/* Hallmark · genre: modern-minimal (technical) · macrostructure: Narrative ledger (bespoke) · theme: custom "Analysis Sheet"
 * signature: analysis-pad ruling + red margin rule · reconciliation ticks · double-underlined totals
 * pre-emit critique: P5 H4 E4 S5 R4 V5
 */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.94; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--space-md); }
strong { font-weight: 600; }

.fig { font-family: var(--font-figures); font-weight: 500; letter-spacing: -0.01em; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-style: double; text-decoration-thickness: var(--rule-hair); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: var(--color-ruling); color: var(--color-ink); }

.total {
  text-decoration: underline double var(--color-accent);
  text-decoration-thickness: max(2px, 0.045em);
  text-underline-offset: 0.11em;
  text-decoration-skip-ink: none;
}

.skip {
  position: absolute; left: var(--space-md); top: var(--space-md); z-index: 10;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-ink); color: var(--color-paper);
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

.wrap { width: min(100% - 2 * var(--page-gutter), var(--page-max)); margin-inline: auto; }

/* Bar nav */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-xl);
  padding: var(--space-md) var(--page-gutter);
  border-bottom: var(--rule-mid) solid var(--color-ink);
  background: var(--color-paper);
}
.logo { display: block; height: 100%; width: auto; overflow: visible; }
.logo__bars, .logo__name { fill: var(--color-slate); }
.logo__tick { fill: var(--color-accent); }
.bar__brand { display: block; height: 2.25rem; text-decoration: none; }
.bar__nav { margin-left: auto; }
.bar__nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); list-style: none; margin: 0; padding: 0; }
.bar__nav a {
  display: inline-block;
  padding-block: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: var(--rule-mid) solid transparent;
  transition: border-color var(--dur-micro) var(--ease-out);
}
.bar__nav a:hover { border-bottom-color: var(--color-rule); }
.bar__nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.bar__phone {
  font-family: var(--font-figures);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-ink);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.bar__phone:hover { background: var(--color-ink); color: var(--color-paper); }

/* The analysis sheet: ruled pad with a red double margin rule */
.sheet {
  background-color: var(--color-sheet);
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--ruling-step) - 1px), var(--color-ruling) calc(var(--ruling-step) - 1px) var(--ruling-step));
  border-bottom: var(--rule-mid) solid var(--color-ink);
}
.sheet__inner { position: relative; }
.sheet__inner::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: calc(-1 * min(var(--page-gutter), var(--space-lg)) + 2px);
  width: 4px;
  border-inline: var(--rule-hair) solid var(--color-accent);
}

/* Hero */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-2xl) clamp(var(--space-xl), 5vw, var(--space-3xl));
  align-items: end;
  padding-block: var(--space-3xl) var(--space-2xl);
}
.hero__text { display: grid; gap: var(--space-xl); }
.hero h1 { max-width: 9ch; }
.lede { font-size: var(--text-md); line-height: 1.5; max-width: 44ch; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); }
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--color-accent);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--color-accent); text-decoration: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--color-accent); }
.fig-link { font-family: var(--font-figures); font-size: var(--text-sm); white-space: nowrap; }

