/* VibeGov: the Coordination Contract and its live record (redesign/DESIGN.md). The record leads; the text is a click
   away. Blue is what a member can act on, green is a check that holds, amber a check that is not done, red a check that
   failed. No picture stands in for the record. */

@font-face {
  font-family: "Literata";
  src: url("fonts/literata.woff2") format("woff2-variations"), url("fonts/literata.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-italic.woff2") format("woff2-variations"), url("fonts/literata-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans.woff2") format("woff2-variations"), url("fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face { font-family: "Literata fallback"; src: local("Georgia"), local("Noto Serif"), local("DejaVu Serif"); size-adjust: 103%; ascent-override: 92%; descent-override: 25%; }
@font-face { font-family: "Public Sans fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 101%; ascent-override: 95%; descent-override: 23%; }

:root {
  --paper: #fbfbf9;
  --panel: #ffffff;
  --shade: #f0efeb;
  --ink: #16191d;
  --muted: #5b6068;
  --rule: #d9d8d3;
  --act: #1f4bb0;
  --ok: #17784a;
  --wait: #9a5b00;
  --bad: #b3261e;
  --serif: "Literata", "Literata fallback", serif;
  --sans: "Public Sans", "Public Sans fallback", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", monospace;
  --margin: clamp(2.25rem, 7vw, 8rem);
  --measure: 42rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --max: 84rem;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111316;
    --panel: #181b1f;
    --shade: #20242a;
    --ink: #ecedef;
    --muted: #a3a8b0;
    --rule: #2e333a;
    --act: #8eaaff;
    --ok: #5fd39a;
    --wait: #f0b45a;
    --bad: #ff8a80;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); font-kerning: normal; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 650; text-wrap: balance; margin: 0; letter-spacing: -0.015em; }
p, li, dd { text-wrap: pretty; }
a { color: var(--act); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.86em; overflow-wrap: anywhere; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font: 600 0.8rem var(--sans); }
.skip:focus { top: 0.75rem; }
.label, .eyebrow { font: 600 0.74rem/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow { margin: 0 0 0.75rem; }
.note { color: var(--muted); font-size: 0.92rem; }
.empty { color: var(--muted); margin: 0; padding: 1rem 0; }
.none { color: var(--muted); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 40rem; }

/* ---------- the running head ---------- */
.runhead { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--paper) 88%, transparent); border-bottom: 1px solid var(--rule); }
@supports (backdrop-filter: blur(1px)) { .runhead { backdrop-filter: saturate(1.2) blur(8px); } }
.runhead__in { display: flex; align-items: center; gap: 1.25rem; min-height: 3.5rem; padding: 0 var(--gutter); max-width: var(--max); margin: 0 auto; }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; flex: none; color: var(--ink); font: 750 1.15rem var(--sans); letter-spacing: -0.02em; }
.wordmark img { height: 1.6rem; width: 1.6rem; }
.runhead__title { margin: 0; color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.runhead .contents-btn { margin-left: auto; display: none; }
.contents { margin: 0 0 0 auto; padding: 0; border: 0; background: none; color: inherit; display: block; position: static; inset: auto; overflow: visible; }
.contents ol { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.contents a { display: block; padding: 0.4rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--ink); font: 550 0.92rem var(--sans); white-space: nowrap; }
.contents a:hover { background: var(--shade); }
.contents a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 70rem) { .runhead__title { display: none; } }
@media (max-width: 52rem) {
  .runhead .contents-btn { display: inline-flex; }
  .contents { position: fixed; inset: 3.75rem var(--gutter) auto auto; margin: 0; width: min(18rem, calc(100vw - 2rem)); padding: 0.5rem; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 18px 50px rgb(0 0 0 / 0.18); }
  .contents:not(:popover-open):not(.is-open) { display: none; }
  .contents ol { flex-direction: column; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.9rem; padding: 0.55rem 1.2rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 600 0.92rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--shade); }
.btn.primary { background: var(--act); border-color: var(--act); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0b1020; } }
.btn.small { min-height: 2.3rem; padding: 0.3rem 0.95rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* ---------- page frame ---------- */
.sheet { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--rule); }
.band:first-child { border-top: 0; }
.band__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 1.5rem; }
.band__head h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.1; }
.band__head p { margin: 0.5rem 0 0; color: var(--muted); max-width: 44rem; }
.cite { font: 600 0.72rem var(--sans); letter-spacing: 0.06em; color: var(--muted); }

