/* Shively Systems site stylesheet. Section numbers refer to docs/BUILD-SPEC.md.
   One light theme, a print block at the end, motion gated behind prefers-reduced-motion and html.js.
   Layout spacing comes from flex and grid gaps; headings and paragraphs carry no margins. */

/* ---------- 2.2 Palette, 2.4 fonts, 2.5 type sizes, 2.6 spacing ---------- */
:root {
  --bg: #F7F8F6;
  --surface: #FFFFFF;
  --text: #16211F;
  --muted: #5A6563;
  --accent: #0B4F6C;
  --accent-hover: #083B51;
  --accent-contrast: #FFFFFF;
  --accent-tint: #E7EDF0;
  --border: #D5DAD6;
  --diff-add-text: #1B5E3B;
  --diff-add-bg: #E6F2EA;
  --diff-del-text: #8A2A2A;
  --diff-del-bg: #F7E6E6;
  --focus: var(--accent);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-display: clamp(2.375rem, 1.6rem + 3.3vw, 3.75rem);
  --text-h1: clamp(2.125rem, 1.5rem + 2.2vw, 3rem);
  --text-h2: clamp(1.875rem, 1.45rem + 1.3vw, 2.5rem);
  --text-h3: 1.25rem;
  --text-lede: 1.0625rem;
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-label: 0.8125rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: 16px;
  --section-pad: var(--s8);
  --panel-pad: 16px;
  --header-h: 64px;
}
@media (min-width: 640px) {
  :root { --text-h3: 1.375rem; --text-lede: 1.25rem; --text-body: 1.125rem; --gutter: 24px; --panel-pad: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --section-pad: var(--s9); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s4)); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, blockquote, fieldset { margin: 0; }
