/* esolang.dev: one look for every page. A sans for what you read, a mono for what runs (code, consoles, the wordmark, small
   labels). Colour means something or stays out: each hall has its paint, Evolve is violet, the one amber is the lamp on Run.
   Square corners, hairline rules, WCAG 2.2 AA in light and dark, no external fonts. Spacing and type come only from the
   --s-* and --t-* tokens; token names are shared with the page styles in museum/server and museum/studio. */
:root {
  --bg: #f2f3ef; --surface: #ffffff; --text: #16191b; --muted: #585f5b;
  --accent: #835610; --accent-text: #ffffff; --border: #6f7670; --line: #d3d7cf; --focus: #835610;
  --ok: #17703c; --bad: #a8231b; --warn: #7d5200;
  --code-bg: #eaece6;
  --c1: #3946b8; --c2: #a8501a; --c3: #17703c; --c4: #a8326f; --c5: #11698a; --c6: #6f6400; --c7: #6a3fc0; --c8: #b03a16;
  --sign: #15181a; --sign-ink: #eff1ec; --sign-dim: #9aa29c; --sign-field: #24282b; --sign-edge: #3a4044;
  --term: #15181a; --term-ink: #e4e7e1; --term-dim: #8f9791; --term-bad: #ff9a8f; --lamp: #d9a648;
  --on-hall: #ffffff;
  --evolve: #6a3fc0; --sign-evolve: #b29bff; --hall-shibboleth: var(--evolve);
  --hall-tarpit: #7a2e2e; --hall-functional: #1f5f5b; --hall-rewriting: #8a5a12; --hall-spatial: #2b4c8c;
  --hall-reversible: #5b3a73; --hall-golf: #4f6b2a; --hall-hostile: #5e1f2b; --hall-camouflage: #3f5e45;
  --hall-strange-time: #34356e; --hall-joke: #a34a2e; --hall-life: #1e6b43;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --display: var(--sans); --serif: var(--sans);
  --space: var(--s-4); --radius: 0; --measure: 68ch; --wide: 1120px;
  /* spacing: --s-1 a hairline gap, --s-4 one line and card padding, --s-6 between sections */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 3rem;
  /* type: nothing below --t-xs; --t-hero is the one big line on a door page */
  --t-xs: .8125rem; --t-s: .875rem; --t-m: 1rem; --t-l: 1.25rem; --t-xl: 1.6rem; --t-2xl: clamp(2rem, 5vw, 3rem); --t-hero: clamp(2.6rem, 7vw, 4.2rem);
  /* colour by meaning: --run is the one primary action, --link what you can follow, --current where you are, --evolve the lab */
  --run: var(--lamp); --run-ink: #16191b; --link: var(--accent); --current: var(--lamp);
  /* one colour per model family: its tile, chart line, challenge square and Ask pill */
  --model-cairn: var(--c2); --model-palimpsest: var(--c4); --model-scroll: var(--c1); --model-mosaic: var(--c5); --model-quipu: var(--c6); --model-forge: var(--c8); --model-loom: var(--c7);
  /* what a command does, shared with the Studio */
  --role-move: var(--c5); --role-math: var(--c2); --role-io: var(--c3); --role-loop: var(--c1); --role-comment: var(--muted);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101213; --surface: #181b1d; --text: #e4e7e1; --muted: #9ca39e;
    --accent: #dcaa4c; --accent-text: #16191b; --border: #7d8580; --line: #2d3235; --focus: #dcaa4c;
    --ok: #63d49e; --bad: #ff8f85; --warn: #f2b56b;
    --code-bg: #15181a;
    --c1: #a3b0ff; --c2: #f2a56b; --c3: #63d49e; --c4: #ff8cc4; --c5: #6cd0f5; --c6: #e0d06a; --c7: #c7a2ff; --c8: #ff9a70;
    --sign: #050606; --sign-dim: #8d958f; --sign-field: #181b1d;
    --term: #050606; --term-dim: #7f8781; --lamp: #dcaa4c;
    --evolve: #c7a2ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101213; --surface: #181b1d; --text: #e4e7e1; --muted: #9ca39e;
  --accent: #dcaa4c; --accent-text: #16191b; --border: #7d8580; --line: #2d3235; --focus: #dcaa4c;
  --ok: #63d49e; --bad: #ff8f85; --warn: #f2b56b;
  --code-bg: #15181a;
  --c1: #a3b0ff; --c2: #f2a56b; --c3: #63d49e; --c4: #ff8cc4; --c5: #6cd0f5; --c6: #e0d06a; --c7: #c7a2ff; --c8: #ff9a70;
  --sign: #050606; --sign-dim: #8d958f; --sign-field: #181b1d;
  --term: #050606; --term-dim: #7f8781; --lamp: #dcaa4c;
  --evolve: #c7a2ff;
  color-scheme: dark;
}
.hall-tarpit { --hall: var(--hall-tarpit); } .hall-functional { --hall: var(--hall-functional); }
.hall-rewriting { --hall: var(--hall-rewriting); } .hall-spatial { --hall: var(--hall-spatial); }
.hall-reversible { --hall: var(--hall-reversible); } .hall-golf { --hall: var(--hall-golf); }
.hall-hostile { --hall: var(--hall-hostile); } .hall-camouflage { --hall: var(--hall-camouflage); }
.hall-strange-time { --hall: var(--hall-strange-time); } .hall-joke { --hall: var(--hall-joke); }
.hall-life { --hall: var(--hall-life); } .hall-shibboleth { --hall: var(--evolve); }

/* == Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--sans); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--t-2xl); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--t-l); margin-top: var(--s-5); } h3 { font-size: var(--t-m); margin-top: var(--s-5); } h4 { font-size: var(--t-m); }
p, ul, ol, dl, table, pre, figure { margin: 0 0 var(--s-4); }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre, samp, textarea.mono, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--code-bg); padding: .1em .3em; }
pre { background: var(--code-bg); border: 1px solid var(--line); padding: var(--s-3) var(--s-4); overflow-x: auto; white-space: pre-wrap; font-size: var(--t-s); line-height: 1.5; }
pre code { background: none; padding: 0; }
img, svg, canvas, video { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }
small, .small { font-size: var(--t-s); }
.muted { color: var(--muted); }
.lead { font-size: var(--t-l); color: var(--muted); max-width: 60ch; }
.prose { max-width: var(--measure); min-width: 0; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
/* one small label everywhere, in the mono: the room number, a fact's name, a column head, a form label */
.eyebrow, .room-no, .facts dt, .side h2, th, caption, legend, .field > label, .field > .label, .stats span, figcaption, .crumb .wrap, .steps li b, .first-badge {
  font: 500 var(--t-xs)/1.4 var(--mono); letter-spacing: 0; text-transform: none; color: var(--muted); }

/* == Skip link, screen-reader text */
.skip-link { position: absolute; left: var(--s-2); top: -100px; z-index: 100; background: var(--run); color: var(--run-ink); padding: var(--s-3) var(--s-4); font: 600 var(--t-s)/1 var(--sans); }
.skip-link:focus { top: var(--s-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* == Layout */
.wrap { max-width: var(--wide); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main { display: block; max-width: var(--wide); margin: 0 auto; min-height: 60vh; padding: var(--s-5) max(16px, env(safe-area-inset-left, 0px)) var(--s-6); }
main.bleed { max-width: none; padding: 0 0 var(--s-6); }
main:focus { outline: none; }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.grid, .grid-2 { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

/* == The bar: wordmark, three wings, find. Under it, on Museum pages, the museum's rooms */
.top { position: sticky; top: 0; z-index: 5; background: var(--sign); color: var(--sign-ink); }
.top .wrap { display: flex; align-items: center; gap: var(--s-1) var(--s-4); flex-wrap: wrap; min-height: 56px; padding-block: var(--s-1); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; margin-right: var(--s-1); text-decoration: none; color: var(--sign-ink); font: 700 var(--t-m)/1 var(--mono); letter-spacing: -0.02em; }
.brand-mark { display: block; width: 26px; height: 26px; flex: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-mark rect:first-child { fill: transparent; }
.cursor { display: inline-block; width: .5em; height: .95em; margin-left: 1px; vertical-align: -0.1em; background: var(--lamp); }
.wordmark > span:not(.cursor) { color: var(--sign-dim); font-weight: 400; }
.wings ul, .rooms ul { list-style: none; margin-block: 0; padding-block: 0; display: flex; flex-wrap: wrap; }
.wings ul { padding: 0; gap: 2px; }
.wings a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-2); text-decoration: none; color: var(--sign-dim); font: 600 var(--t-s)/1 var(--sans); border-bottom: 2px solid transparent; }
.wings a:hover { color: var(--sign-ink); }
.wings a[aria-current="page"] { color: var(--sign-ink); border-color: var(--lamp); }
.wings li.evolve a { color: var(--sign-evolve); }
.wings li.evolve a:hover, .wings li.evolve a[aria-current="page"] { color: var(--sign-ink); border-color: var(--sign-evolve); }
.wings li.quiet a { font: 500 var(--t-xs)/1 var(--mono); }
.find { margin-left: auto; flex: 0 1 240px; min-width: 0; display: flex; }
.find input { width: 100%; min-height: 36px; font: 400 var(--t-s)/1 var(--sans); padding: var(--s-1) var(--s-2); background: var(--sign-field); color: var(--sign-ink); border: 1px solid var(--sign-edge); }
.find input::placeholder { color: var(--sign-dim); }
.find input:focus { border-color: var(--sign-dim); }
.rooms { background: var(--bg); border-bottom: 1px solid var(--line); color: var(--text); }
.rooms ul { gap: 0 var(--s-4); }
.rooms a { display: inline-flex; align-items: center; min-height: 38px; text-decoration: none; color: var(--muted); font: 500 var(--t-s)/1 var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rooms a:hover, .rooms a[aria-current="page"] { color: var(--text); }
.rooms a[aria-current="page"] { border-color: var(--accent); }

/* == Footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font: var(--t-s)/1.5 var(--sans); }
.site-foot .wrap { display: grid; gap: var(--s-5); padding-block: var(--s-6); }
.site-foot p, .site-foot ul, .site-foot h2 { margin: 0; }
.foot-tag { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); align-items: baseline; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 12rem)); gap: var(--s-5); }
.site-foot h2 { font: 500 var(--t-xs)/1.4 var(--mono); color: var(--muted); margin-bottom: var(--s-2); }
.site-foot ul { list-style: none; padding: 0; display: grid; gap: var(--s-1); }
.site-foot a { color: var(--muted); display: inline-block; min-height: 32px; padding-block: var(--s-1); }
.site-foot a:hover { color: var(--text); }
.foot-credits { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.foot-credits a { display: inline; min-height: 0; padding: 0; }
.site-foot .wordmark { font: 700 var(--t-s)/1.5 var(--mono); color: var(--text); }
.site-foot .theme { margin-left: auto; }
.theme { min-width: 44px; min-height: 44px; padding: 0; font: 400 var(--t-l)/1 var(--sans); color: inherit; background: none; border: 1px solid var(--line); cursor: pointer; }
.theme:hover { border-color: var(--text); color: var(--text); }
@media (max-width: 560px) { .foot-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* == Page heads, sections */
.page-head { padding-block: var(--s-2) var(--s-4); display: grid; gap: var(--s-2); }
.page-head p, .section-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; padding-block: var(--s-5) var(--s-3); margin-top: var(--s-4); border-top: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: var(--t-l); }
.section-head p { font-size: var(--t-m); max-width: 60ch; }

/* == Cards and wall labels: one card, a hall stripe on top where a hall owns it */
.card, .label-card, .idea-card, .tour-card { background: var(--surface); border: 1px solid var(--line); padding: var(--s-4); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.card > :is(h2, h3):first-child { margin-top: 0; }
a:is(.card, .label-card, .idea-card, .tour-card) { display: flex; flex-direction: column; gap: var(--s-1); color: inherit; text-decoration: none; }
a:is(.card, .label-card, .idea-card, .tour-card):hover { border-color: var(--text); }
a.card:hover :is(h2, h3) { text-decoration: underline; text-decoration-color: var(--accent); }
.label-card, .label-card:hover { border-top: 4px solid var(--hall, var(--text)); }
:is(.label-card, .idea-card, .tour-card) h3 { margin: 0; font-size: var(--t-m); line-height: 1.2; }
:is(.label-card, .idea-card, .tour-card, .room) p { margin: 0; font-size: var(--t-s); line-height: 1.45; color: var(--muted); }
.labels, .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s-3); padding-block: var(--s-4); }
.runs, .badge { display: inline-block; font: 500 var(--t-xs)/1.4 var(--mono); padding: 1px var(--s-1); border: 1px solid var(--border); color: var(--text); background: var(--surface); white-space: nowrap; }
.runs { align-self: flex-start; }

/* == Floor plan */
.plan { display: flex; flex-wrap: wrap; border: 2px solid var(--text); background: var(--text); gap: 2px; }
.room { flex: var(--grow, 4) 1 230px; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; padding: var(--s-3) var(--s-4) var(--s-4); color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--hall) 12%, var(--surface)); }
.room:hover { background: color-mix(in srgb, var(--hall) 24%, var(--surface)); }
.room h3 { margin: 0; font-size: var(--t-m); line-height: 1.15; }
.plinths { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); margin: auto 0 0; padding: 0; list-style: none; font: 500 var(--t-xs)/1.3 var(--sans); }
.plinths li { display: flex; align-items: center; gap: var(--s-1); }
.plinths li::before, .swatch { content: ""; width: 7px; height: 7px; background: var(--hall); flex: none; display: inline-block; }

