/* Luminnovate v4. Concept: an audit ledger. Quiet paper and ink; one evidence colour that appears only
   where something is traced to its source. Plex Sans for words, Plex Mono for every figure. */

@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-400-600.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #f6f7f8;
  --surface: #ffffff;
  --ink: #16212c;
  --ink-2: #46535f;
  --ink-3: #5f6b77;
  --navy: #2c3e50;
  --rule: #d9dee3;
  --rule-2: #e8ecef;
  --evidence: #b5653f;
  --evidence-text: #95502f;
  --evidence-soft: #f3e3d9;
  --ok: #2a7253;
  --ok-soft: #dff0e7;
  --bad: #b23a3a;
  --bad-soft: #f6dede;
  --panel-head: #eef1f4;
  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wide: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11181f; --surface: #182129; --ink: #e9eef2; --ink-2: #b9c3cc; --ink-3: #8b97a2; --navy: #9fb3c6;
    --rule: #2b3640; --rule-2: #222c35; --evidence: #e09a74; --evidence-text: #e09a74; --evidence-soft: #3a2a22; --ok: #7cc9a3; --ok-soft: #1d3329;
    --bad: #ec8b8b; --bad-soft: #3a2224; --panel-head: #1e2831; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11181f; --surface: #182129; --ink: #e9eef2; --ink-2: #b9c3cc; --ink-3: #8b97a2; --navy: #9fb3c6;
  --rule: #2b3640; --rule-2: #222c35; --evidence: #e09a74; --evidence-text: #e09a74; --evidence-soft: #3a2a22; --ok: #7cc9a3; --ok-soft: #1d3329;
  --bad: #ec8b8b; --bad-soft: #3a2224; --panel-head: #1e2831; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); overflow-x: hidden; }
