:root {
  --body: rgba(255, 255, 255, 0.78);
  --glass: rgba(0, 0, 0, 0.38);
  --bg: #000;
  --fg: #fff;
  --dim: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.14);
  --ink: #fff;
  --paper: #000;
}
html[data-theme="light"] {
  --body: rgba(0, 0, 0, 0.78);
  --glass: rgba(255, 255, 255, 0.45);
  --bg: #fff;
  --fg: #000;
  --dim: rgba(0, 0, 0, 0.55);
  --faint: rgba(0, 0, 0, 0.3);
  --line: rgba(0, 0, 0, 0.14);
  --ink: #000;
  --paper: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Helvetica Neue", Inter, system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s, color 0.4s;
}
a { color: inherit; text-decoration: none; }
code, .mono, .digits, .readout { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 400; }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  mix-blend-mode: difference; color: #fff;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { font-size: 15px; letter-spacing: 0.32em; text-transform: lowercase; opacity: 0; transition: opacity 0.8s; }
html.travelled .brand { opacity: 1; }
.rooms { display: flex; gap: 10px; font-size: 11px; letter-spacing: 0.12em; }
.rooms a { opacity: 0.45; padding: 4px 2px; border-bottom: 1px solid transparent; }
.rooms a.on { opacity: 1; border-bottom-color: #fff; }
#invert { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
@media (max-width: 900px) { .rooms { display: none; } }

/* ---------- rooms ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.room {
  min-height: 100vh;
  padding: 120px 0 80px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.room:first-of-type { border-top: 0; }
.room-head { display: grid; grid-template-columns: 80px 1fr; gap: 24px; align-items: baseline; }
.numeral { font-size: 13px; letter-spacing: 0.3em; color: var(--dim); }
.room h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 200; letter-spacing: -0.01em; margin: 0; line-height: 1.05; }
.room h2 .sym { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-weight: 300; margin-right: 0.15em; }
.lede { font-size: clamp(17px, 2vw, 22px); color: var(--dim); max-width: 60ch; margin: 10px 0 0; }

.stage { position: relative; width: 100%; }
.stage canvas {
  display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bg);
  border: 1px solid var(--line);
  touch-action: none;
}
.stage canvas.square { aspect-ratio: 1; max-width: 640px; margin: 0 auto; }
.stage .hint { position: absolute; left: 12px; bottom: 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.readout { position: absolute; right: 12px; top: 10px; font-size: 13px; color: var(--dim); white-space: pre; text-align: right; pointer-events: none; }

.controls { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.controls label { display: flex; align-items: center; gap: 12px; }
.controls output { color: var(--fg); min-width: 4ch; font-family: ui-monospace, Menlo, monospace; letter-spacing: 0; text-transform: none; }
.controls button, .btn {
  background: none; border: 1px solid var(--line); color: var(--fg);
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  padding: 8px 14px; cursor: pointer; border-radius: 0;
}
.controls button:hover, .btn:hover { border-color: var(--fg); }
.controls button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.controls input[type="text"], .controls input[type="number"] {
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg);
  font: 15px ui-monospace, Menlo, monospace; padding: 6px 2px; width: 12ch; outline: none;
}
.controls input[type="text"]:focus { border-bottom-color: var(--fg); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 180px; height: 1px; background: var(--dim); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); border: 0; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--fg); border: 0; cursor: pointer; }

.essay { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 100%; }
.essay p { margin: 0 0 1em; font-size: 16px; max-width: 58ch; }
.essay p:last-child { margin-bottom: 0; }
.essay .big { font-size: clamp(20px, 2.2vw, 26px); font-weight: 200; line-height: 1.4; }
details { border-top: 1px solid var(--line); padding-top: 14px; }
summary { cursor: pointer; list-style: none; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; }
details[open] summary::before { content: "− "; }
details > *:not(summary) { margin-top: 14px; }
.formula { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: 22px; color: var(--fg); margin: 10px 0 16px; }
.formula sup { font-style: normal; font-size: 0.6em; }
.digits { font-size: 14px; line-height: 1.9; word-break: break-all; color: var(--dim); letter-spacing: 0.06em; }
.digits mark { background: var(--fg); color: var(--bg); padding: 0 2px; }

@media (max-width: 760px) {
  .essay { grid-template-columns: 1fr; }
  .room-head { grid-template-columns: 1fr; gap: 6px; }
  .room { padding-top: 90px; }
  main { padding: 0 16px; }
}

/* ---------- hero ---------- */
.hero { min-height: 100vh; display: grid; align-content: center; justify-items: center; text-align: center; gap: 8px; padding: 80px 0 40px; }
.hero canvas { width: min(100%, 900px); aspect-ratio: 3 / 1; display: block; }
.hero h1 { font-size: clamp(44px, 9vw, 120px); font-weight: 100; letter-spacing: 0.18em; margin: 0; line-height: 1; }
.hero .tag { color: var(--dim); font-size: clamp(14px, 1.6vw, 18px); letter-spacing: 0.3em; text-transform: uppercase; margin-top: 10px; }
.hero .scroll { margin-top: 60px; font-size: 11px; letter-spacing: 0.3em; color: var(--faint); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- quotes & text rooms ---------- */
.quote { min-height: 60vh; display: grid; place-content: center; text-align: center; padding: 100px 0; border-top: 1px solid var(--line); }
.quote blockquote { margin: 0; font-size: clamp(24px, 3.4vw, 44px); font-weight: 200; max-width: 24ch; line-height: 1.3; }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); }