/* == Hall bands and exhibit heads */
.hallband, .crumb { background: var(--hall, var(--sign)); color: var(--on-hall); }
.hallband .wrap { padding-block: var(--s-5); display: grid; gap: var(--s-2); }
.hallband .hb-text { display: grid; gap: var(--s-2); }
.hallband .eyebrow { color: var(--on-hall); opacity: .85; }
.hallband h1 { margin: 0; font-size: var(--t-2xl); }
.hallband p { margin: 0; max-width: 58ch; }
.hallband a, .crumb a { color: var(--on-hall); text-decoration-color: var(--on-hall); }
.crumb .wrap { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding-block: var(--s-2); color: var(--on-hall); }
.exhibit-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: var(--s-5); align-items: end; padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.exhibit-head h1 { margin: 0; font-size: var(--t-hero); line-height: 0.98; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.exhibit-head .maker { font: 400 var(--t-m)/1.3 var(--sans); color: var(--muted); margin: var(--s-2) 0 0; }
.exhibit-head .hook { font-size: var(--t-l); line-height: 1.45; margin: var(--s-3) 0 0; max-width: 44ch; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); }
.facts div { padding: var(--s-2) var(--s-3); border-top: 1px solid var(--line); min-width: 0; }
.facts div:nth-child(-n+2) { border-top: 0; }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts dd { margin: var(--s-1) 0 0; font: 600 var(--t-s)/1.3 var(--sans); }
.exhibit-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: var(--s-6); padding-block: var(--s-2) 0; }
.side { padding-top: var(--s-5); display: grid; gap: var(--s-5); align-content: start; }
.side h2 { margin: 0 0 var(--s-1); }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--t-s); }
.side li a { display: flex; gap: var(--s-2); align-items: center; min-height: 32px; text-decoration: none; }
.side li a:hover { text-decoration: underline; }
.side li a[aria-current="page"] { font-weight: 700; }
.side li a::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--dot, var(--hall)); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.chips a { font: 500 var(--t-xs)/1 var(--sans); padding: var(--s-2); border: 1px solid var(--line); text-decoration: none; background: var(--surface); }
.chips a:hover { border-color: var(--text); }