img, svg, canvas { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--evidence); }
:focus-visible { outline: 2px solid var(--evidence); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; margin: 0 0 0.45em; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: var(--gutter); }
.measure { max-width: 66ch; }
.lead { font-size: 1.22rem; line-height: 1.5; color: var(--ink-2); max-width: 56ch; }
.quiet { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.note { font-size: 0.8rem; color: var(--ink-3); margin: 10px 0 0; }
.band { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--rule); }
.band.first { border-top: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark svg { width: 26px; height: 26px; }
.mark span { font-weight: 600; letter-spacing: 0.14em; font-size: 0.9rem; }
.menu { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.menu a { text-decoration: none; font-size: 0.95rem; color: var(--ink-2); }
.menu a:hover, .menu a[aria-current="page"] { color: var(--ink); }
.button { display: inline-flex; align-items: center; font: 500 0.95rem/1 var(--sans); padding: 13px 18px; border-radius: 6px; text-decoration: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.button:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.button.plain { background: transparent; color: var(--ink); border-color: var(--rule); }
.button.plain:hover { border-color: var(--ink-3); color: var(--ink); background: transparent; }
.menu .button { color: var(--paper); padding: 10px 14px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: 6px; padding: 8px 12px; font: 500 0.9rem var(--sans); }
@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px var(--gutter) 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .menu.open { display: flex; }
}

/* Hero with the decision trace */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero .grid { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero .grid { grid-template-columns: 1fr; } }
.hero .lead { margin-bottom: 30px; }

.trace { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: clamp(48px, 7vw, 96px); align-items: start; }
.trace svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trace .lines path { fill: none; stroke: var(--evidence); stroke-width: 1.5; stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset 0.9s ease; }
.trace .lines path.on { stroke-dashoffset: 0; }
.trace .lines circle { fill: var(--evidence); opacity: 0; transition: opacity 0.3s ease 0.7s; }
.trace .lines circle.on { opacity: 1; }
@media (max-width: 640px) { .trace { grid-template-columns: 1fr; gap: 28px; } }
.memo { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.memo header { background: var(--panel-head); padding: 12px 16px; display: flex; justify-content: space-between; gap: 10px; font-size: 0.8rem; color: var(--ink-3); }
.memo .who { padding: 16px 16px 6px; }
.memo .who b { display: block; font-size: 1.05rem; }
.memo .who span { font-size: 0.85rem; color: var(--ink-3); }
.memo .verdict { margin: 10px 16px 6px; display: flex; align-items: baseline; gap: 10px; }
.memo .verdict b { font: 600 1.35rem var(--sans); color: var(--navy); }
.memo .verdict span { font-size: 0.85rem; color: var(--ink-3); }
.figs { list-style: none; margin: 8px 0 0; padding: 0; }
.figs li { margin: 0; }
.figs button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; text-align: left; padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--rule-2); font: inherit; color: var(--ink); cursor: pointer; }
.figs button span { font-size: 0.9rem; color: var(--ink-2); }
.figs button b { font: 500 1rem var(--mono); font-variant-numeric: tabular-nums; }
.figs button small { grid-column: 1 / -1; font-size: 0.78rem; color: var(--ink-3); margin-top: -4px; }
.figs button[aria-pressed="true"] { background: var(--evidence-soft); }
.figs button[aria-pressed="true"] b { color: var(--evidence-text); }
.figs button[aria-pressed="true"] small { color: var(--ink-2); }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sources li { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; font-size: 0.82rem; color: var(--ink-2); transition: border-color 0.3s, color 0.3s; }
.sources li b { display: block; color: var(--ink); font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.sources li code { font: 0.76rem var(--mono); color: var(--ink-3); display: block; margin-top: 4px; }
.sources li.on { border-color: var(--evidence); color: var(--ink); }
.sources li.on code { color: var(--evidence-text); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }
.pillars h3 { font-size: 1.35rem; margin-bottom: 6px; }
.pillars p { color: var(--ink-2); margin: 0; }

/* Learn from the book, decide for one */
.book { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); margin-top: 32px; }
@media (max-width: 860px) { .book { grid-template-columns: 1fr; } }
.book figure { margin: 0; padding: 18px; }
.book figure + figure { border-left: 1px solid var(--rule); }
@media (max-width: 860px) { .book figure + figure { border-left: 0; border-top: 1px solid var(--rule); } }
.book figcaption { font-size: 0.82rem; color: var(--ink-3); margin-bottom: 10px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.book canvas { display: block; width: 100%; height: 300px; }
.book .one svg { display: block; width: 100%; height: auto; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--evidence); }
.key i.grey { background: var(--ink-3); opacity: 0.45; }
.chart text { font: 11px var(--mono); fill: var(--ink-3); }
.chart .axis { stroke: var(--rule); }
.chart .bandfill { fill: var(--ink-3); opacity: 0.14; }
.chart .series { fill: none; stroke: var(--ink); stroke-width: 2; }
.chart .hit { fill: var(--evidence); }
.chart .hl { stroke: var(--evidence); stroke-width: 1.2; stroke-dasharray: 3 4; }
.decision-tag { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--rule-2); margin-top: 10px; padding-top: 10px; font-size: 0.88rem; }
.decision-tag b { color: var(--navy); }