.constants { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.constants > div { background: var(--bg); padding: 26px 22px; }
.constants .sym { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: 48px; font-weight: 300; line-height: 1; }
.constants .name { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); margin: 8px 0 12px; }
.constants .val { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--dim); line-height: 1.7; }
.constants p { font-size: 14px; color: var(--dim); margin: 12px 0 0; }

.timeline { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.timeline li { break-inside: avoid; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; display: grid; grid-template-columns: 84px 1fr; gap: 14px; }
.timeline .yr { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--dim); padding-top: 3px; }
.timeline b { font-weight: 400; }
@media (max-width: 760px) { .timeline { columns: 1; } }

footer { border-top: 1px solid var(--line); padding: 60px 0 80px; text-align: center; color: var(--dim); font-size: 13px; letter-spacing: 0.08em; }
footer .brand { display: block; font-size: 22px; letter-spacing: 0.3em; margin-bottom: 14px; color: var(--fg); }

/* ---------- journey (scroll-driven field behind everything) ---------- */
#journey { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, footer, .top { position: relative; z-index: 1; }
.top { position: fixed; }
.rooms, #invert, #sound { opacity: 0; transition: opacity 0.8s; }
html.travelled .rooms, html.travelled #invert { opacity: 1; }
.depth { position: fixed; left: 24px; bottom: 18px; z-index: 2; font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.14em; color: var(--faint); mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: opacity 0.8s; }
html.travelled .depth { opacity: 1; }
.depth sup { font-size: 0.75em; }
.hero .scroll { font-size: 22px; color: var(--faint); margin-top: 40px; animation: bob 3s ease-in-out infinite; }
.hero { gap: 0; }
.timeline.open li { grid-template-columns: 56px 1fr; }
.final { min-height: 100vh; display: grid; place-items: center; position: relative; }
.final > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.final .word { position: relative; font-size: 15px; letter-spacing: 0.32em; color: var(--dim); }
footer { font-size: 11px; letter-spacing: 0.14em; color: var(--faint); padding: 30px 0 40px; border-top: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.progress { position: fixed; top: 0; left: 0; height: 1px; width: 0; background: var(--fg); z-index: 3; opacity: 0.6; pointer-events: none; }
.colophon { position: relative; text-align: center; max-width: 46ch; padding: 0 16px; }
.colophon .word { font-size: clamp(28px, 5vw, 48px); font-weight: 100; letter-spacing: 0.3em; color: var(--fg); margin-bottom: 28px; }
.colophon i { font-style: italic; }



h3.sub { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); font-weight: 400; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- centred layout ---------- */
.room-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
.lede { margin-left: auto; margin-right: auto; }
.controls { justify-content: center; }
h3.sub { text-align: center; }
.essay .big { text-align: center; }
.final { min-height: 100vh; padding: 80px 0; }
/* ---------- contact ---------- */
.contact { display: grid; gap: 12px; margin: 36px auto 0; max-width: 420px; text-align: left; }
.contact input, .contact textarea { background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: 300 15px -apple-system, "Helvetica Neue", sans-serif; padding: 8px 2px; outline: none; resize: vertical; }
.contact input:focus, .contact textarea:focus { border-bottom-color: var(--fg); }
.contact button { justify-self: center; margin-top: 8px; }
.contact .hp { position: absolute; left: -9999px; }
#contact-status { text-align: center; font-size: 12px; color: var(--dim); min-height: 1em; }

/* ---------- one centred column ---------- */
.room { justify-items: center; text-align: center; }
.room > * { width: 100%; max-width: 760px; }
.room > .stage { max-width: 1120px; }
.room > .constants { max-width: 1120px; }
.essay { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
.essay > div { max-width: 640px; }
.essay p { margin-left: auto; margin-right: auto; }
details { text-align: center; }
summary { display: inline-block; }
.formula { text-align: center; }
.digits { text-align: center; }
.timeline { columns: 1; text-align: left; max-width: 640px; margin: 0 auto; }
.timeline li { grid-template-columns: 90px 1fr; }
.stage .readout { text-align: right; }
/* ---------- depth on scroll ---------- */
.depthfx { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { .depthfx { transform: none !important; opacity: 1 !important; filter: none !important; } }

.controls input.pisearch { width: 9ch; text-align: center; letter-spacing: .12em; }
.pifound { text-align: center; font-size: 15px; min-height: 1.5em; line-height: 1.8; }
.pifound b { font-weight: 400; }
.pifound .ctx { font-size: 15px; letter-spacing: .08em; color: var(--dim); word-break: break-all; }
.pifound mark { background: var(--fg); color: var(--bg); padding: 0 3px; }
.pifound .dim { color: var(--dim); font-size: 13px; }

.gap { height: 150vh; pointer-events: none; }
#sound { background: none; border: 0; color: inherit; font-size: 16px; cursor: pointer; line-height: 1; opacity: 0.45; margin-right: 6px; }
#sound.on { opacity: 1; }
html.travelled #sound { opacity: .45; } html.travelled #sound.on { opacity: 1; }
.top > .right { display: flex; align-items: center; }

.colophon { padding-top: 120px; }
.sig { position: relative; margin: 28px auto 0; max-width: 420px; }
.sig canvas { width: 100%; aspect-ratio: 1; display: block; }
#sigread { font-size: 11px; line-height: 1.8; color: var(--dim); min-height: 5.4em; white-space: pre-wrap; }

.pihelp { text-align: center; font-size: 12px; color: var(--dim); margin-top: -18px; }

/* ---------- music: a thin strip, bottom centre ---------- */
.player { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); width: min(440px, calc(100vw - 32px)); transition: opacity .5s; }
.player[hidden] { display: none; }
.player button { background: none; border: 0; color: var(--fg); font-size: 18px; cursor: pointer; padding: 0 4px; opacity: .6; line-height: 1; }
.player button:hover { opacity: 1; }
.pl-mid { flex: 1; min-width: 0; }
#pl-title { font-size: 11px; letter-spacing: .08em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; margin-bottom: 4px; }
#sc { display: block; width: 100%; height: 20px; border: 0; }

.controls.kernel { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; justify-content: center; }
.controls.kernel input { width: 56px; text-align: center; background: none; border: 1px solid var(--line); color: var(--fg); font: 14px ui-monospace, Menlo, monospace; padding: 6px 0; }

/* the ending: room to scroll the form up to eye level, and nothing fading it */
.final { padding-bottom: 60vh; }
.sig { max-width: 300px; }

.copy { margin-top: 90px; font-size: 11px; letter-spacing: .24em; color: var(--faint); }

/* ---------- sound: visible from the first second ---------- */
#sound, html.travelled #sound { opacity: 1 !important; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.5); padding: 7px 12px 7px 10px; font: 400 11px ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-right: 14px; border-radius: 999px; }
#sound:hover { border-color: #fff; }
#sound .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
#sound .eq i { display: block; width: 2px; height: 3px; background: currentColor; }
#sound.playing .eq i { animation: eq 0.9s ease-in-out infinite; }
#sound.playing .eq i:nth-child(2) { animation-delay: -.3s; } #sound.playing .eq i:nth-child(3) { animation-delay: -.6s; } #sound.playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
#sound.waiting { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { border-color: #fff; box-shadow: 0 0 18px rgba(255,255,255,.35); } }
.begin { margin-top: 28px; background: none; border: 1px solid var(--line); color: var(--dim); font: 400 11px ui-monospace, Menlo, monospace; letter-spacing: .22em; text-transform: uppercase; padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: opacity .8s; animation: breathe 2.4s ease-in-out infinite; }
.begin.gone { opacity: 0; pointer-events: none; }

/* translucent exhibits: the universe moves behind everything */
.stage canvas { background: var(--glass) !important; }
.hero canvas, .final > canvas { background: transparent; }
.constants > div { background: var(--glass); }
.constants { background: var(--line); }
.player { background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- entry: one tap, which is what browsers require before sound ---------- */
body.gated { overflow: hidden; }
#gate { position: fixed; inset: 0; z-index: 50; background: transparent; display: grid; place-content: center; justify-items: center; gap: 22px; cursor: pointer; transition: opacity 1.4s ease; }
#gate.out { opacity: 0; pointer-events: none; }
.g-circle { display: none; width: 120px; height: 120px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; position: relative; animation: gspin 6s linear infinite; }
.g-circle::after { content: ""; position: absolute; width: 6px; height: 6px; background: #fff; border-radius: 50%; top: -3px; left: calc(50% - 3px); }
@keyframes gspin { to { transform: rotate(360deg); } }
#gate-enter { background: none; border: 1px solid rgba(255,255,255,.6); color: #fff; font: 300 22px -apple-system, "Helvetica Neue", sans-serif; width: 72px; height: 72px; padding: 0 0 0 5px; border-radius: 50%; cursor: pointer; animation: breathe 2.4s ease-in-out infinite; }
.g-note { font: 400 10px ui-monospace, Menlo, monospace; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.4); }

/* the portal: the play ring opens until it is the whole sky */
#gate::before { content: ""; position: absolute; inset: 0; background: #000; transition: opacity 1.2s ease .35s; }
#gate > * { position: relative; }
.portal { position: absolute !important; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; border: 1px solid #fff; opacity: 0; pointer-events: none; }
#gate.out { opacity: 1; }
#gate.out::before { opacity: 0; }
#gate.out .portal { animation: portal 1.6s cubic-bezier(.5, 0, .2, 1) forwards; }
#gate.out #gate-enter, #gate.out .g-note { opacity: 0; transition: opacity .3s; }
@keyframes portal { 0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 60% { opacity: .8; } 100% { opacity: 0; transform: scale(45); box-shadow: 0 0 60px 20px rgba(255,255,255,0); } }

/* the destination's numeral, rising as you arrive */
.warpsign { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.6); z-index: 4; pointer-events: none; font: 100 clamp(80px, 18vw, 240px) -apple-system, "Helvetica Neue", sans-serif; letter-spacing: .08em; color: var(--fg); opacity: 0; transition: opacity .5s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); mix-blend-mode: difference; }
.warpsign.show { opacity: .5; transform: translate(-50%, -50%) scale(1); }

.copy.credit { margin-top: 70px; }
.copy.credit + .copy { margin-top: 14px; }

#sound { white-space: nowrap; flex-shrink: 0; }

/* the top bar sits above the page so the numerals and buttons can be clicked */
.top { z-index: 30; }
.rooms { gap: 2px; }
.rooms a { padding: 8px 7px; }

/* ================= one type scale, used everywhere =================
   display · statement · lede · body · label · data                    */
:root { --sans: -apple-system, "Helvetica Neue", Inter, system-ui, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-display: clamp(34px, 5vw, 64px); --t-statement: clamp(21px, 2.3vw, 26px); --t-lede: clamp(18px, 1.9vw, 21px); --t-body: 16px; --t-label: 11px; --t-data: 12.5px; }
/* display */
.room h2, .colophon .word { font-family: var(--sans); font-weight: 200; }
.colophon .word { font-size: clamp(30px, 4.6vw, 56px); letter-spacing: 0.28em; margin-bottom: 28px; }
/* statement */
.essay .big, .why p, .quote blockquote { font-family: var(--sans); font-weight: 200; color: var(--fg); line-height: 1.4; }
.essay .big, .why p, .colophon p.big { font-size: var(--t-statement); font-weight: 200; color: var(--fg); line-height: 1.4; }
.why p { margin: 40px auto 0; max-width: 34ch; }
/* lede */
.lede, .colophon p.lede { font-family: var(--sans); font-weight: 300; font-size: var(--t-lede); line-height: 1.5; color: var(--dim); }
/* body */
.essay p:not(.big), details p, .colophon p:not(.lede):not(.big), .timeline li, .constants p, .pifound {
  font-family: var(--sans); font-weight: 300; font-size: var(--t-body); line-height: 1.65; color: var(--body); }
.essay p:not(.big), details p, .colophon p:not(.lede):not(.big) { max-width: 58ch; margin: 0 auto 1em; }
.colophon p.lede { margin: 0 auto 1.4em; }
.timeline li b { font-weight: 400; color: var(--fg); }
/* label */
.controls, summary, .hint, h3.sub, .numeral, .quote cite, .constants .name, .g-note, .copy, #contact-status, .controls button, .btn {
  font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400; }
.copy { text-transform: none; letter-spacing: 0.16em; }
/* data */
.readout, .digits, .timeline .yr, .constants .val, #sigread, #pl-title, .controls output, .pifound .ctx, .depth, .mono, code {
  font-family: var(--mono); font-size: var(--t-data); font-weight: 400; letter-spacing: 0.02em; }
