/* Halcyon · Steady State, v3. Shared Cucumbs tokens first (tokens.css), then
   the shared network bar (network-bar.css, unedited copy), then this file.
   Identity: deep still water, descending page by page. Vine green and ink,
   horizon. Every colour pair used for text meets WCAG AA (see making.html). */
:root {
  /* paper side (kept for chips and verdicts that must read as paper) */
  --hc-paper: #e4e7df;
  --hc-paper-2: #dde1d7;
  --hc-surface: #eef0ea;
  --hc-ink: #182019;
  --hc-muted: #43504a;
  --hc-line: #b4bcb0;
  --hc-link: #1d5e48;
  --hc-sea: #245f60;
  /* deep side */
  --hc-deep: #0b1f19;
  --hc-deep-2: #10291f;
  --hc-deep-3: #163327;
  --hc-deep-ink: #e6eee8;
  --hc-deep-muted: #b4c9bc;
  --hc-deep-link: #8fdcbc;
  --hc-deep-sea: #7fc9c0;
  --hc-deep-line: #2a4a3d;
  /* signal colours (used on their own tints) */
  --hc-warn: #8a5300;
  --hc-warn-bg: #f6ead6;
  --hc-bad: #9b2c2c;
  --hc-bad-bg: #f8e3e1;
  --hc-good: #1b6f45;
  --hc-good-bg: #dff0e6;

  /* semantic layer: components use only these */
  --bg: var(--hc-paper);
  --surface: var(--hc-surface);
  --surface-2: var(--hc-paper-2);
  --ink: var(--hc-ink);
  --muted: var(--hc-muted);
  --line: var(--hc-line);
  --link: var(--hc-link);
  --accent: var(--hc-sea);
  --tint: #dbe6e1;
  --tint-line: #9fbdb4;
  --shadow: 0 1px 1px rgb(11 31 25 / 0.06), 0 6px 18px -6px rgb(11 31 25 / 0.22);
  --ease-slow: cubic-bezier(0.37, 0, 0.63, 1);
}
.deep {
  --bg: var(--hc-deep);
  --surface: var(--hc-deep-2);
  --surface-2: var(--hc-deep-3);
  --ink: var(--hc-deep-ink);
  --muted: var(--hc-deep-muted);
  --line: var(--hc-deep-line);
  --link: var(--hc-deep-link);
  --accent: var(--hc-deep-sea);
  --tint: #123027;
  --tint-line: #2f5a4b;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 10px 30px -10px rgb(0 0 0 / 0.6);
  color: var(--ink);
  background-color: var(--bg);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background-color: var(--bg); font-family: var(--cu-font-sans); font-size: 1.04rem; line-height: 1.65; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 var(--cu-space-5); }
.prose { max-width: var(--cu-measure); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--cu-space-4); top: var(--cu-space-4); background: var(--hc-surface); color: var(--hc-ink); padding: var(--cu-space-2) var(--cu-space-3); z-index: 30; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0 0 var(--cu-space-3); }

/* ---- Header: the seat's own bar, under the shared network bar ---- */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; gap: var(--cu-space-3) var(--cu-space-5); justify-content: space-between; align-items: center; padding-top: var(--cu-space-3); padding-bottom: var(--cu-space-3); }
.brand { display: inline-flex; align-items: center; gap: var(--cu-space-2); font-weight: var(--cu-weight-bold); text-decoration: none; color: var(--ink); letter-spacing: 0.01em; }
.brand small { font-weight: var(--cu-weight-regular); color: var(--muted); font-size: var(--cu-text-sm); }
.site-nav ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--cu-space-1) var(--cu-space-2); margin: 0; padding: 0; counter-reset: j; }
.site-nav li { counter-increment: j; }
.site-nav a { display: inline-block; text-decoration: none; color: var(--muted); padding: var(--cu-space-1) var(--cu-space-2); border-radius: var(--cu-radius-md); font-size: var(--cu-text-sm); }
.site-nav a::before { content: counter(j); font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); margin-right: 0.4em; color: var(--accent); }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); font-weight: var(--cu-weight-medium); }

/* ---- Hero: the surface of the water, then a level horizon ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--hc-deep-line); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: -1; background: linear-gradient(180deg, rgb(127 201 192 / 0.35) 0, rgb(127 201 192 / 0.35) 1px, rgb(18 48 39 / 0.85) 1px, var(--hc-deep) 100%); }
.hero .wrap { padding-top: var(--cu-space-8); padding-bottom: calc(var(--cu-space-7) + 56px); }
.hero.small .wrap { padding-top: var(--cu-space-7); padding-bottom: calc(var(--cu-space-6) + 56px); }
.kicker { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.08; margin: var(--cu-space-2) 0 var(--cu-space-4); color: var(--ink); letter-spacing: -0.015em; font-weight: 700; }
h2 { font-size: var(--cu-text-xl); line-height: 1.2; margin: 0 0 var(--cu-space-4); color: var(--ink); letter-spacing: -0.005em; }
h3 { font-size: 1.05rem; margin: 0 0 var(--cu-space-2); color: var(--ink); }
.lede { font-size: 1.22rem; line-height: 1.55; max-width: var(--cu-measure); color: var(--muted); margin: 0; }
.note { color: var(--muted); font-size: var(--cu-text-sm); max-width: var(--cu-measure); }
.cu-notice { max-width: var(--cu-measure); margin: var(--cu-space-4) 0 0; }

/* Epigraph: the Cucumbs axiom this step of the journey rests on */
.epigraph { margin: var(--cu-space-6) 0 0; max-width: 46rem; padding: var(--cu-space-4) var(--cu-space-5); border-left: 3px solid var(--accent); background: rgb(127 201 192 / 0.06); border-radius: 0 var(--cu-radius-md) var(--cu-radius-md) 0; }
.epigraph .ax-label { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 var(--cu-space-1); }
.epigraph blockquote { margin: 0; }
.epigraph .ax { font-size: 1.12rem; font-weight: var(--cu-weight-bold); color: var(--ink); margin: 0 0 var(--cu-space-1); }
.epigraph .ax-why { color: var(--muted); margin: 0; }
.epigraph .reading { font-size: var(--cu-text-sm); color: var(--muted); margin: var(--cu-space-2) 0 0; font-style: italic; }