/* Platform tour */
.tour { margin-top: 30px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; font: 500 0.95rem var(--sans); color: var(--ink-3); cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button:hover { color: var(--ink); }
.tab-panel { padding-top: 22px; }
.tab-panel[hidden] { display: none !important; }
.tab-q { font-size: 1.15rem; margin: 0 0 16px; color: var(--ink-2); }
.tab-q b { color: var(--ink); font-weight: 600; }
.app { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.app > header { background: var(--panel-head); border-bottom: 1px solid var(--rule); padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.8rem; color: var(--ink-3); flex-wrap: wrap; }
.app > header b { color: var(--ink); font-weight: 600; }
.app .body { padding: 18px; display: grid; gap: 18px; }
.app .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .app .cols { grid-template-columns: 1fr; } }
.app h4 { margin: 0 0 8px; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.app table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.app th, .app td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule-2); }
.app th { font-weight: 500; color: var(--ink-3); font-size: 0.78rem; }
.app td.num, .app th.num { text-align: right; }
.bars { display: grid; gap: 8px; }
.bars div { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: 0.85rem; }
.bars i { display: block; height: 8px; border-radius: 4px; background: var(--navy); opacity: 0.85; }
.bars i.ev { background: var(--evidence); opacity: 1; }
.bars span.num { text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 0.82rem; border: 1px solid var(--rule); border-radius: 99px; padding: 5px 10px; color: var(--ink-2); background: var(--surface); }
.chip.on { border-color: var(--ink); color: var(--ink); }
.chip.ev { border-color: var(--evidence); color: var(--evidence-text); font-family: var(--mono); }
.status { display: inline-block; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; background: var(--evidence-soft); color: var(--evidence-text); }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.answer p { margin: 0 0 8px; font-size: 0.95rem; }
.answer a.cite { font-family: var(--mono); font-size: 0.85rem; color: var(--evidence-text); text-decoration: none; border-bottom: 1px dashed var(--evidence); }

/* Where we work */
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); margin-top: 28px; }
@media (max-width: 760px) { .halves { grid-template-columns: 1fr; } }
.halves > div { padding: 24px 28px 8px 0; }
.halves > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
@media (max-width: 760px) { .halves > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }
.halves h3 { font-size: 1.3rem; }
.halves ul { list-style: none; padding: 0; margin: 12px 0 0; }
.halves li { border-top: 1px solid var(--rule-2); margin: 0; }
.halves li a, .halves li span { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--ink); }
.halves li span { color: var(--ink-2); }
.halves li a:hover { color: var(--evidence-text); }

/* Learning loop */
.loop-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .loop-wrap { grid-template-columns: 1fr; } }
.loop svg { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.loop circle.ring { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.loop .node circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.loop .node.gate circle { stroke: var(--evidence); stroke-width: 2; }
.loop .node text { font: 500 13px var(--sans); fill: var(--ink); }
.loop .arrow { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
.loop .arrowhead { fill: var(--ink-3); }
.loop .centre { font: 400 12px var(--sans); fill: var(--ink-3); }

/* Decision record */
.record { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 22px clamp(18px, 3vw, 28px); margin-top: 28px; }
.record .rec-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--rule-2); }
.record .rec-head b { font-size: 1rem; }
.record .rec-head span { font: 0.85rem var(--mono); color: var(--ink-3); }
.record ol { list-style: none; margin: 0; padding: 6px 0 0 18px; position: relative; display: grid; grid-template-columns: 1fr; gap: 0; }
.record ol::before { content: ""; position: absolute; left: 4px; top: 16px; bottom: 16px; width: 1.5px; background: var(--evidence); opacity: 0.6; }
@media (max-width: 760px) { .record ol { grid-template-columns: 1fr; } }
.record li { margin: 0; padding: 14px 0 14px 14px; border-bottom: 1px solid var(--rule-2); position: relative; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 640px) { .record li { grid-template-columns: 1fr; gap: 2px; } }
.record li::before { content: ""; position: absolute; left: -18px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--evidence); }
.record li b { display: block; font-size: 0.95rem; }
.record li span { font-size: 0.88rem; color: var(--ink-2); }
.record li em { font-style: normal; font-size: 0.75rem; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }

/* Founder and close */
.close { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 28px; align-items: end; }
@media (max-width: 760px) { .close { grid-template-columns: 1fr; } }
.close p { color: var(--ink-2); max-width: 60ch; margin: 0; }

