/* Beaverbit — beaverbit.io
   One stylesheet for every page. Paper, ink and the logo's red; one typeface in giant sizes,
   and a monospace for anything that is code. No inline style anywhere (the security header forbids it). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}
:root {
  --paper: #f4ecdf;
  --ink: #0c0c0d;
  --red: #e4001b;
  --blue: #1f5fff;
  --white: #ffffff;
  --card: #fffdf8;
  --soft: rgba(12, 12, 13, 0.66);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --margin: clamp(1.1rem, 3.4vw, 3.5rem);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.4; -webkit-font-smoothing: antialiased; overflow-x: hidden; word-spacing: 0.05em; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 3px solid #ffb000; outline-offset: 3px; border-radius: 8px; }
canvas { display: block; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 0.6rem 1rem; z-index: 30; }
.skip:focus { left: 0; }
.edge, .wrap { padding-left: var(--margin); padding-right: var(--margin); }
.mono { font-family: var(--mono); }

/* ---- Bar: the mark on the left, small pills on the right ---- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; padding: 0.75rem var(--margin); pointer-events: none; }
.bar a { pointer-events: auto; display: inline-block; line-height: 2.1rem; padding: 0 0.95rem; border-radius: 99px; background: rgba(244, 236, 223, 0.86); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); font-size: 0.95rem; font-weight: 700; box-shadow: 0 0 0 1px rgba(12, 12, 13, 0.1); white-space: nowrap; }
/* The name is the full logo: beaver, BEAVERBIT, dev_kits. Its height is set, its width follows. */
.bar .name { display: block; padding: 0.3rem 0.55rem 0.4rem; line-height: 0; border-radius: 0.9rem; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background 0.3s, box-shadow 0.3s; }
.bar .name .logo { display: block; height: 6rem; width: auto; transition: height 0.35s; }
.after .bar .name .logo, .plain .bar .name .logo { height: 4.2rem; }
.after .bar .name, .plain .bar .name { background: rgba(244, 236, 223, 0.86); box-shadow: 0 0 0 1px rgba(12, 12, 13, 0.1); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); }
.bar .links { display: flex; gap: 0.4rem; }
.bar .go::after, .arrow::after { content: " ›"; }

/* ---- Hero: the name, built bit by bit ---- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 30rem; background: var(--red); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; pointer-events: none; color: #fff; }
.foot p { margin: 0; background: var(--red); }
/* What it is and where it is built sit with the motto, in one red tab at the foot of the hero. */
.foot .tab { background: var(--red); padding: clamp(0.65rem, 1.2vw, 1.05rem) clamp(1rem, 1.9vw, 1.6rem) clamp(0.8rem, 1.5vw, 1.35rem) var(--margin); border-radius: 0 clamp(1rem, 1.9vw, 1.6rem) 0 0; }
.what { font-family: var(--mono); font-size: clamp(0.75rem, 1vw, 0.9rem); font-weight: 700; line-height: 1.4; letter-spacing: 0; word-spacing: 0; margin-bottom: 0.3rem; }
.foot .what { margin-bottom: 0.35rem; }
.what::before { content: ">>> "; opacity: 0.6; }
.what .where::before { content: "· "; opacity: 0.6; }
.motto { font-size: clamp(1.1rem, 2.1vw, 1.8rem); font-weight: 800; letter-spacing: -0.025em; }
.state { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; padding: 0.9em var(--margin) 1.2em 1.1em; border-radius: 1em 0 0 0; }

/* Words shown when the script does not run */
.fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15vw; letter-spacing: -0.04em; color: #fff; }
.js .fallback { display: none; }
.needs-js { display: none; }
.js .needs-js { display: block; }
.js .no-js-only { display: none; }

/* Lines fitted to the full width (the script sets the size) */
.fit { display: block; white-space: nowrap; }
.fit-m { white-space: nowrap; }
.fit, .fit-m { letter-spacing: -0.05em; word-spacing: 0.2em; }