/* Ledger with reconciliation ticks */
.ledger {
  background: var(--color-paper);
  border: var(--rule-mid) solid var(--color-ink);
  box-shadow: 8px 8px 0 var(--color-ink);
}
.ledger__title {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-figures);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ledger ol { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 1.5rem;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-ruling);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.ledger li .fig { color: var(--color-muted); font-size: var(--text-xs); }
.ledger__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  margin-top: 2px;
  padding: var(--space-sm) var(--space-md);
  border-top: var(--rule-hair) solid var(--color-ink);
  font-size: var(--text-sm);
}
.ledger__total .fig {
  font-size: var(--text-lg);
  font-weight: 700;
  text-decoration: underline double var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.tick { width: 1.4rem; height: 1.4rem; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tick__base { stroke: var(--color-ruling); }
.tick__ink { stroke: var(--color-accent); stroke-dasharray: 1; stroke-dashoffset: 1; }
.ledger .tick__base { stroke: transparent; }
.ledger .tick__ink { animation: draw var(--dur-long) var(--ease-out) forwards; }
.ledger li:nth-child(1) .tick__ink { animation-delay: 500ms; }
.ledger li:nth-child(2) .tick__ink { animation-delay: 680ms; }
.ledger li:nth-child(3) .tick__ink { animation-delay: 860ms; }
.ledger li:nth-child(4) .tick__ink { animation-delay: 1040ms; }
.ledger li:nth-child(5) .tick__ink { animation-delay: 1220ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Slate band: the schedule of services */
.band { background: var(--color-slate); color: var(--color-on-slate); padding-block: var(--space-3xl); }
.band a { text-decoration-color: var(--color-accent-bright); }
.band :focus-visible { outline-color: var(--color-accent-bright); }
.band__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-lg) var(--space-2xl);
  align-items: end;
  margin-bottom: var(--space-2xl);
}
.band__head h2 { max-width: 20ch; }
.band__head p { color: var(--color-on-slate-muted); }
.band__foot { margin-top: var(--space-xl); }

.schedule { list-style: none; margin: 0; padding: 0; border-top: var(--rule-mid) solid var(--color-on-slate); }
.schedule a {
  display: grid;
  grid-template-columns: 3rem minmax(0, 5fr) minmax(0, 6fr) 1.75rem;
  gap: var(--space-md) var(--space-lg);
  align-items: baseline;
  padding-block: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-slate-rule);
  text-decoration: none;
  transition: background-color var(--dur-short) var(--ease-out);
}
.schedule a:hover { background: var(--color-slate-2); }
.schedule .fig { color: var(--color-accent-bright); font-size: var(--text-sm); padding-left: var(--space-xs); }
.schedule__name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: -0.03em; line-height: 1.05; }
.schedule__what { color: var(--color-on-slate-muted); }
.schedule .tick { align-self: center; }
.schedule .tick__base { stroke: var(--color-slate-rule); }
.schedule .tick__ink { stroke: var(--color-accent-bright); transition: stroke-dashoffset var(--dur-long) var(--ease-out); }
.schedule a:hover .tick__ink, .schedule a:focus-visible .tick__ink { stroke-dashoffset: 0; }

/* Split: text + specimen letter */
.split {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-2xl) clamp(var(--space-xl), 6vw, var(--space-4xl));
  align-items: center;
  padding-block: var(--space-4xl) var(--space-3xl);
}
.split__text { display: grid; gap: var(--space-md); }
.split__text h2 { margin-bottom: var(--space-sm); }
.split__text p { max-width: 52ch; }

.letter {
  position: relative;
  margin: 0;
  padding: var(--space-xl) var(--space-xl) var(--space-lg) calc(var(--space-xl) + var(--space-sm));
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule);
  box-shadow: 0 1px 2px oklch(20% 0.028 255 / 0.06);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.letter::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: var(--space-md);
  width: 4px;
  border-inline: var(--rule-hair) solid var(--color-accent);
}
.letter__head .logo { height: 1.75rem; }
.letter__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.letter figcaption {
  margin-top: var(--space-lg);
  padding-top: var(--space-xs);
  border-top: var(--rule-hair) dashed var(--color-rule);
  font-family: var(--font-figures);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* Origins: one column per office, keyed by founding year */
.origins { padding-block: var(--space-2xl) var(--space-4xl); }
.origins h2 { max-width: 22ch; margin-bottom: var(--space-2xl); }
.origins__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--rule-mid) solid var(--color-ink);
}
.origin {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
}
.origin + .origin { padding-left: var(--space-lg); border-left: var(--rule-hair) solid var(--color-rule); }
.origin__year { font-size: clamp(2.5rem, 4vw + 1rem, 4rem); font-weight: 300; letter-spacing: -0.06em; line-height: 1; color: var(--color-accent); }
.origin p:not(.origin__year) { color: var(--color-muted); }
.origin a { justify-self: start; font-weight: 600; margin-top: var(--space-xs); }