/* ---- Bands ---- */
section.band { padding: var(--cu-space-7) 0; position: relative; }
section.band + section.band:not(.deep) { border-top: 1px solid var(--hc-line); }
section.band.deep { border-top: 1px solid var(--hc-deep-line); border-bottom: 1px solid var(--hc-deep-line); }
.section-lead { max-width: var(--cu-measure); color: var(--muted); }

/* ---- Cards and grids ---- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--cu-space-4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); padding: var(--cu-space-5); box-shadow: var(--shadow); }
.card p { margin: 0 0 var(--cu-space-2); color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.two { display: grid; gap: var(--cu-space-6); grid-template-columns: 1fr; }
@media (min-width: 860px) { .two { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.sub-h { margin-top: var(--cu-space-6); }
.plain-list { max-width: var(--cu-measure); padding-left: var(--cu-space-5); color: var(--muted); }
.plain-list li { margin-bottom: var(--cu-space-1); }

/* ---- Steady State panel ---- */
.state { display: grid; gap: var(--cu-space-4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); list-style: none; padding: 0; margin: 0; }
.state > li { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--hc-deep-sea); padding: var(--cu-space-4) var(--cu-space-5); border-radius: 0 0 var(--cu-radius-md) var(--cu-radius-md); box-shadow: var(--shadow); }
.state > li.moving { border-top-color: #4fb3c9; }
.state > li.open { border-top-color: var(--hc-deep-muted); border-top-style: dotted; }
.state ul { padding-left: var(--cu-space-4); margin: var(--cu-space-2) 0 0; list-style: none; }
.state li li { margin-bottom: var(--cu-space-2); color: var(--muted); font-size: var(--cu-text-sm); }

/* ---- Evidence labels (self-contained chips: same on paper or deep) ---- */
.ev { display: inline-block; font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); font-weight: var(--cu-weight-medium); letter-spacing: 0.04em; padding: 0 0.45em; border-radius: var(--cu-radius-sm); border: 1px solid currentColor; vertical-align: 0.1em; white-space: nowrap; line-height: 1.55; }
.ev-fact { color: var(--cu-status-confirmed); background: var(--cu-status-confirmed-bg); }
.ev-observed { color: var(--cu-status-implemented); background: var(--cu-status-implemented-bg); }
.ev-reported { color: var(--cu-status-recovered); background: var(--cu-status-recovered-bg); }
.ev-inferred { color: var(--cu-status-planned); background: var(--cu-status-planned-bg); border-style: dashed; }
.ev-hypothesis { color: var(--cu-status-proposed); background: var(--cu-status-proposed-bg); border-style: dashed; }
.ev-unknown { color: var(--cu-status-unresolved); background: var(--cu-status-unresolved-bg); border-style: dotted; }
.evlist { display: grid; grid-template-columns: max-content 1fr; gap: var(--cu-space-2) var(--cu-space-4); margin: 0; max-width: 820px; }
.evlist dt { padding-top: 0.15em; }
.evlist dd { margin: 0; color: var(--muted); }

/* ---- Cucumbs message block ---- */
.msg { font-family: var(--cu-font-mono); font-size: var(--cu-text-sm); background: var(--tint); border: 1px solid var(--tint-line); border-left: 4px solid var(--accent); border-radius: var(--cu-radius-md); padding: var(--cu-space-4); margin: var(--cu-space-4) 0; overflow-x: auto; color: var(--ink); }
.msg dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--cu-space-1) var(--cu-space-4); margin: 0; }
.msg dt { color: var(--accent); font-weight: var(--cu-weight-bold); }
.msg dd { margin: 0; white-space: pre-line; }
.msg .route { font-weight: var(--cu-weight-bold); color: var(--ink); margin: 0 0 var(--cu-space-2); letter-spacing: 0.03em; }
.msg .field-empty { color: var(--muted); font-style: italic; }
.msg .field-new { background: var(--surface); outline: 1px solid var(--accent); border-radius: var(--cu-radius-sm); }

