/* Layout and components. Colours come from tokens.css only. */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[data-motion="off"] { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}
.skip:focus { top: 12px; }

.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; }

/* Background layers */

#aurora, #bits { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#aurora { z-index: 0; }
#bits { z-index: 1; }

/* Shown when WebGL is missing: three blurred lights that drift. */
html[data-aurora="css"] #aurora { display: none; }
html[data-aurora="css"] body::before {
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 70% 30%, color-mix(in srgb, var(--aurora-2) 45%, transparent), transparent 70%),
    radial-gradient(35% 28% at 45% 45%, color-mix(in srgb, var(--aurora-1) 50%, transparent), transparent 70%),
    radial-gradient(30% 26% at 85% 55%, color-mix(in srgb, var(--aurora-4) 40%, transparent), transparent 70%);
  filter: blur(40px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

.site-header, main, .site-footer { position: relative; z-index: 2; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 40px; height: 30px; display: block; background: var(--mark) center / contain no-repeat; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand-word b { font-weight: 600; color: var(--accent); }


.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }

.look-toggle {
  background: transparent; border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px;
}
.look-toggle::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.look-toggle:hover { border-color: var(--accent); }

/* Hero */

.hero { position: relative; min-height: calc(100svh - 64px); display: flex; align-items: center; padding: 56px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 84%, transparent) 0%, color-mix(in srgb, var(--bg) 48%, transparent) 46%, transparent 78%);
}
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }

.kicker {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px; display: block;
}

.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); font-weight: 600; letter-spacing: -0.03em; }
.hero h1 span {
  background: linear-gradient(100deg, var(--primary) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .hero h1 span { background: none; color: var(--primary); }

.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 34em; margin-top: 22px; }
.hero .lead { color: var(--text); opacity: 0.9; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; text-decoration: none;
  font-weight: 600; font-size: 1rem; transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { box-shadow: 0 0 calc(28px * var(--glow)) color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.notice {
  margin-top: 30px; display: flex; gap: 12px; align-items: flex-start; max-width: 34em;
  padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.92rem; color: var(--text-muted);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%;
  background: var(--wait); box-shadow: 0 0 calc(10px * var(--glow)) var(--wait);
}

/* Hero figure: the mark of the current design, with a stream of bits in and out */

.io-figure { position: relative; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: 320 / 226; }
.io-streams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.io-streams .stream { fill: none; stroke: var(--bit); stroke-width: 5; stroke-dasharray: 5 13; opacity: 0.85; }
.io-streams text { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; fill: var(--text-muted); text-transform: uppercase; }
.hero-logo {
  position: absolute; inset: 4% 18% 4% 20%; background: var(--mark) center / contain no-repeat;
  filter: drop-shadow(0 0 calc(22px * var(--glow)) color-mix(in srgb, var(--primary) 60%, transparent));
}
:root[data-theme="light"] .hero-logo,
:root[data-theme="light"] .brand-mark { filter: drop-shadow(0 2px 6px rgba(10, 16, 40, 0.28)); }

.flow { animation: flow 1.6s linear infinite; }
.float { animation: float 9s ease-in-out infinite alternate; }

@keyframes flow { to { stroke-dashoffset: -18; } }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }

/* At rest the animations hold the state they have. look.js slows them down before that. */
html[data-motion="off"] .flow,
html[data-motion="off"] .float,
html[data-motion="off"] .stage::after,
html[data-motion="off"] .return-line,
html[data-motion="off"][data-aurora="css"] body::before { animation-play-state: paused; }

/* Sections */

.section { padding: 104px 0; background: color-mix(in srgb, var(--bg) var(--veil), transparent); border-top: 1px solid var(--border); }
.section-head { max-width: 46em; margin-bottom: 44px; }
.section h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }

.card {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
/* A light that follows the pointer across a card. */
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.card:hover::before { opacity: var(--glow); }
.card > * { position: relative; }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted);
}
.tag[data-state="open"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.tag[data-state="dev"] { color: var(--link); border-color: color-mix(in srgb, var(--link) 50%, transparent); }
.tag[data-state="idea"] { color: var(--wait); border-color: color-mix(in srgb, var(--wait) 50%, transparent); }

/* Platform path */

.path { display: grid; grid-template-columns: 1fr 3fr 1fr; gap: 14px; }
.lane { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lane-role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); display: block; }
.lane-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; display: block; margin: 2px 0 14px; }
.lane[data-product="iogentic"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 calc(30px * var(--glow)) color-mix(in srgb, var(--accent) 14%, transparent); }
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 26px; }