/* Inner pages */
.page-top { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); }
.page-top h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 20ch; }
.lines-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.lines-list li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; }
@media (max-width: 640px) { .lines-list li { grid-template-columns: 1fr; gap: 4px; } }
.lines-list b { font-weight: 600; }
.lines-list span { color: var(--ink-2); }
.case { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: 34px; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .case { grid-template-columns: 1fr; } }
.case .source { font-size: 0.78rem; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px; display: inline-block; margin-bottom: 12px; }
.case h3 { font-size: 1.35rem; }
.case .big { font: 500 clamp(2rem, 4vw, 2.8rem)/1.05 var(--mono); letter-spacing: -0.02em; display: block; margin: 14px 0 6px; }
.case dl { margin: 0; display: grid; gap: 14px; }
.case dt { font-weight: 600; font-size: 0.9rem; }
.case dd { margin: 2px 0 0; color: var(--ink-2); }
.shot { margin: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: #fff; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { background: var(--surface); border-top: 1px solid var(--rule); padding: 10px 14px; font-size: 0.82rem; color: var(--ink-3); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding-block: 48px 36px; font-size: 0.9rem; color: var(--ink-2); }
.foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .foot .cols { grid-template-columns: 1fr 1fr; } }
.foot h4 { margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0 0 8px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot .legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.8rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .trace .lines path, .trace .lines circle, .sources li { transition: none; }
}

/* Insights list */
.insight-list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--rule); }
.insight-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.insight-list a { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.6fr); gap: 20px; padding: 18px 0; text-decoration: none; color: var(--ink); align-items: baseline; }
.insight-list a:hover b { color: var(--evidence-text); }
.insight-list span { color: var(--ink-2); }
.insight-list em { font-style: normal; font-size: 0.8rem; color: var(--ink-3); justify-self: end; }
@media (max-width: 760px) { .insight-list a { grid-template-columns: 1fr; gap: 4px; } .insight-list em { justify-self: start; } }

/* Trust panels and solution visuals */
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-block: 40px; border-top: 1px solid var(--rule); align-items: center; }
@media (max-width: 860px) { .panel { grid-template-columns: 1fr; } }
.panel h3 { font-size: 1.45rem; }
.panel p { color: var(--ink-2); }
.strike { text-decoration: line-through; text-decoration-color: var(--bad); color: var(--bad); }
.fixed { color: var(--ok); }
.check-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule-2); font-size: 0.95rem; }
.check-row:last-child { border-bottom: 0; }
.mark-bad, .mark-ok { font: 500 0.75rem var(--mono); padding: 2px 6px; border-radius: 4px; }
.mark-bad { background: var(--bad-soft); color: var(--bad); }
.mark-ok { background: var(--ok-soft); color: var(--ok); }
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gauge { text-align: center; font-size: 0.82rem; color: var(--ink-2); }
.gauge svg { width: 100%; max-width: 120px; display: block; margin: 0 auto 6px; }
.gauge .track { fill: none; stroke: var(--rule); stroke-width: 10; stroke-linecap: round; }
.gauge .fill { fill: none; stroke: var(--navy); stroke-width: 10; stroke-linecap: round; }
.ifs { list-style: none; margin: 0; padding: 0; }
.ifs li { margin: 0; padding: 12px 0; border-top: 1px solid var(--rule-2); font-size: 0.95rem; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.ifs li span { color: var(--ink-2); }
.ifs li b { font-weight: 500; color: var(--navy); white-space: nowrap; }
.peer-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .peer-pair { grid-template-columns: 1fr; } }
.peer-pair figure { margin: 0; }
.peer-pair figcaption { font-size: 0.85rem; display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.verdict-bad { color: var(--bad); font-weight: 500; }
.verdict-ok { color: var(--ok); font-weight: 500; }
.net text { font: 11px var(--sans); fill: var(--ink-2); }
.net line { stroke: var(--rule); stroke-width: 1.4; }
.net .strong { stroke: var(--evidence); stroke-width: 2; }
.net .dash { stroke-dasharray: 4 4; stroke: var(--ink-3); }
.net circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.net circle.hot { fill: var(--evidence); stroke: var(--evidence); }
.idcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; font-size: 0.9rem; }
.idcard b { display: block; font-size: 1rem; }
.idcard dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin: 10px 0 0; font-size: 0.85rem; }
.idcard dt { color: var(--ink-3); }
.idcard dd { margin: 0; }
.idcard dd.match { color: var(--evidence-text); font-family: var(--mono); }
.id-link { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
@media (max-width: 640px) { .id-link { grid-template-columns: 1fr; } }
.id-link .joint { text-align: center; font-size: 0.85rem; color: var(--ink-2); }
.id-link .joint b { display: block; color: var(--ok); }

/* Form */
.v4form { display: grid; gap: 18px; max-width: 760px; }
.v4form label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 500; }
.v4form input, .v4form select, .v4form textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 11px 12px; width: 100%; }
.v4form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.v4form .consent input { width: auto; margin-top: 4px; }
.v4form button { justify-self: start; cursor: pointer; }
.prose-v4 { max-width: 68ch; }
.prose-v4 h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose-v4 p, .prose-v4 li { color: var(--ink-2); }
.prose-v4 details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.prose-v4 summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.prose-v4 details p { margin: 10px 0 0; }
.app .body > svg { display: block; width: 100%; max-width: 680px; max-height: 300px; }