/* ---------- the front door ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--act); }
.hero .lede { margin: 1.25rem 0 0; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.1rem, 2.5vw, 1.6rem); }
.panel h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.hero .panel { display: grid; gap: 0.9rem; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.parts li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; align-items: baseline; font-size: 0.95rem; }
.parts b { font-weight: 650; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }
.tile { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; display: grid; align-content: start; gap: 0.35rem; }
.tile dt { font: 600 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile dd { margin: 0; display: grid; gap: 0.3rem; }
.tile b { font: 700 clamp(1.8rem, 3.2vw, 2.6rem)/1.05 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tile span { font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
.tile cite { font: 600 0.7rem var(--sans); font-style: normal; letter-spacing: 0.05em; color: var(--muted); opacity: 0.85; }
[aria-busy="true"] { color: var(--muted); }

.rfcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.rfc { background: var(--panel); border: 1px solid var(--rule); border-left: 4px solid var(--act); border-radius: var(--radius); padding: 1rem 1.2rem; display: grid; gap: 0.4rem; }
.rfc h3 { font-size: 1.2rem; }
.rfc p { margin: 0; }
.rfc__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.tag { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--shade); color: var(--ink); font: 600 0.74rem var(--sans); letter-spacing: 0.03em; }
.rfc__clock { font-size: 0.9rem; color: var(--muted); }
.rfc__act { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.3rem !important; }
.rfc__act code { color: var(--muted); }
.decided { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.decided li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.verdict { font: 650 0.74rem var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.verdict--adopted { color: var(--ok); }

/* one RFC's tally, and the engine's seats (record.html) */
.tally__head { display: grid; gap: 0.3rem; margin-bottom: 0.75rem; }
.tally__head h3 { font-size: 1.3rem; }
.tally__head p { margin: 0; }
.tally__count { margin: 0 0 0.5rem; }
.options { margin: 0.5rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.options span { color: var(--muted); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(2.2rem, 1fr)); gap: 0.3rem; align-items: end; }
.hist li { display: grid; grid-template-rows: 2.5rem auto auto; justify-items: center; font-size: 0.75rem; color: var(--muted); }
.hist i { align-self: end; display: block; width: 70%; height: max(2px, var(--h)); border-radius: 3px 3px 0 0; background: var(--act); opacity: 0.8; }
.hist b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.decision { margin-top: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.decision > p { margin: 0 0 0.6rem; }
.dets { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.tier { font-size: 1rem; margin: 1.25rem 0 0; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }

/* the record's own state */
.health, .check { display: flex; align-items: baseline; gap: 0.55rem; margin: 0 0 0.75rem; font-weight: 550; }
.dot { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--muted); transform: translateY(-0.05rem); }
.health--live .dot, .check--ok .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ok) 22%, transparent); }
.health--quiet .dot, .health--empty .dot { background: var(--wait); }
.check--bad .dot { background: var(--bad); }
.check--bad { color: var(--bad); }
.check code { color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: no-preference) {
  .health--live .dot { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in oklab, var(--ok) 0%, transparent); } }
.facts { display: grid; gap: 0.5rem; margin: 0 0 1.25rem; }
.facts div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.facts dt { font: 600 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.kinds { margin: 0; }
.kinds figcaption { font: 600 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.kinds ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.kinds li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 4rem; gap: 0.75rem; align-items: center; font-size: 0.88rem; }
.kinds i { display: block; height: 0.55rem; width: var(--w); border-radius: 999px; background: var(--act); opacity: 0.8; }
.kinds b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.params { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.6rem 2rem; margin: 0; }
.params div { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.params dt { font-size: 0.9rem; color: var(--muted); }
.params dd { margin: 0.15rem 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.params code { font-weight: 400; color: var(--muted); font-size: 0.75rem; margin-left: 0.4rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: 0.93rem; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 0.8rem var(--sans); margin-bottom: 0.5rem; }
.steps h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--muted); }

.acts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem; }
.acts a { display: grid; gap: 0.25rem; height: 100%; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; }
.acts a:hover { border-color: var(--act); }
.acts b { color: var(--act); }
.acts span { font-size: 0.9rem; color: var(--muted); }

/* ---------- tables (the record, and the contract's text) ---------- */
.table-wrap { overflow-x: auto; margin: 0.5rem 0 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.table-wrap table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; }
.table-wrap th { text-align: left; font: 600 0.72rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.table-wrap td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-variant-numeric: tabular-nums; }

