/* Lucia marketing site · page sections (home) */

/* .skip lives in base.css (shared by every page) */

/* ---------- section rhythm · SITE-PLAN P0-2 ----------
   Narrative-heavy segments (costs, desks) run tighter;
   climax segments (AI, portal) breathe wider. */
section { padding: var(--section) 0; }
section.costs-section  { padding: clamp(56px, 5vw + 32px, 112px) 0; }
section.desks          { padding: clamp(56px, 5vw + 32px, 112px) 0; }
section.ai             { padding: clamp(80px, 7vw + 48px, 160px) 0; }
section.cta            { padding: clamp(80px, 7vw + 48px, 160px) 0; }

.dark { background: var(--ink); color: var(--paper); }
.elevated { background: var(--cream-2); border-top: 1px solid var(--line); }

/* ---------- hero · the ledger page ---------- */
.hero { position: relative; padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(56px, 6vw, 96px); overflow: hidden; background: var(--cream); }
/* P0-1: ledger texture — opacity from .055 to .09, mask to 70% */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 35px, rgba(25, 25, 24, 0.09) 35px 36px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.6) 70%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.6) 70%, transparent 96%);
}
/* P0-4: gold margin line — 2px, opacity .85 */
.hero::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); opacity: .85; pointer-events: none;
  left: calc(max(var(--gutter), (100% - var(--container)) / 2) - 28px);
}
/* Continue gold margin line into the book segment */
.book { position: relative; }
.book::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); opacity: .55; pointer-events: none;
  left: -28px;
}
.hero > .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero-copy h1 { font-family: var(--serif); font-size: clamp(2.4rem, 0.8rem + 3.2vw, 3.75rem); line-height: 1.04; letter-spacing: -0.015em; margin-top: 22px; text-wrap: balance; }
.hero-copy h1 br { display: inline; }
@media (max-width: 560px) { .hero-copy h1 br { display: none; } }