.digits { letter-spacing: 0.06em; }
.colophon { max-width: 640px; }
.why p { max-width: 30ch; }

/* ================= mobile ================= */
/* only up and down: anything that swells past the edges (the depth effect) is clipped, never scrollable */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body { touch-action: pan-y; }
.stage canvas, .controls, .kernel { touch-action: manipulation; }
#lander, #nn, #eulerc, #lifec, #lorenzc, #tesseract, #montecarlo, #hilbert { touch-action: none; }
/* the numerals as a grid behind a small button on narrow screens */
#navbtn { display: none; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 999px; width: 34px; height: 34px; font-size: 15px; line-height: 1; cursor: pointer; margin-right: 10px; }
@media (max-width: 900px) {
  #navbtn { display: inline-block; opacity: 0; transition: opacity .8s; }
  html.travelled #navbtn { opacity: 1; }
  .top { padding: 12px 16px; }
  .brand { font-size: 13px; letter-spacing: .24em; }
  #sound { padding: 6px 10px; margin-right: 8px; }
  #sound .lbl { display: none; }
  html:not(.navopen) .rooms { display: none; }
  html.navopen .rooms { display: grid; position: fixed; inset: 64px 16px auto 16px; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 14px; background: rgba(0,0,0,.92); border: 1px solid rgba(255,255,255,.2); mix-blend-mode: normal; z-index: 40; opacity: 1; }
  html.navopen .rooms a { text-align: center; padding: 12px 0; font-size: 13px; opacity: .7; border: 0; }
  html.navopen .rooms a.on { opacity: 1; text-decoration: underline; }
  .room { padding: 90px 0 60px; gap: 24px; }
  .room h2 { font-size: clamp(30px, 9vw, 44px); }
  .stage canvas { aspect-ratio: 4 / 3; }
  .stage canvas.square { aspect-ratio: 1; }
  .readout { font-size: 10.5px; }
  .controls { gap: 12px 14px; }
  .controls label { flex-wrap: wrap; justify-content: center; }
  input[type="range"] { width: 140px; }
  .gap { height: 110vh; }
  .quote blockquote { font-size: clamp(22px, 6.5vw, 30px); padding: 0 8px; }
  .constants { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 74px 1fr; font-size: 15px; }
  .player { bottom: 10px; }
  .warpsign { font-size: 34vw; }
}