/* Financial services dropdown: the label opens it; hover is bridged across the gap; closing waits 150 ms */
.drop { position: relative; display: flex; align-items: center; }
.drop-head { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 0.95rem; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.drop-head:hover, .drop-head.current, .drop.open .drop-head { color: var(--ink); }
.drop-head::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease; }
.drop.open .drop-head::after { transform: translateY(1px) rotate(225deg); }
.drop-panel { position: absolute; top: calc(100% + 12px); left: -18px; width: min(560px, 90vw); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; box-shadow: 0 16px 40px rgba(16, 24, 32, 0.12); opacity: 0; visibility: hidden; transition: opacity 0.15s ease 0.15s, visibility 0s linear 0.3s; z-index: 60; }
.drop-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.drop:hover .drop-panel, .drop.open .drop-panel { opacity: 1; visibility: visible; transition: opacity 0.12s ease, visibility 0s; }
.drop-panel p { margin: 0 0 6px; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
.drop-panel a { display: block; padding: 6px 0; color: var(--ink); font-size: 0.92rem; }
.drop-panel a:hover { color: var(--evidence-text); }
.drop-panel .drop-all { grid-column: 1 / -1; border-top: 1px solid var(--rule-2); margin-top: 8px; padding-top: 12px; color: var(--ink-2); }
@media (max-width: 900px) {
  .menu { max-height: calc(100vh - 66px); overflow-y: auto; }
  .drop { flex-direction: column; align-items: flex-start; width: 100%; }
  .drop-head { cursor: default; color: var(--ink); }
  .drop-head::after { display: none; }
  .drop-panel { position: static; opacity: 1; visibility: visible; width: 100%; box-shadow: none; border: 0; padding: 4px 0 0 12px; grid-template-columns: 1fr; transition: none; }
  .drop-panel::before { display: none; }
}


/* Platform: the four-layer stack */
.stack { display: grid; gap: 6px; margin-top: 28px; }
.stack a { display: grid; grid-template-columns: 44px minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.stack a:hover { border-color: var(--ink-3); }
.stack a:nth-child(1) { margin-inline: 0; }
.stack a:nth-child(2) { margin-inline: 12px; }
.stack a:nth-child(3) { margin-inline: 24px; border-color: var(--evidence); }
.stack a:nth-child(4) { margin-inline: 36px; }
@media (max-width: 640px) { .stack a { grid-template-columns: 32px 1fr; margin-inline: 0 !important; } .stack a span.d { grid-column: 2; } }
.stack i { font: 500 1rem var(--mono); font-style: normal; color: var(--ink-3); }
.stack b { font-weight: 600; }
.stack span.d { color: var(--ink-2); font-size: 0.92rem; }
.layer { padding-block: 44px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .layer { grid-template-columns: 1fr; } }
.layer .num-l { font: 500 0.9rem var(--mono); color: var(--evidence-text); display: block; margin-bottom: 8px; }
.layer h3 { font-size: 1.5rem; }
.layer p { color: var(--ink-2); }

/* Raw line to labelled flow */
.flow { display: grid; gap: 10px; }
.flow .raw, .flow .lab { font: 0.88rem var(--mono); padding: 12px 14px; border-radius: 6px; border: 1px solid var(--rule); background: var(--surface); }
.flow .raw { color: var(--ink-3); }
.flow .lab { border-color: var(--evidence); }
.flow .lab b { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.flow .lab span { color: var(--evidence-text); }
.flow .step { font-size: 0.8rem; color: var(--ink-3); padding-left: 14px; }
.flow .hist { display: grid; grid-template-columns: repeat(36, 1fr); gap: 2px; margin-top: 4px; }
.flow .hist i { height: 18px; background: var(--navy); opacity: 0.75; border-radius: 1px; }
.flow .hist i.gap { background: none; border: 1px dashed var(--ink-3); opacity: 0.6; }
.flow .hist i.dup { background: var(--evidence); opacity: 0.85; }
.flow .hist-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--ink-3); }

/* Signals earn their place */
.sig td.t { text-align: center; font-family: var(--mono); }
.sig .pass { color: var(--ok); }
.sig .fail { color: var(--bad); }
.sig .kept { background: var(--ok-soft); color: var(--ok); font-size: 0.78rem; padding: 2px 8px; border-radius: 4px; }
.sig .dropped { background: var(--bad-soft); color: var(--bad); font-size: 0.78rem; padding: 2px 8px; border-radius: 4px; }
.table-scroll { overflow-x: auto; }

/* Energy strip */
.strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 22px 26px; }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr; } }
.strip .big { font: 500 2rem var(--mono); }