/* ---------- hero scene · the loan file writes itself (markup = finished frame; js/hero-scene.js animates) ---------- */
.scene { position: relative; margin: 0; }
.scene .label { font-size: 12px; }
.sheet { position: relative; background: var(--cream); border: 1px solid var(--line-strong); border-radius: 6px; padding: 14px 18px 16px; }
.sheet::before { content: ""; position: absolute; inset: 8px -8px -8px 8px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; z-index: -1; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.sheet-head .label:first-child { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .label:last-child { flex: none; }
.sc-intake { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.sc-intake .label:first-child { color: var(--gold-ink); }
.sc-docs { display: grid; gap: 4px; margin: 6px -2px 0; padding: 0 2px; overflow: hidden; }
.sc-doc { position: relative; overflow: hidden; display: grid; grid-template-columns: 12px 1fr auto 14px; gap: 10px; align-items: center; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--cream); font-size: 12px; line-height: 1.3; color: var(--ink); white-space: nowrap; }
.sc-doc small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sc-icon { width: 11px; height: 14px; border: 1px solid var(--ink); border-radius: 1px; position: relative; }
.sc-icon::before, .sc-icon::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 1px; background: var(--ink); }
.sc-icon::after { top: 7px; }
/* P1 scan line — 2px with glow */
.sc-doc .sc-scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); box-shadow: 0 2px 8px rgba(252, 170, 45, 0.4); opacity: 0; }
.sc-doc .sc-read { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ok); text-align: right; }
/* Gold cause-flow bridge between docs and score */
.sc-flow { position: absolute; left: 50%; width: 2px; background: var(--gold); transform: translateX(-50%); pointer-events: none; opacity: 0; z-index: 2; }
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.score { display: flex; gap: 10px; align-items: center; }
.dial { width: 36px; height: 36px; transform: rotate(-90deg); flex: none; }
.dial .track { fill: none; stroke: var(--cream-3); stroke-width: 4; }
.dial .arc { fill: none; stroke: var(--ok); stroke-width: 4; }
.score .num { display: block; font-size: 20px; font-weight: 500; line-height: 1; margin-top: 3px; }
.health { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cov-mini { margin-top: 12px; font-size: 12px; }
.cov-mini .row { display: grid; grid-template-columns: 1.5fr 1fr 0.9fr 0.9fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); white-space: nowrap; color: var(--ink-2); }
.cov-mini .row span:first-child { font-family: var(--sans); color: var(--ink); }
.cov-mini .row.h { padding: 0 0 6px; border-bottom: 1px solid var(--line-strong); }
.cov-mini .row.h span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.cov-mini .chip { font-size: 12px; padding: 1px 7px; }
.stmt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 8px; font-size: 12px; font-family: var(--mono); color: var(--ink-2); white-space: nowrap; }
.stmt-row .st-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stmt-row b { color: var(--ink); font-weight: 500; }
.stamp { flex: none; display: inline-block; padding: 3px 8px; background: var(--gold); color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 2px; transform: rotate(-6deg); }
/* P1 double underline — 8px container, 5px gap */
.rule-draw { position: relative; height: 8px; margin-top: 10px; }
.rule-draw i { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; }
.rule-draw i:nth-child(2) { top: 5px; }
/* P1 pen — 24x6, rounded end, subtle shadow */
.pen { position: absolute; left: 0; top: 0; width: 24px; height: 6px; border-radius: 0 2px 2px 0; background: var(--gold); box-shadow: 0 1px 3px rgba(252, 170, 45, 0.3); opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-grid > * { min-width: 0; } .scene { max-width: 560px; margin-top: 40px; } .book::before { display: none; } }
@media (max-width: 560px) { .sc-docs { grid-template-columns: 1fr; } .cov-mini .row { grid-template-columns: 1.4fr 1fr 0.9fr auto; } .cov-mini .row span:nth-child(4) { display: none; } .stmt-row .st-w { white-space: normal; } }
.hero-copy .lede { margin-top: 26px; font-size: var(--text-lede); color: var(--ink-2); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* three seals · one row, same left edge as the headline */
/* P0-3: seal border softened to --line-strong */
.seals-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(36px, 4vw, 56px); }
.seals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; flex: 1 1 0%; min-width: 0; }
.seals li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 3px; background: color-mix(in srgb, var(--cream) 80%, transparent); font-size: var(--text-small); color: var(--ink-2); }
.seals .seal-mark { font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.1em; color: var(--gold-ink); padding: 4px 8px; border: 1px solid var(--gold); border-radius: 2px; background: var(--gold-wash); }
.seals-link { flex: none; }
@media (max-width: 860px) { .seals { grid-template-columns: 1fr; } .seals-row { flex-direction: column; align-items: stretch; } .seals-link { align-self: flex-end; } }

/* the loan book · frameless, so every label shares the headline's left edge */
.book { margin: clamp(40px, 5vw, 72px) 0 0; background: var(--cream); }
.book-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-bottom: 14px; }
/* P2: tiles equal width via column-gap + border-left */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 20px; border-top: 1px solid var(--ink); }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 22px 0 24px; min-width: 0; }
.tile + .tile { border-left: 1px solid var(--line); padding-left: 20px; }
.tile .label { min-height: 2.8em; }
.tile .big { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 500; line-height: 1; letter-spacing: -0.01em; }
.tile-sub { font-size: 0.875rem; color: var(--muted); line-height: 1.45; }
.tile-sub b { color: var(--ink); font-weight: 500; }
.tile-sub .up { color: var(--ok); }
.tile-sub .down { color: var(--risk); }
.book-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0 14px; margin-top: 4px; }
.book-foot .num { font-size: 1.05rem; font-weight: 500; }
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile + .tile { border-left: 1px solid var(--line); padding-left: 20px; }
  .tile:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .tile:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) { .hero-copy h1 { max-width: none; } }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile + .tile { border-left: 1px solid var(--line); padding-left: 20px; }
  .tile:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tile .label { min-height: 2.4em; }
}

/* ---------- statement · lit by scroll, readable at rest ---------- */
.statement { padding: var(--section) 0; }
.statement .label { margin-bottom: 28px; }
.statement .st { font-family: var(--serif); font-size: clamp(1.7rem, 1.1rem + 2.4vw, 3.1rem); line-height: 1.2; letter-spacing: -0.01em; max-width: 30ch; color: var(--muted); text-wrap: pretty; }
.statement .st-w { transition: color 380ms ease; }
.statement .st-w.lit { color: var(--ink); }
.statement em { font-style: italic; }
.statement em .st-w.lit { color: var(--gold-ink); }