.room { align-content: start; }
.readout { background: var(--glass); padding: 4px 7px; }

/* ---------- acts, the single tally, the reveal ---------- */
.quote.act { min-height: 80vh; }
.act .act-n { font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.5em; color: var(--dim); text-transform: uppercase; }
.act .act-t { font-family: var(--sans); font-weight: 100; font-size: clamp(44px, 8vw, 104px); letter-spacing: -0.01em; margin: 14px 0 16px; line-height: 1.02; }
.act .lede { margin: 0 auto; max-width: 40ch; }
.quote.roll { min-height: 100vh; }
.roll canvas { width: min(900px, 92vw); height: 380px; display: block; margin: 0 auto 10px; touch-action: none; cursor: grab; }
.roll .try { margin-top: 6px; }
.reveal .colophon { padding-top: 0; }
/* the section numerals fold into a menu on all but wide screens (there are many sections) */
@media (max-width: 1100px) {
  #navbtn { display: inline-block; opacity: 0; transition: opacity .8s; }
  html.travelled #navbtn { opacity: 1; }
  html:not(.navopen) .rooms { display: none; }
  html.navopen .rooms { display: grid; position: fixed; inset: 64px 16px auto auto; width: min(460px, calc(100vw - 32px)); grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 14px; background: rgba(0,0,0,.92); border: 1px solid rgba(255,255,255,.2); mix-blend-mode: normal; z-index: 40; opacity: 1; }
  html.navopen .rooms a { text-align: center; padding: 12px 0; font-size: 13px; opacity: .7; border: 0; }
  html.navopen .rooms a.on { opacity: 1; text-decoration: underline; }
}

