/* quirkyagents.com: the site's one stylesheet (owner, 2026-12-01: one look, one source of truth).
   Every page gets it from the head partial (site/partials/head.html); the build fails if a page doesn't. Only the apps
   (The Butler, Plug, the Jev games, the admin kit) add a sheet of their own, after this one, for their own UI, and they
   use the tokens below rather than their own colours for the site's things.

   Sections, in order: 1 fonts · 2 tokens · 3 page frame · 4 type · 5 layout · 6 header, search, theme switch ·
   7 footer, survey · 8 buttons · 9 tiles and rows · 10 showpieces (window, replay, numbers, steps, questions, bands, video) ·
   11 reading pages · 12 code · 13 widgets · 14 page by page · 15 motion and print.

   Rules that hold everywhere: Atkinson for reading text and every small label; Pixelify only big (the logo); the cream,
   ink, indigo and gold palette in light and dark; ink borders with flat offset shadows; nothing blinks; under reduced motion
   everything is shown at once. Class names here never clash with the apps' own (Butler and Plug use .card, .btn, .badge,
   .note): the site's are .tile, .button, .eyebrow, .fine. */

/* ---------- 1. fonts ---------- */
@font-face { font-family: "Pixelify"; src: url("/fonts/pixelify.4a5633a0c9.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
/* Pixelify's 8 reads as a 3, its 5 as an S, C as O, B as G and Z as 2 (owner, 09-30, 10-11), so 0-9, B, C and Z come from
   Jersey 10 (OFL, fonts/OFL-jersey.txt), sized to Pixelify's cap height. Declared after Pixelify's own face, so it wins. */
@font-face { font-family: "Pixelify"; src: url("/fonts/jersey.c44e76589b.woff2") format("woff2"); font-weight: 400 700; unicode-range: U+0030-0039, U+0042-0043, U+005A; size-adjust: 118.5%; font-display: swap; }
/* Atkinson Hyperlegible Next (OFL, fonts/OFL-atkinson.txt): built so look-alike letters stay apart */
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson.18b2a1a39a.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-italic.4a5037bfaf.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

/* ---------- 2. tokens ---------- */
/* cream, ink, deep indigo and starlight gold. An agent's own little things wear its mascot's colours instead */
:root { color-scheme: light only;
  --ink: #231c26; --muted: #6b6258; --line: #e6dccb; --bg: #fbf6ec; --card: #fffdf8; --foot: #f1e8d6;
  --accent: #3b3a8c; --gold: #d9a441; --tint: #eeedf8; --bar: #e3e1f5; --bar-mine: #cdcaf0; --mark: #f6e3b4;
  --night: #1e1b3a; --quote: #4a4140; --on-ink: #d8d6f4; --good: #2f7a4f; --bad: #b3473b;
  --spell-0: #3b3a8c; --spell-1: #b0731a; --spell-2: #1f7a6e; --spell-3: #b03a5b; --spell-4: #4c7a2a; --spell-5: #7a3fa0;
  --pixel: Pixelify, system-ui, sans-serif; --sans: Atkinson, system-ui, sans-serif; --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display: var(--sans);   /* headings: one switch for the whole site */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --page: 76rem;            /* the widest anything gets */
  --read: 44rem;            /* a line of reading text */
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(1rem, 2.2vw, 1.6rem);
  --section: clamp(3.4rem, 8vw, 6rem);   /* space between a page's sections */
}
/* dark (theme.js, only when the visitor picks it): the night sky. Indigo lifted so links read; gold stays gold */
:root[data-theme="dark"] { color-scheme: dark;
  --ink: #ece6d8; --muted: #a9a2b6; --line: #34304d; --bg: #13121d; --card: #1c1a2b; --foot: #181726;
  --accent: #a5a3f2; --gold: #e2b65a; --tint: #26244a; --bar: #2e2b55; --bar-mine: #423e78; --mark: #5a4718;
  --night: #0c0b16; --quote: #c9c1b4; --on-ink: #4a4566; --good: #7cc48a; --bad: #e2826f;
  --spell-0: #a5a3f2; --spell-1: #e8a94a; --spell-2: #5cc7b4; --spell-3: #f08aa6; --spell-4: #9fd27a; --spell-5: #c99af0; }

/* ---------- 3. page frame ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* a class that sets display never un-hides */
html { background: var(--bg); overflow-x: clip; scroll-padding-top: 6rem; }   /* no page scrolls sideways; a #link lands below the header */
/* never overflow on body: with html clipping, it would make body its own scroll box and the sticky header would scroll away */
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; position: relative;
  background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
body > main { flex: 1 0 auto; width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 2rem; }
img, video, canvas, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--mark); color: var(--ink); }

/* ---------- 4. type ---------- */
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -.01em; }
p { text-wrap: pretty; }
.kicker { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .8rem; font: 700 .92rem/1.3 var(--sans); color: var(--accent); letter-spacing: .02em; }
.kicker .icon { width: 1.05rem; height: 1.05rem; }
.kicker.pillars { flex-wrap: wrap; gap: .35rem; }
.kicker.pillars a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.kicker.pillars a:hover { color: var(--ink); }
.sub { margin: 0 0 1.4rem; font-size: 1.16rem; line-height: 1.55; max-width: 40rem; }
.fine { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.center { text-align: center; }
.center.fine, .center.sub { margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-block; flex: none; width: 1.4rem; height: 1.4rem; fill: currentColor; shape-rendering: crispEdges; vertical-align: -.2em; }
.tag { font: 700 .66rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1.5px solid var(--line); padding: .2em .45em; vertical-align: .15em; }
.eyebrow { margin: 0 0 .35rem; font: 600 .76rem/1.35 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* the spell: one phrase per page, recoloured on hover or tap (site.js) with one pixel sparkle */
.spell { color: var(--spell, var(--accent)); transition: color .3s; position: relative; }
.spell.casting::after { content: ""; position: absolute; right: -7px; top: -5px; width: 2px; height: 2px; background: var(--gold); pointer-events: none;
  box-shadow: 0 -2px var(--gold), 0 2px var(--gold), -2px 0 var(--gold), 2px 0 var(--gold); animation: twinkle .6s steps(3) forwards; }
@keyframes twinkle { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1); } }

/* ---------- 5. layout ---------- */
.read { max-width: var(--read); margin-inline: auto; }
.sec { margin: 0 0 var(--section); scroll-margin-top: 5rem; }
/* a section's head: centred, the question it answers, one line under it */
.sec-head { max-width: 46rem; margin: 0 auto clamp(1.4rem, 3vw, 2.2rem); text-align: center; }
.sec-head h2 { margin: 0 0 .55rem; font-size: clamp(1.55rem, 3.6vw, 2.25rem); line-height: 1.18; font-weight: 700; }
.sec-head p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.sec-head .kicker { justify-content: center; }
.sec-head.left { margin-left: 0; text-align: left; }
.sec-head.left .kicker { justify-content: flex-start; }
/* grids: one column on a phone, then as many as fit */
.grid-2, .grid-3, .grid-4 { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); align-items: stretch; }
.grid-2 > li, .grid-3 > li, .grid-4 > li { margin: 0; }
@media (min-width: 44rem) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
/* three in a row on a tablet would squeeze; an odd last card spans the row instead */
@media (min-width: 44rem) and (max-width: 63.99rem) { .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* a band: a full-width tinted stripe behind a section, the content stays in the page's column */
.band { position: relative; padding-block: clamp(2.6rem, 6vw, 4.4rem); isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--tint); border-block: 2px solid var(--ink); }
.band.dotted::before { background-color: var(--tint); background-image: radial-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1.2px, transparent 1.6px); background-size: 14px 14px; }

/* the opening of a page: words on the left, the thing itself on the right (stacked on a phone) */
.hero { display: grid; gap: clamp(1.8rem, 4vw, 3.2rem); align-items: center; padding: clamp(1.6rem, 5vw, 3.6rem) 0 var(--section); }
@media (min-width: 60rem) { .hero { grid-template-columns: 1.05fr 1fr; } .hero.wide-text { grid-template-columns: 1.3fr 1fr; } }
.hero h1 { font-size: clamp(2.05rem, 4.8vw, 3.25rem); }
.hero-demo { margin: 0; min-width: 0; }
.hero-demo > figcaption { margin-top: .9rem; color: var(--muted); font-size: .88rem; }
.ctas { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin: 0 0 1.2rem; }
.ctas > a:not(.button) { font-weight: 700; }
/* a mascot beside a page's title */
.with-mascot { display: flex; align-items: center; gap: 1rem; }
.mascot { image-rendering: pixelated; cursor: pointer; -webkit-tap-highlight-color: transparent; flex: none; }
/* each mascot at a whole multiple of its own pixels, so every pixel stays square */
canvas.mascot[data-mascot=shifty] { width: 96px; height: 84px; }   /* 32x28 */
canvas.mascot[data-mascot=pemberton], canvas.mascot[data-mascot=plug] { width: 84px; height: 96px; }   /* 28x32 */
canvas.mascot[data-mascot=firstwatch] { width: 90px; height: 96px; }   /* 30x32 */
canvas.mascot[data-mascot=wizard] { width: 84px; height: 112px; }   /* 24x32 */

/* ---------- 6. header, search, theme switch ---------- */
/* the same on every page (partials/header.html), held at the top: Shifty's still face and the name, the search, the doors,
   the light switch. On a phone the search is the header's second row */