.stage {
  position: relative; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.stage small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 2px; }
.stage:hover { border-color: var(--accent); }
.stage[aria-current="step"] {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  box-shadow: 0 0 calc(22px * var(--glow)) color-mix(in srgb, var(--accent) 35%, transparent);
}
/* Bits that travel from one stage to the next. */
.stage::after {
  content: ""; position: absolute; top: 50%; left: 100%; width: 26px; height: 4px; margin-top: -2px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--bit) 0 4px, transparent 4px 10px);
  opacity: 0.8; animation: march 0.9s linear infinite;
}
.lane:last-child .stage:last-child::after { display: none; }
.lane:not(:last-child) .stage:last-child::after { width: 46px; }
@keyframes march { to { background-position: 10px 0; } }

.return {
  margin-top: 14px; display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
}
.return-line {
  flex: 1; height: 4px;
  background: repeating-linear-gradient(90deg, var(--accent-2) 0 4px, transparent 4px 10px);
  opacity: 0.8; animation: march-back 0.9s linear infinite;
}
@keyframes march-back { to { background-position: -10px 0; } }

.stage-detail { margin-top: 22px; min-height: 196px; }
.stage-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stage-detail h3 { font-size: 1.5rem; margin: 10px 0 10px; }
.stage-detail p { color: var(--text-muted); }
.facts { margin: 0; display: grid; gap: 12px; }
.facts div { border-left: 2px solid var(--border-strong); padding-left: 14px; }
.facts dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.facts dd { margin: 2px 0 0; }

.stepper { margin-top: 18px; display: flex; align-items: center; gap: 14px; }
.stepper .count { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); min-width: 5.5em; text-align: center; }
.btn-small { padding: 8px 16px; font-size: 0.92rem; }

/* Runtime grid */

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fn h3 { font-size: 1.3rem; margin: 14px 0 8px; }
.fn p { color: var(--text-muted); font-size: 0.98rem; }
.fn .glyph { width: 40px; height: 40px; display: block; }
.fn .glyph * { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fn .glyph .solid { fill: var(--primary); stroke: none; }

/* Run simulation */

.run { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 16px; align-items: stretch; }
.run-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.run-steps li {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text-muted); font-family: var(--font-display); font-weight: 500;
}
.run-steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; }
.run-steps li[data-state="active"] { color: var(--text); border-color: var(--accent); }
.run-steps li[data-state="active"]::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 calc(12px * var(--glow)) var(--accent); }
.run-steps li[data-state="waiting"] { color: var(--text); border-color: var(--wait); }
.run-steps li[data-state="waiting"]::before { background: var(--wait); border-color: var(--wait); box-shadow: 0 0 calc(12px * var(--glow)) var(--wait); }
.run-steps li[data-state="done"] { color: var(--text); }
.run-steps li[data-state="done"]::before { background: var(--ok); border-color: var(--ok); }

.run-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.run-state { margin-top: 14px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }

.console {
  margin: 0; padding: 18px; min-height: 380px; max-height: 460px; overflow: auto;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.75; white-space: pre-wrap;
  background: color-mix(in srgb, var(--bg-alt) 86%, transparent); border: 1px solid var(--border); border-radius: var(--radius);
  list-style: none;
}
.console li { display: grid; grid-template-columns: 5.6em 7.2em 1fr; gap: 10px; }
.console .t { color: var(--text-muted); }
.console .k { color: var(--accent); }
.console li[data-kind="checkpoint"] .k,
.console li[data-kind="signature"] .k { color: var(--wait); }
.console li[data-kind="record"] .k { color: var(--ok); }
.console .empty { display: block; color: var(--text-muted); }

.record { margin-top: 16px; }
.record h3 { font-size: 1.2rem; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.record dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; }
.record dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.record dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 0.92rem; overflow-wrap: anywhere; }

/* Status */