/* Quote on the sheet */
.quote-band { border-top: var(--rule-mid) solid var(--color-ink); }
.quote { margin: 0; padding-block: var(--space-3xl); display: grid; gap: var(--space-lg); }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw + 1rem, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 24ch;
}
.quote blockquote p::before { content: "“"; color: var(--color-accent); }
.quote blockquote p::after { content: "”"; color: var(--color-accent); }
.quote figcaption { font-size: var(--text-sm); color: var(--color-muted); }

.cta { display: grid; gap: var(--space-xl); justify-items: start; padding-block: var(--space-3xl) var(--space-4xl); }
.cta h2 { max-width: 22ch; }

/* Inner pages */
.page-head .sheet__inner { display: grid; gap: var(--space-lg); padding-block: var(--space-3xl) var(--space-2xl); }
.page-head h1 { font-size: var(--text-display-s); max-width: 16ch; line-height: 0.98; }

.section { padding-block: var(--space-2xl); }
.section + .section { border-top: var(--rule-hair) solid var(--color-rule); }
.section--split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-lg) clamp(var(--space-xl), 6vw, var(--space-3xl));
}
.section--split > h2 { font-size: var(--text-xl); max-width: 14ch; }
.section__body { display: grid; gap: var(--space-md); align-content: start; max-width: var(--measure); }
.section__body p + p { margin-top: 0; }
.section__body ul { list-style: none; margin: 0; padding: 0; border-top: var(--rule-hair) solid var(--color-ink); }
.section__body li {
  position: relative;
  padding: var(--space-xs) 0 var(--space-xs) 1.6rem;
  border-bottom: var(--rule-hair) solid var(--color-ruling);
}
.section__body li::before, .prose li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }
.small { font-size: var(--text-sm); }
.muted { color: var(--color-muted); }

/* Long document: history, privacy, 404 */
.prose { max-width: var(--measure); padding-block: var(--space-2xl) var(--space-3xl); }
.prose p { line-height: 1.7; }
.prose .year { margin: var(--space-2xl) 0 var(--space-2xs); color: var(--color-accent); font-size: var(--text-sm); }
.prose h2 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.prose ul { list-style: none; padding: 0; margin: var(--space-md) 0 0; display: grid; gap: var(--space-xs); }
.prose li { position: relative; padding-left: 1.6rem; }
.prose .pull {
  margin: var(--space-xl) 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-slate);
  color: var(--color-on-slate);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.prose .prose__next { margin-top: var(--space-xl); }

/* People */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-2xl) var(--space-xl); }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs) var(--space-lg); align-items: start; padding-top: var(--space-md); border-top: var(--rule-mid) solid var(--color-ink); }
.mark {
  display: inline-grid;
  place-items: center;
  width: 4.5rem;
  aspect-ratio: 1;
  grid-row: span 3;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.05em;
  box-shadow: inset -4px 0 0 var(--color-accent);
}
.person h2 { font-size: var(--text-lg); }
.person__role { font-family: var(--font-figures); font-size: var(--text-xs); color: var(--color-muted); line-height: 1.5; }
.person p + p { margin-top: 0; }
.person p:last-child { grid-column: 2; }

/* Case notes */
.notes { display: grid; }
.note { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-lg) clamp(var(--space-xl), 6vw, var(--space-3xl)); padding-block: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.note h2 { font-size: var(--text-xl); }
.note__meta { margin-top: var(--space-sm); font-family: var(--font-figures); font-size: var(--text-xs); color: var(--color-muted); }

/* Offices (contact) and closing bands on inner pages */
.offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-xl); }
.office { display: grid; gap: var(--space-2xs); align-content: start; padding-top: var(--space-sm); border-top: var(--rule-mid) solid var(--color-ink); }
.office .h3 { font-size: var(--text-xl); margin-bottom: var(--space-xs); }
.office a { white-space: nowrap; justify-self: start; }
.office a[href^="tel"] { font-family: var(--font-figures); font-weight: 600; }