/* ---- Axioms ---- */
.axioms { list-style: none; padding: 0; margin: var(--cu-space-5) 0 0; counter-reset: ax; display: grid; gap: var(--cu-space-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.axioms li { counter-increment: ax; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--cu-radius-md); padding: var(--cu-space-4) var(--cu-space-5); box-shadow: var(--shadow); }
.axioms .ax { margin: 0 0 var(--cu-space-2); font-weight: var(--cu-weight-bold); color: var(--ink); font-size: 1.12rem; line-height: 1.35; }
.axioms .ax::before { content: counter(ax) ". "; font-family: var(--cu-font-mono); color: var(--accent); font-size: var(--cu-text-sm); }
.axioms .ax-why { margin: 0; color: var(--muted); }
.leans { font-size: var(--cu-text-sm); color: var(--accent); max-width: var(--cu-measure); }

/* ---- Principles / worked examples ---- */
.principle { border-top: 1px solid var(--line); padding: var(--cu-space-6) 0; }
.principle:first-of-type { border-top: 0; padding-top: 0; }
.principle h2 { display: flex; gap: var(--cu-space-3); align-items: baseline; }
.principle h2 .n { font-family: var(--cu-font-mono); font-size: var(--cu-text-sm); color: var(--accent); }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); padding: var(--cu-space-5); margin-top: var(--cu-space-4); box-shadow: var(--shadow); }
.tag-illus { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); color: var(--hc-warn); background: var(--hc-warn-bg); padding: 0 0.4em; border-radius: var(--cu-radius-sm); margin-left: var(--cu-space-2); font-weight: var(--cu-weight-regular); }
.tag-illus-inline { text-transform: none; letter-spacing: 0; }
.steps-plain { padding-left: var(--cu-space-5); max-width: var(--cu-measure); }
.steps-plain li { margin-bottom: var(--cu-space-2); }

/* ---- Buttons ---- */
.btn, .chip { font: inherit; cursor: pointer; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: var(--cu-space-1) var(--cu-space-4); font-size: var(--cu-text-sm); transition: background var(--cu-duration-fast) var(--cu-ease), border-color var(--cu-duration-fast) var(--cu-ease); }
.btn:hover, .chip:hover { border-color: var(--accent); }
.btn.primary { background: var(--hc-link); border-color: var(--hc-link); color: #fff; }
.deep .btn.primary { background: var(--hc-deep-link); border-color: var(--hc-deep-link); color: var(--hc-deep); }
.btn.primary:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chip[aria-pressed="true"] { background: var(--hc-link); border-color: var(--hc-link); color: #fff; }
.deep .chip[aria-pressed="true"] { background: var(--hc-deep-link); border-color: var(--hc-deep-link); color: var(--hc-deep); }
.row { display: flex; flex-wrap: wrap; gap: var(--cu-space-2); align-items: center; margin: var(--cu-space-3) 0; }

/* ---- Interactive shells ---- */
.lab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); padding: var(--cu-space-5); box-shadow: var(--shadow); margin-top: var(--cu-space-5); }
.lab-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--cu-space-2); align-items: baseline; }
.lab-head p { margin: 0; }
.privacy-line { font-size: var(--cu-text-xs); color: var(--muted); font-family: var(--cu-font-mono); }
.nojs { border: 1px dashed var(--line); padding: var(--cu-space-3) var(--cu-space-4); border-radius: var(--cu-radius-md); color: var(--muted); font-size: var(--cu-text-sm); }
.js .nojs { display: none; }
.js .static-only { display: none; }
[hidden] { display: none !important; }