/* Lending lifecycle */
.life svg { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto; }
.life .ring { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.life .node rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.3; }
.life .node text { font: 500 13px var(--sans); fill: var(--ink); }
.life .node text.s { font: 11px var(--sans); fill: var(--ink-3); }
.life .arrow { fill: none; stroke: var(--ink-3); stroke-width: 1.3; }
.life .arrowhead { fill: var(--ink-3); }
.life .core { font: 600 13px var(--sans); fill: var(--evidence-text); }
.life .core2 { font: 12px var(--sans); fill: var(--ink-3); }

/* Renewal comparison */
.renew { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); }
@media (max-width: 760px) { .renew { grid-template-columns: 1fr; } }
.renew figure { margin: 0; padding: 18px; }
.renew figure + figure { border-left: 1px solid var(--rule); }
@media (max-width: 760px) { .renew figure + figure { border-left: 0; border-top: 1px solid var(--rule); } }
.renew figcaption { font-size: 0.85rem; color: var(--ink-2); margin-bottom: 10px; }
.renew figcaption b { color: var(--ink); display: block; }
.renew .fc { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--rule-2); margin-top: 12px; padding-top: 12px; font-size: 0.9rem; }
.renew .fc b { font: 500 1.05rem var(--mono); }
.source-tag { font-size: 0.78rem; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px; display: inline-block; margin-bottom: 10px; }
.cal { width: 100%; height: auto; display: block; }
.cal .review-zone { fill: var(--evidence); opacity: 0.08; }
.cal circle.due { fill: var(--navy); opacity: 0.35; }
.cal circle.due.hot { fill: var(--evidence); opacity: 0.9; }
.cal .zl { fill: var(--evidence-text); font-weight: 500; }