/* ---------- the contract: the rendered text ---------- */
.doc { display: grid; grid-template-columns: var(--margin) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--gutter); }
.doc > * { grid-column: 2; }
.doc .in-margin { grid-column: 1; text-align: right; }
.sheet-title { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.sheet-title h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; grid-column: 2 / -1; }
.sheet-title .lede { grid-column: 2; margin: 1.25rem 0 0; }
.sheet-title .in-margin { grid-row: 1 / span 3; color: var(--muted); font: 300 clamp(2rem, 4vw, 3.2rem)/1 var(--serif); }
.source { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.source .facts { padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 2.5rem; }
.toc li { break-inside: avoid; border-top: 1px solid var(--rule); }
.toc a { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 0; text-decoration: none; color: var(--ink); }
.toc a span { font: 600 0.74rem var(--sans); color: var(--muted); min-width: 2.2rem; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--act); }
.clause { border-top: 1px solid var(--rule); padding-block: clamp(2rem, 5vw, 3.5rem); font-family: var(--serif); }
.clause .in-margin { padding-top: 0.55rem; }
h2.part { font: 650 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--sans); letter-spacing: -0.02em; margin: 0 0 1.25rem; }
.clause .doc > p, .clause .doc > ul, .clause .doc > ol { margin: 0 0 1rem; }
.clause .doc ul, .clause .doc ol, .article .sub ul { padding-left: 1.2rem; }
.clause .doc li, .article .sub li { margin: 0 0 0.45rem; }
.clause .doc li::marker { color: var(--muted); }
.clause h3 { font: 650 1.15rem var(--sans); margin: 1.5rem 0 0.6rem; }
.clause .table-wrap, .clause pre.figure { grid-column: 2 / -1; font-family: var(--sans); }
.article { display: grid; grid-template-columns: var(--margin) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--gutter); padding: 1.75rem 0 2rem; border-top: 1px solid var(--rule); }
.clause .doc > .article, .doc > .article { grid-column: 1 / -1; }
.article .num { grid-column: 1; grid-row: 1 / span 3; text-align: right; color: var(--muted); padding: 0.3rem 2.5rem 0 0; margin: 0; font: 600 0.66rem var(--sans); letter-spacing: 0.05em; text-transform: uppercase; }
.article .num b { display: block; font: 700 clamp(2rem, 3.5vw, 3rem)/0.9 var(--sans); letter-spacing: -0.02em; color: var(--ink); margin-bottom: 0.35rem; }
.article > p { grid-column: 2; margin: 0; }
.article .sub { grid-column: 2; margin-top: 0.6rem; }
.article .sub ul { margin: 0; }
.lined { position: relative; }
.lined .ln { position: absolute; right: calc(100% + 0.75rem); width: 2.5rem; text-align: right; font: 500 0.66rem/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; user-select: none; }
pre.figure { overflow-x: auto; margin: 0.5rem 0 1.5rem; padding: 1.1rem 1.25rem; background: var(--shade); border-radius: var(--radius); font: 400 0.8rem/1.55 var(--mono); }
pre.figure code { font: inherit; }
.clause code { background: var(--shade); padding: 0.05em 0.3em; border-radius: 4px; }

/* ---------- take part ---------- */
.ways { list-style: none; margin: 0 0 clamp(2.5rem, 6vw, 4rem); padding: 0; counter-reset: way; }
.ways li { counter-increment: way; position: relative; padding: 1.4rem 0 1.5rem 3.25rem; border-top: 1px solid var(--rule); }
.ways li::before { content: counter(way); position: absolute; left: 0; top: 1.35rem; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 0.95rem var(--sans); }
.ways h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.2; margin-bottom: 0.5rem; }
.ways p { margin: 0 0 0.6rem; }
.ways .aside-note { color: var(--muted); font-size: 0.95rem; border-left: 3px solid var(--act); padding-left: 1rem; }
.notice { border-left: 3px solid var(--act); padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); font-size: 0.95rem; }
.ask { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); margin: 0 0 2rem; }
.ask h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 1rem; }
.ask label { display: block; font: 600 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
textarea { width: 100%; min-height: 6rem; font: 400 1.05rem/1.55 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 0.75rem 0.9rem; resize: vertical; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); margin-top: clamp(2rem, 6vw, 4rem); padding: 2.5rem 0 3rem; font-size: 0.9rem; }
.site-foot .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.5rem; row-gap: 1rem; align-items: start; }
.site-foot .wrap > * { grid-column: 2; margin: 0; }
.site-foot .seal-mark { grid-column: 1; grid-row: 1 / span 3; width: 2.5rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 600; }
.site-foot nav a { color: var(--ink); text-decoration: none; }
.site-foot nav a:hover { color: var(--act); text-decoration: underline; }
.site-foot .colophon, .site-foot p { color: var(--muted); max-width: 46rem; }