.cta-band { display: grid; gap: var(--space-lg); justify-items: start; padding-block: var(--space-2xl) var(--space-3xl); border-top: var(--rule-mid) solid var(--color-ink); }
.cta-band h2 { max-width: 20ch; }
.chip { display: inline-block; padding: var(--space-sm) var(--space-lg); background: var(--color-ink); color: var(--color-paper); font-weight: 600; font-size: var(--text-sm); text-decoration: none; white-space: nowrap; box-shadow: 4px 4px 0 var(--color-accent); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.chip:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--color-accent); }
.chip:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--color-accent); }
.text-link { display: inline-block; font-weight: 600; white-space: nowrap; }

/* Ft5 statement footer */
.foot { background: var(--color-slate); color: var(--color-on-slate); overflow: hidden; }
.foot__inner { width: min(100% - 2 * var(--page-gutter), var(--page-max)); margin-inline: auto; padding-top: var(--space-3xl); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
.foot a { text-decoration-color: var(--color-accent-bright); }
.foot :focus-visible { outline-color: var(--color-accent-bright); }
.foot__statement { font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.035em; max-width: 22ch; }
.foot__offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-lg); }
.foot__offices > div { display: grid; gap: var(--space-2xs); align-content: start; padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-slate-rule); }
.foot__offices h2 { font-size: var(--text-md); letter-spacing: -0.02em; }
.foot__offices p { color: var(--color-on-slate-muted); font-size: var(--text-sm); }
.foot__offices a { justify-self: start; white-space: nowrap; font-weight: 600; }
.foot__small { font-size: var(--text-xs); color: var(--color-on-slate-muted); line-height: 1.8; }
.foot__small a { white-space: nowrap; }
.foot__logo { display: block; width: min(100%, 15rem); padding-bottom: var(--space-3xl); text-decoration: none; }
.foot__logo .logo { height: auto; width: 100%; }
.foot .logo__bars, .foot .logo__name { fill: var(--color-on-slate); }
.foot .logo__tick { fill: var(--color-accent-bright); }

@media (max-width: 60rem) {
  .hero__grid, .split, .band__head, .section--split, .note { grid-template-columns: minmax(0, 1fr); }
  .hero__grid { padding-block: var(--space-2xl); align-items: start; }
  .split { padding-block: var(--space-3xl) var(--space-2xl); }
  .schedule a { grid-template-columns: 2.25rem minmax(0, 1fr) 1.75rem; }
  .schedule__what { grid-column: 2; grid-row: 2; }
  .schedule .tick { grid-column: 3; grid-row: 1; }
  .origins__grid { grid-template-columns: minmax(0, 1fr); }
  .origin, .origin + .origin { padding: var(--space-lg) 0; border-left: 0; }
  .origin + .origin { border-top: var(--rule-hair) solid var(--color-rule); }
  .bar__nav { margin-left: 0; order: 3; flex-basis: 100%; }
  .bar__phone { margin-left: auto; }
}

@media (max-width: 30rem) {
  .bar__nav ul { gap: 0 var(--space-md); }
  .bar { column-gap: var(--space-md); }
  .bar__brand { height: 1.75rem; }
  .bar__phone { font-size: var(--text-xs); padding: var(--space-sm) var(--space-xs); }
  .ledger { box-shadow: 5px 5px 0 var(--color-ink); }
  .ledger li { grid-template-columns: 1.75rem minmax(0, 1fr) 1.4rem; padding-inline: var(--space-sm); }
  .mark { width: 3.5rem; font-size: var(--text-lg); grid-row: span 2; }
  .person p:last-child { grid-column: 1 / -1; }
  .letter { padding-inline: var(--space-lg) var(--space-md); padding-left: calc(var(--space-lg) + var(--space-sm)); }
  .letter::before { left: var(--space-xs); }
}

@media (max-width: 22.5rem) {
  .bar { column-gap: var(--space-sm); }
  .bar__brand { height: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 150ms !important; animation-delay: 0ms !important; transition-duration: 150ms !important; }
  .btn:hover, .chip:hover, .btn:active, .chip:active { transform: none; }
}

@media print {
  .bar__nav, .skip, .cta, .cta-band { display: none; }
  .sheet, .band, .foot { background: none; color: inherit; }
}
