/* One dark site. Every page but the home loads this after its own tokens: near-black, white pill button, heavy Inter.
   Toys keep their navy art; only the page around them changes. The html prefix outranks each page's own <style>. */
:root:root {
  --bg: #05080c; --bg-alt: #0b1118; --card: #0c131b; --line: rgba(255, 255, 255, .14);
  --fg: #fff; --fg-muted: #c2ced8; --fg-light: #93a4b2;
  --marrs-tint: #0e1a26; --charcoal: #05080c; --glass: rgba(255, 255, 255, .04);
  --on-dark-muted: #dfe7ee; --panel: #0e1a26; --on-panel: #eaf2f8; --link: #dfe7ee;
}
/* clip, not hidden: a toy's flying part never makes the page swing sideways, and sticky bars still work. */
html body { background: var(--bg); color: var(--fg); overflow-x: clip; }
html a { color: var(--link); }
html h1, html h2, html h3 { color: #fff; font-weight: 800; letter-spacing: -.025em; }

/* Page head, as /funny/ */
html .workhead { text-align: left; padding-inline: max(16px, calc((100% - 1080px) / 2)); }
html .workhead::after, html .workhead .eyebrow { display: none; }
html .workhead h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: .98; letter-spacing: -.045em; font-weight: 800; text-wrap: balance; }
html .workhead h1 em { font-style: normal; color: var(--coral); }
html .workhead p { max-width: 620px; margin-inline: 0; font-weight: 500; color: var(--on-dark-muted); }
/* Toy pages: the toy is the page, so every one opens the same tight way. */
html .workhead:has(+ .mw, + .bn, + .bq, + .gt, + .ht, + .tr, + .rd, + .tm) { padding-block: clamp(14px, 2.8vw, 40px) clamp(14px, 1.7vw, 24px); }
html .workhead:has(+ .mw, + .bn, + .bq, + .gt, + .ht, + .tr, + .rd, + .tm) h1 { margin: 0; }
html .workhead:has(+ .mw, + .bn, + .bq, + .gt, + .ht, + .tr, + .rd, + .tm) p { margin-block: clamp(4px, .5vw, 6px) 0; }

/* The home's button: white pill, blue on hover. */
html .mbtn { padding: 0; background: #fff; box-shadow: none; }
html .mbtn > span { background: #fff; color: #05080c; font-weight: 800; letter-spacing: 0; text-transform: none; }
html .mbtn > span::after { display: none; }
html .mbtn:hover { transform: none; box-shadow: none; background: #b8c4ce; }
html .mbtn:hover > span, html .mbtn:active > span { background: #b8c4ce; color: #05080c; }
html .mbtn:active { transform: scale(.98); box-shadow: none; }
html .mbtn:focus-visible { outline-color: #fff; }

/* Keyboard: a ring you can see on near-black. */
html :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Toy pages: the foreman's panel, scores, hints, links */
html .tm-says, html .tr-says, html .bq-says, html .bn-says, html .gt-says, html .mw-says, html .ht-says,
html .tm-says p, html .tr-says p, html .bq-says p, html .bn-says p, html .gt-says p, html .mw-says p, html .ht-says p { color: var(--on-panel); }
html .tm-says, html .tr-says, html .bq-says, html .bn-says, html .gt-says, html .mw-says, html .ht-says { background: var(--panel); border: 1px solid var(--line); }
html .tm-says b, html .tr-says b, html .bq-says b, html .bn-says b, html .gt-says b, html .mw-says b, html .ht-says b { color: var(--link); }
html .tm-score, html .tr-score, html .bq-score, html .bn-score, html .gt-score, html .mw-score, html .ht-score,
html .tm-score b, html .tr-score b, html .bq-score b, html .bn-score b, html .gt-score b, html .mw-score b, html .ht-score b,
html .tr-job, html .bq-hint, html .bn-hint, html .rd-hint, html #gt-you-said,
html .tm-turn, html .tr-turn, html .bq-turn, html .bn-turn, html .gt-turn, html .mw-turn, html .ht-turn,
html .mw-hint, html .ht { color: #fff; }
html .gt-how, html .ht-how { color: var(--fg-muted); }
html .tm-turn a, html .tr-turn a, html .bq-turn a, html .bn-turn a, html .gt-turn a, html .mw-turn a, html .ht-turn a,
html .tr-more a, html .bq-more a, html .bn-more a, html .mw-more a, html .ht-more a, html .gt-more a, html .rd-more-link a { color: #fff; }
html .tm-more h2 { color: #fff; }
html .tm-more a { background: var(--panel); border: 1px solid var(--line); color: #fff; }
html .tm-more a:hover { background: #15263a; }
html .tm-more span { color: var(--fg-muted); }
html .tm-box { filter: none; }

/* Pass it on, the glass board */
html .chain { background: var(--bg); }
html .door .go { color: var(--link); }
html .room { background: radial-gradient(ellipse at 50% 0, #12263a, #05080c 70%); }
html .glass { background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,.03) 48%, rgba(255,255,255,.08) 100%); border-color: rgba(255,255,255,.22); box-shadow: 0 50px 80px -40px #000, inset 0 1px 0 rgba(255,255,255,.25); }

/* Help lines */
html .group, html .checked { max-width: 1080px; }
html .line .num { color: #fff; }
html .line.urgent { border-color: rgba(44,88,120, .5); }

/* The slip that can't be taken: its small print sits on cream, not on the page. */
html .slip.fixed small { color: #4b5b68; }

/* Toys with tall art fit the screen: the yard or scene gives way so the controls stay in sight without scrolling. */
html .tr-box { width: min(100%, 470px, max(270px, calc((100vh - 469px) * 100 / 112))); width: min(100%, 470px, max(270px, calc((100svh - 469px) * 100 / 112))); }
@media (max-width: 800px) { html .tr-box { width: min(100%, 470px, max(280px, calc((100svh - 510px) * 100 / 112))); } }
@media (min-width: 801px) { html .ht-scene { width: min(100%, max(420px, calc((100svh - 300px) * 640 / 580))); justify-self: end; } }