/* what you can do, said plainly, above the controls */
.try { text-align: center; font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); line-height: 1.9; margin: 0 auto; max-width: 62ch; }
.try b { font-weight: 400; color: var(--fg); }

/* the unit converter */
.conv { display: grid; gap: 14px; justify-items: center; margin: 0 auto; max-width: 900px; }
.conv .row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; }
.conv label { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.conv input { width: 11ch; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); font: 15px ui-monospace, Menlo, monospace; padding: 6px 2px; outline: none; text-align: right; }
.conv output { font-family: var(--mono); font-size: var(--t-data); color: var(--fg); }

/* the section row: one small line icon per section, the number and title on hover */
.rooms { gap: 1px; }
.rooms a { position: relative; padding: 7px 4px; opacity: .5; }
.rooms a svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.rooms a svg .f { fill: currentColor; stroke: none; }
.rooms a i { display: none; font-style: normal; }
.rooms a::after { content: attr(data-tip); position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 400 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; background: rgba(0,0,0,.88); border: 1px solid rgba(255,255,255,.22); color: #fff; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.rooms a:hover { opacity: 1; }
.rooms a:hover::after { opacity: 1; }
@media (max-width: 1300px) { .rooms a { padding: 7px 2.5px; } .rooms a svg { width: 14px; height: 14px; } }
@media (max-width: 1100px) {
  html.navopen .rooms a { display: grid; justify-items: center; gap: 5px; padding: 10px 0; }
  html.navopen .rooms a svg { width: 18px; height: 18px; }
  html.navopen .rooms a i { display: block; font-size: 10px; letter-spacing: .08em; }
  html.navopen .rooms a::after { display: none; }
}

/* the dedication */


.quote.stars { min-height: 70vh; }
.stars canvas { width: min(900px, 92vw); height: 320px; display: block; margin: 0 auto; }

/* the last stretch: the dedication decrypts while you scroll, then the copyright */
.final { padding-bottom: 30vh; }
.decrypt { position: relative; height: 280vh; }
.decrypt-pin { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; padding: 0 16px; }
.dedication { font-family: var(--sans); font-weight: 100; font-size: clamp(30px, 5.4vw, 72px); letter-spacing: 0.02em; color: var(--fg); text-align: center; white-space: nowrap; }
.dedication span { display: inline-block; text-align: center; color: var(--faint); transition: color .4s; }
.dedication span.lock { color: var(--fg); }

.tail { min-height: 40vh; display: grid; align-content: center; justify-items: center; gap: 14px; padding-bottom: 60px; }
.tail .copy { margin: 0; }
.dedication { line-height: 1.35; }
.dedication br + span, .dedication br ~ span { font-size: 0.62em; }
.dedication span.gap-ch { width: 0.32em; }
.decrypt-pin { align-content: center; gap: 0; grid-template-rows: auto auto; }
.copywrap { opacity: 0; display: grid; justify-items: center; gap: 12px; margin-top: 48px; }
.copywrap .copy { margin: 0; }
.decrypt { height: 300vh; }

#shannon { border-top: 0; }
.quote.stars { min-height: 100vh; padding: 0; }
.stars canvas { width: 100%; height: 86vh; }

/* the page ends on the dedication: no rubber-band bounce past it, only back up */
html, body { overscroll-behavior-y: none; }

/* no horizontal rules anywhere */
.room, .quote, h3.sub, details, .timeline li, footer, .essay, .final { border-top: 0 !important; border-bottom: 0 !important; }
.copy.thanks { max-width: 52ch; margin-top: 18px !important; font-size: 11px; line-height: 1.8; letter-spacing: 0.08em; color: var(--faint); text-align: center; }
.copy.thanks { margin-top: 34px !important; line-height: 2; }
.copywrap { justify-items: center; text-align: center; width: 100%; }
.copywrap .copy, .copy.thanks { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

/* the stars: approach a cluster (pinned), then the credit roll settles it into E and S */
.stars { position: relative; height: 300vh; }
.stars-pin { position: fixed; inset: 0; height: 100vh; pointer-events: none; z-index: 0; }
.stars-pin canvas { display: block; width: 100%; height: 100vh; }

/* ================= mobile pass ================= */
html { -webkit-text-size-adjust: 100%; touch-action: pan-y; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; font-size: 16px; } /* 16px stops iOS zooming into fields */
canvas, .stage, .controls, .player, .rooms, button { touch-action: manipulation; }
.stage canvas, .roll canvas, #lander, #nn, #eulerc, #lifec, #lorenzc, #tesseract, #montecarlo, #hilbert, #raycast, #worm, #pyth, #cantor-c, #vexations, #hop, #fifths, #rollc { touch-action: none; }
@media (max-width: 760px) {
  .readout { font-size: 9.5px; padding: 3px 5px; max-width: 70%; white-space: pre-wrap; }
  .try { font-size: 10px; letter-spacing: .12em; padding: 0 8px; }
  .controls { gap: 10px 12px; font-size: 10px; }
  .controls button, .btn { padding: 8px 10px; }
  .controls input[type="number"], .controls input[type="text"] { width: 9ch; }
  .controls.kernel { grid-template-columns: repeat(3, 52px); }
  .conv .row { flex-direction: column; gap: 6px; }
  .conv output { text-align: center; font-size: 11px; }
  .essay p:not(.big), details p { font-size: 15px; }
  .room h2 { font-size: clamp(28px, 8.5vw, 40px); }
  .act .act-t { font-size: clamp(38px, 12vw, 60px); }
  .dedication { font-size: clamp(26px, 8.5vw, 40px); }
  .stars-pin canvas { height: 100vh; }
  .roll canvas { height: 300px; }
}
.dedication { white-space: nowrap !important; max-width: 100%; }

/* minimal top bar: no progress rule, no outlines, no wordmark */
.progress { display: none !important; }
.top .brand { display: none !important; }
#navbtn, #sound, #sound.waiting, #sound:hover { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; animation: none !important; }
#sound { padding: 6px 4px; }

/* the message: what the drawing means */
.sig-info { max-width: 420px; margin: 10px auto 0; text-align: center; }
.sig-info summary { font-size: var(--t-label); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); cursor: pointer; }
.sig-info p { font-size: 14px !important; line-height: 1.7; color: var(--body); margin: 12px auto 0 !important; text-align: left; }
/* the top bar: controls on the right */
.top { justify-content: flex-end; }
/* phones: drawing, form and keyboard on one screen */
@media (max-width: 760px) {
  .sig { max-width: 150px; margin-top: 14px; }
  #sigread { font-size: 9px; min-height: 0; line-height: 1.5; }
  .contact { margin-top: 12px; gap: 6px; }
  .contact input, .contact textarea { padding: 6px 2px; }
  .contact button { margin-top: 2px; }
  .why p { margin-top: 24px !important; }
}

/* a soft fade under the icon bar: anything that scrolls up dissolves before it reaches the symbols */
.topfade { position: fixed; left: 0; right: 0; top: 0; height: 130px; z-index: 25; pointer-events: none; background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 42%, rgba(0,0,0,0) 100%); }
html[data-theme="light"] .topfade { background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 42%, rgba(255,255,255,0) 100%); }
@media (max-width: 760px) { .topfade { height: 96px; } }