.status { width: 100%; border-collapse: collapse; }
.status th, .status td { text-align: left; padding: 16px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.status thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; }
.status tbody th { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.status td { color: var(--text-muted); }
.foot-note { margin-top: 22px; color: var(--text-muted); font-size: 0.95rem; }

/* Footer */

.site-footer { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 80%, transparent); padding: 28px 0; font-size: 0.9rem; color: var(--text-muted); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.built { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; }
.partner { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); text-decoration: none; }
.partner:hover { color: var(--text); text-decoration: underline; }
/* Pipesmith, wherever the page names it: its symbol and a link. */
.pipesmith { color: inherit; white-space: nowrap; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pipesmith:hover { color: var(--accent); }
.ps-mark { display: inline-block; width: 1.35em; height: 1.35em; margin-right: 0.3em; vertical-align: -0.3em; background: var(--pipesmith-mark) center / contain no-repeat; }
.partner.pipesmith { color: var(--text-muted); text-decoration: none; }
.partner.pipesmith:hover { color: var(--text); text-decoration: underline; }
.partner .ps-mark { width: 24px; height: 24px; margin: 0; }

/* Look panel and first visit */

.look-panel {
  position: fixed; z-index: 30; top: 74px; right: max(16px, calc((100vw - var(--container)) / 2));
  width: 300px; max-width: calc(100vw - 32px); max-height: calc(100svh - 96px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.look-panel h2 { font-size: 1.05rem; margin-bottom: 10px; }
.look-panel fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.look-panel legend, .look-panel .row > span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 7px 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; }
.seg input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.look-panel .row { display: grid; grid-template-columns: 1fr; margin-bottom: 12px; }
.look-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.look-panel .check, .first-visit .check { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 0.92rem; }
.look-panel .check input, .first-visit .check input { accent-color: var(--accent); width: 18px; height: 18px; }
.look-panel .btns { display: flex; gap: 8px; }
.look-panel .btns .btn { flex: 1; }
.look-note { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

.first-visit {
  position: fixed; z-index: 40; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 calc(30px * var(--glow)) color-mix(in srgb, var(--accent) 25%, transparent);
}
.first-visit h2 { font-size: 1.1rem; margin-bottom: 6px; }
.first-visit p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.first-visit .btns { display: flex; gap: 8px; }
.first-visit .btn { flex: 1; }

[hidden] { display: none !important; }

/* Narrow screens */

/* Harness: screenshots of the app, one at a time */

.shot-tabs { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.shots[data-ready] .shot-tabs { display: flex; }
.shot-tab {
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--text); cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.shot-tab:hover { border-color: var(--accent); }
.shot-tab[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.shot { margin: 0 0 36px; }
.shots[data-ready] .shot { margin-bottom: 0; }
.shot img { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.5)); }
.shot .shot-light { display: none; }
:root[data-theme="light"] .shot .shot-dark { display: none; }
:root[data-theme="light"] .shot .shot-light { display: block; }
:root[data-theme="light"] .shot img { filter: drop-shadow(0 16px 34px rgba(10, 16, 40, 0.24)); }
.shot figcaption { margin-top: 18px; color: var(--text-muted); max-width: 46em; }
.section-head .notice { margin-top: 22px; }

/* Sections taken over from the Funkeltronic site: offer, architecture, process, example,
   fields, sovereignty, questions, team, contact */

.band {
  padding: 76px 0; border-top: 1px solid var(--border);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--primary) 22%, transparent), transparent 56%, color-mix(in srgb, var(--accent-2) 18%, transparent)),
    color-mix(in srgb, var(--bg) var(--veil), transparent);
}
.band-line { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.14; letter-spacing: -0.02em; max-width: 19em; margin-top: 14px; color: var(--text); }
.band-text { color: var(--text-muted); font-size: 1.12rem; max-width: 42em; margin-top: 18px; }
.subhead { margin: 64px 0 26px; max-width: 46em; }
.subhead h3 { font-size: 1.6rem; letter-spacing: -0.01em; }
.subhead p:not(.band-line) { color: var(--text-muted); margin-top: 10px; }
.subhead .band-line { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.aside-note { margin-top: 26px; color: var(--text-muted); font-size: 0.95rem; max-width: 52em; }
.label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Offer */
.principles { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; padding: 0; }
.principles li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 0.95rem; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.principles li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 calc(10px * var(--glow)) var(--accent); }
.offers, .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.offer .no, .field .no { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--accent); }
.offer h3, .field h3 { font-size: 1.35rem; margin: 10px 0; }
.offer p, .field p { color: var(--text-muted); }
.offer p + p { margin-top: 10px; }
.points { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 0.95rem; }
.points li, .field ul li { position: relative; padding-left: 18px; }
.points li::before, .field ul li::before { content: ""; position: absolute; left: 0; top: 0.58em; width: 7px; height: 7px; border-radius: 2px; background: var(--primary); }

