/* Beam design system: Touchstone, locked 25 Nov 2026.
   Dark first: the page is the touchstone, the gold streak marks what you operate. */

@font-face { font-family: "B612"; src: url("fonts/B612-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "B612"; src: url("fonts/B612-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("fonts/B612Mono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url("fonts/B612Mono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* 60 / 30 / 10 */
  --page: #141619;      /* Basanite */
  --frame: #22262B;     /* Stone */
  --streak: #E9B824;    /* the gold streak: fills only on light, fills and text on dark */
  --on-streak: #141619;
  --streak-text: #E9B824;
  --text: #E9E7E2;
  --on-frame: #E9E7E2;
  --muted: #A7ACB2;
  --line: #3A4047;
  --sheet: #1B1E22;
  /* readings */
  --true: #5CCB8A;
  --false: #FF7A85;
  --norun: #8E959C;

  --heading: "B612", "Segoe UI", sans-serif;
  --body: "B612", system-ui, "Segoe UI", sans-serif;
  --mono: "B612 Mono", ui-monospace, Consolas, monospace;
  --r: 4px;
  color-scheme: light;
}
:root {
  /* Instrument (26 Nov): a warm-grey panel, dark bezels, one signal orange. */
  --page: #ECEAE4;
  --frame: #1A1C1E;
  --streak: #C2410C;
  --on-streak: #FFFFFF;
  --streak-text: #A3360A;
  --text: #1A1C1E;
  --on-frame: #ECEAE4;
  --muted: #4E5257;
  --line: #C9C5BB;
  --sheet: #F6F5F1;
  --true: #17663D;
  --false: #B42318;
  --norun: #5C6168;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.55 var(--body); }
a { color: var(--streak-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--streak); outline-offset: 2px; }
::selection { background: var(--streak); color: var(--on-streak); }
code, pre, kbd { font-family: var(--mono); font-size: 0.82em; }
pre { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 5vw, 48px); margin: 0 0 14px; }
h2 { font-size: 26px; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--streak); color: var(--on-streak); padding: 8px 12px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }

/* Scale rule: the one decoration. Calibration ticks every 8px, taller every 40px. */
.scale {
  height: 9px; color: var(--text); opacity: 0.4; margin: 0;
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 40px) bottom / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px) bottom / 100% 4px no-repeat;
}
section > .scale { margin: 48px 0 18px; }

/* Top bar */
.top { background: var(--frame); color: var(--on-frame); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--on-frame); text-decoration: none; font: 700 25px/1 var(--heading); letter-spacing: 0.02em; }
.labtag { font: 600 14px var(--body); color: var(--muted); }
.top nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.top nav a { color: var(--on-frame); text-decoration: none; font-weight: 600; font-size: 15px; }
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--streak); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.top .scale { color: var(--on-frame); opacity: 0.35; }

/* Hero */
.hero { padding: 44px 0 0; max-width: 860px; }
.lede { font-size: 19px; color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.contrast { list-style: none; padding: 0; margin: 0 0 14px; background: var(--frame); color: var(--on-frame); border-radius: var(--r); }
.contrast li { padding: 14px 16px; display: grid; gap: 6px; }
.contrast li + li { border-top: 1px solid rgb(233 231 226 / 0.12); }
.contrast code { font-size: 14px; color: var(--on-frame); }
.contrast .reading { font-size: 15px; }
.scope { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; margin: 18px 0 0; }

/* Command frame */
.cmd { display: flex; align-items: center; gap: 12px; background: var(--frame); color: var(--on-frame); border-radius: var(--r); padding: 10px 10px 10px 16px; max-width: 660px; margin: 8px 0; }
.cmd code { flex: 1; font-size: 14px; overflow-x: auto; white-space: nowrap; color: var(--on-frame); }
.cmd.wrap code { white-space: pre-wrap; word-break: break-word; }

/* Buttons */
.btn { font: 600 15px var(--body); background: var(--streak); color: var(--on-streak); border: 0; border-radius: var(--r); padding: 9px 16px; min-height: 40px; cursor: pointer; transition: transform 120ms ease-out, filter 120ms ease-out; }
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: translateY(1px); filter: brightness(0.88); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--on-frame); border: 1px solid rgb(233 231 226 / 0.35); }