ul, ol { padding-left: 1.25em; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
p { max-width: 68ch; }
strong { font-weight: 600; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 2.5 Type roles ---------- */
h1, h2, .display, .wordmark, .process-word, .footer-name { font-family: var(--font-display); font-weight: 500; font-optical-sizing: auto; letter-spacing: 0; }
h1 { font-size: var(--text-h1); line-height: 1.08; max-width: 22ch; }
h1.display { font-size: var(--text-display); line-height: 1.05; letter-spacing: -0.01em; max-width: 18ch; }
h2 { font-size: var(--text-h2); line-height: 1.12; max-width: 28ch; }
h2::before { content: ""; display: block; width: 48px; height: 2px; background: var(--accent); margin-bottom: var(--s4); }
h2.no-rule::before { display: none; }
/* A lesser H2 for pages whose spec says "H3" straight under the H1 (About working rules, Privacy sections): keeps heading order. */
h2.minor { font-family: var(--font-body); font-weight: 600; font-size: var(--text-h3); line-height: 1.3; max-width: none; }
h2.minor::before { display: none; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-h3); line-height: 1.3; }
h3.label { font-size: var(--text-label); }
.lede { font-size: var(--text-lede); line-height: 1.5; max-width: 60ch; color: var(--text); }
.small { font-size: var(--text-small); line-height: 1.5; color: var(--muted); }
.label, .eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: var(--text-label); line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.label.sentence, .eyebrow.sentence { text-transform: none; letter-spacing: 0.02em; }
.mono, .num, data.price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono { font-size: var(--text-small); line-height: 1.5; }
.ledger-price, .pricing-price { font-family: var(--font-mono); font-weight: 500; font-size: 1.0625rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.big-price, .big-tel { font-family: var(--font-mono); font-weight: 500; font-size: 1.75rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.br-phone { display: inline; }
@media (min-width: 640px) { .br-phone { display: none; } }

/* ---------- Stacks (gap-based vertical rhythm, 2.6) ---------- */
.stack { display: grid; gap: var(--s4); align-content: start; }
.stack-sm { display: grid; gap: var(--s2); align-content: start; }
.stack-lg { display: grid; gap: var(--s6); align-content: start; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.link-row { display: flex; }

/* ---------- 3.6 Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 12px 20px; max-width: 100%;
  border: 1px solid transparent; border-radius: 2px;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: transparent; color: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover, .btn-primary:active { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-contrast); }
.btn-secondary { background: transparent; border-color: var(--text); color: var(--text); }
.btn-secondary:hover, .btn-secondary:active { background: var(--accent-tint); color: var(--text); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--text); border-radius: 2px; color: var(--text); background: transparent; text-decoration: none;
}
.icon-btn:hover { background: var(--accent-tint); }
/* Standalone links keep a 44px hit area through padding, and the matching negative margin keeps the layout tight. */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s2); padding-block: 11px; margin-block: -11px;
  font-weight: 500; color: var(--accent);
}
.link-arrow .icon { flex: none; }

/* ---------- 3.6 Icons ---------- */
.icon { display: inline-block; width: 20px; height: 20px; flex: none; vertical-align: -0.25em; }

/* ---------- 3.1 Container, grid and the signature split ---------- */
.container { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.split { display: grid; gap: var(--s6); }
.split-head { display: grid; gap: var(--s4); align-content: start; }
.split-body { min-width: 0; }
@media (min-width: 1024px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
  .split-head { grid-column: 1 / 5; }
  .split-body { grid-column: 6 / 13; }
}

/* ---------- 3.5 Section rhythm ---------- */
.section { padding-block: var(--section-pad); display: grid; gap: var(--s7); align-content: start; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: var(--s4); align-content: start; }
.section.split { gap: var(--s6); }
@media (min-width: 1024px) { .section.split { gap: var(--s5); } }

/* ---------- 3.2 Header ---------- */
.skip-link {
  position: absolute; top: -200px; left: var(--s4); z-index: 100;
  padding: 12px 20px; background: var(--surface); border: 1px solid var(--text); border-radius: 2px;
  color: var(--text); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: var(--s2); }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header.is-scrolled { box-shadow: 0 1px 2px rgba(22, 33, 31, 0.06); }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; gap: var(--s3); }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px; margin-right: auto;
  font-size: 1.375rem; line-height: 1; color: var(--text); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { text-decoration: none; color: var(--accent); }
.site-nav { display: flex; align-items: center; }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; gap: var(--s5); }
.nav-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  font-weight: 500; font-size: 1rem; color: var(--muted); text-decoration: none;
  text-underline-offset: 8px; text-decoration-thickness: 2px;
}
.nav-list a:hover { color: var(--text); text-decoration: none; }
.nav-list a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.header-cta { display: none; flex-direction: column; align-items: flex-end; flex: none; }
.header-reply { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-label); line-height: 1.4; color: var(--muted); white-space: nowrap; }
.header-phone { display: inline-flex; }
/* The phone-width menu is a <details>, so it opens and closes without JavaScript. */
.nav-menu { display: block; }
.nav-menu-toggle { list-style: none; }
.nav-menu-toggle::-webkit-details-marker { display: none; }
.nav-menu[open] .nav-menu-toggle { background: var(--accent-tint); }
.nav-menu-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--border);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.nav-menu-links { list-style: none; margin: 0; padding: 0 var(--gutter); }
.nav-menu-links li + li { border-top: 1px solid var(--border); }
.nav-menu-links a { display: flex; align-items: center; min-height: 56px; font-weight: 500; font-size: 1.0625rem; color: var(--text); text-decoration: none; }
.nav-menu-links a:hover { color: var(--accent); }
.nav-menu-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-menu-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); padding: var(--s4) var(--gutter); border-top: 1px solid var(--border); }
@media (min-width: 900px) {
  .header-inner { gap: var(--s5); }
  .wordmark { margin-right: 0; }
  .site-nav { margin-inline: auto; }
  .nav-list { display: flex; }
  .nav-menu, .header-phone { display: none; }
  .header-cta { display: flex; }
}
@media (max-width: 1099.98px) { .header-reply { display: none; } }

/* ---------- 3.3 Sticky bottom bar (phones only) ---------- */
.sticky-bar { display: none; }
@media (max-width: 639.98px) {
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  body[data-kind="contact"], body:not(:has(.sticky-bar)) { padding-bottom: 0; }
  .sticky-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sticky-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; font-weight: 500; font-size: 0.9375rem; line-height: 1; color: var(--text); text-decoration: none;
  }
  .sticky-bar a + a { border-left: 1px solid var(--border); }
  .sticky-bar a:hover { background: var(--accent-tint); }
  .sticky-bar .icon { color: var(--accent); }
}