.site-head { position: sticky; top: 0; z-index: 20; width: 100%; background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.head-bar { position: relative; max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: .6rem 1.1rem; flex-wrap: wrap; }
.site-home { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font: 600 1.1rem/1 var(--pixel); }
.site-face { height: 30px; width: auto; image-rendering: pixelated; }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; font: 600 .97rem/1 var(--sans); }
.site-nav a { color: var(--ink); text-decoration: none; padding: .4rem 0; border-bottom: 2px solid transparent; transition: border-color .2s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: var(--gold); }
.head-bar .search { flex: 0 1 15rem; min-width: 0; }
.head-bar .head-contact { padding: .45rem .8rem; font-size: .92rem; }
.site-head .theme-toggle { width: 36px; height: 36px; }
.site-head .theme-toggle svg { width: 16px; height: 16px; }
@media (max-width: 52rem) {
  .head-bar .search { order: 1; flex-basis: 100%; }
}
@media (max-width: 480px) { body { font-size: 17px; } .site-nav { gap: .75rem; font-size: .92rem; } .head-bar { gap: .5rem .6rem; } }
/* a phone: the name, Contact and the switch on the first row, the doors on the second, the search on the third */
@media (max-width: 560px) {
  .site-nav .nav-long { display: none; }
  .head-bar .head-contact { margin-left: auto; padding: .35rem .6rem; font-size: .85rem; }
  .site-nav { order: 1; flex-basis: 100%; margin-left: 0; justify-content: space-between; }
  .head-bar .search { order: 2; }
}
@media (max-width: 374px) { .site-nav { gap: .55rem; font-size: .86rem; } .site-home span { display: none; } }
/* the pixel mascots are outlined in near-black: at night they get a thin moonlit rim instead */
:root[data-theme="dark"] canvas.site-face, :root[data-theme="dark"] canvas.mascot {
  filter: drop-shadow(1px 0 0 #8784c9) drop-shadow(-1px 0 0 #8784c9) drop-shadow(0 1px 0 #8784c9) drop-shadow(0 -1px 0 #8784c9); }

/* the site search (search.js): it reads /llms-full.txt in the browser. Results open in a panel under the header while the
   box has words in it and focus; Esc clears it */
.search { margin: 0; position: static; }
.search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search input { width: 100%; min-height: 38px; padding: .45rem .75rem; border: 2px solid var(--ink); border-radius: 0;
  background: var(--card); box-shadow: 3px 3px 0 var(--line); color: var(--ink); font: 1rem/1.3 var(--sans); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus { outline: 2px dashed var(--accent); outline-offset: 2px; }
.search-panel { position: absolute; top: 100%; right: var(--gutter); width: min(38rem, 100% - 2 * var(--gutter));
  max-height: min(70vh, 34rem); overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--line); }
.search:not(:focus-within) .search-panel, .search:has(input:placeholder-shown) .search-panel { display: none; }
.search .search-status { margin: 0; padding: .7rem .9rem .5rem; font: 600 .82rem/1.4 var(--sans); letter-spacing: .04em; color: var(--muted); }
.search .search-status:empty { display: none; }
.search-results { list-style: none; margin: 0; padding: 0 .4rem .4rem; }
.search-results:empty { display: none; }
.search-results li { border-top: 1px solid var(--line); }
.search-results a { display: grid; gap: .2rem; padding: .7rem .5rem; color: var(--muted); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--tint); }
.search-results a:focus-visible { outline: 2px dashed var(--accent); outline-offset: -2px; }
.sr-title { font: 700 1rem/1.3 var(--sans); color: var(--ink); text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sr-where { font: 600 .78rem/1.4 var(--sans); letter-spacing: .03em; color: var(--accent); }
.sr-text { font: .92rem/1.5 var(--sans); overflow-wrap: anywhere; }
.search-results mark { background: var(--mark); color: var(--ink); padding: 0 .1em; }

/* the light/dark switch (theme.js) */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; margin: 0; cursor: pointer;
  color: inherit; background: transparent; border: 2px solid currentColor; border-radius: 0; -webkit-tap-highlight-color: transparent; }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; shape-rendering: crispEdges; }
.theme-toggle:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.theme-toggle:active { transform: translate(1px, 1px); }
.theme-toggle:focus-visible { outline: 2px dashed currentColor; outline-offset: 3px; }
.theme-toggle.corner { position: absolute; top: 14px; right: 16px; z-index: 6; }

/* the reading bar: how far down a long page you are (site.js sets --read-progress) */
.progress { position: fixed; left: 0; top: 0; z-index: 30; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--read-progress, 0));
  background: var(--gold); pointer-events: none; }

/* ---------- 7. footer, survey ---------- */
/* one footer on every page (partials/footer.html). On a phone everything is one centred column; on a wide screen the
   name and links on the left, the site map in the middle, the survey on the right */
.site-foot { flex: none; width: 100%; margin-top: var(--section); border-top: 2px solid var(--ink); background: var(--foot); color: var(--muted);
  font: .95rem/1.55 var(--sans); padding-bottom: env(safe-area-inset-bottom); }
.foot-in { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 2.6rem var(--gutter) 1.4rem; display: grid; gap: 2.2rem; text-align: center; justify-items: center; }
.site-foot p { margin: 0; }
.foot-brand { display: grid; gap: 1rem; justify-items: center; max-width: 24rem; }
.foot-brand .site-home { font-size: 1.3rem; }
.foot-brand .site-face { height: 40px; }
.foot-line { font: 600 1.05rem/1.5 var(--sans); color: var(--ink); text-wrap: balance; }
.foot-map { display: grid; gap: 1.4rem; justify-items: center; width: 100%; }
.foot-map > div { display: grid; gap: .45rem; justify-items: center; }
.foot-map h2 { margin: 0; font: 700 .78rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .09em; color: var(--ink); }
.foot-map ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .9rem; }
.foot-map a { color: var(--muted); }
.foot-map a:hover { color: var(--accent); }
.site-foot .foot-legal { max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; padding: 1rem var(--gutter) 1.4rem; border-top: 1px solid var(--line); font-size: .85rem; text-align: center; }
.foot-legal a { color: var(--muted); }
body:has(#crew) .site-foot { padding-bottom: 110px; }   /* the crew's ground, on the pages they live on */
@media (min-width: 60rem) {
  .foot-in { grid-template-columns: 1fr 1.25fr 1.25fr; align-items: start; text-align: left; justify-items: stretch; gap: 3rem; }
  .foot-brand { justify-items: start; }
  .foot-map { grid-template-columns: 1fr 1fr; justify-items: start; }
  .foot-map > div { justify-items: start; }
  .foot-map ul { flex-direction: column; justify-content: start; }
  .foot-legal { text-align: left; }
}
/* X, GitHub and Hugging Face, big enough to notice */
.runes { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0; }
.site-foot .runes { justify-content: center; }
@media (min-width: 60rem) { .site-foot .runes { justify-content: start; } }
.rune { display: inline-flex; align-items: baseline; gap: .45rem; text-decoration: none; font: 700 1rem/1 var(--sans); color: var(--bg); background: var(--accent);
  padding: .7rem .95rem; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--gold); transition: background-color .2s var(--ease), transform .1s var(--ease), box-shadow .1s var(--ease); }
.rune span { font: 500 .82rem/1 var(--sans); color: color-mix(in srgb, var(--bg) 78%, var(--accent)); }
.rune:hover { background: var(--ink); }
.rune:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--gold); }

/* the survey: one odd question, vote once, then everyone's answers */
.survey { width: 100%; max-width: 30rem; margin: 0; text-align: left; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); color: var(--ink); }
.survey > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.2rem; padding: .7rem 1.2rem; cursor: pointer; list-style: none; }
.survey > summary::-webkit-details-marker { display: none; }
.survey > summary:hover { background: var(--bg); }
.survey > summary:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.survey h2 { font: 600 .82rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0; }
.survey-arrow { flex: none; width: 16px; height: 10px; fill: var(--ink); shape-rendering: crispEdges; transition: transform .35s var(--ease); }
.survey[open] .survey-arrow { transform: rotate(180deg); }
.survey[open] > summary { padding-bottom: .3rem; }
.survey > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.survey > .survey-q { margin-top: .3rem; }
.survey > .survey-meta { margin-bottom: 1rem; }
.survey-q { font-size: 1.1rem; line-height: 1.4; margin: 0 0 .8rem; }
.survey-opts { display: grid; gap: .5rem; }
.survey-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; min-height: 2.75rem;
  padding: .55rem .85rem; font: 1rem/1.3 var(--sans); text-align: left; color: var(--ink); background: var(--bg); border: 2px solid var(--line); overflow: hidden; }
button.survey-opt { cursor: pointer; }
button.survey-opt:hover { background: var(--line); }
button.survey-opt:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.survey-opt .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bar); transition: width .7s var(--ease); }
.survey-opt.mine .bar { background: var(--bar-mine); }
.survey-opt .label, .survey-opt .pct { position: relative; }
.survey-opt .pct { font: 600 .9rem/1 var(--sans); white-space: nowrap; }
.survey-opt.mine .label { font-weight: 700; }
.survey.busy .survey-opts { opacity: .6; pointer-events: none; }
.survey-meta { font: .75rem/1.5 var(--sans); color: var(--muted); letter-spacing: .02em; margin: .7rem 0 0; }
.survey-opt .you { font: 500 .62rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-left: .5em; vertical-align: .15em; white-space: nowrap; display: inline-block; }