/* Architecture */
.arch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.arch-flow { display: grid; gap: 12px; }
.arch-node {
  width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  display: grid; grid-template-columns: 2.4em 1fr; gap: 2px 12px; align-items: center; padding: 14px 16px;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--surface) 84%, transparent);
}
.arch-node small { grid-row: 1 / 3; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.arch-node b { font-family: var(--font-display); font-size: 1.1rem; }
.arch-node > span { grid-column: 2; color: var(--text-muted); font-size: 0.92rem; }
.arch-node:hover { border-color: var(--accent); }
.arch-node[data-state="done"] { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.arch-node[data-state="done"] small { color: var(--ok); }
.arch-node[data-state="now"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 calc(26px * var(--glow)) color-mix(in srgb, var(--accent) 40%, transparent); }
.arch-node[data-state="now"] small { color: var(--accent); }
.guards { border: 1px dashed var(--border-strong); border-radius: calc(var(--radius) + 6px); padding: 12px; display: grid; gap: 12px; }
.guards-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 2px 4px 0; }
.arch-node .skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skills i { font-style: normal; font-size: 0.8rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.arch-side { display: grid; gap: 16px; }
.arch-step { color: var(--text-muted); }
.arch-step + .arch-step { margin-top: 12px; }
.arch[data-ready] .arch-step { min-height: 6.4em; margin-top: 0; }
.arch-step strong { color: var(--text); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head b { font-family: var(--font-display); font-size: 1.15rem; }
.trace { list-style: none; margin: 14px 0 0; padding: 0; font-family: var(--font-mono); font-size: 0.86rem; display: grid; gap: 6px; min-height: 0; }
.arch[data-ready] .trace { min-height: 22.5em; align-content: start; }
.trace li { display: grid; grid-template-columns: 2.2em 1fr; gap: 10px; color: var(--text-muted); }
.trace li[hidden] { display: none; }
.trace li b { color: var(--accent); font-weight: 400; }

/* Process */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: step; }
.timeline li { position: relative; padding: 36px 20px 0 0; counter-increment: step; }
.timeline li::before { content: "0" counter(step); position: absolute; top: 0; left: 0; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--accent); }
.timeline li::after { content: ""; position: absolute; top: 9px; left: 2.8em; right: 12px; height: 2px; background: repeating-linear-gradient(90deg, var(--bit) 0 4px, transparent 4px 10px); opacity: 0.55; }
.timeline li:last-child::after { display: none; }
.timeline h3 { font-size: 1.2rem; margin-bottom: 8px; }
.timeline p { color: var(--text-muted); font-size: 0.97rem; }

/* Worked example */
.example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 36px; align-items: start; }
.example-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.example-steps li { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.example-steps b { font-family: var(--font-mono); font-weight: 400; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding-top: 4px; }
.example-steps span { color: var(--text-muted); }
.sheet { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 24px; box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32); }
:root[data-theme="light"] .sheet { box-shadow: 0 18px 44px rgba(10, 16, 40, 0.16); }
.sheet-case { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.sheet dl { margin: 16px 0 0; }
.sheet dl > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.sheet dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding-top: 4px; }
.sheet dd { margin: 0; }
.sheet dd ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.95rem; }
.sheet .mark { color: var(--wait); }
.sheet .good { color: var(--ok); }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pseudo-btn { display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 0.92rem; }
.pseudo-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* Fields */
.field { display: flex; flex-direction: column; }
.field ul { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 6px; font-size: 0.93rem; }
.chip { margin-top: auto; align-self: flex-start; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.chip[data-state="now"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.decide { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.decide h3 { font-size: 1.35rem; margin-bottom: 10px; }
.decide p { color: var(--text-muted); }
.phases { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.phases li { padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted); }
.phases li b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.1em; margin-bottom: 4px; }
.phases li[data-state="done"] { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--text); }
.phases li[data-state="done"] b { color: var(--ok); }
.phases li[aria-current="step"] { border-color: var(--accent); color: var(--text); box-shadow: 0 0 calc(18px * var(--glow)) color-mix(in srgb, var(--accent) 30%, transparent); }
.phases li[aria-current="step"] b { color: var(--accent); }
.weights { margin: 0; }
.weights figcaption { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.bars li { display: grid; grid-template-columns: 7em 1fr 1.4em; gap: 12px; align-items: center; font-size: 0.93rem; }
.bar-track { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.bar[data-w="3"] { width: 100%; }
.bar[data-w="2"] { width: 66.7%; }
.bar[data-w="1"] { width: 33.3%; }
.bar-value { font-family: var(--font-mono); color: var(--text-muted); text-align: right; }

/* Sovereignty */
.layers { margin: 0; }
.layers figcaption { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 10px; }
.layers > p { color: var(--text-muted); max-width: 54em; }
.layers > p:first-of-type { margin-bottom: 22px; }
.layer { display: grid; grid-template-columns: 12em 1fr; gap: 18px; align-items: center; padding: 14px 16px; }
.eu .layer + .layer { border-top: 1px solid var(--border); }
.layer b { display: block; font-family: var(--font-display); }
.layer small { color: var(--text-muted); font-size: 0.85rem; }
.options { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.options li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted); }
.options li[data-picked] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.eu { margin-top: 10px; border: 1px dashed var(--border-strong); border-radius: calc(var(--radius) + 4px); padding: 12px 0 2px; }
.eu-label { display: block; padding: 0 16px 6px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fact h4 { font-size: 1.08rem; margin-bottom: 8px; }
.fact p:not(.refs) { color: var(--text-muted); font-size: 0.93rem; }
.refs { margin-top: 12px; font-family: var(--font-mono); font-size: 0.75rem; display: flex; gap: 10px; flex-wrap: wrap; }
.refs a { color: var(--link); text-decoration: none; }
.refs a:hover { text-decoration: underline; }
.rules { display: grid; gap: 16px; }
.rule { display: grid; grid-template-columns: 12em minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.rule h4 { font-size: 1.2rem; margin-bottom: 8px; }
.rule p:not(.refs) { color: var(--text-muted); font-size: 0.95rem; }
.sources { margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--border); }
.sources h3 { font-size: 1.35rem; }
.sources > p { color: var(--text-muted); margin-top: 8px; }
.sources ol { list-style: none; margin: 18px 0 0; padding: 0; columns: 2; column-gap: 44px; font-size: 0.86rem; color: var(--text-muted); }
.sources li { display: grid; grid-template-columns: 2.6em 1fr; gap: 8px; break-inside: avoid; margin-bottom: 9px; scroll-margin-top: 90px; }
.sources li b { font-family: var(--font-mono); font-weight: 400; color: var(--text); }
.sources li:target { color: var(--text); }
.sources li:target b { color: var(--accent); }
.sources a { color: var(--link); overflow-wrap: anywhere; }

/* Questions */
.faq { max-width: 54em; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-weight: 400; font-size: 1.3rem; color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--text-muted); padding: 0 0 20px; max-width: 46em; }

/* Team and contact */
.team-text { color: var(--text-muted); margin-top: 14px; }
.bring { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 28px; border-top: 1px solid var(--border); }
.bring h3 { font-size: 1.08rem; margin-bottom: 6px; }
.bring p { color: var(--text-muted); font-size: 0.93rem; }
.asks { margin-top: 44px; }
.asks ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asks li { padding: 16px 18px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--surface) 72%, transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.05rem; }
.mail { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2.3rem); color: var(--text); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); }