/* ---------- 3.4 Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { padding-block: var(--s7) var(--s6); display: grid; gap: var(--s6); }
.footer-grid { display: grid; gap: var(--s6); }
.footer-col { display: grid; gap: var(--s2); align-content: start; }
.footer-name { font-size: 1.375rem; line-height: 1.2; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; }
.footer-link { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--s5); display: grid; gap: var(--s2); }
.footer-bottom p { max-width: 80ch; }
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: var(--s5); }
  .footer-inner { padding-block: var(--s8) var(--s6); }
}

/* ---------- Panels and hairline line lists (2.8, 5.4) ---------- */
.panel, .notice { background: var(--surface); border: 1px solid var(--border); padding: var(--panel-pad); display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines > li { border-top: 1px solid var(--border); padding: var(--s3) 0; max-width: 68ch; }
.lines > li:last-child { padding-bottom: 0; }
@media (min-width: 1024px) {
  .lines.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); }
  .lines.two-col > li:nth-last-child(2) { padding-bottom: 0; }
}

/* ---------- 3.6 Ledger row with dotted leader ---------- */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger > li { border-top: 1px solid var(--border); }
.ledger > li:last-child { border-bottom: 1px solid var(--border); }
.ledger-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3);
  padding: var(--s3) var(--s2); margin-inline: calc(-1 * var(--s2));
  color: inherit; text-decoration: none;
}
.ledger-row::before { content: ""; display: none; order: 1; flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted var(--border); align-self: flex-end; margin-bottom: 0.45em; }
.ledger-title { order: 0; flex: 0 1 auto; min-width: 0; font-size: 1.0625rem; line-height: 1.5; }
.ledger-price { order: 2; flex: 1 0 100%; text-align: right; }
a.ledger-row:hover { background: var(--accent-tint); }
a.ledger-row:hover .ledger-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
@media (min-width: 640px) {
  .ledger-row { flex-wrap: nowrap; }
  .ledger-row::before { display: block; }
  .ledger-price { flex: none; }
}

/* ---------- 3.6 Hairline table in an overflow wrapper ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.table-hairline { width: 100%; min-width: 540px; border-collapse: collapse; font-size: var(--text-small); line-height: 1.5; }
.table-hairline th, .table-hairline td { text-align: left; vertical-align: top; padding: var(--s3); border-top: 1px solid var(--border); }
.table-hairline thead th { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-label); line-height: 1.4; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-top: 0; }
.table-hairline tbody th { font-weight: 500; }
.table-hairline tbody tr:last-child > * { border-bottom: 1px solid var(--border); }
.table-hairline .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table-hairline .unit { color: var(--muted); }
.table-hairline tr.highlight > * { background: var(--accent-tint); }
.table-hairline tr.highlight > :first-child { border-left: 2px solid var(--accent); }
@media (max-width: 639.98px) { .table-wrap { border: 1px solid var(--border); } }

/* ---------- 3.6 Call-record panel and transcript ---------- */
.call-record { margin: 0; background: var(--surface); border: 1px solid var(--border); padding: var(--panel-pad); display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.call-record-head { padding-bottom: var(--s3); border-bottom: 1px solid var(--border); max-width: none; }
.call-record-foot { padding-top: var(--s3); border-top: 1px solid var(--border); }
.transcript { display: grid; gap: var(--s1); }
.transcript dt { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-label); line-height: 1.4; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: var(--s3); }
.transcript dt:first-child { padding-top: 0; }
.transcript dd { font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; max-width: 68ch; }
.transcript .stop { color: var(--accent); font-weight: 500; }
@media (min-width: 640px) { .transcript dd { font-size: 0.9375rem; } }

/* ---------- 3.6 Diff block ---------- */
.diff { background: var(--surface); border: 1px solid var(--border); padding: var(--s3) 0; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; white-space: normal; overflow: hidden; min-width: 0; }
.diff code { display: block; font: inherit; }
.diff-line { display: grid; grid-template-columns: 2.5ch 1.5ch minmax(0, 1fr); column-gap: 0.5ch; padding: 0 var(--s3); white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .ln { color: var(--muted); text-align: right; user-select: none; }
.diff .sign { text-align: center; }
.diff .add { color: var(--diff-add-text); background: var(--diff-add-bg); }
.diff .del { color: var(--diff-del-text); background: var(--diff-del-bg); }

/* ---------- 3.6 Line drawings and the waveform figure (5.3, 6.1) ---------- */
.drawing { width: 100%; max-width: 240px; color: var(--text); }
.drawing-lg { max-width: 480px; }
.drawing-svg, .waveform-svg { display: block; width: 100%; height: auto; }
.drawing-svg .accent, .waveform-svg .accent { stroke: var(--accent); }
.drawing-svg .accent-fill { fill: var(--accent); stroke: none; }
.drawing-svg .muted, .waveform-svg .muted { stroke: var(--muted); }
.drawing-svg .hatch-line { stroke: var(--muted); stroke-width: 1; }
.drawing-svg .node { fill: var(--bg); }
.drawing-svg text, .waveform-svg text { font-family: var(--font-mono); font-weight: 500; font-size: 12px; fill: var(--muted); stroke: none; letter-spacing: 0; }
.waveform { width: 100%; max-width: 480px; color: var(--text); }

/* ---------- 3.6 Headshot frame ---------- */
.headshot { width: 60%; max-width: 240px; aspect-ratio: 3 / 4; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.headshot img { width: 100%; height: 100%; object-fit: cover; }
.headshot-empty { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-label); line-height: 1.4; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); text-align: center; padding: var(--s3); }
.headshot-lg { max-width: 320px; }
@media (min-width: 640px) { .headshot { width: 100%; } }