/* Readings: beam glyph + word on a hairline baseline. Never colour alone. */
.reading { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid currentColor; padding-bottom: 2px; line-height: 1.2; }
.reading svg { flex: none; }
.r-CORRECT, .r-FIXED_BY_WORDING { color: var(--true); }
.r-FALSE_GREEN, .r-FALSE_RED { color: var(--false); }
.r-ERROR, .r-NOT_RUN { color: var(--norun); }
.r-NOT_RUN { border-bottom-style: dashed; font-weight: 400; }
.r-RUNNING { color: var(--streak-text); }
.changed { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.cellstep { display: block; font-size: 13px; color: var(--muted); max-width: 30ch; margin-top: 5px; }

/* Matrix */
.mhead { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-size: 14.5px; color: var(--muted); }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend dt, .legend dd { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; margin: 20px 0 14px; }
.search { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.search input { font: 16px var(--body); color: var(--text); padding: 9px 12px; width: min(340px, 90vw); border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.search input::placeholder { color: var(--muted); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.segmented button { font: 600 14px var(--body); color: var(--text); background: transparent; border: 0; padding: 9px 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button[aria-pressed="true"] { background: var(--streak); color: var(--on-streak); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 13px 16px; vertical-align: top; }
thead th { font: 600 14px var(--body); color: var(--muted); background: var(--sheet); border-bottom: 1px solid var(--line); position: sticky; top: 0; white-space: nowrap; }
thead th .run { display: block; font-weight: 400; font-size: 12.5px; }
tbody tr + tr > * { border-top: 1px solid var(--line); }
table.m tbody th { min-width: 280px; position: sticky; left: 0; background: var(--sheet); font-weight: 400; }
table.m tbody th a { font-weight: 600; color: var(--text); text-decoration-color: var(--line); }
table.m tbody th a:hover { text-decoration-color: var(--streak); }
.sub { display: block; font-weight: 400; color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.empty { padding: 16px 0; color: var(--muted); }

/* Behavior page */
.crumb { margin: 30px 0 8px; font-size: 15px; color: var(--muted); }
.crumb a { color: var(--muted); }
.bhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.bhead h1 { margin: 0; }
.issue { font-weight: 600; }
.agent { border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); margin-top: 26px; overflow: hidden; }
.agent > h2 { background: var(--frame); color: var(--on-frame); font-size: 20px; padding: 11px 16px; margin: 0; }
.agent-body { padding: 6px 16px 16px; }
.label { margin: 14px 0 4px; font-weight: 600; font-size: 15px; color: var(--muted); }
.avoid { margin: 4px 0; padding-left: 20px; }
.avoid li { margin: 4px 0; }
blockquote { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); white-space: pre-wrap; background: var(--sheet); }
.codepair { margin: 14px 0; }
.codepair p { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0; }
.twins { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.twins figure { margin: 0; }
.twins figcaption { font-weight: 600; margin-bottom: 6px; }
.twins iframe { width: 100%; height: 260px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.twins summary { cursor: pointer; margin-top: 8px; color: var(--streak-text); font-weight: 600; }
.steps li { margin-bottom: 10px; }

/* Footer */
.foot { background: var(--frame); color: var(--on-frame); margin-top: 72px; }
.foot .wrap { padding-top: 20px; padding-bottom: 24px; font-size: 14.5px; }
.foot p { margin: 4px 0; color: rgb(233 231 226 / 0.78); }
.foot a { color: var(--on-frame); }

/* Lab */
dialog { border: 1px solid var(--line); border-radius: var(--r); padding: 0; width: min(660px, 94vw); background: var(--sheet); color: var(--text); }
dialog::backdrop { background: rgb(10 11 13 / 0.6); }
dialog h2 { background: var(--frame); color: var(--on-frame); font-size: 22px; padding: 12px 20px; margin: 0; }
dialog form > :not(h2) { margin-left: 20px; margin-right: 20px; }
dialog fieldset { border: 1px solid var(--line); border-radius: var(--r); margin-top: 14px; }
dialog legend { font-weight: 600; padding: 0 4px; }
dialog label { display: block; margin: 10px 0; font-weight: 600; }
dialog input[type="number"], dialog input[type="url"] { display: block; width: 100%; font: 16px var(--body); color: var(--text); padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); margin-top: 4px; background: var(--page); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; max-height: 190px; overflow: auto; }
.checks label { font-weight: 400; margin: 3px 0; }
label.inline { display: flex; gap: 8px; align-items: center; }
.row { display: flex; gap: 10px; margin: 14px 20px 20px; }
dialog .btn.ghost { color: var(--text); border-color: var(--line); }
.runstatus { position: fixed; right: 16px; bottom: 16px; width: min(400px, 92vw); background: var(--frame); color: var(--on-frame); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 14px; z-index: 20; }
.draft-twins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.draft-twins iframe { width: 100%; height: 180px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }

/* Needle settles once when a live reading arrives. */
@keyframes settle { 0% { transform: rotate(-9deg); } 70% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
.reading.arrived svg .beam { transform-origin: 10px 6px; animation: settle 240ms ease-out; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 28px; }
  table.m tbody th { min-width: 210px; }
  .top nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* The balance: Kane's pan and the app's pan, then the reading. */
.balance { margin: 30px 0 8px; background: var(--frame); color: var(--on-frame); border-radius: var(--r); padding: 18px 20px 16px; }
.balance figcaption { font-size: 14px; color: rgb(233 231 226 / 0.7); margin-bottom: 12px; }
.pans { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0; border-top: 2px solid rgb(233 231 226 / 0.85); position: relative; }
.pans::before { content: ""; position: absolute; left: 41.5%; top: -2px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 11px solid rgb(233 231 226 / 0.85); transform: translateX(-50%); }
.pan { padding: 16px 16px 4px 0; }
.pan + .pan { padding-left: 22px; border-left: 1px solid rgb(233 231 226 / 0.14); }
.pan-h { font: 700 22px/1 var(--heading); margin: 0 0 10px; letter-spacing: 0.02em; }
.pan-h span { display: block; font: 400 14px var(--body); color: rgb(233 231 226 / 0.7); margin-top: 4px; letter-spacing: 0; }
.pan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 15px; }
.kane li::before { content: "✓ "; color: var(--true); font-weight: 700; }
.app li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; }
.app .what { font-family: var(--mono); font-size: 13px; }
.app .val { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.app .exp { grid-column: 2; font-size: 13px; color: rgb(233 231 226 / 0.7); }
.app li.ok .val { color: var(--true); }
.app li.no .val { color: var(--false); }
.pan-v { margin: 12px 0 0; font-size: 15px; }
.balance .verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgb(233 231 226 / 0.14); font-size: 16px; }
.balance .reading { font-size: 16px; }
@media all {
  .balance .r-CORRECT, .balance .r-FIXED_BY_WORDING, .balance .kane li::before, .balance .app li.ok .val { color: #5CCB8A; }
  .balance .r-FALSE_GREEN, .balance .r-FALSE_RED, .balance .app li.no .val { color: #FF7A85; }
}

.how { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; gap: 22px; max-width: 760px; }
.how li { counter-increment: how; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
.how li::before { content: counter(how); grid-row: span 3; font: 700 34px/1 var(--heading); color: var(--streak-text); }
.how h3 { margin: 2px 0 4px; font-size: 22px; }
.how p { margin: 0 0 6px; color: var(--muted); }
.changes { margin: 0 0 8px; padding-left: 20px; max-width: 70ch; }
.changes li { margin: 4px 0; }
section > .lede { margin-bottom: 14px; }

@media (max-width: 720px) {
  .pans { grid-template-columns: 1fr; }
  .pans::before { left: 50%; }
  .pan + .pan { padding-left: 0; border-left: 0; border-top: 1px solid rgb(233 231 226 / 0.14); }
}

main > h1:first-child { margin-top: 40px; }

.steps-live { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: rgb(233 231 226 / 0.85); min-height: 3em; }
.steps-live li:last-child { color: var(--on-frame); font-weight: 600; }
select { font: 16px var(--body); color: var(--text); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }

/* ---- Revision 3 (26 Nov): a product page, not a docs page. Same tokens, bigger scale. ---- */
body { font-size: 17px; }
.wrap { max-width: 1240px; padding: 0 32px; }
h2 { font-size: clamp(26px, 2.8vw, 36px); margin-bottom: 14px; }
h3 { font-size: 22px; }
section > .scale { margin: 88px 0 26px; }
.lede { font-size: 20px; }

.hero { max-width: none; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 72px 0 24px; }
.hero h1 { font-size: clamp(36px, 4.3vw, 60px); line-height: 1.02; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--streak-text); display: block; }
.hero .lede { font-size: 21px; }
.hero .cmd { margin-top: 26px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 22px 0 0; font-weight: 600; font-size: 16px; }

.hero-balance { margin: 0; }
.hero-balance > svg { width: 100%; height: auto; display: block; color: var(--text); }
.hero-balance .post, .hero-balance .pivot { fill: currentColor; }
.hero-balance .arm { stroke: currentColor; stroke-width: 8; stroke-linecap: square; }
.hero-balance .needle { fill: var(--streak); }
.hero-balance line:not(.arm) { stroke: currentColor; stroke-width: 1.5; opacity: 0.6; }
.hero-balance .dish { fill: var(--frame); stroke: currentColor; stroke-width: 2; }
.hero-balance .hb-t { font: 700 22px var(--heading); fill: var(--text); letter-spacing: 0.02em; }
.hero-balance .hb-l { font: 600 13px var(--mono); }
.hero-balance .pass .hb-l { fill: var(--true); }
.hero-balance .fail .hb-l { fill: var(--false); }
.hero-balance figcaption { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; margin-top: 10px; font-size: 17px; }
.hero-balance .reading { font-size: 17px; }
@media all { .hero-balance .dish { fill: var(--sheet); } }

.balance { padding: 26px 30px 22px; }
.pan-h { font-size: 28px; }
.pan ul { font-size: 16.5px; gap: 9px; }
.app .what, .app .val { font-size: 14.5px; }

.how.cols { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.how.cols li { grid-template-columns: 1fr; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 16px; align-content: start; }
.how.cols li::before { grid-row: auto; font-size: 46px; margin-bottom: 12px; }
.how.cols pre { margin-top: auto; }

.loop { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; align-items: center; margin-top: 10px; }
.loop .changes { list-style: none; counter-reset: ch; padding: 0; margin: 0; display: grid; gap: 18px; font-size: 18px; }
.loop .changes li { counter-increment: ch; display: grid; grid-template-columns: 34px 1fr; margin: 0; }
.loop .changes li::before { content: counter(ch); font: 700 26px/1 var(--heading); color: var(--streak-text); }
.loop .balance { margin: 0; }

.tools-h { margin: 44px 0 14px; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.tools div { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.tools dt code { font-size: 13.5px; color: var(--streak-text); }
.tools dd { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

.contrast li { padding: 18px 22px; }
.contrast code { font-size: 15px; }
.scope { margin-top: 26px; }

@media (max-width: 960px) {
  .hero, .loop { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 40px; gap: 28px; }
  .how.cols, .tools { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  .how.cols, .tools { grid-template-columns: 1fr; }
  section > .scale { margin-top: 56px; }
  .balance { padding: 20px 18px 16px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .hero-copy, .hero-balance { min-width: 0; }
  .hero-balance figcaption { font-size: 15.5px; }
}

/* Footer: a closing hero with the path to a first verdict (revision 3). */
.foot { margin-top: 120px; padding-bottom: 8px; }
.foot > .scale { color: var(--on-frame); opacity: 0.35; }
.foot-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 72px; padding-bottom: 64px; }
.foot-hero h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; margin: 0 0 18px; color: var(--on-frame); }
.foot-lede { font-size: 20px; color: rgb(233 231 226 / 0.75); margin: 0 0 24px; max-width: 46ch; }
.foot .cmd { background: var(--page); }
@media all { .foot .cmd { background: #22262B; } }
.foot-steps { list-style: none; counter-reset: fs; margin: 0; padding: 0; display: grid; gap: 0; }
.foot-steps li { counter-increment: fs; display: grid; grid-template-columns: 48px 1fr; gap: 4px 0; padding: 16px 0; border-top: 1px solid rgb(233 231 226 / 0.14); }
.foot-steps li:last-child { border-bottom: 1px solid rgb(233 231 226 / 0.14); }
.foot-steps li::before { content: counter(fs); grid-row: span 2; font: 700 30px/1 var(--heading); color: var(--streak); }
.foot-steps code { font-size: 14px; color: var(--on-frame); }
.foot-steps span { font-size: 16px; color: rgb(233 231 226 / 0.7); }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 20px; padding-bottom: 20px; border-top: 1px solid rgb(233 231 226 / 0.14); font-size: 14.5px; }
.foot-base .brand { font-size: 20px; gap: 8px; }
.foot-base nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-base nav a { color: var(--on-frame); text-decoration: none; font-weight: 600; }
.foot-base nav a:hover { text-decoration: underline; text-decoration-color: var(--streak); }
.foot-base p { margin: 0 0 0 auto; color: rgb(233 231 226 / 0.6); }
@media (max-width: 960px) { .foot-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 48px; } .foot-base p { margin-left: 0; } }

/* Behavior page (revision 3): a clear header, framed demo pages, a light "Use" panel. */
.bhero { margin-top: 8px; max-width: 900px; }
.bhero h1 { font-size: clamp(32px, 4vw, 52px); margin: 0 0 14px; }
.bmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 18px; font-size: 16px; }
.bhero .lede { margin-bottom: 0; }
.agent .cmd { background: var(--page); color: var(--text); border: 1px solid var(--line); max-width: none; }
.agent .cmd code { color: var(--text); }
.twins { gap: 24px; }
.device { background: var(--frame); border-radius: var(--r); padding: 0 6px 6px; }
.device figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 10px 10px; margin: 0; color: var(--on-frame); font-size: 15px; font-weight: 400; }
.device figcaption .muted { color: rgb(236 234 228 / 0.65); }
.device figcaption a { color: var(--on-frame); font-weight: 600; font-size: 14px; white-space: nowrap; }
.device iframe { display: block; height: 300px; border: 0; border-radius: 2px; }
.device details { padding: 8px 10px 4px; }
.device summary { color: var(--on-frame); }
.device pre { background: var(--page); color: var(--text); max-height: 320px; overflow: auto; }
table.r tbody th { font-weight: 400; }
table.r tbody th code { font-weight: 400; }
.device iframe { height: 230px; }
@media (max-width: 640px) { .device figcaption { flex-direction: column; gap: 4px; } .bmeta { gap: 8px 16px; } }
@media (max-width: 640px) { table.r { min-width: 620px; } table.r tbody th { min-width: 230px; } }

/* Set up page (revision 3): finish line first, each step beside its code. */
.phero { padding: 56px 0 8px; max-width: 820px; }
.phero h1 { font-size: clamp(36px, 4.4vw, 60px); margin: 0 0 16px; }
.needs { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 16px; color: var(--muted); }
.needs strong { color: var(--text); }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; padding: 40px 0; border-top: 1px solid var(--line); }
.step h2 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(24px, 2.4vw, 30px); margin: 0 0 14px; }
.step-n { color: var(--streak-text); font-size: 1.3em; }
.step-text p { margin: 0 0 12px; }
.step-code .cmd { max-width: none; margin-top: 0; }
.code-label { font-size: 14.5px; color: var(--muted); margin: 18px 0 4px; }
.step-code pre { margin: 0; }
pre.out { background: var(--frame); color: var(--on-frame); border-color: var(--frame); }
table.cmds th { width: 38%; font-weight: 400; }
table.cmds td { color: var(--muted); }
@media (max-width: 900px) { .step { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* How it works page (revision 3). */
.flow { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); }
.flow li { padding: 22px 22px 18px; position: relative; }
.flow li + li { border-left: 1px solid var(--line); }
.flow li + li::before { content: ""; position: absolute; left: -7px; top: 30px; border: 6px solid transparent; border-left-color: var(--line); }
.flow-n { display: block; font: 700 34px/1 var(--heading); color: var(--streak-text); margin-bottom: 12px; }
.flow h3 { margin: 0 0 8px; }
.flow p { margin: 0; color: var(--muted); font-size: 16px; }
section.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 44px; align-items: start; }
section.split > .scale { grid-column: 1 / -1; }
.notes { padding-left: 20px; max-width: 72ch; }
.notes li { margin: 6px 0; }
@media (max-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .flow li:nth-child(3) { border-left: 0; }
  .flow li:nth-child(n+3) { border-top: 1px solid var(--line); }
  section.split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li + li { border-left: 0; border-top: 1px solid var(--line); }
  .flow li + li::before { display: none; }
}
/* Readings on dark frames use the bright pair, like the balance frame. */
.contrast { color: var(--on-frame); }
.contrast li { color: rgb(236 234 228 / 0.8); }
.contrast .r-CORRECT, .contrast .r-FIXED_BY_WORDING { color: #5CCB8A; }
.contrast .r-FALSE_GREEN, .contrast .r-FALSE_RED { color: #FF7A85; }
.contrast li span:not(.reading), .contrast li .muted { color: rgb(236 234 228 / 0.82); }

/* Lab (revision 3). */
.labtag { color: var(--streak); font-weight: 700; }
.labhead { padding-top: 44px; }
#live .controls select { min-width: 280px; min-height: 44px; }
.steps-live .ph, .pan .app .ph { display: block; color: rgb(236 234 228 / 0.55); font-weight: 400; font-style: italic; }
.steps-live li.ph:last-child { color: rgb(236 234 228 / 0.55); font-weight: 400; }
