/* REAGENT — desk.
   Manrope for everything a person reads, mono kept for the things that are
   literally machine text: addresses, selectors, commands. The old page set
   body copy in a monospace face, which is why it read like a log file.

   Colour means one thing throughout. Red is a power somebody else holds over
   your balance, or a check that failed. Green is that power being absent, or a
   check that passed. Amber is this desk having failed to look — a fact about
   the desk, never about the token. */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --paper: #f4f6ef;
  --white: #fff;
  --ink: #16301f;
  --muted: #57685b;
  --soft: #8a9789;
  --green: #256b41;
  --green-bright: #38935c;
  --green-deep: #123726;
  --green-light: #e2f0e2;
  --gold: #a87a1f;
  --gold-bright: #d9ae4b;
  --gold-light: #faeecd;
  --line: #ccd6c8;
  --line-soft: #e4ebe0;
  --red: #b23c22;
  --red-light: #fce6de;
  --amber: #96701a;
  --amber-light: #fbf0d3;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  --nav-h: 62px;
  --r: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 16px/1.62 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse 900px 520px at 78% -6%, #dfeadb66, transparent 70%);
}
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
img { max-width: 100%; }
code, .mono { font-family: var(--mono); }
::selection { background: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { width: min(1280px, calc(100% - 40px)); margin: auto; }

/* ---------------------------------------------------------------- nav */
.nav {
  height: var(--nav-h); border-bottom: 1px solid var(--line);
  /* Solid rather than frosted: this bar is sticky and passes over the
     bench, and a backdrop blur over a canvas that changes every frame is
     re-computed every frame. At 93% opacity there was nothing to see
     through it anyway. */
  background: #f6f8f2;
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 0 max(20px, calc((100vw - 1280px) / 2));
}
.nav-mark { display: flex; gap: 10px; align-items: center; flex: none; font-weight: 800; letter-spacing: -.02em; }
.nav-mark img { width: 30px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.pagenav { display: flex; gap: 4px; }
.pagenav a {
  padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  border-radius: 999px;
}
.pagenav a:hover { background: #e7efe2; color: var(--ink); }
.pagenav a[aria-current="page"] { background: var(--ink); color: #f2f7ec; }
.nav .spacer { margin-left: auto; }
.navbtn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px;
  border-radius: 999px; font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  transition: transform .14s, box-shadow .14s, background .14s;
}
.navbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px #16301f18; }
.navbtn.dark { background: var(--ink); color: #eef5e8; border-color: var(--ink); }
.navbtn.dark:hover { background: #1f4029; }
.navbtn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------------------------------------------------------------- bits */
.chip {
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid #c6d4c0; color: #3f5c46; background: #eaf2e6; white-space: nowrap;
}
.chip.gold { color: #7d5a13; background: var(--gold-light); border-color: #e2caa0; }
.chip.dark { color: #eef5e8; background: var(--green-deep); border-color: var(--green-deep); }

.frame {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white);
  box-shadow: 0 1px 0 #ffffff inset, 0 10px 30px #16301f0d;
  position: relative;
}
.panel-head {
  min-height: 46px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.panel-head b { color: var(--ink); font-weight: 800; }
.panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--muted); flex-wrap: wrap;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 14px 26px; border-radius: 999px;
  font-size: 15.5px; font-weight: 800; white-space: nowrap;
  border: 1px solid #23492f; color: #fffbed;
  background: linear-gradient(160deg, #35784c, #17402a);
  box-shadow: 0 8px 20px #16301f2e, inset 0 1px 0 #ffffff36;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 26px #16301f38, inset 0 1px 0 #ffffff36; }
.button:disabled { cursor: not-allowed; filter: grayscale(.45) brightness(.94); opacity: .8; box-shadow: none; }
.button .sub { font-weight: 600; opacity: .72; font-size: 13px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 46px 0 22px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero .kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; color: var(--gold); }
.hero h1 { font-size: 60px; line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 14px 0 0; }
.hero h1 em { font-style: normal; color: var(--green-bright); }
.hero .say { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 480px; }
.hero-art { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero-art img { width: 108px; height: 120px; object-fit: contain; image-rendering: pixelated; animation: bob 4.6s steps(3, end) infinite; }
.hero-art canvas { width: min(100%, 360px); height: auto; }
@keyframes bob { 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none !important; } }

/* ---------------------------------------------------------------- ask */
.ask { padding: 20px; margin-top: 4px; }
.ask .row { display: grid; grid-template-columns: 210px 1fr auto; gap: 12px; }
.ask select, .ask input {
  width: 100%; padding: 15px 17px; border-radius: 999px; font-size: 15.5px;
  border: 1px solid #cbd6c5; background: #fbfcf8; font-weight: 600;
}
.ask input { font-family: var(--mono); font-size: 14.5px; font-weight: 400; }
.ask input:focus, .ask select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px #a87a1f1f; }
.ask .under { display: flex; gap: 12px; align-items: center; margin-top: 13px; padding: 0 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.ask .under b { color: var(--green); font-weight: 700; }
/* Wraps because there are four of these now: on a narrow phone the row would
   otherwise run past the frame instead of folding. */
.ask .examples { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; }
.ask .examples button {
  border: 1px solid #cbd6c5; padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #3f5c46; background: #eef4ea;
}
.ask .examples button:hover { background: var(--gold-light); border-color: #e2caa0; color: #7d5a13; }

/* a plate, used for everything the desk needs to say */
.plate {
  margin-top: 14px; border-radius: 12px; padding: 13px 16px; font-size: 14px;
  font-weight: 600; display: none; align-items: center; gap: 11px;
  border: 1px solid; line-height: 1.55;
}
.plate.show { display: flex; }
.plate::before { font-size: 16px; }
.plate.warn { color: #7d5a13; background: var(--gold-light); border-color: #e6cfa4; }
.plate.warn::before { content: "◔"; }
.plate.bad { color: #8e3319; background: var(--red-light); border-color: #eec2b3; }
.plate.bad::before { content: "!"; font-weight: 800; }
.plate.good { color: var(--green); background: var(--green-light); border-color: #bcdcc0; }
.plate.good::before { content: "✓"; }

/* ---------------------------------------------------------------- bench */
.bench { margin-top: 18px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.bench-frame { overflow: hidden; display: flex; flex-direction: column; position: relative; }
.bench-frame iframe { width: 100%; height: 470px; border: 0; display: block; background: #0d1a13; }

/* the hand-off card sits on the bench itself, over the crew, so it is where a
   person is already looking when the run ends */
.overlay {
  position: absolute; left: 50%; bottom: 22px; transform: translate(-50%, 14px);
  z-index: 6; width: min(520px, calc(100% - 40px));
  /* Sits on the bench itself, so the same applies: opaque, no blur. */
  background: #0f2418; color: #eef5e8; border: 1px solid #47654a;
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 18px 40px #08140d66;
  opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
}
.overlay.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.overlay b { display: block; font-size: 17px; font-weight: 800; }
.overlay p { font-size: 13.5px; color: #b9cdb4; margin-top: 5px; }
.overlay .go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: linear-gradient(180deg, #f0d79a, #d9b969); color: #34280a;
  border-radius: 999px; padding: 9px 17px; font-weight: 800; font-size: 14px;
}
.overlay .go:hover { filter: brightness(1.05); }
.overlay .lock { margin-top: 11px; font-size: 12.5px; color: #d9c07a; display: flex; align-items: center; gap: 8px; }
.overlay .lockbar { flex: 1; height: 4px; background: #2b4434; border-radius: 999px; overflow: hidden; }
.overlay .lockbar i { display: block; height: 100%; width: 0; background: var(--gold-bright); transition: width 1s linear; }

/* ---------------------------------------------------------------- status */
.status { display: flex; flex-direction: column; }
.status-body { padding: 20px; flex: 1; }
.status .stage { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--gold); }
.status h3 { font-size: 27px; letter-spacing: -.04em; font-weight: 800; margin: 8px 0 0; }
.status .sub { font-size: 14.5px; color: var(--muted); margin-top: 9px; }
.bar { height: 12px; border-radius: 999px; background: #e6ece0; overflow: hidden; margin: 20px 0 9px; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--green-bright), var(--gold-bright));
  transition: width .5s linear; }
.bar-note { font-size: 13px; color: var(--soft); display: flex; justify-content: space-between; font-weight: 600; }
.steps { margin-top: 18px; display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14px; align-items: baseline; color: var(--soft); }
.step .tick { text-align: center; font-weight: 800; }
.step.done { color: var(--ink); }
.step.done .tick { color: var(--green-bright); }
.step.active { color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------------------- report */
#report { scroll-margin-top: 76px; }
.section { padding: 58px 0 0; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.section-label h2 { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.report-empty { padding: 42px 28px; color: var(--muted); font-size: 16px; }

.rep { overflow: hidden; }
.rep-head {
  padding: 28px 30px; color: #eef5e8;
  background: linear-gradient(135deg, #17402a 0%, #0f2c1d 58%, #123726 100%);
  position: relative;
}
.rep-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 420px 200px at 88% 0%, #d9ae4b26, transparent 70%);
}
.rep-head .kicker { font-size: 12px; font-weight: 800; letter-spacing: .13em; color: var(--gold-bright); }
.rep-head h2 { font-size: 40px; font-weight: 800; letter-spacing: -.045em; margin: 9px 0 0; }
.rep-head h2 small { font-size: 19px; font-weight: 600; color: #a9c2a6; letter-spacing: -.01em; }
.rep-head .meta { font-size: 13px; color: #a9c2a6; margin-top: 12px; display: flex; gap: 18px; flex-wrap: wrap; }
.rep-head .meta code { color: var(--gold-bright); font-size: 12.5px; }

.rep-grid { display: grid; grid-template-columns: 1.3fr 1fr; }
.rep-grid > div { padding: 26px 30px; }
.rep-grid > div + div { border-left: 1px solid var(--line-soft); background: #fbfcf8; }
.rep-lede { font-size: 23px; line-height: 1.42; letter-spacing: -.028em; font-weight: 700; }
.rep-sub { font-size: 15.5px; color: var(--muted); margin-top: 14px; }
.rep-catch { margin-top: 20px; border-radius: 12px; background: #fdf1ec; border: 1px solid #eec2b3; padding: 15px 17px; font-size: 15px; }
.rep-catch b { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--red); margin-bottom: 7px; }
.rep-watch { margin-top: 18px; }
.rep-watch b { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--soft); margin-bottom: 9px; }
.rep-watch ul { margin: 0; padding-left: 20px; }
.rep-watch li { font-size: 14.5px; color: var(--muted); padding: 4px 0; }

.grade { display: flex; align-items: center; gap: 20px; }
.grade .letter {
  width: 112px; height: 112px; flex: none; border-radius: 20px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: #fff;
}
.grade .letter b { font-size: 50px; font-weight: 800; letter-spacing: -.05em; }
.grade .letter span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; margin-top: 7px; opacity: .85; }
.grade.a .letter, .grade.b .letter { background: linear-gradient(150deg, #3f9c63, #1d6640); }
.grade.c .letter { background: linear-gradient(150deg, #d2a340, #9b7317); }
.grade.d .letter, .grade.f .letter { background: linear-gradient(150deg, #c2512f, #8c3218); }
.grade.withheld .letter { background: linear-gradient(150deg, #9aa89a, #6f7d70); }
.grade .say { font-size: 14px; color: var(--muted); }
.grade .say b { color: var(--ink); display: block; font-size: 17px; font-weight: 800; margin-bottom: 5px; }

.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.numbers div { background: var(--white); border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px 15px; }
.numbers b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.numbers span { font-size: 12px; color: var(--soft); font-weight: 600; }
.numbers .na b { color: var(--soft); font-size: 15px; }

.factors { border-top: 1px solid var(--line-soft); }
.factor { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 15px 30px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.factor .what { font-size: 15.5px; font-weight: 700; }
.factor .reading { display: block; font-size: 14px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.factor .pts { font-size: 12.5px; font-weight: 700; white-space: nowrap; padding: 6px 12px; border-radius: 999px; }
.factor.hot .pts { color: #8e3319; background: var(--red-light); }
.factor.cool .pts { color: var(--green); background: var(--green-light); }
.factor.na .pts { color: var(--amber); background: var(--amber-light); }

.notes { display: grid; grid-template-columns: repeat(3, 1fr); }
.note { padding: 20px 24px; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.note .who { display: flex; align-items: center; gap: 11px; }
.note .who svg { width: 38px; height: 42px; flex: none; }
.note .who b { font-size: 16px; font-weight: 800; }
.note .who span { font-size: 11px; font-weight: 700; letter-spacing: .07em; color: var(--soft); display: block; }
.note p { font-size: 14.5px; color: var(--muted); margin-top: 11px; }

.paths { display: grid; grid-template-columns: repeat(3, 1fr); }
.path { padding: 22px 24px; border-top: 1px solid var(--line); border-right: 1px solid var(--line-soft); }
.path b { font-size: 16.5px; font-weight: 800; }
.path p { font-size: 14px; color: var(--muted); margin-top: 9px; }
.path .breaks { font-size: 13px; color: var(--soft); margin-top: 12px; border-top: 1px dashed #d9e0d5; padding-top: 10px; }

details.sources { border-top: 1px solid var(--line); background: #fbfcf8; }
details.sources > summary { padding: 17px 30px; cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--muted); list-style: none; }
details.sources > summary::-webkit-details-marker { display: none; }
details.sources > summary::before { content: "+ "; color: var(--gold); }
details.sources[open] > summary::before { content: "− "; }
.sources-body { padding: 0 30px 24px; font-size: 14px; color: var(--muted); }
.sources-body h4 { font-size: 14.5px; font-weight: 800; color: var(--green); margin-top: 16px; }
.sources-body code { color: var(--green); overflow-wrap: anywhere; font-size: 12.5px; }

/* ---------------------------------------------------------------- crew */
/* All eight stand in one row on a desktop: the crew is one team, and a wrapped
   grid read as two ranks of different importance. The card is therefore sized
   from the column it lands in rather than from a fixed portrait. */
.crew { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.agent-card {
  padding: 14px 10px 16px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 6px; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.agent-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px #16301f1f; border-color: #bccdb6; }
.agent-art {
  width: 100%; max-width: 116px; aspect-ratio: 1 / 1.12;
  display: grid; place-items: center;
}
.agent-art img, .agent-art svg, .agent-art canvas {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
/* While the live scene is drawing into this card, the still portrait behind it
   would show through the canvas's transparent background. */
.agent-art.live img, .agent-art.live svg { display: none; }
.agent-card b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.agent-card .beat {
  font-size: 9px; font-weight: 700; letter-spacing: .06em; color: var(--soft);
  line-height: 1.35;
}
/* The question each agent owns, clamped so one long line cannot make its card
   twice the height of the one beside it. The full text is in the title. */
.agent-card span.line {
  font-size: 11.5px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.agent-card.lead { background: linear-gradient(160deg, #fffdf6, #f6efdc); border-color: #e2caa0; }
.agent-card.lead b { color: var(--gold); }

/* ---------------------------------------------------------------- self-host */
.selfhost { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0; overflow: hidden; }
.selfhost > div { padding: 26px 28px; }
.selfhost h3 { font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.selfhost p { font-size: 15px; color: var(--muted); margin-top: 10px; }
.selfhost .terminal {
  background: var(--green-deep); color: #dbe9d2; padding: 24px 26px;
  font: 400 13.5px/2 var(--mono); overflow-wrap: anywhere;
}
.selfhost .terminal .c { color: #82a186; }
.selfhost .terminal .p { color: var(--gold-bright); }

footer { margin-top: 60px; padding: 22px 0 50px; border-top: 1px solid var(--line); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--soft); }
footer .links { margin-left: auto; display: flex; gap: 18px; font-weight: 600; }
footer a:hover { color: var(--gold); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 44px; }
  .bench { grid-template-columns: 1fr; }
  .crew { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .agent-card span.line { -webkit-line-clamp: 3; }
  .rep-grid, .notes, .paths, .selfhost { grid-template-columns: 1fr; }
  .rep-grid > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
}
/* The header carries a logo, four links and two buttons. Below this the two
   will not fit beside the rest, and the dev link is the one a visitor needs
   least — GitHub stays. */
@media (max-width: 900px) {
  .navbtn:not(.dark) { display: none; }
}
@media (max-width: 660px) {
  .nav { gap: 8px; }
  .navbtn.dark { padding: 8px 11px; }
  .pagenav a { padding: 6px 8px; font-size: 12.5px; }
}

@media (max-width: 720px) {
  .ask .row { grid-template-columns: 1fr; }
  .ask select, .ask input, .button { border-radius: 14px; }
  .crew { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; } .rep-head h2 { font-size: 28px; }
  .pagenav a { padding: 7px 10px; font-size: 13px; }
}

/* ---------------------------------------------------------------- pages */
/* The written pages share the desk's language rather than a second one: same
   type, same frames, same meaning for every colour. */

body.page { padding-bottom: 60px; }
.page-head { padding: 52px 0 6px; max-width: 820px; }
.page-head .kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; color: var(--gold); }
.page-head h1 { font-size: 46px; font-weight: 800; letter-spacing: -.05em; line-height: 1.05; margin-top: 14px; }
.page-head p { font-size: 17px; color: var(--muted); margin-top: 16px; }

/* A reference table cannot be narrower than its own columns, so on a phone it
   keeps its shape and swipes inside its card rather than dragging the page
   sideways with it. */
.scroller { overflow-x: auto; overscroll-behavior-x: contain; }
table.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
table.grid th, table.grid td {
  text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
table.grid thead th {
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; color: var(--soft);
  background: #fbfcf8;
}
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid td:first-child { color: var(--green); font-weight: 700; white-space: nowrap; }
table.grid code { color: var(--green); font-size: 13px; overflow-wrap: anywhere; }

.legend { display: grid; gap: 4px; padding: 10px; }
.legend div {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center;
  padding: 13px 14px; border-radius: 10px;
}
.legend div:nth-child(odd) { background: #fbfcf8; }
.legend b {
  font-size: 19px; text-align: center; width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.legend span { font-size: 14.5px; color: var(--muted); }
.legend .m-live { color: var(--red); background: var(--red-light); }
.legend .m-plain { color: var(--muted); background: #eef2ea; }
.legend .m-absent { color: var(--green); background: var(--green-light); }
.legend .m-unchecked { color: var(--amber); background: var(--amber-light); }
.legend .m-blocked { color: #5c4d7a; background: #efeaf7; }

.codebox {
  background: var(--green-deep); color: #dbe9d2; border-radius: var(--r);
  padding: 22px 24px; font: 400 13.5px/2 var(--mono); overflow-wrap: anywhere;
}
.codebox .c { color: #82a186; }
.codebox .p { color: var(--gold-bright); }

.split .ok h3 { color: var(--green); }
.split .no h3 { color: var(--red); }
.split li b { color: var(--ink); }

@media (max-width: 720px) {
  .page-head h1 { font-size: 32px; }
  .legend div { grid-template-columns: 38px 1fr; gap: 12px; }
  .legend b { width: 38px; height: 38px; font-size: 16px; }
  table.grid th, table.grid td { padding: 11px 12px; font-size: 14px; }
}

/* --------------------------------------------------------------- archive */
/* Finished work does not sit in the live slot forever. It folds down to a row
   here, and the slot goes back to saying what will land in it next. Only the
   three most recent are kept, and only in this browser. */

.archive { margin-top: 14px; }
.archive-head {
  font-size: 12px; font-weight: 700; letter-spacing: .09em; color: var(--soft);
  padding: 0 4px 10px;
}
.archive-item {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white);
  margin-bottom: 10px; overflow: hidden;
  box-shadow: 0 1px 0 #fff inset, 0 6px 18px #16301f0a;
}
.archive-item > summary {
  list-style: none; cursor: pointer; padding: 15px 18px;
  display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 14px;
  align-items: center; font-size: 15px;
}
.archive-item > summary::-webkit-details-marker { display: none; }
.archive-item > summary:hover { background: #fbfcf8; }
.archive-item .tick {
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff;
}
.archive-item .tick.a, .archive-item .tick.b { background: linear-gradient(150deg, #3f9c63, #1d6640); }
.archive-item .tick.c { background: linear-gradient(150deg, #d2a340, #9b7317); }
.archive-item .tick.d, .archive-item .tick.f { background: linear-gradient(150deg, #c2512f, #8c3218); }
.archive-item .tick.withheld { background: linear-gradient(150deg, #9aa89a, #6f7d70); }
.archive-item .sym { font-weight: 800; letter-spacing: -.02em; }
.archive-item .line { color: var(--muted); font-size: 13.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.archive-item .when { font-size: 12.5px; color: var(--soft); white-space: nowrap; }
.archive-item .open { font-size: 12.5px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.archive-item[open] .open::after { content: " ▲"; }
.archive-item:not([open]) .open::after { content: " ▼"; }
.archive-item .rep-head { border-radius: 0; }

@media (max-width: 720px) {
  .archive-item > summary { grid-template-columns: auto 1fr auto; gap: 10px; }
  .archive-item .line, .archive-item .when { display: none; }
}

/* ----------------------------------------------------------- cards & split */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 26px 24px; display: flex; flex-direction: column; }
.card h3 {
  font-size: 19px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3;
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.card h3 > span {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background: var(--gold-light); color: var(--gold);
  font-size: 13px; font-weight: 800; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.card p { font-size: 15px; color: var(--muted); line-height: 1.7; }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > div { padding: 28px 30px; }
.split > div + div { border-left: 1px solid var(--line); }
.split h3 {
  font-size: 19px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
.split h3::before {
  content: ""; width: 9px; height: 9px; border-radius: 3px; flex: none;
  background: var(--soft);
}
.split .ok h3::before { background: var(--green-bright); }
.split .no h3::before { background: var(--red); }
.split p { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* Lists carry their own marker so a line that wraps stays aligned under the
   first word rather than under the bullet. */
.split ul { list-style: none; margin: 14px 0 0; padding: 0; }
.split li {
  position: relative; padding: 10px 0 10px 24px; font-size: 15px;
  color: var(--muted); line-height: 1.65;
  border-bottom: 1px solid var(--line-soft);
}
.split li:last-child { border-bottom: 0; padding-bottom: 0; }
.split li::before {
  content: ""; position: absolute; left: 4px; top: 19px;
  width: 6px; height: 6px; border-radius: 2px; background: #c2cebd;
}
.split .ok li::before { background: var(--green-bright); }
.split .no li::before { background: var(--red); }
.split li b, .split li code { color: var(--ink); }
.split li code { font-size: 13.5px; color: var(--green); }

@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .card, .split > div { padding: 22px 20px; }
  .card h3, .split h3 { font-size: 17px; }
}

/* ------------------------------------------------------------------ phones */
/* Below this the header cannot hold a logo, four links and a button on one
   line, and the hero's wordmark has no room beside the robot. Everything here
   is about width; nothing above is undone. */

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }

  /* Two rows: the logo and GitHub keep the top line, the page links take their
     own and scroll sideways if a fifth one is ever added. */
  .nav {
    height: auto; flex-wrap: wrap; padding: 9px 16px 0; gap: 10px;
    align-items: center;
  }
  .nav .spacer { display: none; }
  .nav-mark { font-size: 15px; }
  .nav-mark img { width: 26px; height: 29px; }
  /* The links moved to their own row, so the top one has room for both
     buttons again — the dev link is only dropped between here and 900, where
     everything still shares a single line. Sitting as a pair also stops the
     GitHub button reading as one stray control adrift on the right. */
  .navbtn { padding: 7px 10px; font-size: 11.5px; gap: 6px; }
  .navbtn:not(.dark) { display: inline-flex; }
  /* The handle alone is the part worth reading; the prefix is what makes
     the pair too wide to share a line at 360. */
  .wide-only { display: none; }
  .navbtn.dark { margin-left: auto; }
  .navbtn svg { width: 14px; height: 14px; }
  .pagenav {
    order: 3; width: 100%; gap: 2px;
    overflow-x: auto; overscroll-behavior-x: contain;
    margin: 0 -16px; padding: 0 16px 8px;
    scrollbar-width: none;
  }
  .pagenav::-webkit-scrollbar { display: none; }
  .pagenav a { flex: none; padding: 7px 12px; font-size: 13.5px; }

  /* The wordmark is the point of this row; the robot beside it is a flourish
     and gives up its width first. */
  .hero { padding: 26px 0 16px; gap: 22px; }
  .hero h1 { font-size: 30px; }
  .hero .say { font-size: 16px; }
  .hero-art { gap: 10px; }
  .hero-art img { width: 58px; height: 64px; flex: none; }
  .hero-art canvas { flex: 1 1 0; min-width: 0; width: 100%; }

  /* A phone screen is mostly height, and the bench must not take all of it:
     what is under it is the answer the visitor came for. */
  .bench-frame iframe { height: 320px; }

  /* Two short tiles read better side by side than five stacked down the page. */
  .numbers { grid-template-columns: 1fr 1fr; }

  /* The card sits on a bench that is now 280 tall; at its desktop size it
     covered nearly all of it. Same words, less around them. */
  .overlay { bottom: 12px; padding: 11px 13px; width: calc(100% - 24px); }
  .overlay b { font-size: 15px; }
  .overlay p { font-size: 12px; margin-top: 3px; }
  .overlay .go { padding: 8px 12px; font-size: 13px; }
  .overlay .lock { margin-top: 8px; font-size: 11.5px; }

  /* Tighter cells, and the first column may wrap: most of these then fit the
     screen outright and never need the swipe. */
  table.grid th, table.grid td { padding: 11px 12px; font-size: 13.5px; }
  table.grid td:first-child { white-space: normal; }

  .card, .split > div { padding: 18px 16px; }
  .agent-card { padding: 12px 8px 14px; }
  .agent-card b { font-size: 14px; }
  .agent-card span.line { -webkit-line-clamp: 3; font-size: 11px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 27px; }
  .bench-frame iframe { height: 280px; }
  .hero-art img { display: none; }     /* the wordmark takes the whole row */
}