/* ---------- status quo · a ledger of costs ---------- */
/* P1-1: tighter cost grid, capped width */
.costs { margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--ink); max-width: 960px; }
.cost { display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 52ch); gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cost .amt { font-family: var(--mono); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.cost .amt small { font-size: 0.45em; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.cost .what { color: var(--ink-2); max-width: 52ch; }
.cost .what b { color: var(--ink); font-weight: 500; }
.costs-total { display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 52ch); gap: 24px; align-items: baseline; padding: 18px 0 20px; }
.costs-total .amt { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; }
.costs-total p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 600px) { .cost, .costs-total { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- desks ---------- */
.desks .head { margin-bottom: clamp(32px, 4vw, 56px); }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line-strong); align-items: start; }
.desk:last-of-type { border-bottom: 1px solid var(--line-strong); }
.desk.flip .desk-ex { order: -1; }
/* P1-6: Reduce height gap between copy and exhibit */
.desk-copy { padding-top: 19px; }
.desk-copy .caps li { padding: 9px 0; }
.desk-copy .thesis { max-width: 40ch; }
.desk-num { color: var(--gold-ink); }
.desk h3 { font-family: var(--serif); font-size: var(--text-h3); line-height: 1.1; margin-top: 12px; }
.desk .thesis { margin-top: 12px; font-size: var(--text-lede); color: var(--ink-2); max-width: 44ch; }
.caps { margin-top: 26px; border-top: 1px solid var(--line-strong); }
.caps li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: var(--text-small); color: var(--ink-2); }
.caps li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; background: var(--gold); border-radius: 1px; }
.caps li b { color: var(--ink); font-weight: 500; }
.desk .textlink { margin-top: 22px; }
.ex { background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px 20px; }
.ex-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: nowrap; margin-bottom: 12px; }
.ex-head .label:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-head .label:last-child { flex: none; }
.doc { background: var(--cream); border: 1px solid var(--line-strong); border-radius: 4px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(25, 25, 24, 0.04); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.doc-head .name { font-weight: 600; font-size: 1.0625rem; }
.doc-head .sub { color: var(--muted); font-size: 0.875rem; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 12px 0 0; font-size: var(--text-small); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kv dd b { font-weight: 500; }
.doc .split { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 10px 0 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.doc .split span { display: block; font-family: var(--mono); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.doc .split small { display: block; font-family: var(--sans); color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.bar { height: 6px; border-radius: 2px; background: var(--cream-3); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .ok { background: var(--ok); } .bar .watch { background: var(--watch); } .bar .risk { background: var(--risk); } .bar .goldbar { background: var(--gold); }
.screen { margin-top: 14px; }
.screen .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.875rem; color: var(--muted); margin-bottom: 8px; }
.screen .row b { color: var(--ink); font-weight: 500; }
.flag { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 3px; font-size: 0.875rem; color: var(--ink-2); }
.flag .chip { margin-top: 1px; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.doc-foot b { color: var(--ink); font-weight: 500; }

.cov-wrap { overflow-x: auto; }
table.cov { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 0.875rem; }
.cov th { text-align: left; font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 8px 8px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.cov td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cov td:first-child { font-weight: 500; }
.cov .n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov th.r, .cov td.r { text-align: right; padding-right: 0; }
.cov .tight { color: #7a5806; }
@media (max-width: 900px) { .desk { grid-template-columns: minmax(0, 1fr); } .desk > * { min-width: 0; } .desk.flip .desk-ex { order: 0; } .desk-copy { padding-top: 0; } }

/* ---------- matrix ---------- */
.chart { background: var(--cream); border: 1px solid var(--line-strong); border-radius: 6px; padding: 22px 24px 18px; margin-top: clamp(28px, 4vw, 48px); }
.chart-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: start; }
.chart-head h3 { font-size: 1.125rem; font-weight: 600; }
.chart-head .sub { color: var(--muted); font-size: var(--text-small); margin-top: 2px; }
.readout { text-align: right; }
.readout .big { font-family: var(--mono); font-size: 1.5rem; font-weight: 500; line-height: 1.1; }
.readout .sub { font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.chart-wrap { position: relative; margin-top: 16px; overflow-x: auto; }
.chart svg { width: 100%; min-width: 1000px; height: auto; font-family: var(--mono); } /* keeps SVG text at ≥ 12px; narrower viewports scroll the plot */
.chart .axis { stroke: var(--ink); stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .policy { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 7; opacity: .55; }
.chart .tick { fill: var(--muted); font-size: 12px; }
.chart .axis-label { fill: var(--ink-2); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.chart .qlabel { fill: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.chart .qlabel.ok { fill: var(--ok); } .chart .qlabel.risk { fill: var(--risk); }
.chart .bubble { stroke: var(--cream); stroke-width: 1.5; opacity: .92; cursor: pointer; transition: opacity 160ms; }
.chart .bubble.ok { fill: var(--ok); } .chart .bubble.watch { fill: var(--watch); } .chart .bubble.risk { fill: var(--risk); }
.chart .bubble:hover, .chart .bubble:focus-visible { stroke: var(--ink); outline: none; }
.chart.has-hover .bubble:not(.hot) { opacity: .35; }
.chart .blabel { fill: var(--ink-2); font-size: 12px; pointer-events: none; }
.chart .band { opacity: .9; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 200px; max-width: 260px; background: var(--ink); color: var(--paper); border-radius: 4px; padding: 12px 14px; font-size: 0.875rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(25, 25, 24, 0.18); }
.tip[hidden] { display: none; }
.tip .t-name { font-weight: 600; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tip .t-rows { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-family: var(--mono); font-size: 12px; }
.tip .t-rows span:nth-child(odd) { color: var(--paper-2); font-family: var(--sans); }
.tip .t-rows span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.tip .gap { color: var(--gold); }
/* P1-4: quad subtitles 13px, reduced letter-spacing */
.quads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); margin-top: 8px; }
.quad { padding: 14px 16px 6px 0; border-right: 1px solid var(--line); min-width: 0; }
.quad + .quad { padding-left: 16px; }
.quad:last-child { border-right: 0; padding-right: 0; }
.quad .qn { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--text-small); }
.quad .qs { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--muted); margin-top: 4px; }
.quad .qv { font-family: var(--mono); font-size: 0.875rem; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
.dot-ink { background: var(--ink-2); }
.chart-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 800px) {
  .quads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quad:nth-child(2n) { border-right: 0; padding-right: 0; }
  .quad:nth-child(2n+1) { padding-left: 0; }
  .quad:nth-child(n+3) { border-top: 1px solid var(--line); }
  .chart-head { grid-template-columns: 1fr; } .readout { text-align: left; } .chart { padding: 16px; }
  .chart-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) { .legend { flex-direction: column; gap: 8px; } }

/* ---------- lucia ai (dark) ---------- */
.ai .head h2 { color: var(--paper); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); margin-top: clamp(32px, 4vw, 56px); align-items: start; }
.chat { background: var(--ink-elevated); color: var(--paper); border: 1px solid var(--paper-line); border-radius: 8px; padding: 26px 28px; } /* color set here so the panel reads on cream sections too (sub-pages) */
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.msg + .msg { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--paper-line); }
.msg .who { font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-2); margin-bottom: 8px; }
.msg .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--paper); border: 1px solid var(--paper-line); }
.msg .avatar svg { width: 28px; height: 28px; }
.msg p { font-size: var(--text-body); line-height: 1.6; }
.msg p b { font-weight: 600; }
.cite { font-family: var(--mono); font-size: 12px; color: var(--gold); vertical-align: super; line-height: 0; margin-left: 2px; }
.sources { margin-top: 16px; display: grid; gap: 6px; }
.sources li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--paper-2); }
.sources li span:first-child { color: var(--gold); }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.prompts span { display: inline-block; border: 1px solid var(--paper-line); border-radius: 999px; padding: 8px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--paper); }
.ask { margin-top: 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border: 1px solid var(--paper-line); border-radius: 999px; color: var(--paper-2); font-size: var(--text-small); }
.ask .send { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: var(--ink); font-weight: 600; }
.ai-cols { display: grid; gap: 22px; }
.ai-col { padding-top: 16px; border-top: 1px solid var(--paper-line); }
.ai-col:first-child { padding-top: 26px; }
.ai-col h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.ai-col p { margin-top: 8px; color: var(--paper-2); font-size: var(--text-small); max-width: 40ch; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } .chat { padding: 20px; } }