/* ---------- the front door: mission, the seal, what is alive now, the machines ---------- */
:root {
  --seal-bg: #0f2457;
  --seal-ink: #f3f5fb;
  --seal-muted: #b7c2de;
  --t0: #1f4bb0; --t1: #17784a; --t2: #9a5b00; --t3: #b3261e; --t4: #6a3fa3; --t5: #0b7a85;
}
@media (prefers-color-scheme: dark) {
  :root { --seal-bg: #16285a; --t0: #8eaaff; --t1: #5fd39a; --t2: #f0b45a; --t3: #ff8a80; --t4: #c6a6ff; --t5: #5fd0dc; }
}
.runhead__act { flex: none; }
.contents + .runhead__act { margin-left: 0.5rem; }

.mission { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.75rem, 4.5vw, 4.5rem); align-items: start; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.mission h1 { font-size: clamp(2.6rem, 6.6vw, 5.6rem); line-height: 0.98; letter-spacing: -0.035em; font-weight: 750; }
.mission h1 em { font-style: normal; color: var(--act); }
.mission .lede { margin: 1.5rem 0 0; color: var(--ink); opacity: 0.82; }

.seal { --ok: #5fd39a; --wait: #f0b45a; --bad: #ff8a80; --act: #b9c9ff; --muted: var(--seal-muted); background: var(--seal-bg); color: var(--seal-ink); border-radius: calc(var(--radius) + 6px); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0.9rem; box-shadow: 0 30px 60px -30px rgb(15 36 87 / 0.55); }
.seal .eyebrow { margin: 0; color: var(--seal-muted); }
.seal h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.15; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.promises li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; padding: 0.45rem 0; border-top: 1px solid rgb(255 255 255 / 0.14); font-size: 0.97rem; }
.promises b { font: 650 0.74rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--seal-muted); }
.seal__lead { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--seal-muted); }
.seal .check, .seal__version { margin: 0; font-size: 0.92rem; font-weight: 500; }
.seal__version { color: var(--seal-muted); }
.seal .check code, .seal code { color: var(--seal-ink); }
.check--wait .dot { background: var(--wait); }

.livedot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ok); margin-right: 0.5rem; vertical-align: 0.05em; }
@media (prefers-reduced-motion: no-preference) { .livedot, .badge--live::before { animation: beat 1.8s ease-in-out infinite; } }
@keyframes beat { 50% { opacity: 0.35; } }

