:root {
  color-scheme: dark;
  --bg: #0d1826;
  --fg: #e9e6dd;
  --muted: #b3bac2;
  --line: #273647;
  --card: #15222f;
  --accent: #46d6c3;
  --accent-ink: #04141a;
  --accent-tint: rgba(70, 214, 195, 0.14);
  --ok: #46d6c3;
  --miss: #e08a63;
  --wood: #2e2820;
  --wood-line: #b89a6a;
  --sign-red: #e2524a;
  --sign-green: #4cae6c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.7 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1, h2, .brand { font-family: ui-serif, Georgia, "Times New Roman", serif; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 1.5rem; padding-bottom: 2rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 1rem; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 0.6rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 0 0 0.3rem; font-weight: 600; }
p { margin: 0 0 1.1rem; }
ul.tight, ol.tight { padding-left: 1.2rem; margin: 0 0 1rem; }
ul.tight li, ol.tight li { margin: 0.2rem 0; }
.lede { font-size: 1.08rem; }
.muted, .dates, .fine, .pending-note { color: var(--muted); }
.fine { font-size: 0.88rem; }
.small { font-size: 0.9rem; }
.dates { font-size: 0.92rem; margin-top: -0.4rem; }
.eyebrow { font: 600 0.72rem/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.stack { font: 0.86rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.pending-note { font-size: 0.88rem; font-style: italic; }
.role { border-left: 3px solid var(--accent); padding-left: 0.9rem; margin-top: 2rem; font-size: 0.95rem; }
.warn { color: var(--miss); font-size: 0.92rem; }
.status.proposed { color: var(--miss); }
.status.applied { color: var(--ok); }

/* buttons and inputs */
button, input[type="password"], input[type="text"], textarea, select {
  font: inherit; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 1rem; border-radius: 6px;
}
button { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); padding: 0.55rem 1.1rem; cursor: pointer; }
button.secondary { background: transparent; color: var(--fg); border-color: var(--line); }
button.small { padding: 0.3rem 0.7rem; font-size: 0.88rem; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, .node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hit:focus { outline: none; }
.hit:focus-visible { stroke: var(--accent); stroke-width: 1.5; }
input[type="password"], input[type="text"], textarea, select { background: var(--bg); color: var(--fg); border: 1px solid var(--line); padding: 0.5rem 0.7rem; }
input[type="password"] { width: 100%; max-width: 20rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
a.button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); padding: 0.55rem 1.1rem; border-radius: 6px; text-decoration: none; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 1rem; }
.tag-demo { display: inline-block; font: 600 0.65rem/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.5rem; vertical-align: middle; margin-left: 0.3rem; }
.quiet { font-size: 0.9rem; align-self: center; }

/* gate */
.gate { position: relative; z-index: 1; padding-top: 6vh; max-width: 62rem; display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: 1rem 3rem; align-items: start; }
@media (max-width: 760px) { .gate { grid-template-columns: 1fr; gap: 0.5rem; } }
.gate h1 { margin-bottom: 0.8rem; grid-column: 1 / -1; }
.gate-board-wrap { max-width: 27rem; margin: 0; }
.gate-side { min-width: 0; }
.gate-board .letter { font: 700 11px ui-sans-serif, system-ui, sans-serif; fill: var(--accent-ink); pointer-events: none; }
.gate-board .stump circle { fill: var(--wood); stroke: var(--wood-line); stroke-width: 1; stroke-dasharray: 2 2; }
.gate-board .stump .letter { fill: var(--wood-line); }
.gate-board .stone.last .tree { stroke: var(--fg); stroke-width: 1.2; }
.score { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: 0.6rem; }
.scoretable { border-collapse: collapse; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.95rem; margin-bottom: 0.4rem; }
.scoretable th { text-align: left; font-weight: 600; padding: 0.15rem 1rem 0.15rem 0; }
.scoretable td { padding: 0.15rem 1rem 0.15rem 0; font-variant-numeric: tabular-nums; }
.gate-board .star { fill: var(--wood-line); }
.gate-board .tree.mine { fill: var(--accent); }
.gate-board .tree.theirs { fill: var(--bg); stroke: var(--wood-line); stroke-width: 0.8; }
.gate-board.show-atari .tree.atari { stroke: var(--miss); stroke-width: 1.5; }
.gate-task { margin-bottom: 0.3rem; }
.gate-say { color: var(--muted); min-height: 1.5rem; margin-bottom: 0.3rem; }
.gate-hint { border-left: 3px solid var(--accent); padding-left: 0.9rem; margin: 0.4rem 0 1rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.gate-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.8rem; }
.gate-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice { width: 100%; margin: 0.4rem 0 0; color: var(--muted); }

/* top bar */
.topbar { border-bottom: 1px solid var(--line); background: var(--card); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.85rem; position: sticky; top: 0; z-index: 5; }
.bar { max-width: 72rem; margin: 0 auto; padding: 0.55rem 16px; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; align-items: center; }
.brand { font-size: 1.05rem; font-weight: 600; line-height: 1.2; color: var(--fg); text-decoration: none; white-space: nowrap; }
.bar .who { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.nav a { color: var(--fg); opacity: 0.78; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav a.locked { opacity: 0.38; }
.nav a.locked:hover, .nav a.locked:focus-visible { opacity: 0.6; text-decoration: none; }
.nav a[aria-current="page"] { opacity: 1; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.bar .reg { padding: 0.38rem 0.85rem; font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .bar .who { display: none; } .nav { order: 3; flex-basis: 100%; margin-left: 0; } }

/* shell: one reading column, as wide as the demos */
.shell { max-width: 64rem; margin-inline: auto; position: relative; z-index: 1; }
/* the ambient field: dendrites behind every page, faint enough to read through */
.ambient { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.ambient .field { opacity: 0.13; }
.ambient path { fill: none; stroke: #d3cab6; stroke-linecap: round; stroke-linejoin: round; }
.ambient .pulse { stroke: #ffffff; stroke-width: 2.2; stroke-dasharray: 6 104; stroke-dashoffset: 110; opacity: 0.38; animation: travel-ambient 2s linear forwards; }
@keyframes travel-ambient { 0% { stroke-dashoffset: 110; opacity: 0.38; } 85% { opacity: 0.38; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ambient .pulse { display: none; } }
main, .band, footer { position: relative; z-index: 1; }
.note { border: 1px solid var(--accent); border-radius: 8px; padding: 0.8rem 0.9rem; margin: 1rem 0 0; background: var(--accent-tint); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.92rem; }
.note p { margin: 0 0 0.6rem; }

.ledger { list-style: none; padding: 0; margin: 0 0 0.6rem; font: 0.8rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ledger li { border-bottom: 1px dashed var(--line); padding: 0.25rem 0; overflow-wrap: anywhere; }
.ledger li.fresh { background: var(--accent-tint); }
.ledger .code { color: var(--accent); }
.ledger.big { font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* the board */
.board-stage { display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .board-stage { grid-template-columns: 1fr; } }
.board-wrap { max-width: 27rem; margin: 0 0 1rem; }
.board-side .score { margin-top: 0; border-top: 0; padding-top: 0; }
.board-page .note { margin: 0 0 1.4rem; }
.problem { margin: 0 0 1.1rem; }
.problem h2 { margin: 0.1rem 0 0.35rem; }
.problem .task { font-size: 1.12rem; margin: 0; }
.lesson { border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; background: var(--card); margin-bottom: 1rem; }
.lesson .say { margin: 0 0 0.5rem; min-height: 1.5em; }
.lesson .fine { margin-bottom: 0.4rem; }
.openings-list li.locked .name { color: var(--muted); }
.openings-list li.proposed .name { color: var(--fg); font-weight: 600; }
.board .tree.ghost[hidden] { display: none; }
.board .letter { font: 700 11px ui-sans-serif, system-ui, sans-serif; fill: var(--accent-ink); pointer-events: none; }
.board .stump circle { fill: var(--wood); stroke: var(--wood-line); stroke-width: 1; stroke-dasharray: 2 2; }
.board .stone.last .tree { stroke: var(--fg); stroke-width: 1.2; }
.board .tree.theirs { fill: var(--bg); stroke: var(--wood-line); stroke-width: 0.8; }
.board .tree.mine { fill: var(--accent); }
.board { width: 100%; height: auto; display: block; border-radius: 6px; }
.board .wood { fill: var(--wood); }
.board .grid { stroke: var(--wood-line); stroke-width: 1; }
.board .coord { fill: var(--wood-line); font: 10px ui-sans-serif, system-ui, sans-serif; }
.board .tree.ghost { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 2; }
.board .hit { fill: transparent; cursor: pointer; }
.board .hit:hover { fill: rgba(70, 214, 195, 0.14); }
.openings-list { list-style: none; padding: 0; margin: 1rem 0 0.8rem; display: grid; grid-template-columns: 1fr; gap: 0.3rem 1rem; font-size: 0.95rem; }
.openings-list li { display: flex; gap: 0.5rem; align-items: baseline; }
.openings-list .coordtag { font: 0.75rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.openings-list .tag { font: 600 0.65rem/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.openings-list li.opened a { color: var(--fg); }

/* fit map: the neuron */
.band { width: 100vw; margin: 0 0 0 calc(50% - 50vw); background: var(--bg); overflow-x: auto; }
.band-inner { max-width: 1500px; margin: 0 auto; position: relative; }
.shell:has(+ .band) { margin-bottom: 0; }
.shell:has(+ .band) .section > p:last-child { margin-bottom: 0.2rem; }
.oak { display: block; width: 100%; min-width: 820px; height: auto; font-family: ui-sans-serif, system-ui, sans-serif; }
.neuron .soma-halo { fill: #e9dfc6; opacity: 0.07; }
.neuron .ink { fill: none; stroke: #e6dcc6; stroke-linecap: round; stroke-linejoin: round; }
.neuron .soma { fill: #e6dcc6; }
.neuron .nucleus { fill: var(--bg); opacity: 0.6; }
.neuron .bouton { fill: #efe7d3; }
.neuron .spines { fill: #e6dcc6; opacity: 0.75; }
.neuron .free { opacity: 0.8; }
.neuron .root, .neuron .rootlet, .neuron .limb, .neuron .trunkline, .neuron .apical { transition: opacity 220ms; }
.neuron .leader { stroke: #6b665b; stroke-width: 0.8; }
.neuron .knot { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; fill: #c9c0a8; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.neuron .soma-name { font-size: 11px; font-weight: 600; letter-spacing: 0.24em; fill: #d9d0ba; }
.neuron .lbl { cursor: pointer; }
.neuron .lbl:focus { outline: none; }
.neuron .lbl text { fill: #d3cab6; font-weight: 500; letter-spacing: 0.01em; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; transition: fill 160ms; }
.neuron .lbl:hover text, .neuron .lbl:focus-visible text { fill: #ffffff; }
.neuron .lbl.linked text { fill: #f0d48a; font-weight: 600; }
.neuron .lbl.on text { fill: #ffffff; font-weight: 700; }
.neuron .lbl.on .leader, .neuron .lbl.linked .leader { stroke: #f0d48a; }
.neuron .hover .ink { stroke: #ffffff; }
.neuron .hover .bouton { fill: #ffffff; }
.neuron .on .ink { stroke: #f3d78f; }
.neuron .on .bouton, .neuron .on .spines { fill: #f3d78f; }
.neuron .on.w3 .ink { stroke: #ffe8a8; }
.neuron.has-selection .root:not(.on), .neuron.has-selection .rootlet:not(.on), .neuron.has-selection .limb:not(.on), .neuron.has-selection .trunkline:not(.on) { opacity: 0.22; }
.neuron.has-selection .lbl:not(.on):not(.linked) { opacity: 0.4; }
.neuron .pulse { fill: none; stroke: #ffffff; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 9 101; stroke-dashoffset: 110; opacity: 0; animation: travel 0.9s linear forwards; }
.neuron .pulse.faint { stroke-width: 2.2; animation-name: travel-faint; }
.neuron .pulse.s1 { animation-duration: 0.8s; animation-delay: 0s; }
.neuron .pulse.s2 { animation-duration: 0.5s; animation-delay: 0.78s; }
.neuron .pulse.s3 { animation-duration: 0.55s; animation-delay: 1.26s; }
.neuron .pulse.s4 { animation-duration: 0.4s; animation-delay: 1.79s; }
.neuron .pulse.s5 { animation-duration: 0.9s; animation-delay: 2.17s; }
@keyframes travel { 0% { stroke-dashoffset: 110; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes travel-faint { 0% { stroke-dashoffset: 110; opacity: 0.55; } 100% { stroke-dashoffset: 0; opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .neuron .pulse { display: none; } }
.neuron .lead .ink { stroke: #f3d78f; stroke-width: 1.1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: grow 0.45s ease-out forwards; }
.neuron .lead .bouton { fill: #f3d78f; opacity: 0; animation: appear 0.2s 0.4s forwards; }
@keyframes grow { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
.callout { position: absolute; width: clamp(16rem, 32%, 24rem); background: var(--bg); border: 1px solid rgba(243, 215, 143, 0.55); border-radius: 4px; padding: 0.7rem 0.95rem 0.75rem; font-size: clamp(0.8rem, 0.56vw + 0.35rem, 0.9rem); line-height: 1.5; z-index: 2; transition: opacity 0.3s ease 0.3s; }
.callout.enter { opacity: 0; transition: none; }
.callout h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 0.35rem; color: #fff; }
.callout p { margin: 0; }
.callout .links { margin: 0.5rem 0 0; font: 0.8rem/1.5 ui-sans-serif, system-ui, sans-serif; color: var(--muted); }
.callout .links span { display: block; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; margin-bottom: 0.1rem; }
.callout .linklike { font: inherit; color: #f0d48a; text-align: left; text-decoration: none; }
.callout .linklike:hover, .callout .linklike:focus-visible { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .neuron .lead .ink, .neuron .lead .bouton { animation: none; opacity: 1; stroke-dashoffset: 0; } .callout { transition: none; } }

/* forest */
.forest { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: var(--card); margin: 1rem 0; }
.forest-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.5rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.9rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .forest-controls { grid-template-columns: 1fr; } }
.forest-controls label { display: block; }
.forest-controls .check { grid-column: 1 / -1; }
.forest-controls .check.col { grid-column: auto; }
.stand-type { font: 9px ui-sans-serif, system-ui, sans-serif; fill: var(--fg); opacity: 0.7; }
.stand-conv { font: 600 9.5px ui-sans-serif, system-ui, sans-serif; fill: var(--accent); }
.stand-conv.ghost { fill: var(--miss); }
.forest-stage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 680px) { .forest-stage { grid-template-columns: 1fr; } }
.stands { width: 100%; height: auto; display: block; }
.stand { stroke: var(--bg); stroke-width: 1; }
.stand.a0 { fill: #243a2e; } .stand.a1 { fill: #2f5a3c; } .stand.a2 { fill: #3b7a4d; } .stand.a3 { fill: #4a9a5e; } .stand.a4 { fill: #62bd78; }
.stand.cut { stroke: var(--fg); stroke-width: 2; }
.stand.young { stroke: var(--miss); stroke-dasharray: 4 3; }
.stand-id { font: 10px ui-sans-serif, system-ui, sans-serif; fill: var(--fg); }
.stand-period { font: 600 16px ui-sans-serif, system-ui, sans-serif; fill: var(--fg); }
.forest-side .eval { font-size: 0.88rem; }
.forest-actions { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.impact { margin-top: 0.8rem; border-top: 1px dashed var(--line); padding-top: 0.6rem; font-size: 0.92rem; }
.impact .changed { margin: 0 0 0.4rem; font-weight: 600; }
.impact .story { margin: 0 0 0.8rem; max-width: 70ch; }
.impact .flags { color: var(--miss); }
.impact .moves { margin-top: 0.4rem; }
.impact .moves summary { cursor: pointer; }
.impact .moves ul { margin: 0.4rem 0 0; }
/* a before-and-after exchange */
.chat { margin: 0 0 1.2rem; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; background: var(--card); }
.mistakes { margin: 0 0 1.4rem; align-items: start; }
.mistakes .card { height: 100%; }
.mistakes .card h3 { margin-top: 0; }
.mistakes .card p { font-size: 0.95rem; margin-bottom: 0.6rem; }
.mini { padding-left: 1.1rem; margin: 0 0 0.7rem; font-size: 0.92rem; }
.mini li { margin: 0.25rem 0; }
.exchange.compact { border: 0; padding: 0; background: transparent; }
.exchange.compact .eyebrow { margin: 0.2rem 0 0.3rem; }
.exchange.compact .bubble { max-width: 92%; margin-bottom: 0.35rem; }
.exchange { border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; background: var(--card); display: flex; flex-direction: column; }
.exchange .eyebrow { margin-bottom: 0.5rem; }
.bubble { max-width: 88%; padding: 0.5rem 0.8rem; border-radius: 10px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.92rem; line-height: 1.5; margin: 0 0 0.5rem; }
.bubble.you { background: var(--accent-tint); align-self: flex-end; border-bottom-right-radius: 3px; }
.bubble.ai { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }

/* a release flow, a rules table */
p .try { font-size: 0.88rem; padding: 0.35rem 0.8rem; margin-left: 0.3rem; vertical-align: baseline; }
.flow { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; counter-reset: step; }
.flow li { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; background: var(--card); font-size: 0.95rem; }
.flow li strong { display: block; margin-bottom: 0.2rem; }
.flow li span { color: var(--muted); font-size: 0.9rem; display: block; }
.flow li + li::before { content: "\2192"; position: absolute; left: -0.75rem; top: 0.7rem; color: var(--accent); font-size: 1.1rem; background: var(--bg); line-height: 1; }
.flow.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .flow.four { grid-template-columns: repeat(2, 1fr); } .flow.four li:nth-child(3)::before { content: none; } }
@media (max-width: 680px) { .flow, .flow.four { grid-template-columns: 1fr; } .flow li + li::before { content: "\2193"; left: 1rem; top: -0.85rem; } }
.rules { max-width: 48rem; margin: 0 0 1.2rem; }
.rules td:first-child { color: var(--muted); width: 50%; }
.rules td:last-child { font-weight: 600; }
.rules.three { max-width: none; }
.rules.three td:first-child { width: 30%; }
.rules.three td:nth-child(2) { font-weight: 600; width: 30%; }
.rules.three td:last-child { font-weight: 400; }
.flow.plain li + li::before { content: none; }
ul.flow { list-style: none; }
.impact-table { max-width: 36rem; margin: 0 0 0.8rem; font-size: 0.9rem; }
.impact-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.impact-table td:first-child { color: var(--muted); }
.impact ul.tight { margin-bottom: 0.2rem; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.4rem 0 0.4rem; }
@media (max-width: 680px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.9rem; background: var(--card); }
.stat b { display: block; font: 600 1.7rem/1.1 ui-serif, Georgia, "Times New Roman", serif; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 0.2rem; }
.stat span { font-size: 0.86rem; color: var(--muted); line-height: 1.4; }

/* the deal network: three seats */
.deal { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: var(--card); margin: 1rem 0 1.4rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.95rem; }
.seats { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.seat { background: transparent; color: var(--fg); border: 1px solid var(--line); padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.seat .n { display: inline-block; width: 1.3rem; height: 1.3rem; line-height: 1.3rem; text-align: center; border-radius: 50%; background: var(--line); font-size: 0.75rem; margin-right: 0.3rem; }
.seat.active { border-color: var(--accent); color: var(--accent); }
.seat.active .n { background: var(--accent); color: var(--accent-ink); }
.seat-panel fieldset { border: 0; padding: 0; margin: 0; }
.seat-panel legend, .seat-panel label > span:first-child { font-size: 0.8rem; color: var(--muted); display: block; margin-bottom: 0.2rem; }
.seat-panel label { display: block; margin: 0 0 0.5rem; }
.seat-panel fieldset label { margin: 0 0 0.2rem; }
.seat-panel select, .seat-panel input[type="text"] { display: block; width: 100%; margin-top: 0.2rem; font: inherit; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.door { margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: 0.8rem 1rem; background: var(--bg); }
.door fieldset { margin-bottom: 0.5rem; }
.deal .actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.8rem 0 0.4rem; }
.deal-card { border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 0.9rem; margin: 0 0 0.6rem; background: var(--bg); }
.deal-card h3 { font-size: 1rem; margin: 0 0 0.2rem; }
.deal-card.matched { border-color: var(--accent); }
.deal-card .reasons { margin: 0.2rem 0 0.5rem; font-size: 0.9rem; }
.deal-card .fine { margin: 0 0 0.3rem; }
.deal-card .ok { color: var(--ok); }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 1rem; margin: 0.4rem 0 0.6rem; font-size: 0.9rem; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; }
.fields dd.miss { color: var(--miss); font-weight: 600; }
.inv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.5rem; }
@media (max-width: 760px) { .inv { grid-template-columns: 1fr; } }
.inv-profile fieldset { margin-bottom: 0.7rem; }
.dots { display: grid; gap: 0.3rem; margin: 0 0 1rem; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.9rem; }
.dots > div { display: flex; gap: 0.6rem; align-items: center; }
.dots .eyebrow { margin: 0; width: 3.5rem; }
.dotrow i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--miss); margin-right: 3px; }

/* lanes */
.lanes-app { margin: 1rem 0; }
.queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; min-height: 4rem; border: 1px dashed var(--line); border-radius: 8px; padding: 0.6rem; margin-bottom: 0.8rem; }
@media (max-width: 680px) { .queue { grid-template-columns: 1fr; } }
.queue.over { border-color: var(--accent); }
.lanes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
@media (max-width: 680px) { .lanes-grid { grid-template-columns: 1fr; } }
.lane { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem; background: var(--card); min-height: 10rem; }
.lane > .fine { min-height: 4.9em; }
@media (max-width: 680px) { .lane > .fine { min-height: 0; } }
.lane.over { border-color: var(--accent); background: var(--accent-tint); }
.lane-drop { display: flex; flex-direction: column; gap: 0.5rem; min-height: 4rem; }
.sign-card { display: flex; gap: 0.7rem; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem; cursor: grab; touch-action: none; user-select: none; }
.sign-card.lifted { opacity: 0.4; }
.sign-card.dragging { position: fixed; z-index: 20; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,0.5); cursor: grabbing; }
.sign-card.ok { border-color: var(--ok); }
.sign-card.miss { border-color: var(--miss); }
.sign-card img.sign { width: 6.4rem; flex: 0 0 6.4rem; height: 8rem; object-fit: cover; border-radius: 4px; align-self: flex-start; }
.sign-meta .read { color: var(--fg); font-weight: 600; line-height: 1.35; margin-bottom: 0.3rem; min-height: 4.3rem; }
.sign-meta .read .k { display: block; font: 600 0.65rem/1.4 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.photo figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.phone { float: right; width: 11.5rem; margin: 0.4rem 0 1rem 1.6rem; }
.phone img { border-radius: 14px; }
@media (max-width: 680px) { .phone { float: none; width: 60%; margin: 0 auto 1.2rem; } }
.lanes-app { clear: both; }
.sign-meta { font-size: 0.82rem; min-width: 0; flex: 1; display: flex; flex-direction: column; min-height: 8rem; }
.sign-meta .small { flex: 1; }
.sign-meta p { margin: 0 0 0.2rem; }
.sign-meta select { font-size: 0.8rem; padding: 0.2rem 0.4rem; margin-top: auto; align-self: flex-start; }
.sign-meta .verdict { font-weight: 600; margin: 0.3rem 0 0.4rem; }
.lanes-actions { margin-top: 0.8rem; display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.lessons { margin-top: 1rem; border-left: 3px solid var(--accent); padding-left: 0.9rem; font-size: 0.95rem; }

/* reader evaluation */
.eval-wrap { margin: 0 0 0.5rem; }
.toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-label { display: inline-block; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.9rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.8rem; cursor: pointer; margin-bottom: 0.7rem; }
.toggle:focus-visible + .toggle-label { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle:checked + .toggle-label { border-color: var(--accent); color: var(--accent); }
.eval { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.eval th, .eval td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); }
.eval thead th { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.eval tbody th { font-weight: 600; }
.eval-wrap .reason { display: none; margin-top: 0.7rem; }
.toggle:checked ~ .eval tr.default { background: var(--accent-tint); }
.toggle:checked ~ .eval tr.default th { color: var(--accent); }
.toggle:checked ~ .reason { display: block; }

/* charts */
.chart, .timeline { margin: 0.4rem 0 0.4rem; }
.two > div > h2:first-child { margin-top: 1.6rem; }
.chart svg { width: 100%; max-width: 22rem; height: auto; display: block; }
.timeline svg { width: 100%; height: auto; display: block; }
.chart .bar, .timeline .bar { fill: var(--accent); }
.timeline .bar2 { fill: var(--accent); opacity: 0.55; }
.chart .axis, .timeline .axis { stroke: var(--line); stroke-width: 1; }
.chart .val, .timeline .val { fill: var(--fg); font: 600 12px ui-sans-serif, system-ui, sans-serif; }
.chart .lbl, .timeline .lbl { fill: var(--muted); font: 12px ui-sans-serif, system-ui, sans-serif; }
.chart figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-top: 1rem; padding-bottom: 2rem; margin-top: 1rem; font-family: ui-sans-serif, system-ui, sans-serif; }
/* land-use against timber value */
.lo { width: 100%; max-width: 40rem; height: auto; display: block; margin: 0.4rem 0 0.4rem; font-family: ui-sans-serif, system-ui, sans-serif; }
.lo .axis { stroke: var(--muted); stroke-width: 1.2; }
.lo .grid { stroke: var(--line); stroke-dasharray: 4 4; }
.lo .lbl { font-size: 12px; fill: var(--muted); }
.lo .q { font-size: 12px; font-weight: 600; fill: var(--fg); }
.lo .qs { font-size: 10.5px; fill: var(--muted); }
.lo .pt circle { fill: var(--accent); opacity: 0.85; }
.lo .pt.sell circle { fill: var(--miss); }
.lo .pt.hard circle { fill: #f0d48a; }
.lo .pt text { font-size: 11px; fill: var(--fg); }
h3 { font-size: 1.05rem; margin: 1.6rem 0 0.4rem; }