/* ---------- audiences ---------- */
.aud { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); border-top: 1px solid var(--ink); }
.aud > div { display: grid; grid-template-rows: subgrid; grid-row: span 6; align-content: start; padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 48px) 0; }
.aud > div + div { border-left: 1px solid var(--line-strong); padding-left: clamp(20px, 4vw, 56px); padding-right: 0; }
.aud h3 { font-family: var(--serif); font-size: var(--text-h3); line-height: 1.1; margin-top: 12px; }
.aud .lead { margin-top: 12px; color: var(--ink-2); max-width: 40ch; }
.aud .caps { margin-top: 20px; align-self: start; }
/* a small piece of the real record anchors each column (Aaron: no pure text walls) */
.aud-ex { margin-top: 22px; align-self: start; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--cream); padding: 2px 14px; }
.aud-ex-row { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.875rem; color: var(--ink-2); }
.aud-ex-row:last-child { border-bottom: 0; }
.aud-ex-row .label { font-size: var(--text-label); }
@media (max-width: 500px) { .aud-ex-row { grid-template-columns: 1fr; gap: 2px; } }
.aud .textlink { margin-top: 22px; align-self: start; justify-self: start; }
@media (max-width: 860px) { .aud { grid-template-columns: 1fr; grid-template-rows: none; } .aud > div { display: block; padding-right: 0; } .aud > div + div { border-left: 0; border-top: 1px solid var(--line-strong); padding-left: 0; } }