/* ---- Node map (deep band) ---- */
.map-wrap { display: grid; gap: var(--cu-space-5); grid-template-columns: 1fr; }
@media (min-width: 900px) { .map-wrap { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.map svg { width: 100%; height: auto; display: block; }
.map .water { fill: #0e2a21; stroke: var(--hc-deep-line); }
.map .edge { stroke: #3d6b5a; stroke-width: 1.5; stroke-dasharray: 4 4; }
.map .edge.hub { stroke: #2f5647; stroke-dasharray: none; }
.map .edge.on { stroke: var(--hc-deep-sea); stroke-width: 3; stroke-dasharray: none; }
.map .node circle { fill: var(--hc-deep-3); stroke: #5aa58a; stroke-width: 2; transition: fill var(--cu-duration-base) var(--cu-ease); }
.map .node text { fill: var(--hc-deep-ink); font-family: var(--cu-font-sans); font-size: 15px; text-anchor: middle; }
.map .node .sub { fill: var(--hc-deep-muted); font-size: 11px; }
.map .node:hover circle, .map .node:focus circle { fill: #1d4436; }
.map .node.on circle { fill: var(--hc-deep-sea); stroke: #c9efe7; }
.map .node.on text.init { fill: var(--hc-deep); }
.map .node.self circle { stroke: var(--hc-deep-sea); stroke-width: 3; }
.map .node.human circle { stroke: #e2c98b; }
.map .node.hubnode circle { stroke-dasharray: 3 3; }
.map .node:focus-visible { outline: none; }
.map .node:focus-visible circle { stroke: #ffffff; stroke-width: 4; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); padding: var(--cu-space-5); box-shadow: var(--shadow); }
.panel:focus { outline: none; }
.panel h3 { font-size: var(--cu-text-lg); }
.panel dl { margin: var(--cu-space-3) 0 0; }
.panel dt { font-size: var(--cu-text-xs); font-family: var(--cu-font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-top: var(--cu-space-3); }
.panel dd { margin: var(--cu-space-1) 0 0; }
.roster { display: grid; grid-template-columns: max-content 1fr; gap: var(--cu-space-3) var(--cu-space-5); margin: 0; }
.roster dt { font-weight: var(--cu-weight-bold); }
.roster dd { margin: 0; color: var(--muted); }
.roster dd p { margin: 0 0 var(--cu-space-1); }
details.more { margin-top: var(--cu-space-5); }
details.more > summary { cursor: pointer; color: var(--link); font-weight: var(--cu-weight-medium); }
details.more[open] > summary { margin-bottom: var(--cu-space-3); }

/* ---- Drift simulator ---- */
.sim { display: grid; gap: var(--cu-space-5); grid-template-columns: 1fr; }
@media (min-width: 900px) { .sim { grid-template-columns: 0.95fr 1.05fr; } }
.sim svg { width: 100%; height: auto; display: block; }
.sim .pond { fill: #0e2a21; stroke: #2a4a3d; }
.sim .link { stroke: #2c5144; stroke-width: 1.5; }
.sim .link.hot { stroke: #ff8f84; stroke-width: 3; stroke-dasharray: 6 4; }
.sim .link.good { stroke: #6fd39c; stroke-width: 3; }
.sim .n circle { fill: var(--hc-deep-3); stroke: #5aa58a; stroke-width: 2; }
.sim .n text { font-size: 13px; text-anchor: middle; fill: var(--hc-deep-ink); }
.sim .n.src circle { fill: #3b2a12; stroke: #f0b660; stroke-width: 3; }
.sim .n.dst circle { fill: #173f3a; stroke: var(--hc-deep-sea); stroke-width: 3; }
.sim .n.self circle { stroke: var(--hc-deep-sea); stroke-width: 3; }
.sim .meter-label { font-size: 13px; fill: var(--hc-deep-muted); }
.sim .level-track { fill: #1a382d; }
.sim .level-bar { fill: var(--hc-deep-sea); }
.sim .level-bar.drifting { fill: #f0b660; }
.sim .level-bar.unsteady { fill: #ff8f84; }
.sim-still { fill: var(--hc-deep-muted); font-size: 12px; text-anchor: middle; }
.verdict { border-radius: var(--cu-radius-md); padding: var(--cu-space-3) var(--cu-space-4); margin: 0 0 var(--cu-space-3); border-left: 4px solid var(--hc-line); background: var(--hc-paper-2); color: var(--hc-ink); }
.verdict h3 { margin-bottom: var(--cu-space-1); color: var(--hc-ink); }
.verdict p { margin: 0; }
.verdict.productive { border-left-color: var(--hc-good); background: var(--hc-good-bg); }
.verdict.neutral { border-left-color: var(--cu-status-planned); background: var(--cu-status-planned-bg); }
.verdict.destabilizing { border-left-color: var(--hc-bad); background: var(--hc-bad-bg); }
.ladder { list-style: none; padding: 0; margin: var(--cu-space-3) 0; counter-reset: rung; }
.ladder li { counter-increment: rung; display: grid; grid-template-columns: 2.2em 1fr; gap: var(--cu-space-2); padding: var(--cu-space-2) var(--cu-space-3); border: 1px solid var(--line); border-radius: var(--cu-radius-md); margin-bottom: var(--cu-space-1); background: var(--surface); color: var(--muted); font-size: var(--cu-text-sm); }
.ladder li::before { content: counter(rung, decimal); font-family: var(--cu-font-mono); color: var(--accent); }
.ladder li strong { color: var(--ink); }
.ladder li.chosen { border-color: var(--accent); background: var(--tint); color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.ladder li.skipped { opacity: 0.6; }
.signals { list-style: none; padding: 0; margin: var(--cu-space-2) 0; font-size: var(--cu-text-sm); }
.signals li { padding: var(--cu-space-1) 0; display: grid; grid-template-columns: 2.6em 1fr; gap: var(--cu-space-2); color: var(--ink); }
.signals .yes { font-family: var(--cu-font-mono); color: var(--hc-bad); font-weight: var(--cu-weight-bold); }
.signals .no { font-family: var(--cu-font-mono); color: var(--muted); }
.signals .plus { font-family: var(--cu-font-mono); color: var(--hc-good); font-weight: var(--cu-weight-bold); }
.checks { display: grid; gap: var(--cu-space-1); grid-template-columns: 1fr; margin: var(--cu-space-3) 0; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks label { display: flex; gap: var(--cu-space-2); align-items: flex-start; font-size: var(--cu-text-sm); padding: var(--cu-space-1) var(--cu-space-2); border-radius: var(--cu-radius-sm); }
.checks label:hover { background: var(--surface-2); }
.history { list-style: none; padding: 0; margin: 0; font-size: var(--cu-text-sm); max-height: 16rem; overflow: auto; border-top: 1px solid var(--line); }
.history li { padding: var(--cu-space-1) 0; border-bottom: 1px solid var(--line); display: flex; gap: var(--cu-space-2); }
.history .k { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); min-width: 9.5em; }
.history .k.productive { color: var(--hc-good); }
.history .k.neutral { color: var(--cu-status-planned); }
.history .k.destabilizing { color: var(--hc-bad); }
.history .empty-h { color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--cu-radius-md); padding: var(--cu-space-3) var(--cu-space-4); margin: var(--cu-space-4) 0 0; }
legend { font-weight: var(--cu-weight-bold); padding: 0 var(--cu-space-2); }

/* ---- Evidence labeler ---- */
.claims { list-style: none; padding: 0; margin: 0; counter-reset: claim; }
.claim { counter-increment: claim; border: 1px solid var(--line); border-radius: var(--cu-radius-md); padding: var(--cu-space-4); margin-bottom: var(--cu-space-3); background: var(--bg); }
.claim .q { margin: 0 0 var(--cu-space-2); font-weight: var(--cu-weight-medium); }
.claim .q::before { content: counter(claim) ". "; color: var(--accent); font-family: var(--cu-font-mono); }
.claim .ctx { margin: 0 0 var(--cu-space-2); font-size: var(--cu-text-sm); color: var(--muted); }
.claim .choices { display: flex; flex-wrap: wrap; gap: var(--cu-space-1); }
.claim .choices .chip { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); }
.claim .choices .chip.right { background: var(--hc-good); border-color: var(--hc-good); color: #fff; }
.claim .choices .chip.wrong { background: var(--hc-bad-bg); border-color: var(--hc-bad); color: var(--hc-bad); text-decoration: line-through; }
.claim .fb { margin: var(--cu-space-2) 0 0; font-size: var(--cu-text-sm); }
.claim .fb.ok { color: var(--hc-good); }
.claim .fb.miss { color: var(--hc-bad); }
.claim details { margin-top: var(--cu-space-2); font-size: var(--cu-text-sm); }
.js .claim details.answer { display: none; }
.score { font-family: var(--cu-font-mono); font-size: var(--cu-text-sm); }

/* ---- Loop ---- */
.loopnav { list-style: none; padding: 0; margin: var(--cu-space-3) 0; display: flex; flex-wrap: wrap; gap: var(--cu-space-1); counter-reset: step; }
.loopnav li { counter-increment: step; }
.loopnav button { font: inherit; font-size: var(--cu-text-xs); font-family: var(--cu-font-mono); border: 1px solid var(--line); background: var(--bg); padding: var(--cu-space-1) var(--cu-space-2); border-radius: var(--cu-radius-sm); cursor: pointer; color: var(--muted); }
.loopnav button::before { content: counter(step) " "; color: var(--accent); }
.loopnav button.done { background: var(--tint); color: var(--ink); }
.loopnav button[aria-current="step"] { background: var(--hc-link); color: #fff; border-color: var(--hc-link); }
.loopnav button[aria-current="step"]::before { color: #fff; }
.stepbody { min-height: 7rem; }
.stepbody h3 { font-size: var(--cu-text-lg); }
.stepbody .hal { border-left: 3px solid var(--accent); padding-left: var(--cu-space-3); color: var(--muted); font-size: var(--cu-text-sm); }
.loopsteps { padding-left: var(--cu-space-5); max-width: var(--cu-measure); }
.loopsteps li { margin-bottom: var(--cu-space-3); }
.loopsteps li strong { color: var(--ink); }
.loopsteps .note { display: block; }
.loop-ring { max-width: 420px; margin: 0 auto; display: block; }
.loop-ring circle.track { fill: none; stroke: var(--hc-deep-sea); stroke-opacity: 0.4; stroke-width: 2; }
.loop-ring .dot { fill: var(--hc-deep-2); stroke: var(--hc-deep-sea); stroke-width: 2; }
.loop-ring .dot.on { fill: var(--hc-deep-sea); }
.loop-ring .dot.done { fill: #1f4c40; }
.loop-ring text { font-size: 12px; text-anchor: middle; fill: var(--hc-deep-ink); }
.loop-ring text.mid { font-size: 15px; fill: var(--hc-deep-sea); font-weight: 600; }

/* ---- Change log ---- */
.filters { display: flex; flex-wrap: wrap; gap: var(--cu-space-2); margin: var(--cu-space-2) 0; align-items: center; }
.filters .lbl { font-size: var(--cu-text-xs); font-family: var(--cu-font-mono); color: var(--muted); min-width: 4.5em; }
.search { font: inherit; font-size: var(--cu-text-sm); padding: var(--cu-space-1) var(--cu-space-3); border: 1px solid var(--line); border-radius: 999px; min-width: 16em; background: var(--surface); color: var(--ink); }
.log { list-style: none; padding: 0; margin: var(--cu-space-5) 0 0; border-left: 2px solid var(--accent); }
.entry { position: relative; padding: 0 0 var(--cu-space-5) var(--cu-space-5); max-width: 860px; }
.entry::before { content: ""; position: absolute; left: -7px; top: 0.45em; width: 12px; height: 12px; border-radius: 50%; background: var(--cu-status-confirmed); box-shadow: 0 0 0 3px var(--bg); }
.entry.status-observed::before { background: var(--cu-status-implemented); }
.entry.status-reported::before { background: var(--bg); border: 2px solid var(--cu-status-recovered); }
.entry.status-planned::before { background: var(--bg); border: 2px dashed var(--accent); }
.entry p { margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: var(--cu-space-2) var(--cu-space-3); align-items: center; font-size: var(--cu-text-xs); color: var(--muted); font-family: var(--cu-font-mono); }
.badge { padding: 0 var(--cu-space-2); border-radius: var(--cu-radius-sm); text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid currentColor; }
.badge.confirmed { background: var(--cu-status-confirmed-bg); color: var(--cu-status-confirmed); }
.badge.observed { background: var(--cu-status-implemented-bg); color: var(--cu-status-implemented); }
.badge.reported { background: var(--cu-status-recovered-bg); color: var(--cu-status-recovered); border-style: dashed; }
.badge.planned { background: var(--cu-status-planned-bg); color: var(--cu-status-planned); border-style: dashed; }
.change { font-weight: var(--cu-weight-medium); margin-top: var(--cu-space-1) !important; }
.why, .basis { color: var(--muted); font-size: var(--cu-text-sm); }
.basis { font-style: italic; }
.empty { padding-left: var(--cu-space-5); color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: var(--cu-space-2) var(--cu-space-4); font-size: var(--cu-text-sm); padding: 0; list-style: none; color: var(--muted); }
table.static-log { border-collapse: collapse; width: 100%; font-size: var(--cu-text-sm); }
table.static-log th, table.static-log td { text-align: left; vertical-align: top; padding: var(--cu-space-2); border-bottom: 1px solid var(--line); }
.log.making .msg { margin-top: var(--cu-space-2); }
.state-list { list-style: none; padding: 0; max-width: 860px; }
.state-list li { padding: var(--cu-space-2) 0; border-bottom: 1px solid var(--line); }
.contrast td:nth-child(n+3) { font-family: var(--cu-font-mono); }
.swatch { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 3px; vertical-align: -0.2em; border: 1px solid var(--line); margin-right: 0.3em; }

/* ---- Handoff: every page passes the reader on, like a packet ---- */
.handoff { padding: var(--cu-space-7) 0; }
.handoff .msg { max-width: 760px; margin: 0 0 var(--cu-space-4); }
.pager { display: grid; gap: var(--cu-space-3); grid-template-columns: 1fr; max-width: 760px; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: var(--cu-space-4) var(--cu-space-5); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); background: var(--surface); text-decoration: none; box-shadow: var(--shadow); transition: border-color var(--cu-duration-base) var(--cu-ease), transform var(--cu-duration-base) var(--cu-ease); }
.pager a:hover { border-color: var(--accent); transform: translateY(-1px); }
.pager .dir { display: block; font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.pager .ttl { display: block; font-size: var(--cu-text-lg); color: var(--ink); font-weight: var(--cu-weight-bold); }
.pager .next { text-align: right; }
.pager .next:only-child { grid-column: 2; }
.pager .first { grid-column: 1 / -1; text-align: left; }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--hc-deep-line); color: var(--muted); font-size: var(--cu-text-sm); }
.foot .wrap { padding-top: var(--cu-space-5); padding-bottom: var(--cu-space-6); }
.foot p { margin: 0 0 var(--cu-space-2); max-width: var(--cu-measure); }
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: var(--cu-space-7) var(--cu-space-5); }

@media (max-width: 640px) {
  .roster, .evlist, .msg dl { grid-template-columns: 1fr; }
  .roster dd, .evlist dd { margin-bottom: var(--cu-space-3); }
  .pager .next:only-child { grid-column: 1; }
  .site-nav a { padding: 2px var(--cu-space-1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  }

/* ---- Descent: the journey goes from the surface down ----
   Each page sits one plane deeper than the last (data-depth 1 to 6 on <html>).
   Surfaces are lighter planes laid over the water; text pairs stay AA at every depth. */
html[data-depth] body { --bg: var(--d-bg); --surface: var(--d-s); --surface-2: var(--d-s2); --tint: var(--d-s2); --line: var(--d-line); }
html[data-depth="1"] { --d-bg: #163a2e; --d-s: #1c4436; --d-s2: #22503f; --d-line: #33604f; }
html[data-depth="2"] { --d-bg: #133328; --d-s: #193d31; --d-s2: #1f4839; --d-line: #2f5a49; }
html[data-depth="3"] { --d-bg: #102c23; --d-s: #16362b; --d-s2: #1c4034; --d-line: #2b5243; }
html[data-depth="4"] { --d-bg: #0d261e; --d-s: #133026; --d-s2: #183a2e; --d-line: #284b3d; }
html[data-depth="5"] { --d-bg: #0b2019; --d-s: #102a21; --d-s2: #153328; --d-line: #244436; }
html[data-depth="6"] { --d-bg: #081913; --d-s: #0d231b; --d-s2: #122c22; --d-line: #203d31; }
html { color-scheme: dark; }
body { background: var(--bg); }
/* The hero is the surface of the water: a little lighter, then a level horizon. */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.hero::after { background: linear-gradient(180deg, rgb(127 201 192 / 0.45) 0, rgb(127 201 192 / 0.45) 1px, transparent 1px, rgb(0 0 0 / 0.18) 100%); }
/* Planes: alternate bands sit one step lower, like light falling off with depth. */
section.band.low { background: linear-gradient(180deg, rgb(0 0 0 / 0.16), rgb(0 0 0 / 0.08)); }
section.band + section.band:not(.deep) { border-top: 1px solid var(--line); }
.top { background: rgb(0 0 0 / 0.14); }
.foot { background: rgb(0 0 0 / 0.22); }
/* Depth gauge in the header: how far down this page sits. */
.gauge { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: var(--cu-space-2); }
.gauge i { display: block; width: 4px; height: 12px; border-radius: 1px; background: var(--line); }
.gauge i.on { background: var(--accent); }
/* The deeper reading: a second layer under each page's surface reading. */
details.deeper { margin-top: var(--cu-space-6); border: 1px solid var(--line); border-radius: var(--cu-radius-lg); background: linear-gradient(180deg, var(--surface), rgb(0 0 0 / 0.25)); box-shadow: var(--shadow); max-width: 820px; }
details.deeper > summary { cursor: pointer; padding: var(--cu-space-4) var(--cu-space-5); list-style: none; display: flex; justify-content: space-between; gap: var(--cu-space-3); align-items: baseline; }
details.deeper > summary::-webkit-details-marker { display: none; }
details.deeper > summary .s1 { font-weight: var(--cu-weight-bold); color: var(--ink); }
details.deeper > summary .s2 { font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
details.deeper[open] > summary .s2::after { content: " (open)"; }
details.deeper .inner { padding: 0 var(--cu-space-5) var(--cu-space-5); border-top: 1px solid var(--line); }
details.deeper .inner p { max-width: var(--cu-measure); color: var(--muted); }
details.deeper .inner p:first-child { margin-top: var(--cu-space-4); }
details.deeper .echo { list-style: none; padding: 0; margin: var(--cu-space-3) 0 0; }
details.deeper .echo li { padding: var(--cu-space-2) 0; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--cu-text-sm); }
details.deeper .echo strong { color: var(--ink); }
/* Light planes kept for content that must read as paper (verdicts, tags). */
.tag-illus { background: var(--hc-warn-bg); color: var(--hc-warn); }
.depth-note { margin: 0; font-family: var(--cu-font-mono); font-size: var(--cu-text-xs); white-space: nowrap; }
.levels { counter-reset: none; }
.levels .card h3 a { text-decoration: none; }
.levels .card h3 a:hover { text-decoration: underline; }
.handoff h2 { font-size: var(--cu-text-lg); color: var(--muted); font-weight: var(--cu-weight-medium); }

/* ==== Halcyon's own palette (v3.1) ====================================
   Halcyon = kingfisher over a calm sea. Night-water ink for the ground,
   kingfisher blue-teal as the primary colour, a thin amber "first light"
   for the one thing that matters most on screen (focus, current step,
   chosen rung). Vine green stays only where we point back to the hub.
   Layered on top of tokens.css; tokens.css itself is untouched.
   AA ratios (worst case across every depth plane): ink 8.9, muted 6.0,
   links 5.0, amber 5.0; dark text on kingfisher 4.7, on amber 8.4. */
:root {
  --hk-night: #0b1a1f;
  --hk-ink: #e4eef0;
  --hk-muted: #b3c7cc;
  --hk-kingfisher: #1f8fa6;
  --hk-kingfisher-light: #5cc0d0;
  --hk-amber: #e0a84a;
  --hk-vine: #8fdcbc;
  --hc-deep-ink: var(--hk-ink);
  --hc-deep-muted: var(--hk-muted);
  --hc-deep-link: var(--hk-kingfisher-light);
  --hc-deep-sea: var(--hk-kingfisher-light);
  --hc-deep-line: #24434d;
}
.deep { --ink: var(--hk-ink); --muted: var(--hk-muted); --link: var(--hk-kingfisher-light); --accent: var(--hk-kingfisher-light); }
/* The descent, now in night water: lighter at the surface, near-black at depth. */
html[data-depth="1"] { --d-bg: #133038; --d-s: #183a43; --d-s2: #1d444e; --d-line: #2e5560; }
html[data-depth="2"] { --d-bg: #112b33; --d-s: #16353e; --d-s2: #1b3f48; --d-line: #2b4f59; }
html[data-depth="3"] { --d-bg: #10272f; --d-s: #153139; --d-s2: #1a3a43; --d-line: #284952; }
html[data-depth="4"] { --d-bg: #0f2329; --d-s: #142c33; --d-s2: #19353d; --d-line: #25434b; }
html[data-depth="5"] { --d-bg: #0d1f25; --d-s: #12282f; --d-s2: #173138; --d-line: #223d45; }
html[data-depth="6"] { --d-bg: #0b1a1f; --d-s: #10232a; --d-s2: #152c33; --d-line: #1f373f; }
/* First light: focus and the current step. */
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline-color: var(--hk-amber); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--hk-amber); }
.site-nav a[aria-current="page"]::before, .gauge i.on:last-of-type { color: var(--hk-amber); }
.gauge i.on { background: var(--hk-kingfisher); }
.loopnav button[aria-current="step"] { background: var(--hk-amber); border-color: var(--hk-amber); color: var(--hk-night); }
.loopnav button[aria-current="step"]::before { color: var(--hk-night); }
.ladder li.chosen { box-shadow: inset 4px 0 0 var(--hk-amber); border-color: var(--hk-amber); }
.epigraph { border-left-color: var(--hk-amber); background: rgb(224 168 74 / 0.06); }
.epigraph .ax-label { color: var(--hk-amber); }
.hero::after { background: linear-gradient(180deg, rgb(224 168 74 / 0.55) 0, rgb(224 168 74 / 0.55) 1px, transparent 1px, rgb(0 0 0 / 0.2) 100%); }
/* Kingfisher for actions. Dark night text on the fill keeps AA. */
.btn.primary, .deep .btn.primary, .chip[aria-pressed="true"], .deep .chip[aria-pressed="true"] { background: var(--hk-kingfisher-light); border-color: var(--hk-kingfisher-light); color: var(--hk-night); }
.claim .choices .chip.right { background: var(--hk-kingfisher-light); border-color: var(--hk-kingfisher-light); color: var(--hk-night); }
.msg { border-left-color: var(--hk-kingfisher); }
.log { border-left-color: var(--hk-kingfisher); }
/* Diagrams */
.map .water, .sim .pond { fill: #0f2730; stroke: #24434d; }
.map .edge { stroke: #2f6573; }
.map .edge.hub { stroke: #3a6b5a; }
.map .edge.on { stroke: var(--hk-amber); }
.map .node circle, .sim .n circle { fill: #173540; stroke: var(--hk-kingfisher); }
.map .node:hover circle, .map .node:focus circle { fill: #1d4553; }
.map .node.on circle { fill: var(--hk-amber); stroke: #f5d9a6; }
.map .node.on text.init { fill: var(--hk-night); }
.map .node.self circle, .sim .n.self circle { stroke: var(--hk-kingfisher-light); }
.map .node.hubnode circle { stroke: var(--hk-vine); }
.map .node:focus-visible circle { stroke: var(--hk-amber); }
.sim .link { stroke: #24434d; }
.sim .n.dst circle { fill: #15404c; stroke: var(--hk-kingfisher-light); }
.sim .level-bar { fill: var(--hk-kingfisher-light); }
.sim .level-track { fill: #173540; }
.loop-ring circle.track { stroke: var(--hk-kingfisher); }
.loop-ring .dot { fill: #10232a; stroke: var(--hk-kingfisher-light); }
.loop-ring .dot.on { fill: var(--hk-amber); stroke: var(--hk-amber); }
.loop-ring .dot.done { fill: #1b4a57; }
.loop-ring text.mid { fill: var(--hk-amber); }
/* Vine green: the tie back to the hub. */
a[href^="https://cucumbs.com"] { color: var(--hk-vine); }
.state > li { border-top-color: var(--hk-kingfisher-light); }
.state > li.moving { border-top-color: var(--hk-amber); }

/* ==== Dimmed for long human reading (v3.2) ============================
   Gentler off-white text, muted kingfisher, softer amber, darker planes,
   and no light panels left on screen. Worst-case ratios across every
   depth plane and tint: body text 10.0, secondary 7.1, links 5.9,
   amber 5.5, evidence labels 6.1 or higher. */
:root {
  --hk-night: #071216;
  --hk-ink: #cfdcdf;
  --hk-muted: #a9bcc0;
  --hk-kingfisher: #2b7f90;
  --hk-kingfisher-light: #6fb3bf;
  --hk-amber: #c99a4e;
  --hk-vine: #86c9ab;
  --hc-deep-line: #1d343b;
}
html[data-depth="1"] { --d-bg: #0d2026; --d-s: #0f242b; --d-s2: #11272e; --d-line: #22404a; }
html[data-depth="2"] { --d-bg: #0c1d23; --d-s: #0e2128; --d-s2: #10252b; --d-line: #203b44; }
html[data-depth="3"] { --d-bg: #0b1b20; --d-s: #0d1f25; --d-s2: #0f2228; --d-line: #1e373f; }
html[data-depth="4"] { --d-bg: #0a181d; --d-s: #0c1c22; --d-s2: #0e1f25; --d-line: #1c333a; }
html[data-depth="5"] { --d-bg: #08151a; --d-s: #0a191e; --d-s2: #0c1c21; --d-line: #1a2f36; }
html[data-depth="6"] { --d-bg: #071216; --d-s: #09161b; --d-s2: #0b191e; --d-line: #182b31; }
body { font-size: 1.0625rem; line-height: 1.72; }
.lede { font-size: 1.18rem; }
/* Fewer glows: flatter surface gradient, quieter shadows. */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 70%); }
.deep { --shadow: 0 8px 24px -14px rgb(0 0 0 / 0.7); }
.epigraph { background: rgb(201 154 78 / 0.04); }
/* Evidence labels: dark chips with soft coloured text instead of bright tiles. */
.ev, .badge { background: rgb(0 0 0 / 0.22); }
.ev-fact, .badge.confirmed { color: #7fc7a0; }
.ev-observed, .badge.observed { color: #8fb0e6; }
.ev-reported, .badge.reported { color: #d4a660; }
.ev-inferred, .badge.planned { color: #74bccb; }
.ev-hypothesis { color: #b9a0e0; }
.ev-unknown { color: #a7afb8; }
.tag-illus { background: rgb(212 166 96 / 0.12); color: #d4a660; }
/* Verdicts: dark tints, soft text, colour only in the edge. */
.verdict, .verdict h3 { color: var(--hk-ink); }
.verdict { background: #122833; border-left-color: var(--hk-kingfisher); }
.verdict.productive { background: #14302f; border-left-color: #7fc7a0; }
.verdict.neutral { background: #122833; border-left-color: #74bccb; }
.verdict.destabilizing { background: #2a1a1c; border-left-color: #e58f86; }
.signals .yes, .claim .fb.miss, .history .k.destabilizing { color: #e58f86; }
.signals .plus, .claim .fb.ok, .history .k.productive { color: #7fc7a0; }
.history .k.neutral { color: #74bccb; }
.claim .choices .chip.wrong { background: #2a1a1c; border-color: #e58f86; color: #e58f86; }
.cu-notice { background: rgb(212 166 96 / 0.08); color: var(--hk-ink); border-left-color: #d4a660; }
.sim .link.hot { stroke: #e58f86; }
.sim .link.good { stroke: #7fc7a0; }
.sim .n.src circle { fill: #2b2414; stroke: var(--hk-amber); }
.sim .level-bar.drifting { fill: var(--hk-amber); }
.sim .level-bar.unsteady { fill: #e58f86; }