.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 0; margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); }
.vital { padding: 0.25rem 1.25rem 0.5rem; border-left: 1px solid var(--rule); display: grid; gap: 0.3rem; align-content: start; }
.vital:first-child { border-left: 0; padding-left: 0; }
.vital dt { font: 600 0.74rem var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.vital dd { margin: 0; display: grid; gap: 0.25rem; }
.vital b { font: 750 clamp(2.4rem, 5vw, 3.8rem)/1 var(--sans); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.vital--ledger b { color: var(--act); }
.vital span { font-size: 0.9rem; color: var(--muted); }
.countdown { display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px; background: color-mix(in oklab, var(--wait) 14%, transparent); color: var(--wait); font: 650 0.82rem var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.countdown--now { background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }

.now { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.75rem, 4vw, 3.5rem); }
.now h3, .sub-head { font: 650 0.8rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem; }
.sub-head { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.feed { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--rule); display: grid; gap: 0.15rem; }
.feed__item { position: relative; display: grid; gap: 0.1rem; padding: 0.5rem 0; }
.feed__item::before { content: ""; position: absolute; left: calc(-1.1rem - 6px); top: 0.95rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--muted); }
.feed--rfc::before, .feed--law::before { border-color: var(--act); }
.feed--machine::before { border-color: var(--ok); background: var(--ok); }
.feed__item a { color: var(--ink); text-decoration: none; font-weight: 550; }
.feed__item a:hover { color: var(--act); text-decoration: underline; }
.feed__when { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed__routine { margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--muted); }
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.cal__item { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 0.25rem 0.9rem; align-items: center; padding: 0.65rem 0.8rem; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.cal__date { display: grid; justify-items: center; line-height: 1; font: 600 0.7rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cal__date b { font: 750 1.45rem/1 var(--sans); color: var(--ink); letter-spacing: -0.02em; margin-bottom: 0.15rem; }
.cal__item a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.cal__item a:hover { color: var(--act); text-decoration: underline; }
.cal--engine { border-left: 3px solid var(--act); }
.cal__sub { font-size: 0.86rem; color: var(--muted); margin: 0.9rem 0 0; }

.badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.6rem; border-radius: 999px; font: 700 0.7rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; background: var(--shade); color: var(--ink); }
.badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.badge--live { background: color-mix(in oklab, var(--ok) 18%, var(--panel)); color: var(--ok); }
.badge--recorded { background: color-mix(in oklab, var(--wait) 16%, var(--panel)); color: var(--wait); }
.robots { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.robot { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: grid; align-content: start; }
.robot--live { border-color: color-mix(in oklab, var(--ok) 55%, var(--rule)); }
.robot figure { margin: 0; position: relative; }
.robot__frame { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--shade); display: block; }
.robot__frame--none { background: repeating-linear-gradient(135deg, var(--shade) 0 10px, transparent 10px 20px); aspect-ratio: 4 / 3; }
.robot figcaption { position: absolute; left: 0.6rem; top: 0.6rem; display: flex; gap: 0.35rem; }
.robot h3, .robot p { margin: 0; padding: 0 1rem; }
.robot h3 { font-size: 1.1rem; padding-top: 0.85rem; }
.robot p { font-size: 0.9rem; padding-top: 0.35rem; }
.robot p:last-child { padding-bottom: 1rem; padding-top: 0.75rem; }
.robot__meta { color: var(--muted); }
.robots__none { border: 1px dashed var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.robots__none b { color: var(--ink); }

.rec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.25rem, 3vw, 2.5rem); background: var(--panel); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 4px); padding: clamp(1rem, 2.5vw, 1.5rem); }
.rec__frames { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; align-content: start; }
.rec__frames figure { margin: 0; }
.rec__frames img { width: 100%; height: auto; border-radius: 10px; background: var(--shade); }
.rec__frames figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }
.rec__body h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.5rem; }
.rec__body > p { margin: 0 0 0.9rem; color: var(--muted); }
.rec__label { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--muted); }
.rec__steps { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.2rem; font-size: 0.92rem; }
.rec__steps li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.5rem; }
.rec__steps span { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.traces { width: 100%; height: 9rem; display: block; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; }
.trace { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trace__step { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.trace--0 { stroke: var(--t0); background: var(--t0); } .trace--1 { stroke: var(--t1); background: var(--t1); } .trace--2 { stroke: var(--t2); background: var(--t2); }
.trace--3 { stroke: var(--t3); background: var(--t3); } .trace--4 { stroke: var(--t4); background: var(--t4); } .trace--5 { stroke: var(--t5); background: var(--t5); }
.traces__key { list-style: none; margin: 0.5rem 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.78rem; color: var(--muted); }
.traces__key i { display: inline-block; width: 0.9rem; height: 3px; border-radius: 2px; margin-right: 0.35rem; vertical-align: 0.2em; }
.cmds { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.cmds li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }

.steps h4 { font-size: 1rem; margin: 0 0 0.3rem; }
.params-wrap { margin-top: 1.5rem; }
.ledger-wrap { margin-top: 1.5rem; }
.library { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.library a { display: grid; gap: 0.3rem; padding: 1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; height: 100%; }
.library b { font: 650 1.1rem var(--serif); }
.library span { font-size: 0.88rem; color: var(--muted); }
.library a:hover b { color: var(--act); text-decoration: underline; }

/* ---------- narrow screens ---------- */
@media (max-width: 64rem) {
  :root { --margin: 3rem; }
  .hero, .two, .mission, .now, .rec { grid-template-columns: minmax(0, 1fr); }
  .vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc, .article { grid-template-columns: var(--margin) minmax(0, 1fr); }
  .clause .table-wrap, .clause pre.figure { grid-column: 2; }
}
@media (max-width: 40rem) {
  :root { --gutter: 1rem; }
  body { font-size: 1rem; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .doc, .article { grid-template-columns: minmax(0, 1fr); }
  .doc > *, .doc .in-margin, .article > *, .article .num, .article > p, .clause .table-wrap, .clause pre.figure { grid-column: 1; grid-row: auto; text-align: left; }
  .article .num { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; padding: 0; }
  .article .num b { display: inline; font-size: 2rem; margin: 0; }
  .sheet-title .in-margin { display: none; }
  .lined .ln { display: none; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .kinds li { grid-template-columns: 7rem minmax(0, 1fr) 3rem; }
  .vitals { grid-template-columns: minmax(0, 1fr); }
  .vital { border-left: 0; padding-left: 0; }
  .runhead__act { display: none; }
  .cal__item { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .cal__item .countdown { grid-column: 2; justify-self: start; }
  .rec__frames { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .runhead, .site-foot, .btn { display: none; }
}