/* ---------- 8. buttons ---------- */
/* one button: ink border, flat shadow, lifts on hover, presses on tap. .quiet is the card-coloured one, .gold the bright one */
.button { display: inline-flex; align-items: center; gap: .5rem; padding: .78rem 1.2rem; font: 700 1.02rem/1 var(--sans); color: var(--bg); background: var(--accent);
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s var(--ease); }
.button:hover, .button:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.quiet { color: var(--ink); background: var(--card); }
.button.quiet:hover { background: var(--tint); }
.button.gold { color: #231c26; background: var(--gold); }
.button.small { padding: .5rem .8rem; font-size: .9rem; box-shadow: 3px 3px 0 var(--ink); }
/* a paragraph that is only "→ [label](url)" in a post */
.cast { margin: 1.4rem 0; }

/* ---------- 9. tiles and rows ---------- */
/* a tile: one thing, framed. Words first; a picture only when it is the thing itself (a screenshot of a tool in use, a demo) */
.tile { position: relative; display: flex; flex-direction: column; padding: 1.15rem 1.2rem 1.05rem; background: var(--card); border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tile > :last-child { margin-bottom: 0; }
a.tile, .tile.lift { color: var(--ink); text-decoration: none; }
.tile.lift:hover, a.tile:hover, .tile:has(h3 a:hover) { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--gold); }
.tile h3 { margin: 0 0 .45rem; font-size: 1.22rem; line-height: 1.3; font-weight: 700; }
.tile h3 a { color: inherit; text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; }   /* the whole tile opens its page */
.tile h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.tile p { margin: 0 0 .55rem; }
.tile ul { padding-left: 1.2rem; margin: 0 0 .9rem; }
.tile li { margin: 0 0 .4rem; }
.tile .links { position: relative; z-index: 1; margin: auto 0 0; padding-top: .6rem; font: 600 .9rem/1.45 var(--sans); }
.tile .icon-box { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin: 0 0 .9rem; color: var(--accent); background: var(--tint); border: 2px solid var(--ink); }
.tile .icon-box .icon { width: 1.6rem; height: 1.6rem; }
/* a long description stops at four lines in a row (the whole text stays in the page) */
.carousel .tile h3 + p, .grid .tile h3 + p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.tile.full h3 + p { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
/* a series is a small stack of tiles */
.tile.stack { box-shadow: 6px 6px 0 -2px var(--card), 6px 6px 0 0 var(--ink), 12px 12px 0 var(--line); }
/* a tile's kind: a coloured edge, so a grid of mixed things reads at a glance */
.tile[data-kind] { border-top-width: 6px; }
.tile[data-kind="series"] { border-top-color: var(--spell-0); }
.tile[data-kind="post"] { border-top-color: var(--spell-1); }
.tile[data-kind="oss"] { border-top-color: var(--spell-2); }
.tile[data-kind="sim"] { border-top-color: var(--spell-3); }
.tile[data-kind="tool"] { border-top-color: var(--spell-4); }
.tile[data-kind="model"], .tile[data-kind="benchmark"] { border-top-color: var(--spell-5); }
.tile[data-kind="agent"] { border-top-color: var(--gold); }

/* a shelf: a titled row of tiles, with "All …" on the right */
.shelf { margin: 0 0 var(--section); scroll-margin-top: 5rem; }
.shelf-head { display: flex; align-items: flex-end; gap: .6rem 1rem; flex-wrap: wrap; margin: 0 0 .35rem; }
.shelf-head h2 { margin: 0 auto 0 0; font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; font-weight: 700; }
.shelf .all, .sec .all { font: 700 .95rem/1.4 var(--sans); text-decoration: none; border-bottom: 2px solid var(--gold); white-space: nowrap; }
/* a heading inside a section, above a second grid (the home's simulations under its agents) */
.sub-head { margin: 2.2rem 0 1rem; font-size: 1.3rem; text-align: center; }
/* a short list of bold-led points inside a tile */
.plain-list { margin: 0 0 1.2rem; padding: 0; list-style: none; }
.plain-list li { margin: 0 0 .8rem; }
.way .ctas { margin: auto 0 0; padding-top: .4rem; flex-direction: column; align-items: stretch; gap: .7rem; }
.way .ctas .button { text-align: center; justify-content: center; }   /* every card: the button full width, then one row of links (owner, 2026-12-04) */
.way .ctas .more { margin: 0; text-align: center; font-weight: 700; color: var(--muted); }
.shelf .count { font: 500 .88rem/1.4 var(--sans); color: var(--muted); margin: 0; }
.shelf > .fine { margin: 0 0 1.1rem; font-size: 1rem; max-width: 46rem; }
/* a carousel: it scrolls sideways and snaps to each tile; on a phone the next tile peeks in. Mouse users get
   arrows in the shelf's head (site.js). On a wide screen three and a bit show at once */
.carousel { list-style: none; display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  /* it runs to the screen's edges; the first tile lines up with the page */
  --edge: max(var(--gutter), (100vw - var(--page)) / 2); /* the page column's left edge */
  margin: 0 calc(50% - 50vw); padding: 4px var(--edge) 16px; scroll-padding-inline: var(--edge); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.carousel:focus-visible { outline-offset: -3px; }
.carousel > .tile { flex: 0 0 min(84%, 20rem); scroll-snap-align: start; }
@media (min-width: 64rem) { .carousel > .tile { flex-basis: calc((100% - 3 * var(--gap)) / 3.3); } }
.nudge { display: inline-grid; place-items: center; font: 700 1rem/1 var(--sans); color: var(--ink); background: var(--card); border: 2px solid var(--ink); width: 2.3rem; height: 2.3rem;
  cursor: pointer; box-shadow: 3px 3px 0 var(--line); }
.nudge:hover:not(:disabled) { background: var(--tint); }
.nudge:disabled { opacity: .35; cursor: default; }
/* a list page (Writing, Projects): every tile at once in a grid */
.grid { list-style: none; margin: 0; padding: 0 6px 6px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--gap); }
.grid > .tile { margin: 0; }
/* the jump links under a list page's title, one per section, with its count */
.jump { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; }
.jump a { display: inline-flex; align-items: center; gap: .45rem; font: 700 .92rem/1 var(--sans); color: var(--ink); text-decoration: none; padding: .55rem .8rem;
  border: 2px solid var(--ink); background: var(--card); box-shadow: 3px 3px 0 var(--line); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.jump a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--gold); }
.jump span { color: var(--muted); font-weight: 500; }

/* ---------- 10. showpieces ---------- */
/* a window: a framed app-like box with a title bar, for demos and real output */
.win { background: var(--card); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); min-width: 0; }
.win-bar { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .45rem .8rem; border-bottom: 2px solid var(--ink); background: var(--tint); font-size: .85rem; font-weight: 700; }
.win-bar .grow { margin-left: auto; }
.dots { display: inline-flex; gap: .3rem; }
.dots i { width: .6rem; height: .6rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); }
.dots i:first-child { background: var(--gold); }
.win-body { position: relative; padding: 1rem; }