/* ---------- servicing ---------- */
/* P2-2: ticker separators as 6px gold squares, padding 16px */
.ticker { overflow: hidden; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 16px 0; margin-bottom: clamp(32px, 4vw, 56px); }
.ticker-track { display: flex; width: max-content; gap: 0; animation: marquee 32s linear infinite; }
.ticker-track span { font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); white-space: nowrap; padding-right: 40px; }
.ticker-track span::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--gold); border-radius: 1px; margin-left: 40px; vertical-align: middle; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.stmts-wrap { overflow-x: auto; margin-top: clamp(32px, 4vw, 56px); }
table.stmts { width: 100%; min-width: 760px; border-collapse: collapse; font-size: var(--text-small); }
.stmts th { text-align: left; font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 12px 10px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.stmts td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stmts td:first-child { font-weight: 500; }
.stmts .n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmts th.r, .stmts td.r { text-align: right; }
.stmts th:nth-child(6), .stmts td:nth-child(6) { padding-left: 28px; }
.stmts td .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--sans); }
.stmts tfoot td { padding: 12px 12px 12px 0; font-weight: 500; }
.stmts tfoot .label { display: inline; }

/* ---------- how it works ---------- */
/* P1-3: step numbers 20px/500 gold, unified top line */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: clamp(32px, 4vw, 56px); }
.step { border-top: 1px solid var(--ink); padding-top: 18px; }
.step .label { color: var(--gold-ink); font-size: 20px; font-weight: 500; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.step h3 { font-family: var(--serif); font-size: var(--text-h3); margin-top: 10px; line-height: 1.1; }
.step p { margin-top: 10px; color: var(--ink-2); max-width: 36ch; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- inputs ---------- */
.inputs { padding: clamp(36px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.inputs-row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 20px 40px; align-items: baseline; }
.inputs ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.inputs li { font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line-strong); line-height: 1.4; min-width: 0; overflow-wrap: break-word; }
@media (max-width: 900px) { .inputs-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .inputs ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .inputs ul { grid-template-columns: 1fr; } }

/* ---------- cta (dark) ---------- */
.cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
/* P1-5: cta side vertically centered */
.cta-side { align-self: center; }
.cta h2 { font-family: var(--serif); font-size: var(--text-h2); line-height: 1.06; letter-spacing: -0.012em; max-width: 16ch; margin-top: 18px; }
.cta .cta-lede { margin-top: 20px; color: var(--paper-2); font-size: var(--text-lede); max-width: 40ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-note { margin-top: 18px; font-family: var(--mono); font-size: var(--text-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-2); }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } .cta-side { align-self: auto; } }

/* ---------- book-cap responsive P2 ---------- */
@media (max-width: 768px) {
  .book-cap .label:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- footer three-column at 760px P2 ---------- */
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