/* == Wall text */
.prose h2 { font-size: var(--t-l); margin: var(--s-6) 0 var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.prose h3 { font-size: var(--t-m); margin: var(--s-5) 0 var(--s-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: var(--s-1); }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 0 0 var(--s-4); padding: var(--s-1) 0 var(--s-1) var(--s-4); border-left: 3px solid var(--line); color: var(--muted); }

/* == Consoles: a program, Run, its output */
.console, .output { background: var(--term); color: var(--term-ink); font: var(--t-s)/1.5 var(--mono); border: 1px solid var(--term); }
.console { margin: 0 0 var(--s-3); }
.console:focus-within { border-color: var(--lamp); }
.cline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); }
.prompt { color: var(--lamp); padding-top: 2px; user-select: none; }
.cmd { width: 100%; min-height: 0; background: transparent; color: inherit; font: inherit; border: 0; padding: 2px 0; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd:focus { outline: none; }
.run { min-height: 34px; font: 600 var(--t-xs)/1 var(--sans); padding: var(--s-2) var(--s-3); background: var(--run); color: var(--run-ink); border: 0; cursor: pointer; }
.run:hover { filter: brightness(1.08); }
.run[aria-busy="true"] { background: var(--term-dim); }
.expect { padding: 0 var(--s-3) var(--s-2) var(--s-6); color: var(--term-dim); font-size: var(--t-xs); }
.out { margin: 0; padding: var(--s-2) var(--s-3) var(--s-3) var(--s-6); background: var(--term); color: var(--term-ink); border: 0; border-top: 1px dashed var(--term-dim); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font: inherit; }
.out .err { color: var(--term-bad); }
.out .meta { color: var(--term-dim); }

/* == Buttons and fields: square, 40px targets (44px on phones) */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; min-width: 40px; padding: 0 var(--s-3); font: 600 var(--t-s)/1 var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--text); }
.btn-primary, button.btn-primary, .btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-small { min-height: 30px; padding: 0 var(--s-2); font-size: var(--t-xs); }
.field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.field .hint { color: var(--muted); font-size: var(--t-s); }
input, select, textarea { font: var(--t-m)/1.4 var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: var(--s-2) var(--s-3); min-height: 40px; max-width: 100%; }
textarea { min-height: 8rem; width: 100%; resize: vertical; font-family: var(--mono); line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; }
fieldset { border: 1px solid var(--line); padding: var(--s-3) var(--s-4) var(--s-4); margin: 0 0 var(--s-4); }
legend { padding: 0 var(--s-1); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; padding-bottom: var(--s-3); font-size: var(--t-s); }

/* == Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); border-bottom: 1px solid var(--line); margin-bottom: var(--s-5); }
.tabs [role="tab"] { min-height: 40px; padding: 0; font: 600 var(--t-s)/1 var(--sans); color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* == Output, notes */
.output { padding: var(--s-3) var(--s-4); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 3rem; max-height: 28rem; overflow: auto; }
:is(.output, .console) :is(code, kbd) { background: none; color: inherit; padding: 0; }
:is(.output, .console) :is(.muted, .byte) { color: var(--term-dim); border-color: var(--term-dim); }
.note { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); }
.note.ok { border-left-color: var(--ok); } .note.bad { border-left-color: var(--bad); } .note.warn { border-left-color: var(--warn); }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn-text { color: var(--warn); }

/* == Tables */
.table-wrap, .table { overflow-x: auto; max-width: 100%; margin: 0 0 var(--s-4); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-m); line-height: 1.45; }
caption { text-align: left; padding-bottom: var(--s-2); }
th, td { text-align: left; padding: var(--s-2) var(--s-2) var(--s-2) 0; }
th { border-bottom: 1px solid var(--text); padding-bottom: var(--s-1); }
td { border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* == Figures, details, stats */
figcaption { margin-top: var(--s-1); }
details { margin: var(--s-2) 0 var(--s-4); }
/* the one way to hide an explanation until someone looks: details.more (ui.more(summary, html)) or a.more-link to its own page */
details.more > summary { display: inline-flex; align-items: center; gap: var(--s-2); list-style: none; min-height: 32px; font: 500 var(--t-s)/1.3 var(--mono); color: var(--muted); }
details.more > summary > :is(h2, h3) { display: inline; margin: 0; font: 700 var(--t-l)/1.3 var(--sans); color: var(--text); }
details.more > summary > h3 { font-size: var(--t-m); }
details.more > summary .more-line { flex-basis: 100%; padding-left: calc(1ch + var(--s-2)); font: 400 var(--t-s)/1.4 var(--sans); color: var(--muted); }
details.more:has(> summary > h2, > summary > h3) > summary { flex-wrap: wrap; font-size: var(--t-l); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-block; width: 1ch; color: var(--link); font-weight: 700; }
details.more[open] > summary::before { content: "\2212"; }
details.more > summary:hover { color: var(--text); }
details.more > :not(summary) { max-width: var(--measure); color: var(--muted); font-size: var(--t-s); }
details.more[open] > summary { margin-bottom: var(--s-2); }
a.more-link { font: 500 var(--t-s)/1.3 var(--mono); color: var(--muted); text-decoration: none; }
a.more-link::after { content: " \2192"; color: var(--link); }
a.more-link:hover { color: var(--text); text-decoration: underline; }
/* a glossary word: dotted, with its definition popping up after the sentence on hover or focus */
a.term { text-decoration-style: dotted; text-decoration-color: var(--muted); }
.term-pop { position: absolute; z-index: 6; max-width: min(22rem, calc(100vw - 2rem)); margin-top: 1.6em; padding: var(--s-2) var(--s-3); background: var(--sign); color: var(--sign-ink); font: var(--t-s)/1.45 var(--sans); }
.term-pop[hidden] { display: none; }
summary { cursor: pointer; font: 600 var(--t-s)/1.3 var(--sans); min-height: 32px; display: list-item; }
.stats { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.stats li { min-width: 6rem; }
.stats b { display: block; font-size: var(--t-xl); line-height: 1; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* == Lobby doors */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-5) 0 var(--s-4); }
.door { display: grid; gap: var(--s-1); padding: var(--s-3) var(--s-4); color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); }
.door b { font: 700 var(--t-l)/1.15 var(--sans); }
.door span { font-size: var(--t-m); color: var(--muted); }
.door:hover, .door:focus-visible { border-color: var(--text); border-left-color: var(--accent); }
.door-evolve, .door-evolve:hover, .door-evolve:focus-visible { border-left-color: var(--evolve); }
@media (max-width: 640px) { .doors { grid-template-columns: minmax(0, 1fr); } }