/* ---------- 3.6 FAQ ---------- */
.faq { display: grid; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; cursor: pointer; list-style: none; font-weight: 600; font-size: var(--text-h3); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-weight: 400; font-size: var(--text-h3); line-height: 1.3; color: var(--muted); }
.faq details[open] > summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq-body { display: grid; gap: var(--s4); padding: 0 0 var(--s5); max-width: 68ch; }

/* ---------- 5.1 Hero and the price index ---------- */
.hero-grid { display: grid; gap: var(--s6); }
.hero-copy { display: grid; gap: var(--s4); align-content: start; justify-items: start; }
.hero-copy .btn-row { padding-top: var(--s2); }
.price-index { min-width: 0; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
  .hero-copy { grid-column: 1 / 8; }
  .price-index { grid-column: 8 / 13; }
}

/* ---------- 5.2 Situations ---------- */
.situations-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); }
.situation { background: var(--bg); padding: var(--s5) 0; display: grid; gap: var(--s3); align-content: start; justify-items: start; }
@media (min-width: 640px) {
  .situations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .situation { padding: var(--s6) var(--s5); }
  .situation:nth-child(odd) { padding-left: 0; }
  .situation:nth-child(even) { padding-right: 0; }
}

/* ---------- 5.3 Services grid ---------- */
.services-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.service-cell {
  background: var(--bg); padding: var(--s5) 0; min-width: 0;
  display: grid; gap: var(--s4); align-items: start;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-areas: "drawing title" "text text" "foot foot";
}
.service-cell .drawing { grid-area: drawing; }
.service-title { grid-area: title; align-self: center; }
.service-text { grid-area: text; }
.service-foot { grid-area: foot; display: grid; gap: var(--s2); justify-items: start; }
.service-foot .ledger-price { justify-self: end; text-align: right; }
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-cell { padding: var(--s7) var(--s5); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; grid-template-areas: "drawing" "title" "text" "foot"; }
  .service-title { align-self: start; }
  .service-cell:nth-child(odd) { padding-left: 0; }
  .service-cell:nth-child(even) { padding-right: 0; }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-cell { padding: var(--s7); }
  .service-cell:nth-child(odd), .service-cell:nth-child(even) { padding-left: var(--s7); padding-right: var(--s7); }
  .service-cell:nth-child(3n + 1) { padding-left: 0; }
  .service-cell:nth-child(3n) { padding-right: 0; }
}

/* ---------- 5.4 Process columns ---------- */
.process { display: grid; gap: var(--s6); }
.process-step { display: grid; gap: var(--s4); align-content: start; }
.process-word { font-size: 1.75rem; line-height: 1.15; }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }

/* ---------- 5.5 Work samples (two panels) ---------- */
.samples { display: grid; gap: var(--s5); }
.sample { display: grid; gap: var(--s3); min-width: 0; }
.sample-panel .diff { border: 0; padding-inline: 0; }
.sample-panel .diff-line { padding-inline: var(--s2); }
@media (min-width: 1024px) { .samples { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

/* ---------- 5.6 Simulated call section and facts ledger ---------- */
.call-section { display: grid; gap: var(--s6); grid-template-areas: "head" "panel" "aside"; }
.call-section > .split-head { grid-area: head; }
.call-section > .call-panel { grid-area: panel; min-width: 0; }
.call-section > .call-aside { grid-area: aside; display: grid; gap: var(--s5); align-content: start; justify-items: start; }
@media (min-width: 1024px) {
  .call-section { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-areas: "head head head head . panel panel panel panel panel panel panel" "aside aside aside aside . panel panel panel panel panel panel panel"; gap: var(--s6) var(--s5); align-items: start; }
}
.facts { list-style: none; margin: 0; padding: 0; }
.facts > li { display: grid; gap: var(--s1); padding: var(--s3) 0; border-top: 1px solid var(--border); justify-items: start; }
.facts > li:last-child { border-bottom: 1px solid var(--border); }
.facts-sm p { font-size: var(--text-small); line-height: 1.5; }
.source { display: inline-flex; align-items: center; gap: var(--s2); padding-block: 11px; margin-block: -11px; font-size: var(--text-small); line-height: 1.5; color: var(--accent); }
.source .icon { width: 16px; height: 16px; }

/* ---------- 5.7 About strip (and the About page frame) ---------- */
.about-strip { display: grid; gap: var(--s6); }
.about-copy { display: grid; gap: var(--s4); align-content: start; justify-items: start; }
@media (min-width: 1024px) {
  .about-strip { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
  .about-strip > .headshot { grid-column: 1 / 4; }
  .about-strip > .about-copy { grid-column: 5 / 12; }
  .about-strip.about-page > .headshot { grid-column: 1 / 5; }
  .about-strip.about-page > .about-copy { grid-column: 6 / 13; }
}

/* ---------- 5.8 Role ledger, and the 6.x timeline ledger (same two-column rows) ---------- */
.roles, .timeline { display: grid; }
.roles > div, .timeline > div { display: grid; gap: var(--s1) var(--s5); padding: var(--s3) 0; border-top: 1px solid var(--border); }
.roles > div:last-child, .timeline > div:last-child { border-bottom: 1px solid var(--border); }
.roles dt, .timeline dt { font-weight: 500; }
.roles dd, .timeline dd { font-size: var(--text-small); line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .roles > div, .timeline > div { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ---------- 5.9 Contact block ---------- */
.contact-grid { display: grid; gap: var(--s6); }
.contact-main { justify-items: start; }
.contact-promise { font-weight: 500; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: start; } }

/* ---------- 6 Service page hero ---------- */
.page-hero { display: grid; gap: var(--s6); }
.page-hero-copy { display: grid; gap: var(--s4); align-content: start; justify-items: start; }
.page-hero-copy .btn-row { padding-top: var(--s2); }
.page-hero-drawing { min-width: 0; }
.page-hero-drawing .drawing { max-width: 480px; }
@media (min-width: 1024px) {
  .page-hero { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); align-items: center; }
  .page-hero-copy { grid-column: 1 / 8; }
  .page-hero-drawing { grid-column: 8 / 13; }
}

/* ---------- 6 Steps ("What I do"), deliverables ("What you get") ---------- */
.steps { display: grid; gap: var(--s5); }
.step { display: grid; gap: var(--s2); }
.step + .step { border-top: 1px solid var(--border); padding-top: var(--s5); }
.deliverables { list-style: none; margin: 0; padding: 0; }
.deliverables > li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 0; border-top: 1px solid var(--border); max-width: 72ch; }
.deliverables > li:last-child { border-bottom: 1px solid var(--border); }
.deliverables .icon { color: var(--accent); margin-top: 0.2em; }

/* ---------- 6 Pricing ledger (service pages, services index, /pricing/) ---------- */
.pricing-ledger { list-style: none; margin: 0; padding: 0; }
.pricing-row { display: grid; gap: var(--s2) var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--border); align-items: start; }
.pricing-row:last-child { border-bottom: 1px solid var(--border); }
.pricing-what { display: grid; gap: var(--s1); min-width: 0; }
.pricing-title { font-weight: 500; font-size: 1.0625rem; line-height: 1.5; }
.pricing-what p { font-size: var(--text-small); line-height: 1.5; color: var(--muted); }
.pricing-price { white-space: nowrap; }
.pricing-price .unit { display: block; font-family: var(--font-mono); font-weight: 400; font-size: var(--text-small); line-height: 1.5; color: var(--muted); white-space: normal; }
.pricing-ledger.big .pricing-price { font-size: 1.75rem; line-height: 1.2; }
@media (min-width: 640px) {
  .pricing-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pricing-price { text-align: right; }
}

/* ---------- 6 Two call-record panels side by side, closing CTA block, retainer line ---------- */
.call-records { display: grid; gap: var(--s5); }
@media (min-width: 1024px) { .call-records { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.section.cta-block { gap: var(--s5); justify-items: start; }
.retainer-line { font-size: var(--text-small); line-height: 1.5; color: var(--muted); }

/* ---------- 8.3 Contact page: methods list, booking, form ---------- */
.methods { list-style: none; margin: 0; padding: 0; max-width: 560px; }
.methods > li { border-top: 1px solid var(--border); }
.methods > li:last-child { border-bottom: 1px solid var(--border); }
.methods a { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2); margin-inline: calc(-1 * var(--s2)); font-weight: 500; color: var(--text); text-decoration: none; }
.methods a:hover { background: var(--accent-tint); color: var(--accent); }
.methods .icon { color: var(--accent); }
.cal-embed { min-height: 480px; min-width: 0; }
.form { display: grid; gap: var(--s5); max-width: 560px; }
.field { display: grid; gap: var(--s2); }
.field > label, .field > legend { font-weight: 500; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 2px;
  background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.4;
}
textarea { resize: vertical; min-height: 120px; }
input[type="text"]:focus-visible, input[type="tel"]:focus-visible, input[type="email"]:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
.radio-row { display: flex; flex-wrap: wrap; gap: var(--s4); }
.radio-row label { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; cursor: pointer; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { font-size: var(--text-small); line-height: 1.5; color: var(--muted); }

/* ---------- Centered pages (/thanks/ and /404.html only) ---------- */
.section.centered { justify-items: center; text-align: center; }
.centered h1, .centered h2, .centered p { margin-inline: auto; }
.centered h2::before { margin-inline: auto; }
.centered .btn-row { justify-content: center; }

/* ---------- 2.10 Motion: only with no motion preference, and only when html.js is present ---------- */
@media (prefers-reduced-motion: no-preference) {
  a, .btn, .ledger-row, .icon-btn, .faq summary { transition: background-color 120ms, color 120ms, text-decoration-thickness 120ms, border-color 120ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  html.js .price-index.rise .ledger > li { animation: rise 320ms cubic-bezier(0.2, 0, 0, 1) both; }
  html.js .price-index.rise .ledger > li:nth-child(2) { animation-delay: 40ms; }
  html.js .price-index.rise .ledger > li:nth-child(3) { animation-delay: 80ms; }
  html.js .price-index.rise .ledger > li:nth-child(4) { animation-delay: 120ms; }
  html.js .price-index.rise .ledger > li:nth-child(5) { animation-delay: 160ms; }
  html.js .price-index.rise .ledger > li:nth-child(6) { animation-delay: 200ms; }
  html.js .call-record.will-reveal .transcript > * { opacity: 0; }
  html.js .call-record.is-revealed .transcript > * { opacity: 1; transition: opacity 220ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 3) { transition-delay: 220ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 5) { transition-delay: 440ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 7) { transition-delay: 660ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 9) { transition-delay: 880ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 11) { transition-delay: 1100ms; }
  html.js .call-record.is-revealed .transcript > :nth-child(n + 13) { transition-delay: 1320ms; }
  html.js svg[data-draw].will-draw .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
  html.js svg[data-draw].is-drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 600ms linear; }
  html.js svg[data-draw].is-drawn .draw-after { transition-duration: 300ms; transition-delay: 600ms; }
}

/* ---------- 2.9 Print ---------- */
@media print {
  :root { --bg: #FFFFFF; --surface: #FFFFFF; --text: #000000; --section-pad: 24px; }
  html { scroll-padding-top: 0; }
  body { padding-bottom: 0 !important; }
  .site-header { position: static; box-shadow: none; }
  .skip-link, .site-nav, .header-cta, .header-phone, .sticky-bar, .cal-embed, form, .form, .h-captcha, .waveform, .icon { display: none !important; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.875em; color: #000000; }
  a { color: #000000; }
  .ledger, .ledger > li, .table-wrap, .panel, .call-record, .pricing-row, .faq details, .facts > li, .service-cell, .roles > div, .timeline > div { break-inside: avoid; }
  body[data-kind="pricing"] .section ~ .section h2 { break-before: page; }
  .faq details > *:not(summary) { display: block !important; }
  .faq details::details-content { content-visibility: visible; display: block; }
  .transcript > * { opacity: 1 !important; transition: none !important; }
  .price-index .ledger > li { animation: none !important; opacity: 1 !important; transform: none !important; }
  svg[data-draw] .draw { stroke-dashoffset: 0 !important; }
}