/* Hero trace set: three decisions */
.trace-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.trace-tabs::-webkit-scrollbar { display: none; }
.trace-tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin-bottom: -1px; font: 500 0.9rem var(--sans); color: var(--ink-3); cursor: pointer; }
.trace-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--evidence); }
.trace[hidden] { display: none !important; }
.trace .trace-note { grid-column: 1 / -1; margin-top: 0; }
.where-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
@media (max-width: 760px) { .where-more { grid-template-columns: 1fr; } }
.where-more article { border-top: 1px solid var(--rule); padding-top: 18px; }
.where-more h3 { font-size: 1.2rem; }
.where-more p { color: var(--ink-2); margin: 0 0 8px; }
.where-more .fig { font: 500 1.6rem var(--mono); display: block; margin: 6px 0; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
.reg td { vertical-align: top; font-size: 0.88rem; }
.reg td:first-child { color: var(--ink-3); white-space: nowrap; }
.reg td:nth-child(2) { font-weight: 500; min-width: 240px; }
@media (max-width: 760px) { .reg td:first-child { white-space: normal; } }

/* Section 16: three surfaces */
.band.dark { --paper: #1e2d3b; --surface: #26394a; --panel-head: #2c4153; --ink: #eef2f5; --ink-2: #c6d0d8; --ink-3: #a3b1bd; --navy: #c6d0d8;
  --rule: #3a4f62; --rule-2: #31455a; --evidence: #e09a74; --evidence-text: #e8a882; --evidence-soft: #4a3428; --ok: #8fd3b0; --ok-soft: #1f3d33; --bad: #f19a9a; --bad-soft: #4a2c2e;
  background: var(--paper); color: var(--ink); border-top: 0; color-scheme: dark; }
.band.dark + .band.dark { border-top: 1px solid var(--rule); }
.band.dark .button { background: var(--paper-light, #f6f7f8); color: #16212c; border-color: #f6f7f8; }
.band.dark .button:hover { background: #ffffff; color: #16212c; }
.band.dark a { color: var(--ink); text-decoration-color: var(--evidence); }
.band.dark .loop .node circle { fill: var(--surface); stroke: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band.dark { --paper: #0b1116; --surface: #16212b; --panel-head: #1b2833; } }
:root[data-theme="dark"] .band.dark { --paper: #0b1116; --surface: #16212b; --panel-head: #1b2833; }

/* Cards lift off the paper: panels, memos, tables only */
.app, .memo, .record, .shot, .renew, .book, .strip, .idcard, .sources li { box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 28px rgba(16, 24, 32, 0.07); }
.band.dark .app, .band.dark .record { box-shadow: none; }

/* Signature texture: ruled ledger lines, home hero and Trust header only */
.ledger { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(44, 62, 80, 0.07) 31px, rgba(44, 62, 80, 0.07) 32px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ledger { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(233, 238, 242, 0.05) 31px, rgba(233, 238, 242, 0.05) 32px); } }
:root[data-theme="dark"] .ledger { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(233, 238, 242, 0.05) 31px, rgba(233, 238, 242, 0.05) 32px); }

/* Data as imagery: quiet full bleed canvases behind sections */
.has-bg { position: relative; overflow: hidden; }
.has-bg > .wrap { position: relative; z-index: 1; }
canvas.bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero.has-bg canvas.bg { left: 45%; width: 55%; -webkit-mask-image: linear-gradient(to right, transparent, #000 30%); mask-image: linear-gradient(to right, transparent, #000 30%); }
@media (max-width: 960px) { .hero.has-bg canvas.bg { left: 0; width: 100%; top: 40%; height: 60%; } }

/* Scale contrast: one very large figure per case, source directly beneath */
.case .big { font: 500 clamp(2.6rem, 6vw, 5rem)/1 var(--mono); letter-spacing: -0.03em; margin: 0 0 10px; overflow-wrap: anywhere; }
.case .big + .source { display: inline-block; margin: 0 0 14px; font-size: 0.85rem; color: var(--ink-2); }
.case { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }
.case .big { font-size: clamp(2.4rem, 4.6vw, 4.4rem); overflow-wrap: normal; word-break: keep-all; }
.insight-list a { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); }
@media (max-width: 760px) { .insight-list a { grid-template-columns: 1fr; } }