/* the replay: a real test conversation, played line by line, before and after the fixes (site.js + agents/runs.js) */
.rp { margin: 0 0 .9rem; border: 2px solid var(--ink); background: var(--bg); font-size: .9rem; min-width: 0; }
.win .rp { margin: 0; border: 0; }
.rp-wait { margin: 0; padding: 2rem 1rem; color: var(--muted); text-align: center; }
.rp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .5rem; border-bottom: 2px solid var(--ink); background: var(--tint); }
.rp-tabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.rp button { font: 700 .78rem/1 var(--sans); padding: .42rem .6rem; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.rp .rp-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.rp .rp-again { border-color: transparent; background: none; text-decoration: underline; text-underline-offset: 3px; color: var(--accent); padding-inline: .2rem; }
.rp-body { position: relative; display: grid; height: 22rem; overflow-y: auto; overscroll-behavior: contain; padding: .7rem .7rem .3rem; scroll-behavior: smooth; }
.hero .rp-body { height: 24rem; }
.rp-list { grid-area: 1 / 1; list-style: none; margin: 0; padding: 0; visibility: hidden; }
.rp-list.on { visibility: visible; }
.rp-list li { margin: 0 0 .55rem; opacity: 0; transform: translateY(5px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.rp-list li.in { opacity: 1; transform: none; }
.rp-who { display: block; margin: 0 0 .15rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-in p, .rp-out p { margin: 0; padding: .45rem .6rem; line-height: 1.42; white-space: pre-line; }
.rp-in p { background: var(--card); border: 1px solid var(--line); margin-right: 1.4rem; }
.rp-out p { background: var(--tint); border: 1px solid var(--bar); margin-left: 1.4rem; }
.rp-out .rp-who { margin-left: 1.4rem; }
.rp-tool { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.rp-tool code { font-family: var(--mono); }
.rp-tool.rp-bad code { color: var(--ink); background: var(--mark); padding: 0 .2rem; }
.rp-tool.rp-good code { color: var(--ink); }
.rp-end { padding: .5rem .6rem; border: 2px solid var(--ink); font-size: .86rem; line-height: 1.4; }
.rp-end.rp-bad { background: var(--mark); }
.rp-end.rp-good { background: var(--card); box-shadow: inset 4px 0 0 var(--accent); }
.rp-label { margin: 0; padding: .35rem .6rem .45rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
/* a replay with a choice of agents: the agent tabs sit in the window's bar */
.rp-pick { display: flex; flex-wrap: wrap; gap: .3rem; }
.rp-pick button { display: inline-flex; align-items: center; gap: .35rem; font: 700 .8rem/1 var(--sans); padding: .4rem .6rem; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.rp-pick button .icon { width: .95rem; height: .95rem; }
.rp-pick button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

/* the looping example: beats fade in one by one (data-beat), then Approve is pressed and "Saved" shows (site.js) */
.loop.playing [data-beat] { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.loop.playing [data-beat].in { opacity: 1; transform: none; }
.loop-mail { padding: .6rem .75rem; background: var(--bg); border-left: 4px solid var(--gold); font-size: .95rem; line-height: 1.45; }
.loop-mail p { margin: 0 0 .3rem; }
.loop-mail p:last-child { margin: 0; }
.loop-from { color: var(--muted); font-size: .82rem; }
.agentline { display: flex; align-items: center; gap: .5rem; margin: .8rem 0 .55rem; font-size: .88rem; font-weight: 700; color: var(--accent); }
.pip { width: .7rem; height: .7rem; background: var(--accent); border: 2px solid var(--ink); }
.sheet { width: 100%; border-collapse: collapse; font-size: .86rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: .38rem .45rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.sheet th { background: var(--tint); font-size: .78rem; }
.sheet td:nth-child(3), .sheet th:nth-child(3) { text-align: right; }
.sheet .flag td { background: var(--mark); }
.sheet .flag span { display: block; margin-top: .2rem; font-size: .78rem; font-weight: 700; }
.approve { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: .9rem; }
.approve p { margin: 0; font-size: .95rem; }
.approve-buttons { display: flex; gap: .5rem; }
.approve-buttons span { padding: .35rem .8rem; border: 2px solid var(--ink); font-weight: 700; font-size: .9rem; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.approve-buttons .ok { background: var(--accent); color: var(--bg); box-shadow: 3px 3px 0 var(--ink); }
.saved { margin: .8rem 0 0; padding: .3rem .7rem; display: inline-block; background: var(--ink); color: var(--bg); font-size: .85rem; font-weight: 700;
  opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.loop.done .approve-buttons .ok { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.loop.done .saved { opacity: 1; transform: none; }

/* before → after: a measured number from a test report, words in ink, no colour coding */
.ba { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; margin: 0 0 .7rem; padding: .65rem .8rem;
  background: var(--bg); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.ba b { flex-basis: 100%; font-size: .92rem; line-height: 1.35; }
.ba .was, .ba .arrow { color: var(--muted); }
.ba .was { font-size: 1.05rem; }
.ba .now { font: 700 1.55rem/1 var(--sans); }
.ba small { flex-basis: 100%; color: var(--muted); font-size: .88rem; }

/* big numbers in a band, with their sources under them */
.stats { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 1.4rem; text-align: center; }
@media (min-width: 44rem) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats li { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.stats b { display: block; font: 700 clamp(2.3rem, 6vw, 3.2rem)/1.05 var(--sans); color: var(--accent); margin-bottom: .25rem; }
.stats .ba-big { display: flex; justify-content: center; align-items: baseline; gap: .5rem; font-variant-numeric: tabular-nums; margin-bottom: .3rem; }
.stats .ba-big .was { font-size: 1.3rem; color: var(--muted); }
.stats .ba-big .now { font: 700 clamp(2.3rem, 6vw, 3.2rem)/1 var(--sans); color: var(--accent); }
.stats a { font-weight: 700; }
.bridge { margin: .4rem auto .6rem; max-width: 38rem; font: 700 1.25rem/1.4 var(--sans); text-align: center; }

/* steps: what happens, in order, with an arrow between on a wide screen */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(var(--n, 3), 1fr); gap: 2rem; } }
.steps.four { --n: 4; }
.steps > li { position: relative; margin: 0; padding: 1rem 1.05rem; background: var(--card); border: 2px solid var(--ink); border-top-width: 6px; line-height: 1.5; }
.steps .day { display: inline-block; margin: 0 0 .5rem; padding: .1rem .5rem; background: var(--ink); color: var(--bg); font-size: .8rem; font-weight: 700; }
.steps b { display: block; margin: 0 0 .35rem; font-size: 1.12rem; }
@media (min-width: 48rem) {
  .steps > li:not(:last-child)::after { content: "→"; position: absolute; right: -1.55rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
}

/* boxes: short points in framed boxes, a bold line on top */
.boxes > li { padding: 1rem 1.05rem; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); line-height: 1.5; }
.boxes b { display: block; margin: 0 0 .4rem; font-size: 1.08rem; line-height: 1.3; }
.boxes .icon { display: block; width: 1.6rem; height: 1.6rem; margin: 0 0 .6rem; color: var(--accent); }

/* questions: folds, two columns on a wide screen */
.faq { display: grid; gap: 0 2.6rem; }
@media (min-width: 52rem) { .faq { grid-template-columns: 1fr 1fr; align-items: start; } }
.faq details { padding: .75rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-weight: 700; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .5rem 0 .2rem; }

/* the closing band: ink background, one ask */
.endband { position: relative; margin: 0 0 1rem; padding: clamp(2.2rem, 6vw, 3.6rem) 1.2rem; background: var(--ink); color: var(--bg); text-align: center; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); }
.endband h2 { margin: 0 0 .5rem; font-size: clamp(1.55rem, 4vw, 2.2rem); line-height: 1.2; }
.endband p { margin: 0 auto 1.3rem; max-width: 36rem; }
.endband .ctas { justify-content: center; margin: 0; }
.endband .button { background: var(--gold); color: #231c26; border-color: var(--bg); box-shadow: 4px 4px 0 var(--bg); }
.endband .ctas a:not(.button) { color: var(--bg); }
.endband p a { color: var(--gold); }
.endband .mascot { margin: 0 auto 1rem; display: block; }

/* a moving preview: a short silent loop of a real demo, played only while on screen (site.js); a tap opens the full video */
.clip { position: relative; display: block; margin: 0 0 1rem; border: 2px solid var(--ink); background: var(--night); overflow: hidden; aspect-ratio: 16 / 9; }
.clip video, .clip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip .play { position: absolute; right: .6rem; bottom: .6rem; z-index: 1; }
.clip-tag { position: absolute; left: .6rem; top: .6rem; margin: 0; padding: .2rem .5rem; font: 700 .75rem/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--bg); background: var(--ink); }
/* the full video, in a dialog */
dialog.watch-box { width: min(64rem, 100% - 2rem); max-height: calc(100% - 2rem); padding: 0; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); background: var(--card); color: var(--ink); }
dialog.watch-box::backdrop { background: rgb(19 18 29 / .72); }
.watch-box video { display: block; width: 100%; height: auto; background: #000; }
.watch-box .win-bar button { margin-left: auto; font: 700 .85rem/1 var(--sans); padding: .35rem .6rem; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }

/* the contact popup (site.js): the one way to write from the site, a window like the video's */
dialog.contact-box { width: min(34rem, 100% - 1.5rem); max-height: calc(100% - 1.5rem); padding: 0; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--gold); background: var(--card); color: var(--ink); }
dialog.contact-box::backdrop { background: rgb(19 18 29 / .72); }
.contact-box .win-bar button { margin-left: auto; font: 700 .85rem/1 var(--sans); padding: .35rem .6rem; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.contact-in { padding: 1.1rem 1.2rem 1.3rem; }
.contact-in h2 { margin: 0 0 .3rem; font-size: 1.45rem; }
.contact-in .fine { margin: 0 0 1rem; }
.contact-in label { display: block; margin: .8rem 0 .3rem; font-weight: 700; }
.contact-in textarea, .contact-in input { display: block; width: 100%; box-sizing: border-box; padding: .6rem .7rem; font: 1rem/1.45 var(--sans); color: var(--ink); background: var(--bg); border: 2px solid var(--ink); border-radius: 0; }
.contact-in textarea { resize: vertical; min-height: 8rem; }
.contact-in textarea:focus, .contact-in input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { min-height: 1.4em; margin: .8rem 0 .4rem; font-weight: 700; }
.contact-in .ctas { margin: 0; align-items: center; }
.contact-box.done textarea, .contact-box.done input, .contact-box.done label { display: none; }
.contact-privacy { font-size: .9rem; }

/* a terminal print-out inside a window */
.term { margin: 0; padding: 1rem 1.1rem; font: .8rem/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); background: var(--card); }
.term .prompt { font-weight: 700; }
.term .dim { color: var(--muted); }
.term .pass { font-weight: 700; padding: 0 .3em; background: var(--tint); }

/* a screenshot of a real thing */
.shot { margin: 0 0 1rem; }
.shot img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); }
.shot figcaption { margin-top: .5rem; color: var(--muted); font-size: .85rem; }

/* ---------- the world (/world/): Acme's office as a floor plan, then one section per place ---------- */
/* the office: rooms on a dotted floor, one per place, each a door to its section */
.office { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  background: var(--tint) radial-gradient(circle, color-mix(in srgb, var(--ink) 18%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px; }
@media (min-width: 30rem) { .office { grid-template-columns: repeat(3, 1fr); } }
.room { display: flex; flex-direction: column; gap: .3rem; min-height: 7.2rem; padding: .7rem .75rem; background: var(--card); border: 2px solid var(--ink);
  color: var(--ink); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.room:hover, .room:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--gold); }
.room .icon { width: 22px; height: 22px; color: var(--accent); }
.room b { font-size: .98rem; line-height: 1.25; }
.room span { margin-top: auto; font-size: .82rem; color: var(--muted); line-height: 1.3; }
.world-story .prose { max-width: var(--read); margin: 0 auto; font-size: 1.08rem; }
.world-place { scroll-margin-top: 5rem; }
.world-place-in { display: grid; gap: 1.6rem 2.6rem; align-items: start; }
@media (min-width: 56rem) { .world-place-in { grid-template-columns: 1fr 1fr; } }
.world-place h2 { margin: .3rem 0 .9rem; font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.25; }
.world-who { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.world-who .person { padding: .25rem .55rem; border: 1px solid var(--line); background: var(--card); font-size: .88rem; }
.world-who .person b { margin-right: .25rem; }
.world-proj { margin: 0 0 1.4rem; }
.world-proj .win { margin: 0 0 .8rem; }
.world-proj .links { margin: 0; font-weight: 700; }

/* ---------- 11. reading pages ---------- */
/* a post or project page: the text at reading width, centred; on a wide screen a list of its sections stays beside it */
.article { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: clamp(1.6rem, 4vw, 3rem); }
@media (min-width: 74rem) {
  .article { grid-template-columns: 1fr minmax(0, var(--read)) 1fr; column-gap: 3rem; }
  .article > .prose { grid-column: 2; }
  .article > .toc { grid-column: 1; grid-row: 1; justify-self: end; }
}
.toc { display: none; }
@media (min-width: 74rem) {
  .toc { display: block; position: sticky; top: 6rem; align-self: start; width: 15rem; max-height: calc(100vh - 8rem); overflow-y: auto; padding: .2rem 0 .2rem 1rem; border-left: 2px solid var(--line); font-size: .9rem; line-height: 1.4; }
  .toc p { margin: 0 0 .6rem; font: 700 .76rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
  .toc a { color: var(--muted); text-decoration: none; display: block; }
  .toc a:hover { color: var(--accent); }
  .toc a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: -1rem 0 0 -0.85rem var(--gold); }
}
.prose { min-width: 0; }
.prose > h1, .prose .title { margin: 0 0 .6rem; font-size: clamp(1.95rem, 4.6vw, 2.75rem); line-height: 1.14; }
.prose .lede { color: var(--muted); font-size: 1.15rem; line-height: 1.55; margin: 0 0 1rem; }
.prose .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font: 500 .9rem/1.4 var(--sans); color: var(--muted); margin: 0 0 2rem; padding-bottom: 1.2rem; border-bottom: 2px dashed var(--line); }
.prose h2 { font-size: 1.55rem; line-height: 1.25; margin: 2.6rem 0 .7rem; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: 1.22rem; line-height: 1.3; margin: 2rem 0 .5rem; scroll-margin-top: 5.5rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose figure, .prose video { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0 0 .45rem; }
.prose img, .prose video { display: block; max-width: 100%; height: auto; border: 2px solid var(--ink); background: var(--card); }
.prose p > img { margin: .4rem 0; }
.prose .photo-grid { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .9rem; }
.prose .photo-grid li { margin: 0; }
.prose .photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; margin: 0 0 .4rem; }
.prose .photo-grid p { margin: 0; font-size: .92rem; line-height: 1.4; }
.prose .photo-grid b { display: block; }
.prose blockquote { margin-left: 0; padding: .2rem 0 .2rem 1rem; border-left: 4px solid var(--gold); color: var(--quote); }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 2.2rem 0; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .92rem; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.prose th { font: 700 .92rem/1.3 var(--sans); background: var(--tint); }
.prose :not(pre) > code { font: .86em/1 var(--mono); background: var(--tint); padding: .12em .32em; border-radius: 2px; overflow-wrap: anywhere; }
.prose figure.watch { margin: 0 0 2rem; }
.prose figure.watch video { width: 100%; margin: 0; }
.watch figcaption { font: 500 .88rem/1.4 var(--sans); color: var(--muted); margin: .5rem 0 0; }
.prose .back { font: 600 .95rem/1.4 var(--sans); margin-top: 2.6rem; }
/* a folded technical section */
.prose details.tech { margin: 2rem 0 1.4rem; border: 2px solid var(--ink); background: var(--card); }
.prose details.tech > summary { font: 700 1rem/1.3 var(--sans); padding: .75rem 1rem; cursor: pointer; }
.prose details.tech[open] > summary { border-bottom: 2px solid var(--line); }
.prose details.tech > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.prose details.tech ul { padding-left: 1.1rem; }
.prose details.tech li { font-size: .95rem; }
.prose details.tech.fold { margin: 0 0 .7rem; }
/* a post in a series: the folded series box under the date, the next and previous parts at the end */
.in-series { border: 2px solid var(--ink); background: var(--tint); margin: -1rem 0 2rem; }
.in-series summary { font: 700 .92rem/1.4 var(--sans); padding: .65rem .9rem; cursor: pointer; }
.in-series ol { margin: 0; padding: 0 .9rem 0 2.2rem; }
.in-series li { margin: 0 0 .35rem; font-size: .95rem; }
.in-series li[aria-current] { font-weight: 700; }
.in-series p { font: 500 .85rem/1.4 var(--sans); margin: .5rem .9rem .8rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.6rem 0 0; }
.pager a { display: block; padding: .8rem .95rem; border: 2px solid var(--ink); background: var(--card); box-shadow: 4px 4px 0 var(--line); color: var(--ink); text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.pager a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--gold); }
.pager .next { grid-column: 2; text-align: right; }
.pager small, .parts small { display: block; font: 600 .76rem/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .2rem; }
.pager strong { font: 700 1rem/1.3 var(--sans); }
@media (max-width: 480px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }
/* a series' page: its parts in order */
.prose .parts { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .9rem; counter-reset: part; }
.parts a { display: block; padding: .9rem 1rem; border: 2px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 var(--line); color: var(--ink); text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.parts a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--gold); }
.parts strong { display: block; font: 700 1.15rem/1.3 var(--sans); margin: 0 0 .25rem; }
.parts span { color: var(--muted); font-size: .95rem; }

/* a list page's head (Writing, Projects, Research): title, one line, the jump links; the wizard watches */
.page-head { display: grid; gap: 1.2rem 2rem; align-items: end; padding: clamp(1.8rem, 5vw, 3.4rem) 0 clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 clamp(1.6rem, 4vw, 2.6rem); border-bottom: 2px solid var(--ink); }
@media (min-width: 52rem) { .page-head { grid-template-columns: 1fr auto; } }
.page-head h1 { margin: 0 0 .5rem; }
.page-head .sub { margin: 0 0 1.2rem; color: var(--muted); }
.page-head .mascot { justify-self: end; }
.page-head .rss { margin-top: 1rem; }
@media (max-width: 52rem) { .page-head .mascot { display: none; } }

/* ---------- 12. code ---------- */
/* code: the spellbook. A pixel tab names the language; the copy button arrives with JS */
figure.code { position: relative; margin: 0 0 1.3rem; border: 2px solid var(--ink); background: var(--night); box-shadow: 5px 5px 0 var(--line); }
figure.code figcaption { position: absolute; top: 0; left: 0; font: 500 .76rem/1 var(--sans); letter-spacing: .06em; color: var(--night);
  background: var(--gold); padding: .3rem .5rem .28rem; }
figure.code pre { margin: 0; padding: 2rem 1rem 1rem; overflow-x: auto; }
figure.code code { font: 14px/1.6 var(--mono); color: #e9e4f5; white-space: pre; }
.copy { position: absolute; top: 0; right: 0; font: 500 .76rem/1 var(--sans); letter-spacing: .04em; color: #e9e4f5; background: transparent;
  border: 0; border-left: 2px solid #3a3566; border-bottom: 2px solid #3a3566; padding: .3rem .55rem; cursor: pointer; }
.copy:hover { color: var(--gold); }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag { color: #f2c14e; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-string { color: #9fd49a; }
.hljs-number, .hljs-literal, .hljs-symbol, .hljs-bullet { color: #f29bb6; }
.hljs-comment, .hljs-quote, .hljs-deletion { color: #8c88b8; font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: #8fc3f0; }
.hljs-built_in, .hljs-type, .hljs-title.class_ { color: #c3a6f0; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-variable, .hljs-params, .hljs-selector-class { color: #f5d9a8; }
.hljs-meta, .hljs-meta .hljs-keyword { color: #d9a441; }
.hljs-punctuation, .hljs-operator { color: #b9b4d8; }

/* ---------- 13. widgets: measured data you can play with. The tables are the data; widgets/*.js swaps them for these ---------- */
figure.widget { margin: 1.6rem 0 1.8rem; padding: 1rem 1.1rem 1.1rem; border: 2px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 var(--gold); }
figure.widget > figcaption { font: 500 1rem/1.45 var(--sans); color: var(--ink); margin: 0 0 .8rem; }
.widget table { font-size: .88rem; margin: 0 0 1rem; }
.widget caption { text-align: left; font-weight: 700; padding: 0 0 .3rem; }
.temp-prompts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; }
.temp-prompt { font: 500 .95rem/1.3 var(--sans); color: var(--ink); background: var(--bg); border: 2px solid var(--line); padding: .35rem .65rem; cursor: pointer; text-align: left; }
.temp-prompt[aria-pressed="true"] { border-color: var(--ink); background: var(--tint); }
.temp-control { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: .5rem; font: 600 .9rem/1 var(--sans); margin: 0 0 .9rem; }
.temp-value { min-width: 2.2em; color: var(--accent); }
.temp-control input { width: 100%; accent-color: var(--accent); min-height: 28px; }
.prose .temp-bars { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .3rem; }
.temp-bars li { display: grid; grid-template-columns: minmax(5.5rem, 34%) 1fr 3.4rem; align-items: center; gap: .55rem; margin: 0; }
.temp-token { font: .9rem/1.2 var(--mono); overflow-wrap: anywhere; }
.temp-bars li.other .temp-token { font: italic .88rem/1.2 var(--sans); color: var(--muted); }
.temp-bar { height: .9rem; background: var(--tint); }
.temp-bar span { display: block; height: 100%; background: var(--accent); transition: width .18s; }
.temp-bars li.other .temp-bar span { background: var(--muted); }
.temp-p { font: 500 .82rem/1 var(--sans); text-align: right; }
.temp-pick { font: 600 .9rem/1 var(--sans); color: var(--bg); background: var(--ink); border: 2px solid var(--ink); padding: .6rem .85rem; box-shadow: 3px 3px 0 var(--gold); cursor: pointer; }
.temp-pick:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gold); }
.temp-picked { font-size: .95rem; color: var(--muted); margin: .7rem 0 0; min-height: 1.6em; }
@media (prefers-reduced-motion: reduce) { .temp-bar span { transition: none; } }

.attn-heads { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; }
.attn-head { font: 500 .82rem/1.2 var(--sans); color: var(--ink); background: var(--bg); border: 2px solid var(--line); padding: .4rem .55rem; cursor: pointer; }
.attn-head[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.attn-hint { font-size: .9rem; color: var(--muted); margin: 0 0 .4rem; }
.prose .attn-tokens { list-style: none; margin: 0 0 .7rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.prose .attn-tokens li { margin: 0; }
.attn-token { display: grid; justify-items: center; gap: .15rem; min-width: 2.6rem; padding: .3rem .4rem; cursor: pointer; color: var(--ink);
  border: 2px solid var(--line); background: color-mix(in srgb, var(--accent) calc(var(--w, 0) * 100%), var(--card)); }
.attn-token .attn-word { font: .92rem/1.2 var(--mono); }
.attn-token .attn-p { font: 500 .7rem/1 var(--sans); }
.attn-token.strong { color: var(--bg); }
.attn-token.focus { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.attn-token.later { opacity: .4; background: var(--card); }
.attn-note { font-size: .95rem; color: var(--muted); margin: 0; min-height: 3em; }

/* the tinytowns playground: pick a model, type, tap a letter, end the name */
.tt { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
.tt-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.tt-model { display: grid; gap: .2rem; justify-items: center; padding: .55rem .3rem; cursor: pointer; color: var(--ink); background: var(--bg); border: 2px solid var(--line); }
.tt-model strong { font: 600 .95rem/1.1 var(--sans); }
.tt-model small { font: 500 .8rem/1 var(--sans); color: var(--muted); }
.tt-model[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.tt-model[aria-pressed="true"] small { color: var(--on-ink); }
.tt-temp { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "k k v" "a s b"; align-items: center; gap: .3rem .6rem; font: 600 .9rem/1 var(--sans); }
.tt-temp-k { grid-area: k; }
.tt-temp-v { grid-area: v; color: var(--accent); text-align: right; }
.tt-temp-end { font: 500 .82rem/1 var(--sans); color: var(--muted); }
.tt-temp-end.safe { grid-area: a; }
.tt-temp-end.wild { grid-area: b; }
.tt-temp input { grid-area: s; width: 100%; accent-color: var(--accent); min-height: 32px; margin: 0; }
.tt-bar { display: flex; border: 2px solid var(--ink); background: var(--bg); box-shadow: 4px 4px 0 var(--gold); }
.tt-bar input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: .6rem .75rem; font: 600 1.55rem/1.2 var(--pixel); letter-spacing: .04em; }
.tt-bar input::placeholder { color: var(--muted); opacity: .6; font-weight: 400; }
.tt-bar input:focus { outline: none; }
.tt-bar:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.tt-clear { border: 0; background: transparent; color: var(--muted); font: 600 1.5rem/1 var(--pixel); padding: 0 .8rem; cursor: pointer; }
.tt-hint { font-size: .95rem; color: var(--muted); margin: 0; min-height: 1.5em; }
.prose .tt-next { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.prose .tt-next li { margin: 0; }
.tt-opt { width: 100%; display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 3rem; align-items: center; gap: .6rem; padding: .35rem .5rem; cursor: pointer;
  color: var(--ink); background: var(--bg); border: 2px solid var(--line); text-align: left; -webkit-tap-highlight-color: transparent; }
.tt-opt:hover { border-color: var(--ink); }
.tt-opt:active { transform: translate(1px, 1px); }
.tt-sym { font: 700 1.3rem/1 var(--mono); }
.tt-sym.word { font: 700 .95rem/1.15 var(--sans); color: var(--accent); }
.tt-track { height: .9rem; background: var(--tint); }
.tt-track span { display: block; height: 100%; background: var(--accent); transition: width .15s; }
.tt-p { font: 500 .85rem/1 var(--sans); text-align: right; }
.tt-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tt-finish, .tt-again { font: 600 .95rem/1 var(--sans); color: var(--bg); background: var(--ink); border: 2px solid var(--ink); padding: .7rem 1rem; box-shadow: 3px 3px 0 var(--gold); cursor: pointer; }
.tt-finish:active, .tt-again:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gold); }
.tt-finish:disabled { opacity: .45; cursor: default; }
.tt-verdict:empty { display: none; }
.tt-verdict { display: grid; justify-items: start; gap: .35rem; padding: .9rem 1rem; border: 2px solid var(--ink); background: var(--bg); }
.tt-verdict p { margin: 0; }
.tt-badge { font: 700 .85rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; padding: .4rem .6rem; }
.tt-badge.real { background: var(--gold); color: var(--ink); }
.tt-badge.invented { background: var(--accent); color: var(--bg); }
.tt-name { font: 700 clamp(1.5rem, 7vw, 2rem)/1.15 var(--pixel); overflow-wrap: anywhere; text-transform: capitalize; }
.tt-line, .tt-checking { font-size: .98rem; color: var(--muted); }
.tt-again { margin-top: .35rem; }
.tt-status { font-size: .9rem; color: var(--muted); margin: 0; }
.tt-legend { display: grid; grid-template-columns: auto 1fr; gap: .25rem .7rem; margin: 0; padding: .6rem .75rem; background: var(--tint); font-size: .92rem; line-height: 1.4; }
.tt-legend[hidden], .prose .tt-next[hidden] { display: none; }
.tt-legend dt { font-weight: 700; color: var(--accent); white-space: nowrap; }
.tt-legend dd { margin: 0; }
/* a folded technical section at the end of a page */
.prose details.tech { margin: 2rem 0 1.4rem; border: 2px solid var(--ink); background: var(--card); }
.prose details.tech > summary { font: 700 1rem/1.3 var(--sans); padding: .75rem 1rem; cursor: pointer; }
.prose details.tech[open] > summary { border-bottom: 2px solid var(--line); }
.prose details.tech > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.prose details.tech ul { padding-left: 1.1rem; }
.prose details.tech li { font-size: .95rem; }
.tt-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .tt-track span { transition: none; } }

.kv .temp-control { grid-template-columns: auto minmax(7.5em, auto) 1fr; }
.kv-total { font: 700 1.5rem/1.2 var(--sans); margin: .2rem 0 .6rem; }
.kv-bars { display: grid; gap: .35rem; margin: 0 0 .7rem; }
.kv-row { display: grid; grid-template-columns: 6.5rem 1fr 4.8rem; align-items: center; gap: .55rem; font-size: .92rem; }
.kv-bar { height: .9rem; background: var(--tint); }
.kv-bar span { display: block; height: 100%; background: var(--accent); transition: width .18s; }
.kv-row + .kv-row .kv-bar span { background: var(--muted); }
[data-widget="chatcost"] .kv-row:first-child .kv-bar span { background: var(--muted); }
[data-widget="chatcost"] .kv-row + .kv-row .kv-bar span { background: var(--accent); }
[data-widget="bars"] .kv-row .kv-bar span { background: var(--accent); }
[data-widget="bars"] .kv-row { grid-template-columns: minmax(6.5rem, 30%) 1fr 4.8rem; }
.kv-num { font: 500 .82rem/1 var(--sans); text-align: right; }
.kv-how { font-size: .92rem; color: var(--muted); margin: 0; }
@media (prefers-reduced-motion: reduce) { .kv-bar span { transition: none; } }

/* widget-chart (widgets/chart.js): one colour per kind of tool, the same in every chart. Validated with the dataviz
   checks (lightness band, chroma, colour-blind and normal-vision separation, 3:1 on the card) in light and dark, 2026-10-14 */
:root { --k-small: #b0731a; --k-general: #4d4bb0; --k-none: #0e8a78; }
:root[data-theme="dark"] { --k-small: #bd8428; --k-general: #8482e2; --k-none: #2ea590; }
.k-small { --kc: var(--k-small); } .k-general { --kc: var(--k-general); } .k-none { --kc: var(--k-none); }
.ch { container-type: inline-size; --name: 9rem; --val: 5.4rem; --gap: .7rem; }
.prose .ch-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; padding: 0; margin: 0 0 .8rem; font-size: .9rem; color: var(--ink); }
.prose .ch-legend li { display: flex; align-items: center; gap: .4rem; margin: 0; }
.ch-legend i { width: .8rem; height: .8rem; border-radius: 2px; background: var(--kc); }
.ch-body { position: relative; }
.ch-body.has-ref { padding-top: 1.5rem; }
.ch-grid { position: absolute; inset: 0; pointer-events: none; }
.ch-grid span { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ch-body.has-ref .ch-grid span:not(.ch-ref) { top: 1.5rem; }
.ch-grid .ch-ref { width: 2px; margin-left: -1px; background: var(--muted); }
.ch-ref b { position: absolute; top: 0; left: 6px; white-space: nowrap; font: 600 .82rem/1.3 var(--sans); color: var(--muted); }
.ch-ref.end b { left: auto; right: 6px; }
.prose .ch-rows { position: relative; list-style: none; padding: 0; margin: 0; }
.prose .ch-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name val" "track track"; column-gap: var(--gap);
  align-items: center; padding: .3rem 0; margin: 0; cursor: default; outline-offset: 2px; }
/* the labels wear the card so a gridline never runs through them (on a phone the lines cross the label line) */
.ch-name, .ch-val { background: var(--card); justify-self: start; padding-right: .3rem; }
.ch-val { justify-self: end; padding: 0 0 0 .3rem; }
.ch-row.on, .ch-row.on .ch-name, .ch-row.on .ch-val { background: var(--tint); }
.ch-name { grid-area: name; font-size: .95rem; color: var(--ink); }
.ch-row.on .ch-name { font-weight: 700; }
.ch-val { grid-area: val; font: 600 .9rem/1.3 var(--sans); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.ch-row.none .ch-val { font-weight: 500; color: var(--muted); }
.ch-track { grid-area: track; position: relative; height: 1.15rem; }
.ch-bar { position: absolute; left: 0; top: 50%; height: .85rem; transform: translateY(-50%); border-radius: 0 4px 4px 0; background: var(--kc); min-width: 2px; }
.ch-dots .ch-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.ch-dot { position: absolute; top: 50%; width: .8rem; height: .8rem; border-radius: 50%; transform: translate(-50%, -50%); background: var(--kc); box-shadow: 0 0 0 2px var(--card); }
.ch-axis { position: relative; height: 1.4rem; margin-top: .2rem; }
.ch-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font: 500 .8rem/1.4 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.ch-ticks span.start { transform: none; } .ch-ticks span.end { transform: translateX(-100%); }
.ch-unit { font-size: .85rem; color: var(--muted); text-align: center; margin: .1rem 0 0 !important; }
.ch-note { font-size: .92rem; color: var(--muted); margin: .6rem 0 0 !important; min-height: 2.8em; }
@container (min-width: 34rem) {
  .prose .ch-row { grid-template-columns: var(--name) 1fr var(--val); grid-template-areas: "name track val"; }
  .ch-grid { left: calc(var(--name) + var(--gap)); right: calc(var(--val) + var(--gap)); }
  .ch-axis, .ch-unit { margin-left: calc(var(--name) + var(--gap)); margin-right: calc(var(--val) + var(--gap)); }
}
.prose .ch-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .7rem; list-style: none; padding: 0; margin: 0; }
.prose .ch-tiles li { margin: 0; padding: .7rem .85rem; border: 2px solid var(--line); background: var(--bg); }
.prose .ch-tiles li[class] { border-left: 5px solid var(--kc); }
.ch-tiles strong { display: block; font: 700 1.7rem/1.15 var(--sans); color: var(--ink); }
.ch-tiles span { display: block; font-size: .92rem; line-height: 1.4; color: var(--muted); margin-top: .25rem; }
.ch-table { margin-top: .8rem; }
.ch-table summary { font: 600 .9rem/1.4 var(--sans); color: var(--ink); cursor: pointer; }
.ch-table .widget-tables { margin-top: .6rem; overflow-x: auto; }
/* scatter: two measures, one point per tool; a point's name sits beside it (pos: right, left, above, below, below-left) */
.ch-sc { --yl: 2.2rem; }
.ch-yunit { font-size: .85rem; color: var(--muted); margin: 0 0 .5rem !important; }
.ch-sc-plot { position: relative; height: 20rem; margin: 0 .4rem 0 var(--yl); }
.ch-sc-grid { position: absolute; inset: 0; pointer-events: none; }
.ch-sc-grid .v { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ch-sc-grid .h { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.ch-sc-grid .h b { position: absolute; right: calc(100% + .45rem); top: -.7em; font: 500 .8rem/1.4 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.ch-sc-grid .h.ref { height: 2px; background: var(--muted); }
.ch-sc-grid .h.ref i { position: absolute; right: 0; bottom: 5px; font: 600 .82rem/1.3 var(--sans); font-style: normal; color: var(--muted); }
.ch-sc-grid .corner { position: absolute; left: .45rem; bottom: .35rem; font: 600 .88rem/1.3 var(--sans); color: var(--ink); background: var(--card); padding: 0 .2rem; }
.ch-pt { position: absolute; width: 1.75rem; height: 1.75rem; transform: translate(-50%, 50%); display: grid; place-items: center; border-radius: 50%; cursor: default; outline-offset: 0; }
.ch-pt i { width: .85rem; height: .85rem; border-radius: 50%; background: var(--kc); box-shadow: 0 0 0 2px var(--card); }
.ch-pt.on i { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--kc); }
.ch-pt span { position: absolute; white-space: nowrap; font: 600 .85rem/1.25 var(--sans); color: var(--ink); background: var(--card); padding: 0 .2rem; }
.ch-pt.on span { background: var(--tint); }
.ch-pt.at-right span { left: calc(100% - .2rem); top: 50%; transform: translateY(-50%); }
.ch-pt.at-left span { right: calc(100% - .2rem); top: 50%; transform: translateY(-50%); }
.ch-pt.at-above span { bottom: calc(100% - .2rem); left: 50%; transform: translateX(-50%); }
.ch-pt.at-below span { top: calc(100% - .2rem); left: 50%; transform: translateX(-50%); }
.ch-pt.at-below-left span { top: calc(100% - .35rem); right: 50%; }
.ch-sc .ch-axis, .ch-sc .ch-unit { margin-left: var(--yl); margin-right: .4rem; }
@container (min-width: 30rem) { .prose .ch-tiles.n4 { grid-template-columns: repeat(2, 1fr); } }   /* four tiles: 2 × 2, not 3 + 1 */

/* widget-indiafacts (widgets/indiafacts.js): the question box, the answer with citation numbers, the numbered sources (folded), Share and
   Ask another fact. A sentence with no source is greyed and labelled in words, never by colour alone. Once answered, the question is locked. */
.if-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; }
.if-form.asked { grid-template-columns: 1fr; }
.if-label { grid-column: 1 / -1; font: 600 .85rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.if-input { width: 100%; box-sizing: border-box; resize: vertical; min-height: 3.2rem; padding: .6rem .7rem; font: 1rem/1.4 var(--sans);
  color: var(--ink); background: var(--bg); border: 2px solid var(--ink); }
.if-input[readonly] { resize: none; font-weight: 700; background: var(--tint); border-color: var(--line); }
.if-go { font: 700 1.2rem/1 var(--pixel); padding: .75rem 1.1rem; color: var(--ink); background: var(--gold); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.if-go:active, .if-act:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.if-tries { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 0; align-items: center; }
.if-tries[hidden], .if-go[hidden] { display: none; }
.if-tries-h { font: 600 .9rem/1 var(--sans); color: var(--muted); }
.if-try { font: .9rem/1.3 var(--sans); text-align: left; padding: .35rem .55rem; color: var(--ink); background: var(--tint);
  border: 1px solid var(--line); cursor: pointer; }
.if-try:hover { border-color: var(--ink); }
.if-status { min-height: 1.4em; margin: .8rem 0 0; color: var(--muted); font-size: .95rem; }
.if-status:empty { min-height: 0; margin: 0; }
.if-answer { margin-top: .8rem; padding: .9rem 1rem; background: var(--bg); border-left: 4px solid var(--gold); scroll-margin-top: 5rem; }
.if-text { margin: 0 0 .6rem; }
.if-cite { display: inline-block; min-width: 1.25em; margin-left: .15em; padding: 0 .2em; font: 700 .8rem/1.3 var(--sans);
  text-align: center; vertical-align: super; text-decoration: none; color: var(--card); background: var(--accent); border-radius: 2px; }
.if-unsourced { color: var(--muted); }
.if-nosource { white-space: nowrap; margin-left: .3em; font-size: .8rem; color: var(--muted); border: 1px solid var(--muted); padding: 0 .3em; }
.if-note { margin: .4rem 0 0; font-size: .9rem; color: var(--muted); }
.if-notice { margin: 0 0 .6rem; padding: .5rem .7rem; font-size: .95rem; background: var(--tint); border: 1px solid var(--line); }
.if-h { margin: 1.2rem 0 .4rem; font: 700 1.2rem/1 var(--pixel); }
.if-sources { margin: 0; padding-left: 1.6rem; }
.if-sources li { margin: 0 0 .5rem; scroll-margin-top: 5rem; }
.if-sources summary { cursor: pointer; }
.if-sources details[open] { padding-bottom: .4rem; }
.if-kind { display: inline-block; margin-right: .4rem; font: 600 .8rem/1.2 var(--sans); letter-spacing: .03em; padding: .1rem .35rem;
  border: 1px solid var(--ink); background: var(--tint); }
.if-src-title { font-weight: 700; font-size: .95rem; }
.if-quote { margin: .4rem 0 .3rem; padding: .3rem .7rem; font-size: .92rem; border-left: 3px solid var(--line); color: var(--ink); }
.if-check { font-size: .9rem; }
.if-quote.clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.if-more { display: block; margin: 0 0 .3rem; padding: .2rem 0; font: 600 .9rem/1.3 var(--sans); color: var(--accent); background: none; border: 0;
  text-decoration: underline; cursor: pointer; }
.if-count { font-size: .9rem; color: var(--muted); }
.if-passage { margin: .7rem 0 0; }
.if-loc { margin: 0; font: 600 .85rem/1.3 var(--sans); color: var(--muted); }
.if-meta { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }
.if-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.if-act { font: 600 1rem/1 var(--sans); padding: .7rem 1rem; color: var(--ink); background: var(--card); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.if-act.if-again { background: var(--gold); }
.if-said { font-size: .9rem; color: var(--muted); }

/* ---------- 14. page by page ---------- */
/* home: the wizard by the title; the ways to work together; the agents; agent security with moving previews */
.hero .wizard-big { width: 54px; height: 72px; image-rendering: pixelated; cursor: pointer; }
.hero-kick { display: flex; align-items: center; gap: .8rem; margin: 0 0 .9rem; }
.hero-kick .kicker { margin: 0; }
.tile.way .start { margin: auto 0 0; padding-top: .7rem; border-top: 1px dashed var(--line); font-size: .95rem; }
.tile.way .proof { margin: .3rem 0 .8rem; font-size: .95rem; }
.tile.way ul { font-size: .95rem; }
.tile.way { scroll-margin-top: 6rem; }
.feature { display: grid; gap: 1rem 1.4rem; grid-template-columns: auto 1fr; align-items: center; margin: 0 0 .8rem; }
.feature canvas.mascot { width: 56px; height: 64px; }
.feature h3 { margin: 0 0 .2rem; }
.feature p { margin: 0; }

/* agents and their test reports (/agents/*): the numbers, the sections, then the report at reading width */
.cu-found { margin: 0 0 var(--section); }
.cu-tiles { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cu-tiles li { margin: 0; padding: 1rem 1.1rem; border: 2px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 var(--line); }
.cu-tiles b { display: block; margin: 0 0 .5rem; font-size: 1rem; line-height: 1.3; }
.cu-ba { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .5rem; font-variant-numeric: tabular-nums; }
.cu-ba .was { font-size: 1.3rem; color: var(--muted); }
.cu-ba .arrow { color: var(--muted); }
.cu-ba .now { font: 700 2rem/1.1 var(--sans); color: var(--accent); }
.cu-ba small { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
.cu-sec { margin: 0 auto var(--section); max-width: var(--read); }
.cu-sec.wide { max-width: none; }
.cu-sec > h2, .cu-report h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.25; margin: 0 0 .8rem; }
.cu-sec ul, .cu-sec ol { padding-left: 1.3rem; }
.cu-sec li { margin: 0 0 .6rem; }
.cu-get { list-style: none; padding: 0 !important; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cu-get li { margin: 0; padding: 1rem 1.05rem; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); }
.cu-get b { display: block; margin: 0 0 .3rem; }
.cu-get span { display: block; margin-top: .45rem; color: var(--muted); font-size: .95rem; }
.cu-price { padding: 1rem 1.1rem; background: var(--tint); border: 2px solid var(--ink); }
.cu-price p:last-child { margin-bottom: 0; }
.cu-price .big { font: 700 1.6rem/1.2 var(--sans); margin: 0 0 .4rem; }
.cu-report { max-width: 52rem; margin: 0 auto; padding-top: 2.4rem; border-top: 3px solid var(--ink); }
.cu-report > h2:first-of-type { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.cu-report h3 { font-size: 1.2rem; line-height: 1.3; margin: 2rem 0 .6rem; }
.cu-report .byline { color: var(--muted); margin: 0 0 1.4rem; }
.cu-pdf { font-weight: 700; }
.cu-table { width: 100%; overflow-x: auto; margin: 0 0 1rem; }
.cu-table table { border-collapse: collapse; width: 100%; min-width: 34rem; font-variant-numeric: tabular-nums; }
.cu-table th, .cu-table td { padding: .5rem .55rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.cu-table th:first-child, .cu-table td:first-child { text-align: left; }
.cu-table thead th { font-size: .9rem; border-bottom: 2px solid var(--ink); }
.cu-table tbody th { font-weight: 400; }
.cu-table td.after { font-weight: 700; }
.cu-fail { margin: 0 0 1.6rem; padding: 1rem 1.1rem; background: var(--card); border: 2px solid var(--line); }
.cu-fail h3 { margin-top: 0; }
.cu-fail p:last-child { margin-bottom: 0; }
.cu-chat { margin: .6rem 0 1rem; padding: .8rem .9rem; background: var(--bg); border-left: 4px solid var(--line); font-size: .97rem; line-height: 1.5; }
.cu-chat p { margin: 0 0 .65rem; }
.cu-chat .who { display: inline-block; min-width: 5.6rem; font-weight: 700; }
.cu-chat .tool { font-family: var(--mono); font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.cu-chat .planted { background: var(--mark); }
details.cu-fold { margin: 0 0 1rem; }
details.cu-fold > summary { cursor: pointer; font-weight: 700; }
.cu code { font-size: .92em; overflow-wrap: anywhere; }
.cu pre { overflow-x: auto; padding: .8rem; background: var(--card); border: 2px solid var(--line); font-size: .9rem; }

/* /first-agent/: what's its own */
.fa-proofline { max-width: 34rem; }
.fa-own { display: grid; gap: 1.4rem; margin: 2.4rem 0 0; align-items: center; }
@media (min-width: 56rem) { .fa-own { grid-template-columns: 1fr 1.4fr; gap: 2.6rem; } }
.fa-own h3 { margin: 0 0 .6rem; font-size: 1.35rem; line-height: 1.3; }
.fa-own p { margin: 0 0 .8rem; line-height: 1.6; }
.fa-own figure { margin: 0 8px 0 0; }
.fa-own figcaption { margin: .9rem 0 0; color: var(--muted); font-size: .88rem; }
.fa-check { margin: 0 0 1rem; padding: .8rem .9rem; background: var(--bg); border: 2px solid var(--line); }
.fa-check-h { margin: 0 0 .5rem; font-weight: 700; font-size: .95rem; }
.fa-check dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0; font-size: .9rem; }
.fa-check dt { color: var(--muted); }
.fa-check dd { margin: 0; overflow-wrap: anywhere; }
.fa-stop { font-weight: 700; }
.fa-check-n { margin: 0; color: var(--muted); font-size: .85rem; }
.fa-check-step { margin: 0 0 .9rem; }
.fa-check-step:last-of-type { margin-bottom: .7rem; }
.fa-check-step > p { margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.fa-ok-line { font-weight: 700; }
/* the two real businesses side by side, their rows lining up (subgrid) */
@media (min-width: 52rem) {
  .fa-duo { grid-template-rows: repeat(4, auto); row-gap: 0; }
  .fa-duo > .tile { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  .fa-duo .fa-check, .fa-duo .shot { margin-bottom: 0; }
}
/* the three agents: their rows line up across the row */
@media (min-width: 64rem) {
  .fa-trio { grid-template-rows: repeat(6, auto); row-gap: 0; }
  .fa-trio > .tile { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
}
.fa-trial { padding: clamp(1.2rem, 3vw, 2rem); background: var(--card); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.fa-trial-head { max-width: 44rem; margin: 0 auto 1.4rem; text-align: center; }
.fa-trial h3 { font-size: 1.5rem; margin: 0 0 .5rem; }
.fa-terms { margin: 0; font-size: 1.08rem; }
.fa-terms b { font-size: 1.2rem; }
.fa-eg { margin: 0 0 .8rem; font-weight: 700; text-align: center; }
.fa-jobs > li { position: relative; padding: .95rem 1rem; background: var(--bg); border: 2px solid var(--ink); line-height: 1.5; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.fa-jobs > li:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--gold); }
.fa-jobs b { display: block; margin: 0 4.2rem .4rem 0; font-size: 1.05rem; line-height: 1.3; }
.fa-price { position: absolute; top: .8rem; right: .8rem; padding: .1rem .45rem; border: 2px solid var(--ink); background: var(--gold); color: #231c26;
  font-weight: 700; font-size: .88rem; font-variant-numeric: tabular-nums; }
.fa-else { margin: 1.2rem 0 0; text-align: center; }
.fa-h3 { font-size: 1.35rem; margin: 2.6rem 0 1rem; text-align: center; }

/* Research: each finding is a tile whose claim is its text, never clipped */
.finding .claim { margin: 0 0 .5rem; line-height: 1.5; }
.finding .why { color: var(--muted); font-size: .95rem; }
.finding.retracted .claim { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.finding .status { font-weight: 700; }
.finding .status.open { color: var(--accent); }
.method { display: grid; gap: var(--gap); }
@media (min-width: 60rem) { .method { grid-template-columns: 1.3fr 1fr; align-items: start; } }

/* About */
.about-hero { display: grid; gap: 1.4rem 3rem; align-items: center; padding: clamp(2rem, 6vw, 4rem) 0 var(--section); }
@media (min-width: 52rem) { .about-hero { grid-template-columns: auto 1fr; } }
.about-hero canvas.mascot { width: 120px; height: 160px; }
.about-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin: 0 0 .8rem; }
.about-hero p { font-size: 1.16rem; max-width: 42rem; margin: 0 0 1.4rem; }
.about-hero .runes { margin-top: .4rem; }

/* firstwatch: the checker's levels use firstwatch's own colours */
.fw { --clean: #2f8f5b; --note: #b07a14; --stop: #c4433a; }
:root[data-theme="dark"] .fw { --clean: #6cc796; --note: #e2b65a; --stop: #f08a80; }
.fw .mascot[data-mascot=firstwatch] { width: 90px; height: 96px; }
.fw-video { width: 100%; aspect-ratio: 16 / 9; background: var(--card); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.fw pre { overflow-x: auto; padding: .8rem 1rem; background: var(--card); border: 2px solid var(--line); font-size: .9rem; }
.fw-examples button, .fw-go { font: 600 .95rem/1.3 var(--sans); color: var(--ink); background: var(--card); border: 2px solid var(--ink);
  padding: .35rem .7rem; margin: 0 .3rem .4rem 0; cursor: pointer; box-shadow: 3px 3px 0 var(--gold); }
.fw-examples button:active, .fw-go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gold); }
.fw-go { background: var(--ink); color: var(--bg); font-size: 1.05rem; padding: .5rem 1.2rem; }
.fw-label { display: block; font: 600 .95rem/1.4 var(--sans); margin: .6rem 0 .3rem; }
#fw-input { width: 100%; font: .95rem/1.45 var(--mono); color: var(--ink); background: var(--card); border: 2px solid var(--ink); padding: .7rem; resize: vertical; }
.fw-version { color: var(--muted); font-size: .9rem; margin-left: .5rem; }
.fw-result { padding: 1rem 1.1rem .4rem; background: var(--card); border: 2px solid var(--ink); border-left-width: 8px; margin: 0 0 1rem; }
.fw-result.clean { border-left-color: var(--clean); } .fw-result.note { border-left-color: var(--note); } .fw-result.stop { border-left-color: var(--stop); }
.fw-verdict { font-weight: 600; }
.fw-lvl { display: inline-block; font: 800 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: .3em .55em; border: 2px solid currentColor; margin-right: .3rem; }
.fw-lvl.clean { color: var(--clean); } .fw-lvl.note { color: var(--note); } .fw-lvl.stop { color: var(--stop); }
.fw-list { list-style: none; padding: 0 !important; }
.fw-f { border-top: 1px solid var(--line); padding-top: .7rem; }
.fw-f p { margin: 0 0 .4rem !important; }
.fw-where, .fw-ids { color: var(--muted); font-size: .92rem; }
.fw-f blockquote { margin: 0 0 .5rem; padding: .4rem .7rem; border-left: 3px solid var(--line); font-size: .95rem; overflow-wrap: anywhere; }
.fw-ids abbr { text-decoration: underline dotted; }
.fw-terms dt { font-weight: 700; margin-top: .7rem; }
.fw-terms dd { margin: .15rem 0 0; }
.fold { border: 2px solid var(--ink); background: var(--card); }
.fold > summary { list-style: none; cursor: pointer; padding: .7rem .9rem; font: 600 .95rem/1.3 var(--sans); display: flex; gap: .6rem; align-items: center; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; font: 700 1rem/1 var(--sans); width: 1ch; }
.fold[open] > summary::before { content: "−"; }
.fold > :not(summary) { margin: 0 .9rem .9rem; }
.fold > summary h2 { margin: 0; font-size: 1.15rem; }
.fold + .fold { margin-top: 1rem; }

/* privacy: one tile per subject, the page's full width */
.privacy { margin: 0 0 1.6rem; padding: 0; list-style: none; }
.privacy h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.privacy p { margin: 0 0 .8rem; }
.privacy p:last-child { margin-bottom: 0; }

/* 404, admin: reading pages with the crew. The crew (creatures.js) hop onto [data-perch] and walk the footer's edge */
.plain { max-width: var(--read); margin: 0 auto; padding-top: max(9vh, 72px); }
.plain h1 { font-size: clamp(2.2rem, 6vw, 3rem); }
.plain h2 { font-size: 1.2rem; margin: 2.2rem 0 .6rem; }
.plain ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.plain li { margin: 0 0 .55rem; }
.plain p { margin: 0 0 1rem; }
.plain .lede { color: var(--muted); margin: 0 0 1.6rem; }
#crew { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 5; image-rendering: pixelated; }
.admin-survey { margin-top: 3rem; padding: 0; background: var(--tint); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--line); }
.admin-survey > summary { list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.admin-survey > summary::-webkit-details-marker { display: none; }
.admin-survey > summary h2 { font: 600 1.15rem/1.3 var(--sans); margin: 0; }
.admin-survey > summary::before { content: "+"; font: 700 1rem/1 var(--sans); width: 1ch; }
.admin-survey[open] > summary::before { content: "−"; }
.as-live-q { color: var(--muted); font-size: .95rem; flex-basis: 100%; padding-left: calc(1ch + .7rem); }
.admin-survey[open] .as-live-q { display: none; }
.as-body { padding: 0 1.2rem 1.2rem; display: grid; gap: 1rem; }
.admin-survey .as-note { color: var(--muted); font-size: .95rem; margin: 0; }
#survey-form { display: grid; gap: .8rem; }
#survey-form label { display: grid; gap: .3rem; font: .8rem/1.3 var(--sans); color: var(--muted); }
#survey-form fieldset { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; }
#survey-form legend { font: .8rem/1.3 var(--sans); color: var(--muted); padding: 0; margin-bottom: .3rem; }
#survey-form input { font: 16px/1.3 var(--sans); padding: .5rem .6rem; border: 2px solid var(--ink); border-radius: 0; background: var(--bg); color: var(--ink); }
#survey-form button, .sp-activate { justify-self: start; font: 600 .9rem/1 var(--sans); padding: .7rem 1rem; border: 2px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--bg); cursor: pointer; }
.sp-activate { background: transparent; color: var(--ink); padding: .45rem .7rem; font-size: .78rem; }
.as-msg { margin: 0; min-height: 1.4em; font-size: .95rem; }
.as-msg:empty { display: none; }
#survey-past { display: grid; gap: .8rem; }
.survey-past { padding: .9rem 1.1rem; border: 2px solid var(--line); background: var(--card); }
.survey-past.live { border-color: var(--ink); }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; font: .78rem/1.4 var(--sans); color: var(--muted); }
.sp-q { margin: .4rem 0 .5rem; font-weight: 700; line-height: 1.35; }
.sp-options { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.sp-options li { display: flex; justify-content: space-between; gap: .8rem; padding: .25rem .5rem; font-size: .95rem;
  background: linear-gradient(90deg, var(--bar) var(--pct), transparent var(--pct)); }
.sp-count { font: .8rem/1.6 var(--sans); white-space: nowrap; }

/* ---------- 15. motion and print ---------- */
/* sections ease in as they reach the screen (site.js adds .waiting, then .seen) */
.ease.waiting { opacity: 0; transform: translateY(18px); }
.ease.seen { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .saved { display: none; }
  .spell.casting::after { opacity: 0; }
}
@media print {
  @page { margin: 16mm 14mm; }
  body > *:not(main), .cu-offer, .site-head, .site-foot, .cu-pdf, .cu-noprint, .progress { display: none !important; }
  .cu-report { margin: 0; padding: 0; border: 0; max-width: none; }
  .cu-chat, .cu-fail, .cu-table tr { break-inside: avoid; }
  details.cu-fold > summary { display: none; }
  details.cu-fold > *:not(summary) { display: block !important; }
  details.cu-fold::details-content { content-visibility: visible; display: block; }
  .cu-table table { min-width: 0; font-size: .85rem; }
  a { color: inherit; }
}
/* the Jev games and their hub: built for a column; they keep one, a little wider on a big screen */
body > main.play { max-width: calc(48rem + 2 * var(--gutter)); padding-top: 1.4rem; }
body > main.pj { max-width: calc(64rem + 2 * var(--gutter)); }
.cu-found h2 { text-align: center; font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 1.4rem; }
.cu-found > .fine { max-width: 54rem; margin: 0 auto; text-align: center; }