/* == Tours, timeline */
.stops { list-style: none; margin: 0; padding: 0; counter-reset: stop; max-width: 780px; }
.stops li { counter-increment: stop; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.stops li::before { content: counter(stop); font: 500 var(--t-l)/1.3 var(--mono); font-variant-numeric: tabular-nums; color: var(--accent); }
.route { display: flex; gap: 3px; margin-top: auto; padding-top: var(--s-2); }
.route i { flex: 1; height: 5px; background: var(--hall, var(--line)); }
.decade { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.decade h2 { margin: 0; font-size: var(--t-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.decade ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.decade li a { display: flex; align-items: baseline; gap: var(--s-2); padding: var(--s-2) var(--s-2); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--hall); text-decoration: none; font: 500 var(--t-s)/1.2 var(--sans); }
.decade li a:hover { border-color: var(--text); border-left-color: var(--hall); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.prevnext a { text-decoration: none; display: grid; gap: var(--s-1); min-width: 0; }
.prevnext a:last-child { text-align: right; }

/* a program is its characters: no font may fold --> or << into an arrow */
code, kbd, pre, samp, textarea, .mono, .console, .console *, .output, .output * { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* == Narrow screens, motion, print */
@media (max-width: 900px) {
  .exhibit-head, .exhibit-body { grid-template-columns: minmax(0, 1fr); }
  .exhibit-body { gap: 0; }
}
/* sub-navs scroll sideways instead of wrapping */
@media (max-width: 720px) {
  .top .rooms ul, .rooms ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .rooms li { flex: none; }
  .rooms a { margin-bottom: 0; white-space: nowrap; }
}
@media (max-width: 600px) {
  .room { flex-basis: 100%; }
  .decade { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
  .cline { grid-template-columns: auto minmax(0, 1fr); }
  .cline .run { grid-column: 1 / -1; justify-self: start; }
  main { padding-top: var(--s-4); }
}
/* phones: the bar scrolls away, find takes its own line, targets are 44px, fields stay at 16px so iOS never zooms */
@media (max-width: 640px) {
  .top { position: static; }
  .top .wrap { gap: var(--s-1) var(--s-2); padding-block: var(--s-1); }
  .find { flex-basis: 100%; margin-left: 0; margin-bottom: var(--s-1); }

  .wings li.quiet { display: none; }
  .wings a, .rooms a, .btn, button.btn, .run, .tabs [role="tab"], .site-foot a, details.more > summary, .side li a, .chips a, .check, .find input { min-height: 44px; }
  .foot-credits a { min-height: 0; }
  .chips a { display: inline-flex; align-items: center; }
  input, select, textarea, .find input, input.mono, textarea.mono { font-size: 16px; }
  summary { min-height: 44px; padding-block: var(--s-3); }
  .breadcrumb ol { align-items: center; }
  .breadcrumb a { display: inline-block; padding: var(--s-3) 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .site-foot, .skip-link { display: none; }
}