/* ---- Blocks and giant type ---- */
/* The heavy type is set tight. The gaps between words are opened so each word stands apart. */
.fact, .giant, .sub, .motto, .levels h3, .txt h3, .rules li, .bench-top .lede, .bot, .band, .faq summary, .prose h1, .notfound h1, .prose h2, .lead, .arrow, .prompt, .panel .says, .panel .goes, .pledge, .opener, .crit li { word-spacing: 0.15em; }
/* The fixed-width face already has wide gaps: it keeps its own. */
.mono, .state, .label, .rules .lvl, .panel .no, .track, .pills.code button, .k, .copy, .tag, .bot span, .count, .bots .more, .bench .hint, .bench .load, .bench-note, .txt .no, pre, textarea, .counter li span, .gutter, .console, .readout, .crit b, .score p, .team .pills button, .eyebrow { word-spacing: 0; }
.block { padding: clamp(4.5rem, 12vw, 12rem) 0; position: relative; overflow: hidden; }
.giant { font-size: clamp(3.2rem, 12vw, 14rem); font-weight: 900; letter-spacing: -0.05em; line-height: 0.86; margin: 0; }
.giant .line { display: block; }
.giant .line + .line { margin-top: 0.07em; }
.red { color: var(--red); }
.sub { font-size: clamp(1.15rem, 2.1vw, 1.8rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: var(--soft); max-width: 34ch; margin: clamp(1.75rem, 3.5vw, 3.5rem) 0 0; }
.fact { font-size: clamp(2.1rem, 6.1vw, 7rem); font-weight: 900; letter-spacing: -0.04em; line-height: 0.98; margin: 0; max-width: 21ch; }
.fact span { display: block; margin-top: 0.3em; }
.label { font-family: var(--mono); font-size: clamp(0.9rem, 1.3vw, 1.2rem); font-weight: 700; letter-spacing: 0; line-height: 1.2; margin: 0 0 clamp(1rem, 2vw, 2rem); }
.label::before { content: ">>> "; color: var(--red); }
.dark .label::before, .end .label::before, .tone-red .label::before { color: inherit; opacity: 0.6; }

/* Numbered lists: big for the levels, smaller for rules */
.levels { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.levels li { counter-increment: l; display: grid; grid-template-columns: clamp(2.6rem, 8vw, 9rem) 1fr clamp(9rem, 24vw, 24rem); align-items: start; column-gap: clamp(0.75rem, 2vw, 2rem); padding: clamp(1rem, 2.1vw, 2.1rem) 0; border-top: 2px solid var(--ink); }
.levels li:last-child { border-bottom: 2px solid var(--ink); }
.levels li::before { content: counter(l); color: var(--red); font-size: clamp(2.1rem, 5.8vw, 6.4rem); font-weight: 900; letter-spacing: -0.05em; line-height: 0.8; }
.levels h3 { font-size: clamp(1.45rem, 4vw, 4.4rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.02; margin: 0; }
.levels p { font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 600; line-height: 1.3; color: var(--soft); margin: 0.6rem 0 0; max-width: 36ch; }
.levels img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 2px var(--ink); }
.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: clamp(2.2rem, 5vw, 4.5rem) 1fr; align-items: baseline; column-gap: clamp(0.6rem, 1.6vw, 1.5rem); padding: clamp(0.85rem, 1.5vw, 1.4rem) 0; border-top: 2px solid currentColor; font-size: clamp(1.15rem, 2.3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.rules li:last-child { border-bottom: 2px solid currentColor; }
.rules li::before { content: counter(r); color: var(--red); font-weight: 900; font-size: 1.3em; letter-spacing: -0.05em; line-height: 0.8; }
.rules.gap, .levels.gap { margin-top: clamp(2rem, 5vw, 5rem); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.cols.gap { margin-top: clamp(2rem, 5vw, 5rem); }
.cols .k { font-size: 0.85rem; margin-bottom: 0.8rem; }
.cols .rules li { grid-template-columns: clamp(3.1rem, 5vw, 5rem) 1fr; font-size: clamp(1.1rem, 1.6vw, 1.55rem); }
.rules.marks li::before { content: attr(data-mark); }
.rules q { display: block; }
:lang(fr) q { quotes: "«\00a0" "\00a0»"; }
.rules .how { display: block; margin-top: 0.3em; font-weight: 700; color: var(--soft); }
.rules .lvl { display: block; margin-top: 0.6em; font-family: var(--mono); font-size: 0.68em; font-weight: 700; letter-spacing: 0; word-spacing: 0; }
.rules .lvl::before { content: ">>> "; color: var(--red); }
.pledge { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 700; color: var(--soft); margin: clamp(1.2rem, 2vw, 1.8rem) 0 0; max-width: 46ch; }
.dark .pledge, .dark .sub { color: rgba(255, 255, 255, 0.72); }

/* ---- Four words, one per panel ---- */
.panel { position: relative; display: block; height: clamp(19rem, 38.5vw, 40rem); overflow: hidden; background: var(--red); color: #fff; }
.panel.p-ink { background: var(--ink); }
.panel.p-paper { background: var(--paper); color: var(--ink); }
.panel canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel .no { position: absolute; top: 0.7rem; left: var(--margin); font-family: var(--mono); font-size: 0.9rem; font-weight: 700; }
.panel .says, .panel .goes { position: absolute; bottom: 0; background: inherit; font-weight: 800; letter-spacing: -0.02em; font-size: clamp(1rem, 1.7vw, 1.5rem); }
.panel .says { left: 0; padding: 0.55em 0.9em 0.7em var(--margin); border-radius: 0 0.9em 0 0; }
.panel .goes { right: 0; padding: 0.55em var(--margin) 0.7em 0.9em; border-radius: 0.9em 0 0 0; font-weight: 900; }
.panel .goes::after { content: "›"; display: inline-block; transition: transform 0.25s; }
.panel:hover .goes::after { transform: translateX(0.3em); }
.panel.p-paper .fallback { color: var(--ink); }

/* ---- A strip of the commands, passing by ---- */
.marquee { overflow: hidden; padding: clamp(1.5rem, 3.4vw, 3.4rem) 0; }
.track { display: flex; width: max-content; font-family: var(--mono); font-size: clamp(2.6rem, 8vw, 8.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1.08; animation: slide 80s linear infinite; }
.track span { padding-right: 0.7em; white-space: nowrap; }
.track .hollow { color: var(--paper); -webkit-text-stroke: 0.03em var(--ink); paint-order: stroke fill; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- Dark and red blocks ---- */
.dark { background: var(--ink); color: #fff; }
.arrow { display: inline-block; margin-top: clamp(2rem, 4vw, 3.5rem); font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; border-bottom: 2px solid currentColor; padding-bottom: 0.15em; }
.arrow:hover { opacity: 0.75; }
.end { background: var(--red); color: #fff; }
.mail { font-weight: 900; margin-top: clamp(2rem, 5vw, 5rem); padding-top: clamp(2rem, 5vw, 5rem); border-top: 2px solid #fff; line-height: 1; }
.end .small { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 700; color: rgba(255, 255, 255, 0.9); margin: 1.1rem 0 0; max-width: 60ch; }
.end a:hover { opacity: 0.85; }
/* The slogan and who makes Beaverbit, just above the footer. */
.made .rules a { border-bottom: 2px solid var(--red); }
.made .rules a:hover { opacity: 0.8; }
.deadline .fit { letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }

/* Buttons and pills */
.btn { font: inherit; font-weight: 800; letter-spacing: -0.01em; border: 0; border-radius: 99px; padding: 0.7rem 1.3rem; background: var(--ink); color: #fff; cursor: pointer; display: inline-block; }
.btn:hover { opacity: 0.86; }
.btn.quiet { background: rgba(12, 12, 13, 0.08); color: var(--ink); }
.dark .btn { background: #fff; color: var(--ink); }
.dark .btn.quiet { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.pills button { font: inherit; font-size: 0.92rem; font-weight: 700; border: 0; border-radius: 99px; padding: 0.5rem 0.95rem; background: rgba(12, 12, 13, 0.08); color: var(--ink); cursor: pointer; }
.pills button:hover { background: rgba(12, 12, 13, 0.15); }
.pills button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pills.code button { font-family: var(--mono); font-size: 0.86rem; }
.dark .pills button { background: rgba(255, 255, 255, 0.13); color: #fff; }
.dark .pills button:hover { background: rgba(255, 255, 255, 0.22); }
.dark .pills button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.dark .pills[data-side="0"] button[aria-pressed="true"] { background: var(--red); color: #fff; }
.dark .pills[data-side="1"] button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.k { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); margin: 0 0 0.5rem; }
.dark .k { color: rgba(255, 255, 255, 0.7); }
.copy { font: inherit; font-family: var(--mono); font-size: 0.85em; font-weight: 700; border: 0; border-radius: 99px; padding: 0.25rem 0.8rem; margin-left: 0.3rem; background: rgba(255, 255, 255, 0.2); color: #fff; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.32); }

/* Sections arrive */
/* ---------- the robots on the workshop table (js/stage.js) ---------- */
.band { display: inline-block; margin: 0; padding: 0.13em 0.3em 0.16em; border-radius: 0.14em; background: var(--ink); color: var(--red); font-size: clamp(2.3rem, 6.2vw, 6.4rem); font-weight: 900; letter-spacing: -0.035em; line-height: 0.95; text-transform: uppercase; }
.tag { display: table; margin: 0 0 0 clamp(1.2rem, 5vw, 5rem); padding: 0.3em 0.9em 0.45em; border-radius: 0 0 0.6em 0.6em; background: var(--ink); color: #f6ead2; font-family: var(--mono); font-size: clamp(0.8rem, 1.2vw, 1.1rem); font-style: italic; font-weight: 700; }
.tag::before { content: ">>> "; color: #ff5c6c; }
.bench-block { background: #132333; color: #fff; }
.bench { position: relative; display: flex; flex-direction: column; min-height: max(36rem, min(96svh, 62rem)); overflow: hidden; }
.view { position: absolute; inset: 0; background: #132333; }
.view canvas, .view .poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.view .poster { object-fit: cover; transition: opacity 0.8s ease; }
.view canvas { opacity: 0; transition: opacity 0.8s ease; touch-action: none; cursor: grab; }
.view canvas.held { cursor: grabbing; }
.view canvas:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.bench.live .view canvas { opacity: 1; }
.bench.live .view .poster { opacity: 0; }
.bench-top, .bench-foot, .bench-note { position: relative; z-index: 1; pointer-events: none; }
.bench-top { padding-top: clamp(6.7rem, 8vw, 7.4rem); }
.bench-top .lede { margin: clamp(1.1rem, 2vw, 1.8rem) 0 0; max-width: 17em; font-size: clamp(1.2rem, 2vw, 1.9rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; text-shadow: 0 1px 22px rgba(8, 16, 24, 0.85); }
.bench-foot { margin-top: auto; padding-top: 7rem; padding-bottom: clamp(1.3rem, 2.6vw, 2.2rem); background: linear-gradient(to top, rgba(8, 16, 24, 0.9), rgba(8, 16, 24, 0.55) 55%, rgba(8, 16, 24, 0)); }
.bench-foot button, .bench-foot label { pointer-events: auto; }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 1.3rem; }
.who p { margin: 0; }
.bot b { font-size: clamp(1.9rem, 3.6vw, 3.4rem); font-weight: 900; letter-spacing: -0.045em; line-height: 1; margin-right: 0.35em; }
.bot span, .count { font-family: var(--mono); font-size: clamp(0.8rem, 1.05vw, 0.98rem); font-weight: 700; }
.bot span { color: rgba(255, 255, 255, 0.78); }
.count::before { content: ">>> "; color: #ff5c6c; }
.bench .pills { align-items: center; margin-top: 0.9rem; }
.bench .pills button { background: rgba(255, 255, 255, 0.15); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bench .pills button:hover { background: rgba(255, 255, 255, 0.26); }
.bench .pills button[aria-pressed="true"] { background: var(--red); color: #fff; }
.bots .more { margin: 0 0.1rem 0 0.7rem; font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: rgba(255, 255, 255, 0.78); }
.bench .row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.4rem; margin-top: 1rem; }
.opener { display: inline-flex; align-items: center; gap: 0.8rem; font-weight: 800; letter-spacing: -0.02em; cursor: pointer; }
.opener input { width: clamp(9rem, 24vw, 22rem); margin: 0; accent-color: var(--red); cursor: pointer; }
.bench .reset { font: inherit; font-size: 0.85rem; font-weight: 700; border: 0; border-radius: 99px; padding: 0.38rem 0.85rem; background: rgba(255, 255, 255, 0.15); color: #fff; cursor: pointer; }
.bench .reset:hover { background: rgba(255, 255, 255, 0.26); }
.bench .hint { margin: 0 0 0 auto; font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: rgba(255, 255, 255, 0.75); }
.bench .load { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); margin: 0; padding: 0.5rem 0.95rem; border-radius: 99px; background: rgba(8, 16, 24, 0.82); font-family: var(--mono); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.bench .load:empty { display: none; }
.bench-note { margin: auto 0 0; padding-top: 6rem; padding-bottom: 1.6rem; font-family: var(--mono); font-size: 0.85rem; font-weight: 700; background: linear-gradient(to top, rgba(8, 16, 24, 0.9), rgba(8, 16, 24, 0)); }
.js .bench.flat .bench-foot { display: none; }
.js .bench.flat .bench-note { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(36px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .rise.seen { opacity: 1; transform: none; }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
}

/* ===================== One robot, four steps: the scene that follows the scroll ===================== */
.chain { position: relative; }
/* Without animation: four steps one under the other, examples in plain view */
.txt { padding: 3.5rem var(--margin); }
.txt .no { margin: 0; font-family: var(--mono); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.72; }
.txt h3 { font-size: clamp(2rem, 3.9vw, 4rem); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin: 0.5rem 0 1rem; max-width: 12ch; }
.txt .says { font-size: clamp(1rem, 1.3vw, 1.25rem); font-weight: 600; line-height: 1.38; margin: 0; max-width: 34ch; opacity: 0.8; }
.txt .note { margin: 1rem 0 0; font-size: 0.85rem; font-weight: 700; line-height: 1.3; opacity: 0.64; max-width: 34ch; }
.example { margin-top: 1.4rem; background: #fff; color: var(--ink); border-radius: 14px; padding: 1rem 1.15rem 1.1rem; box-shadow: 0 0 0 1px rgba(12, 12, 13, 0.1); max-width: 30rem; }
.example p { margin: 0; }
.example pre { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 1rem; line-height: 1.5; white-space: pre-wrap; }
.example .q { font-weight: 800; line-height: 1.25; }
.example img { display: block; width: 100%; height: auto; border-radius: 8px; margin-top: 0.7rem; }
/* Without the moving scene (reduced motion, no script): each step is a plain row, words left, example right */
@media (min-width: 901px) {
  html:not(.anim) .txt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-content: start; border-top: 2px solid var(--ink); }
  html:not(.anim) .txt > * { grid-column: 1; }
  html:not(.anim) .txt .example { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; justify-self: end; align-self: start; width: 100%; }
}
.world, .backs, .counter, .sheet { display: none; }

/* The animated scene */
.anim .chain { height: 680vh; }
.anim .scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); color: var(--ink); transition: background-color 0.7s ease, color 0.7s ease; --stroke: var(--ink); --fill: var(--paper); }
.anim .scene.tone-red { background: var(--red); color: #fff; --stroke: #fff; --fill: var(--red); }
.anim .scene.tone-night { background: var(--ink); color: #fff; --stroke: #fff; --fill: var(--ink); }
.anim .txt { position: absolute; top: 50%; width: min(34vw, 32rem); padding: 0; z-index: 4; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.anim .txt.g { left: var(--margin); }
.anim .txt.d { right: var(--margin); }
.anim .txt .example { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.anim .world { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.anim .backs { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.backs span { position: absolute; left: 0; bottom: -0.3em; white-space: nowrap; font-size: 26vw; font-weight: 900; letter-spacing: -0.05em; line-height: 1; color: var(--fill); -webkit-text-stroke: 4px var(--stroke); paint-order: stroke fill; transition: color 0.7s ease; opacity: 0; will-change: transform; }
/* The program, on a card */
.anim .sheet { display: block; position: absolute; left: 50%; top: 50%; z-index: 3; width: 19rem; margin: -6.5rem 0 0 -9.5rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px rgba(12, 12, 13, 0.1), 0 30px 60px -22px rgba(12, 12, 13, 0.55); opacity: 0; will-change: transform, opacity; }
.sheet .k { color: var(--red); margin-bottom: 0.8rem; }
.sheet pre { margin: 0; font-family: var(--mono); font-size: 1.12rem; font-weight: 700; line-height: 1.55; min-height: 4.65em; }
.sheet .ln { display: block; min-height: 1.55em; padding: 0 0.45rem; margin: 0 -0.45rem; border-radius: 5px; white-space: pre; }
.sheet .ln.on { background: rgba(228, 0, 27, 0.12); box-shadow: inset 4px 0 0 var(--red); }
.sheet .cursor { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 0.05em; vertical-align: -0.16em; background: var(--red); opacity: 0; }
.sheet.typing .cursor { opacity: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sheet .src { margin: 0.7rem 0 0; font-size: 0.76rem; font-weight: 600; line-height: 1.3; color: var(--soft); }
/* Step counter, at the bottom */
.anim .counter { display: flex; position: absolute; z-index: 5; left: 50%; bottom: 1.4rem; transform: translateX(-50%); width: min(40rem, calc(100% - 2 * var(--margin))); gap: 0.7rem; list-style: none; margin: 0; padding: 0; transition: opacity 0.4s; }
.counter li { position: relative; flex: 1; padding-top: 0.55rem; font-size: 0.85rem; font-weight: 800; letter-spacing: -0.01em; opacity: 0.42; transition: opacity 0.3s; }
.counter li span { font-family: var(--mono); font-size: 0.72rem; margin-right: 0.35rem; }
.counter li::before, .counter li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: currentColor; }
.counter li::before { opacity: 0.25; }
.counter li::after { transform-origin: 0 0; transform: scaleX(var(--p, 0)); }
.counter li.on { opacity: 1; }

/* ===================== Your turn ===================== */
.try .edge { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.try .edge > * { min-width: 0; }
.prompt { display: block; font-size: clamp(1.1rem, 1.6vw, 1.45rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; margin: clamp(1.4rem, 3vw, 2.4rem) 0 0.9rem; max-width: 30ch; }
.editor { display: grid; grid-template-columns: auto 1fr; background: #fff; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.editor:focus-within { outline: 3px solid #ffb000; outline-offset: 3px; }
.gutter { list-style: none; margin: 0; padding: 0.9rem 0 0.9rem 0.9rem; font-family: var(--mono); font-size: 1rem; line-height: 1.6rem; font-weight: 500; color: rgba(12, 12, 13, 0.36); text-align: right; min-width: 2.4rem; user-select: none; overflow: hidden; height: 11.4rem; }
.gutter li.on { color: var(--red); font-weight: 800; }
.editor textarea { display: block; width: 100%; height: 11.4rem; margin: 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 1rem; font-weight: 700; line-height: 1.6rem; padding: 0.9rem 1rem 0.9rem 0.8rem; white-space: pre; overflow: auto; tab-size: 4; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.console { margin: 1rem 0 0; min-height: 2.6em; font-family: var(--mono); font-size: 0.92rem; font-weight: 700; line-height: 1.35; max-width: 44ch; }
.console[data-tone="error"] { color: var(--red); }
.keys { margin: 0.5rem 0 0; font-size: 0.8rem; font-weight: 600; color: var(--soft); }
.trycard { background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: 0 0 0 1px rgba(12, 12, 13, 0.1), 0 30px 60px -30px rgba(12, 12, 13, 0.35); padding: 1.4rem 1.4rem 1.2rem; }
.trycard .k { color: var(--red); margin-bottom: 0.9rem; }
#rover-canvas { width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 10px; }
.readout { margin: 0.7rem 0 0; font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--soft); }
.crit { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.crit li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0; border-top: 1px solid rgba(12, 12, 13, 0.1); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.crit b { font-family: var(--mono); font-size: 0.8em; font-weight: 700; color: var(--soft); margin-left: 0.3em; white-space: nowrap; }
.box { position: relative; flex: none; width: 1.25rem; height: 1.25rem; border: 2.5px solid var(--ink); border-radius: 5px; transition: background-color 0.2s, border-color 0.2s, transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.box.ok { background: var(--ink); transform: scale(1.12); }
.box.ok::after { content: ""; position: absolute; left: 32%; top: 8%; width: 30%; height: 62%; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.box.no { background: var(--red); border-color: var(--red); transform: scale(1.12); }
.box.no::before, .box.no::after { content: ""; position: absolute; left: 12%; right: 12%; top: calc(50% - 1.25px); height: 2.5px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.box.no::after { transform: rotate(-45deg); }
.try .sub { grid-column: 1 / -1; margin-top: clamp(1.5rem, 3vw, 3rem); max-width: 46ch; }
.try figure { margin: 0; }
.try figure img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 2px var(--ink); }

/* The arena, same layout on ink */
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 0.5rem; margin: 0 0 0.9rem; }
.score p { margin: 0; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.score b { display: block; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); text-transform: none; }
.score .s-red b { color: var(--red); }
.score .s-blue { text-align: right; }
.score .s-blue b { color: var(--blue); }
.score .s-time { text-align: center; }
#arena-canvas { width: 100%; max-width: 30rem; height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 10px; }
.trycard .btn { margin-top: 1rem; }
.dark .trycard .btn { background: var(--ink); color: #fff; }
.k.gap { margin-top: 1.3rem; }
.result { margin: 0.8rem 0 0; min-height: 1.4em; font-weight: 800; }
.result[data-side="red"] { color: var(--red); }
.result[data-side="blue"] { color: var(--blue); }
.codebox { margin-top: 1.4rem; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 14px; padding: 0.9rem 1rem 1rem; }
.codebox pre { margin: 0; font-family: var(--mono); font-size: 0.86rem; font-weight: 600; line-height: 1.5; overflow-x: auto; color: #fff; }
.codebox .k[data-side="red"] { color: #ff5c6c; }
.codebox .k[data-side="blue"] { color: #86a9ff; }
.tok-k { color: #ff5c6c; }
.tok-s { color: #ffd27a; }
.tok-n { color: #86a9ff; }
.tok-c { color: rgba(255, 255, 255, 0.55); }

/* ---- Championship: team size, then the email ---- */
.team { margin-top: clamp(2rem, 4vw, 3.5rem); }
.team .pills { margin-top: 0.6rem; }
.team .pills button { font-family: var(--mono); font-size: 1.1rem; min-width: 3.2rem; padding: 0.6rem 1rem; }
.team-out { display: inline-block; align-self: center; margin-left: 0.8rem; font-weight: 800; }
.dark .arrow.big, .arrow.big { font-size: clamp(1.4rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -0.03em; border-bottom-width: 3px; }




/* ---- Ask for an invitation: the small form ---- */
.ask { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 2vw, 1.9rem) clamp(1rem, 2.4vw, 2.4rem); max-width: 62rem; margin-top: clamp(2rem, 4vw, 3.5rem); }
.ask .field { margin: 0; }
.ask label, .ask legend { display: block; font-family: var(--mono); font-size: 0.82rem; font-weight: 700; letter-spacing: 0; word-spacing: 0; margin: 0 0 0.5rem; padding: 0; }
.ask label::before, .ask legend::before { content: ">>> "; color: var(--red); }
.ask input[type="text"], .ask input[type="email"] { display: block; width: 100%; font: inherit; font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 0.75rem 0.9rem; }
.ask input:focus-visible { outline: 3px solid #ffb000; outline-offset: 2px; }
.ask-who { grid-column: 1 / -1; border: 0; margin: 0; padding: 0; min-width: 0; }
.ask-who .choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ask-who .choices label { position: relative; margin: 0; font-family: var(--font); font-size: 1.05rem; }
.ask-who .choices label::before { content: none; }
.ask-who input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ask-who span { display: block; font-weight: 700; border-radius: 99px; padding: 0.65rem 1.15rem; background: rgba(12, 12, 13, 0.08); }
.ask-who label:hover span { background: rgba(12, 12, 13, 0.15); }
.ask-who input:checked + span { background: var(--ink); color: #fff; }
.ask-who input:focus-visible + span { outline: 3px solid #ffb000; outline-offset: 3px; }
.ask .trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.ask .send { grid-column: 1 / -1; justify-self: start; font: inherit; font-size: clamp(1.15rem, 1.9vw, 1.6rem); font-weight: 900; letter-spacing: -0.02em; color: #fff; background: var(--red); border: 0; border-radius: 99px; padding: 0.85rem 1.7rem; cursor: pointer; }
.ask .send::after { content: " ›"; }
.ask .send:hover { opacity: 0.88; }
.ask .send[disabled] { opacity: 0.55; cursor: default; }
.ask-out { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 800; letter-spacing: -0.02em; }
.ask-out[data-state="problem"] { color: var(--red); }
.beta .pledge { max-width: 60ch; }
.beta .pledge a { border-bottom: 2px solid var(--red); }
@media (max-width: 760px) {
  .ask { grid-template-columns: minmax(0, 1fr); }
  .ask .send { justify-self: stretch; }
}
/* The page a browser without scripts lands on after the form: one of two messages. */
.receipt #problem { display: none; }
.receipt #problem:target { display: block; }
.receipt #problem:target ~ .sent { display: none; }
/* ---- end of the form ---- */

/* ---- Questions ---- */
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-of-type { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: clamp(0.85rem, 1.5vw, 1.4rem) 0; font-size: clamp(1.15rem, 2.3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--red); font-weight: 900; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1.5rem; max-width: 62ch; font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 500; line-height: 1.5; }
.faq details a { border-bottom: 2px solid currentColor; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.66); font-size: 0.82rem; padding: 1.75rem 0 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { text-decoration: underline; }
.signature { margin: 0 0 1.5rem; padding: 0 var(--margin); }
.signature a { display: inline-block; }
/* The full logo is 773 by 468. Only its height is set, so it keeps its shape. */
.signature img { display: block; height: 6.5rem; width: auto; }

/* ---- Legal pages and the 404 page ---- */
.site-header { border-bottom: 2px solid var(--ink); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 900; font-size: 1.05rem; letter-spacing: 0.01em; }
.brand img { display: block; flex: none; height: 3.6rem; width: auto; }
.header-actions { display: flex; align-items: center; gap: 0.4rem; }
.header-actions a, .btn-quiet { display: inline-block; line-height: 2.1rem; padding: 0 0.95rem; border-radius: 99px; background: rgba(12, 12, 13, 0.07); color: var(--ink); font-size: 0.95rem; font-weight: 700; }
.header-actions a:hover { background: rgba(12, 12, 13, 0.14); opacity: 1; }
.eyebrow { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; margin: 0 0 1rem; }
.eyebrow::before { content: ">>> "; color: var(--red); }
.prose { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.prose .wrap { max-width: calc(46rem + 2 * var(--margin)); }
.prose h1, .notfound h1 { font-size: clamp(2.4rem, 6.4vw, 5.2rem); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin: 0 0 1.2rem; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin: 2.6rem 0 0.7rem; padding-top: 1.1rem; border-top: 2px solid var(--ink); }
.prose h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.015em; margin: 1.6rem 0 0.4rem; }
.prose p, .prose li { line-height: 1.55; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.3rem 0; }
.prose a, .lead.small a { border-bottom: 2px solid var(--red); font-weight: 700; }
.prose .meta { color: var(--soft); font-size: 0.95rem; font-weight: 600; }
.fill { background: #ffe45c; color: #000; padding: 0.05em 0.3em; border-radius: 4px; font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); }
.prose table { width: 100%; min-width: 35rem; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(12, 12, 13, 0.14); }
.prose th { font-weight: 800; }
.prose tr:last-child td { border-bottom: 0; }
.notfound { min-height: 100vh; display: flex; align-items: center; padding: 3rem 0; }
.lead { font-size: clamp(1.15rem, 2.1vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; color: var(--soft); margin: 0; max-width: 34ch; }
.lead.small { margin-top: 1.8rem; font-size: 1rem; }
.cta-row { margin-top: 1.8rem; }
.btn-primary { background: var(--red); color: #fff; }

@media (max-width: 900px) {
  .levels li { grid-template-columns: clamp(2.6rem, 8vw, 9rem) 1fr; }
  .levels img { grid-column: 2; margin-top: 1rem; max-width: 26rem; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .bench-top .lede, .bench .hint { display: none; }
  .bench-top { padding-top: 5.1rem; }
  .bar .name .logo, .after .bar .name .logo, .plain .bar .name .logo { height: 3rem; }
  .bench-foot { padding-top: 2rem; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .cols { grid-template-columns: 1fr; }
  /* Phone: the label on two lines, the motto on one, the bit counter under them; one red band. */
  .foot { flex-direction: column; align-items: stretch; gap: 0; background: var(--red); }
  .foot .tab { border-radius: 0; padding-right: var(--margin); padding-bottom: 0.25rem; }
  .foot .state { align-self: flex-end; border-radius: 0; padding-top: 0.2em; padding-bottom: 0.9em; }
  .what::before { content: none; }
  .what .where { display: block; }
  .what .where::before { content: ">>> "; }
  .bar .name .logo { height: 4.6rem; }
  .after .bar .name .logo, .plain .bar .name .logo { height: 3.3rem; }
  .bar a { font-size: 0.85rem; line-height: 1.95rem; padding: 0 0.8rem; }
  .bar .wide { display: none; }
  .fit { white-space: normal; }
  .fit-m { display: block; line-height: 0.86; }
  .fit-m + .fit-m { margin-top: 0.05em; }
  .panel { height: clamp(19rem, 105vw, 30rem); }
  .state { font-size: 0.7rem; }
  .try .edge { grid-template-columns: 1fr; }
  .anim .txt, .anim .txt.d, .anim .txt.g { top: auto; bottom: 4.4rem; left: var(--margin); right: var(--margin); width: auto; }
  .txt h3 { font-size: 1.75rem; margin: 0.3rem 0 0.55rem; max-width: none; }
  .txt .says { font-size: 0.95rem; }
  .txt .note { font-size: 0.75rem; margin-top: 0.55rem; }
  .backs span { top: 25%; bottom: auto; font-size: 40vw; }
  .anim .sheet { width: 14.5rem; margin: -5rem 0 0 -7.25rem; padding: 0.8rem 0.9rem 0.9rem; }
  .sheet pre { font-size: 0.86rem; }
  .sheet .src { font-size: 0.64rem; }
  .anim .counter { top: 3.6rem; bottom: auto; }
  .counter li { font-size: 0.7rem; }
  .counter li span { display: none; }
  .signature img { height: 5rem; }
  .team-out { display: block; margin: 0.7rem 0 0; }
  .codebox pre { max-height: 14.5rem; overflow: auto; }
  .bench { min-height: 0; }
  .view { position: relative; order: 2; height: 58vh; height: 58svh; min-height: 21rem; }
  .bench-top { order: 1; padding-top: 5.6rem; padding-bottom: 1.4rem; }
  .bench-foot, .js .bench .bench-foot { order: 3; display: flex; flex-direction: column; margin-top: -4.4rem; padding-top: 0; background: none; }
  .who { min-height: 4.4rem; align-content: end; padding-bottom: 0.7rem; text-shadow: 0 1px 14px rgba(8, 16, 24, 0.95); }
  .bench .row { order: 2; margin-top: 0.9rem; }
  .bench .pills { order: 3; margin-top: 1.1rem; }
  .bench .reset { order: 3; }
  .bench .hint { order: 2; flex-basis: 100%; }
  .bench-note { order: 3; margin-top: 0; padding-top: 1rem; background: none; }
  .tag { margin-left: 0.9rem; font-size: 0.72rem; }
  .bots .more { flex-basis: 100%; margin: 0.3rem 0 0; }
  .opener { flex: 1 1 100%; }
  .opener input { flex: 1; width: auto; }
  .bench .hint { margin-left: 0; }
  .bench .hint .fine { display: none; }
  .bench .load { top: auto; bottom: 1rem; transform: translateX(-50%); }
}