/* no frames around the pictures */
.stage canvas { border: 0 !important; }

/* coming home: less is more */
.quote.less { min-height: 70vh; }
.less-f { display: grid; gap: 0.35em; font-family: var(--sans); font-weight: 200; font-size: clamp(30px, 6vw, 72px); letter-spacing: 0.04em; line-height: 1.15; }
#less-maxwell .less-f { font-size: clamp(20px, 3.4vw, 40px); }
.less-f sup { font-size: 0.55em; }

/* chapters in the icon row */
/* chapters: a numeral each; the current one opens to show its sections */
.rooms { align-items: center; }
.rooms .ch { display: flex; align-items: center; }
.rooms .chn { font: 300 12px var(--sans); letter-spacing: .14em; padding: 7px 7px; opacity: .45; }
.rooms .cht, .rooms .chr { display: none; }
.rooms .ch.cur { padding: 0 6px; border-left: 1px solid rgba(255,255,255,.25); border-right: 1px solid rgba(255,255,255,.25); margin: 0 4px; }
.rooms .ch.cur .chn { opacity: 1; }
.rooms .ch.cur .cht { display: inline; font: 400 10px var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 8px 0 0; white-space: nowrap; }
.rooms .ch.cur .chr { display: flex; align-items: center; }
html.navopen .rooms { grid-template-columns: 1fr !important; }
html.navopen .rooms .ch { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 6px 0; border: 0; margin: 0; border-top: 1px solid rgba(255,255,255,.12); }
html.navopen .rooms .ch:first-child { border-top: 0; }
html.navopen .rooms .chn { grid-column: 1 / 2; text-align: left; padding: 8px 0; opacity: .7; }
html.navopen .rooms .cht { display: block; grid-column: 2 / -1; align-self: center; font: 400 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
html.navopen .rooms .chr { display: contents; }
html.navopen .rooms .ch.cur .chn, html.navopen .rooms .ch.cur .cht { opacity: 1; }

/* enigma: typed over sent, letter by letter */
.entape { display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: flex-end; margin: 14px 0 6px; font-family: ui-monospace, Menlo, monospace; min-height: 48px; }
.entape .lbl { display: grid; gap: 4px; margin-right: 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.entape .lbl span { line-height: 22px; }
.entape .pair { display: grid; gap: 4px; text-align: center; width: 1.25em; font-size: 18px; }
.entape .pair i { font-style: normal; opacity: .55; line-height: 22px; }
.entape .pair b { font-weight: 600; line-height: 22px; border-top: 1px solid var(--line); }
.entape .pair.new b { animation: enlamp .9s ease-out 1.1s both; }
@keyframes enlamp { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* the road marker: chapters down the right edge; the one you are in lists its numbered sections */
.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 25; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 300 12px var(--sans); letter-spacing: .12em; mix-blend-mode: difference; color: #fff; opacity: 0; transition: opacity .8s; pointer-events: none; }
html.travelled .rail { opacity: 1; pointer-events: auto; }
.rail::before { content: ""; position: absolute; right: 9px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,.18); z-index: -1; }
.rail .rc { display: flex; flex-direction: column; align-items: flex-end; }
.rail a { display: flex; align-items: center; gap: 8px; padding: 3px 0; opacity: .45; color: inherit; text-decoration: none; white-space: nowrap; }
.rail a:hover { opacity: 1; }
.rail .rn { width: 20px; text-align: center; background: #000; }
.rail .rt { display: none; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.rail .rs { display: none; flex-direction: column; align-items: flex-end; margin: 2px 0 6px; }
.rail .rs a { font-size: 11px; padding: 2px 0; }
.rail .rs a .rt { text-transform: none; letter-spacing: .04em; font-size: 11px; }
.rail .rs a .rn::before { content: ""; }
.rail .rc.cur > a { opacity: 1; }
.rail .rc.cur > a .rt { display: inline; }
.rail .rc.cur .rs { display: flex; }
.rail .rs a.on { opacity: 1; }
.rail .rs a.on .rn { outline: 1px solid #fff; }
.rail:hover .rs a .rt, .rail .rs a.on .rt { display: inline; }
.rail:hover .rc > a .rt { display: inline; }
@media (min-width: 1000px) { .rooms { display: none !important; } }
@media (max-width: 999px) { .rail { display: none; } }

/* index */
.index { padding: 140px 0 120px; text-align: left; }
.index h2 { font: 100 clamp(40px, 7vw, 88px) var(--sans); margin: 0 0 10px; text-align: center; }
.index .lede { text-align: center; margin: 0 auto 50px; }
.index-cols h3 { font: 400 11px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--dim); margin: 40px 0 14px; column-span: all; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.index-cols .grp { columns: 4 210px; column-gap: 32px; font: 300 14px/1.7 var(--sans); }
.index-cols .ent { display: block; break-inside: avoid; color: var(--dim); text-decoration: none; }
.index-cols .ent:hover { color: var(--fg); }
.index h2 { margin-bottom: 50px !important; }
.index-cols .ent a { color: var(--dim); text-decoration: none; font-size: 12px; margin-left: 6px; letter-spacing: .04em; }
.index-cols .ent a:hover { color: var(--fg); }
.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 30% { background: rgba(255,255,255,.22); } 100% { background: transparent; } }

/* calculus */
#calcc { touch-action: none; }

/* food */
#bakerc { touch-action: manipulation; cursor: pointer; }

/* touch */
#touchc { touch-action: none; }

/* gpt */
#gptc { touch-action: none; }

/* gps */
#gpsc { touch-action: none; }

/* pagerank */
#prc { touch-action: none; }

/* qr */
#qrc { touch-action: none; }

/* peace */
#pdc { touch-action: manipulation; }

/* a capped canvas stays centred and keeps its proportions where it can */
.stage canvas { margin-left: auto; margin-right: auto; }

/* phone and tablet menu: solid, compact, every chapter on one screen */
html.navopen .top { mix-blend-mode: normal; color: var(--fg); }
html.navopen .rooms { inset: 58px 10px auto 10px !important; width: auto !important; max-height: calc(100svh - 70px); overflow-y: auto; padding: 8px 12px !important; gap: 0 !important;
  background: color-mix(in srgb, var(--bg) 96%, transparent) !important; border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent) !important; color: var(--fg); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
html.navopen .rooms .ch, html.navopen .rooms .ch.cur { display: grid !important; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0 2px; padding: 3px 0 5px !important; margin: 0 !important; border: 0 !important; border-top: 1px solid color-mix(in srgb, var(--fg) 12%, transparent) !important; }
html.navopen .rooms .ch:first-child { border-top: 0 !important; }
html.navopen .rooms .ch .chn { grid-column: 1 / 2; display: block !important; text-align: left; padding: 4px 0 2px !important; font-size: 11px; opacity: .6; }
html.navopen .rooms .ch .cht { display: block !important; grid-column: 2 / -1; align-self: center; margin: 0 !important; font: 400 10px var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.navopen .rooms .ch.cur .chn, html.navopen .rooms .ch.cur .cht { opacity: 1; }
html.navopen .rooms .ch .chr { display: contents !important; }
html.navopen .rooms .chr a { display: grid !important; justify-items: center; gap: 2px !important; padding: 4px 0 !important; opacity: .75; color: inherit; }
html.navopen .rooms .chr a svg { width: 16px !important; height: 16px !important; }
html.navopen .rooms .chr a i { display: block !important; font-size: 8.5px !important; letter-spacing: .02em !important; }
html.navopen .rooms .chr a.on { opacity: 1; }
/* wide screens use the road marker instead, so the menu button goes */
@media (min-width: 1000px) { #navbtn { display: none !important; } }
html.navopen .rooms .ch, html.navopen .rooms .ch.cur { padding: 2px 0 3px !important; }
html.navopen .rooms .ch .chn { padding: 2px 0 0 !important; line-height: 16px; }
html.navopen .rooms .ch .cht { line-height: 16px; }
html.navopen .rooms .chr a { padding: 3px 0 !important; }
html.navopen .rooms .chr a i { line-height: 10px; }

/* the index, last in both menus */
.rail .ridx { margin-top: 8px; }
.rail .ridx .rn { width: auto; padding: 0 3px; font-size: 10px; }
.rooms .chidx .chn { font-size: 10px; letter-spacing: .1em; }
html.navopen .rooms .chidx .chn { grid-column: 1 / 3; }
html.navopen .rooms .chidx .cht { grid-column: 3 / -1; }

/* the word an index entry points to */
mark.hit { background: transparent; color: inherit; padding: 0 2px; margin: 0 -2px; border-radius: 2px; transition: background .4s, color .4s; }
mark.hit.on { background: var(--fg); color: var(--bg); }

/* a long jump: the page goes dark for a moment while the stars streak, instead of drawing everything it passes */
main { transition: opacity .25s ease; }
html.warping main { opacity: 0; }
.rooms .chidx .chn svg, .rail .ridx .rn svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; margin: 0 auto; }
.rooms .chidx .chn svg .f, .rail .ridx .rn svg .f { fill: currentColor; stroke: none; }
.rail .ridx .rn { width: 20px; padding: 0; }

/* back to the index */
.backpill { position: fixed; top: 64px; left: 50%; transform: translate(-50%, -8px); z-index: 35; font: 400 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--fg); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; cursor: pointer; }
.backpill.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.backpill span { margin-right: 6px; }

/* square corners everywhere; the index return is a solid block, lower down so it is seen */
.backpill { top: 104px; border-radius: 0; border: 0; background: var(--fg); color: var(--bg); font-weight: 500; padding: 10px 18px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
mark.hit { border-radius: 0; }

.begin { border-radius: 0 !important; }

/* the message: drawing, numbers and form on one screen */
.sig { max-width: min(420px, 36vh); }
#sigread { min-height: 3em; }
.signote { font-size: 11px; line-height: 1.7; color: var(--faint); margin: 4px 0 0; }
@media (max-width: 760px) {
  /* while typing, the keyboard takes half the screen: drawing beside its numbers, explainer away, shorter box */
  html.typing .sig { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; max-width: 100%; margin-top: 0; text-align: left; }
  html.typing .sig canvas { width: 120px; }
  html.typing .signote, html.typing .sig-info { display: none; }
  html.typing #contact-status:empty { display: none; }
  html.typing .contact textarea { min-height: 2.6em; }
}

/* credits: well clear of the message form; project names link to their source */
.copy.thanks { margin-top: 240px !important; }
.copy.thanks a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.copy.thanks a:hover { color: var(--fg); border-bottom-color: var(--fg); }
@media (max-width: 760px) { .copy.thanks { margin-top: 160px !important; } }

/* who the dedication is from: quieter than the names, louder than the copyright */
.fromline { opacity: 0; font-family: var(--sans); font-weight: 200; font-size: clamp(16px, 2vw, 26px); letter-spacing: .06em; color: var(--dim); text-align: center; margin-top: 22px; }
.decrypt-pin { grid-template-rows: auto auto auto !important; }
.fromline { font-size: clamp(13px, 1.3vw, 17px); font-weight: 300; letter-spacing: .04em; margin-top: 10px; }

/* execution */
#execc { touch-action: manipulation; }

/* You: the two small demos, centred */
.you-play { max-width: 640px; margin: 0 auto; text-align: center; }
.you-play .digits { text-align: left; }

/* hover car: hold-to-fire thruster buttons */
.hover-btns button { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* labelling */
#labelc { touch-action: none; }

/* key caps: Q W E over A S D, square, lit while held */
.padrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.padside { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.keys { display: grid; gap: 6px; user-select: none; -webkit-user-select: none; }
.keyrow { display: flex; gap: 6px; justify-content: center; }
.key { width: 60px; height: 50px; border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent); border-radius: 0; background: transparent; color: var(--fg); display: grid; place-items: center; align-content: center; gap: 2px; padding: 0; cursor: pointer; touch-action: none; -webkit-touch-callout: none; font-family: var(--sans); }
.key b { font-size: 16px; font-weight: 400; line-height: 1; }
.key i { font-style: normal; font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; line-height: 1; white-space: nowrap; }
.key.on { background: var(--fg); color: var(--bg); }
.key.on i { opacity: .9; }
@media (max-width: 420px) { .key { width: 54px; height: 46px; } }

/* key caps: centred, unaffected by the general button styles */
.controls .key { width: 64px; height: 52px; padding: 0 !important; margin: 0; letter-spacing: 0 !important; text-indent: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.controls .key b, .controls .key i { display: block; width: 100%; text-align: center; letter-spacing: 0; }
.controls .key i { font-size: 8.5px; letter-spacing: .06em; }
/* checkboxes are square, like everything else */
.controls input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; margin: 0 8px 0 0; border: 1px solid color-mix(in srgb, var(--fg) 60%, transparent); border-radius: 0; background: transparent; vertical-align: -2px; cursor: pointer; position: relative; }
.controls input[type="checkbox"]:checked { background: var(--fg); }
.controls input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.padside label { display: inline-flex; align-items: center; }
@media (max-width: 420px) { .controls .key { width: 56px; height: 48px; } }