/* Harness engineering */
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--border); }
.terms > div { padding: 20px 24px 20px 0; border-bottom: 1px solid var(--border); }
.terms dt { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.terms dd { margin: 8px 0 0; }
.terms dd small { display: block; margin-top: 6px; color: var(--text-muted); font-size: 0.88rem; }
.loop { margin: 44px 0 0; }
.loop figcaption { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: 18px; max-width: 34em; }
.loop-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.loop-box { position: relative; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--surface) 84%, transparent); min-height: 7.4em; }
.loop-box:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: 100%; width: 16px; height: 2px; background: var(--bit); opacity: 0.7; }
.loop-box b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.loop-box span { display: block; color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
.loop-box strong { display: block; margin-top: 10px; font-family: var(--font-mono); font-weight: 400; font-size: 0.84rem; }
.loop-box[data-kind="score"] strong, .loop-box[data-kind="gate"] strong { color: var(--wait); }
.loop-box[data-kind="gate"] { border-color: color-mix(in srgb, var(--wait) 60%, transparent); }
.loop-back { margin-top: 14px; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.loop-back::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--bit); }
.loop-back::after { content: ""; flex: 1; order: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--bit) 0 4px, transparent 4px 10px); opacity: 0.55; }
.loop-back span { order: 2; }

@media (max-width: 1080px) {
  .facts, .bring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule { grid-template-columns: 1fr 1fr; }
  .rule > div:first-child { grid-column: 1 / -1; }
  .nav { gap: 16px; }
}
@media (max-width: 900px) {
  .band { padding: 56px 0; }
  .offers, .fields, .arch, .example, .decide, .facts, .bring, .terms, .timeline, .loop-row, .rule, .asks ul { grid-template-columns: 1fr; }
  .timeline li { padding: 30px 0 22px; }
  .timeline li::after, .loop-box:not(:last-child)::after { display: none; }
  .loop-box { min-height: 0; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer { grid-template-columns: 1fr; gap: 10px; }
  .sources ol { columns: 1; }
  .example-steps li, .sheet dl > div { grid-template-columns: 1fr; gap: 4px; }
  .subhead { margin-top: 48px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .look-toggle { margin-left: auto; }
  .hero { min-height: auto; padding: 48px 0 64px; }
  .hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent), color-mix(in srgb, var(--bg) 40%, transparent)); }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .io-figure { max-width: 280px; order: -1; }
  .section { padding: 72px 0; }
  .path { grid-template-columns: 1fr; }
  .stages { grid-auto-flow: row; gap: 22px; }
  .stage::after,
  .lane:not(:last-child) .stage:last-child::after {
    top: 100%; left: 24px; width: 4px; height: 22px; margin-top: 0;
    background: repeating-linear-gradient(180deg, var(--bit) 0 4px, transparent 4px 10px);
    animation-name: march-down;
  }
  .lane:not(:last-child) .stage:last-child::after { height: 48px; }
  .stage-detail { min-height: 0; }
  .stage-panel { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .run { grid-template-columns: 1fr; }
  .console { min-height: 260px; }
  .console li { grid-template-columns: 5.6em 1fr; }
  .console li .m { grid-column: 1 / -1; }
  .record dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status thead { display: none; }
  .status tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .status th, .status td { display: block; padding: 2px 0; border: 0; }
}
@keyframes march-down { to { background-position: 0 10px; } }

@media (min-width: 901px) and (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow, .float, .stage::after, .return-line { animation: none; }
  html[data-aurora="css"] body::before { animation: none; }
}

/* Drafts page */

body.plain { background: var(--bg); }
.drafts-page { padding: 64px 0 96px; }
.drafts-page h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
.drafts { margin-top: 64px; }
.drafts h2 { font-size: 1.7rem; }
.drafts .lead { font-size: 1.05rem; margin-top: 8px; }
.gallery { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tile, .vtile, .dtile { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tile .ground, .vtile .ground, .dtile .ground { display: block; padding: 14px; }
.tile .ground[data-ground="dark"], .vtile .ground[data-ground="dark"], .dtile .ground[data-ground="dark"] { background: #05070D; }
.tile .ground[data-ground="light"], .vtile .ground[data-ground="light"], .dtile .ground[data-ground="light"] { background: #F5F7FC; }
.tile img, .vtile img, .dtile img { display: block; width: 100%; height: auto; }
.tile figcaption, .vtile figcaption, .dtile figcaption { padding: 12px 14px 14px; font-size: 0.92rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.tile code, .vtile code, .dtile code { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); margin-bottom: 4px; }
