/* Super Studio (v3 layout 17 Nov 2026; v4 brand 18 Nov 2026): the CHROME (header, footer, skip link) and the shared colour tokens.
   Studio pages get it inside /site.css; the legacy pages (/curiosity-kills/..., /tread-and-thunder/) load it as /chrome.css on top
   of their own stylesheet, so every rule here names its own classes (st-*) and sets everything the legacy stylesheets would
   otherwise change. Light by default, dark when the system asks for it; data-theme="dark" on an element forces the dark tokens.
   No scripts and no inline styles anywhere (the CSP forbids them). System fonts only: nothing to download.
   v4 palette (tools/make_logo_v4.py): RED #d0262d, DEEP #8f161b, TAN #e8d3aa, TAN_DIM #bfae8c, INK #16110f, INK_2 #1f1916,
   CREAM #fbf6ec. NO BLUE anywhere (tools/check_no_blue.py). Text contrast (WCAG AA, 4.5:1), worst case on --st-bg-2:
   light: text 15.96, muted 5.99, link (deep red) 7.79; dark: text 15.06, muted 7.35, link (tan) 11.85.
   The red accent is for graphics only (3:1): 4.48 on the light --st-bg-2, 3.31 on the dark --st-bg-2.
   Cream on red (the primary button): 4.88. */
:root {
  --st-bg: #fbf6ec; --st-bg-2: #f4ecde; --st-card: #fffcf6; --st-text: #16110f; --st-muted: #62574d; --st-line: #e4d9c6;
  --st-accent: #d0262d; --st-accent-deep: #8f161b; --st-on-accent: #fbf6ec; --st-link: #8f161b; --st-focus: #8f161b;
  --st-wordmark: #8f161b;
  --st-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --st-wrap: 1120px; --st-gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --st-bg: #16110f; --st-bg-2: #1f1916; --st-card: #1f1916; --st-text: #f5eee2; --st-muted: #b3a796; --st-line: #382e28;
    --st-link: #e8d3aa; --st-focus: #e8d3aa; --st-wordmark: #e8d3aa;
  }
}
[data-theme="dark"] {
  --st-bg: #16110f; --st-bg-2: #1f1916; --st-card: #1f1916; --st-text: #f5eee2; --st-muted: #b3a796; --st-line: #382e28;
  --st-link: #e8d3aa; --st-focus: #e8d3aa; --st-wordmark: #e8d3aa;
}

.st-wrap { max-width: var(--st-wrap); margin: 0 auto; padding-inline: var(--st-gutter); box-sizing: border-box; }
.st-skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--st-text); color: var(--st-bg); padding: 8px 12px;
  font: 600 16px/1.2 var(--st-font); border-radius: 6px; }
.st-skip:focus { left: 8px; }

/* Header */
header.nav.st-head { position: sticky; top: 0; z-index: 30; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--st-line);
  background: var(--st-bg); color: var(--st-text); font: 400 16px/1.4 var(--st-font); backdrop-filter: none; -webkit-backdrop-filter: none; }
@supports (backdrop-filter: blur(8px)) {
  header.nav.st-head { background: color-mix(in srgb, var(--st-bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.st-head .st-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding-top: env(safe-area-inset-top, 0px); }
.st-brand { display: inline-flex; align-items: center; color: var(--st-wordmark); text-decoration: none; flex: none; padding: 6px 0; }
.st-lockup { display: block; height: 30px; width: auto; }
.st-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.st-links a { color: var(--st-muted); text-decoration: none; font: 500 15px/1.2 var(--st-font); padding: 8px 0; letter-spacing: 0; text-transform: none; }
.st-links a:hover, .st-links a[aria-current="page"] { color: var(--st-text); }
.st-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-head a:focus-visible, .st-foot a:focus-visible, .st-skip:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 3px; border-radius: 3px; }
/* The account entry (18 Nov 2026): "Sign in" / "Account" as a small outlined pill; with the profile picture when signed in
   (site-nav.js on the site pages, account.js on the account pages add img.nav-avatar and .has-avatar). */
.st-links a.st-acct { color: var(--st-text); border: 1px solid var(--st-line); border-radius: 999px; padding: 7px 14px; background: var(--st-card); }
.st-links a.st-acct:hover { border-color: var(--st-muted); }
.st-links a.st-acct[aria-current="page"] { box-shadow: none; border-color: var(--st-accent); }
.st-links a.st-acct.has-avatar { display: inline-flex; align-items: center; gap: 8px; padding: 3px 14px 3px 3px; }
.st-links a.st-acct .nav-avatar { display: block; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--st-line); }
@media (max-width: 430px) {
  .st-lockup { height: 24px; }
  .st-links a.st-acct { padding: 6px 11px; }
  .st-links a.st-acct.has-avatar { padding: 6px 11px; }
  .st-links a.st-acct .nav-avatar { display: none; }
}
@media (max-width: 380px) { .st-lockup { height: 21px; } .st-links { gap: 11px; } }

/* Footer */
footer.st-foot { margin: 0; padding: 32px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--st-line);
  background: var(--st-bg); color: var(--st-muted); font: 400 14px/1.6 var(--st-font); text-align: left; }
.st-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.st-foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--st-text); text-decoration: none; font: 600 15px/1 var(--st-font); }
.st-mark { width: 26px; height: 26px; flex: none; }
.st-foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.st-foot-links a { color: var(--st-muted); text-decoration: none; font: 400 14px/1.6 var(--st-font); }
.st-foot-links a:hover { color: var(--st-text); text-decoration: underline; }
.st-legal { margin: 18px 0 0; font: 400 12.5px/1.6 var(--st-font); color: var(--st-muted); max-width: 78ch; }

/* Super Studio v3 (17 Nov 2026; v4 brand 18 Nov 2026): the studio pages (home, about, privacy, terms, 404) and the account pages.
   Built as /site.css = src/chrome.css + this file. Clean, light by default, dark when the system asks; system fonts; no
   frameworks. Colours only from the tokens in chrome.css (red + tan + warm near-black, no blue). */

/* The account pages' stylesheet (account.css) uses older variable names: map them onto the v3 tokens. */
:root {
  color-scheme: light dark;
  --ink: var(--st-bg); --ink-2: var(--st-bg-2); --ink-3: var(--st-line); --line: var(--st-line);
  --bone: var(--st-text); --fog: var(--st-muted); --blood: #b3221b; --blood-deep: transparent; --tile: #15834f;
  --hazard: var(--st-link);
  /* account.css hooks (v4): card tops tan, the profile card red, theme-aware messages and danger text */
  --acct-card-top: #bfae8c; --acct-me-top: var(--st-accent); --acct-danger-text: var(--blood);
  --acct-msg-bg: #fbe7e3; --acct-msg-ok-bg: #e6f2ea; --acct-msg-info-bg: #f5ead6; --pixel: var(--st-font); --body: var(--st-font); --gutter: var(--st-gutter); --wrap: var(--st-wrap);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;
  --label: 600 15px/1.2 var(--st-font);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --blood: #ff7b6e; --tile: #4fd1a0;
    --acct-msg-bg: #2a1512; --acct-msg-ok-bg: #12201a; --acct-msg-info-bg: #261f14; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* wins over .btn's display (the home account band's signed-in button) */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--st-bg); color: var(--st-text); font: 400 17px/1.65 var(--st-font); overflow-wrap: break-word; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--st-link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--st-focus); outline-offset: 3px; border-radius: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(38px, 6.4vw, 72px); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
.wrap { max-width: var(--st-wrap); margin: 0 auto; padding-inline: var(--st-gutter); }
.skip { position: absolute; left: -999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 600 13px/1.3 var(--st-font); letter-spacing: .12em; text-transform: uppercase; color: var(--st-muted); }
.muted { color: var(--st-muted); }
.small { font-size: 14px; }
.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.6; color: var(--st-muted); max-width: 40em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons (the account pages use .btn, .btn.primary, .btn.danger and .btn.small too) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--st-font); text-decoration: none;
  color: var(--st-text); padding: 13px 20px; border-radius: 8px; border: 1px solid var(--st-line); background: var(--st-card); cursor: pointer;
  min-height: 46px; }
.btn:hover { border-color: var(--st-muted); }
.btn.primary { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-on-accent); }
.btn.primary:hover { background: var(--st-accent-deep); border-color: var(--st-accent-deep); }
.btn.danger { color: var(--blood); border-color: currentColor; background: transparent; }
.btn.small { font-size: 14px; padding: 8px 12px; min-height: 36px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Home */
.hero { padding-block: clamp(64px, 12vw, 148px) clamp(56px, 9vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-art { display: none; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  /* v4: the S badge (/assets/brand/mark.svg), the same 340 px box as the v3 squares, on a soft red glow */
  .hero-art { display: grid; place-items: center; position: relative; width: min(100%, 340px); aspect-ratio: 1; justify-self: end; }
  .hero-art::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(208, 38, 45, .16), rgba(208, 38, 45, 0)); }
  .hero-art .hero-badge { position: relative; width: 92%; height: auto; filter: drop-shadow(0 14px 24px rgba(22, 17, 15, .18)); }
}
.band { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--st-line); }
/* Home: the account band (18 Nov 2026). Copy + buttons, and a row of the profile pictures (decorative). */
.acct-band { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.acct-band-copy { display: grid; gap: 14px; justify-items: start; }
.acct-band-copy .cta { margin-top: 8px; }
.acct-band-pics { display: flex; padding-left: 14px; }
.acct-band-pics img { width: 64px; height: 64px; border-radius: 50%; margin-left: -14px; border: 3px solid var(--st-bg);
  box-shadow: 0 0 0 1px var(--st-line), 0 6px 16px rgba(22, 17, 15, .14); }
@media (min-width: 860px) {
  .acct-band { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .acct-band-pics { justify-self: end; }
  .acct-band-pics img { width: 92px; height: 92px; margin-left: -22px; border-width: 4px; }
}
.band.alt { background: var(--st-bg-2); }
/* Home: the Games band (25 Nov 2026, lane BB-SITE): one card per game, a link to its page. */
.games-eyebrow { margin-bottom: 10px; }
.games-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.game-card { display: grid; height: 100%; text-decoration: none; color: var(--st-text); background: var(--st-card); border: 1px solid var(--st-line);
  border-radius: 12px; overflow: hidden; }
.game-card:hover { border-color: var(--st-muted); }
.game-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #0e0e0f; }
.game-card-body { display: grid; gap: 8px; padding: 20px 22px 22px; }
.game-card-title { font: 700 22px/1.2 var(--st-font); letter-spacing: -0.01em; }
.game-card-text { color: var(--st-muted); font-size: 16px; }
.game-card-meta { font: 600 13px/1.3 var(--st-font); letter-spacing: .08em; text-transform: uppercase; color: var(--st-link); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-top: 28px; }
.fact { background: var(--st-card); border: 1px solid var(--st-line); border-radius: 12px; padding: 22px; display: grid; gap: 8px; align-content: start; }
.fact p { color: var(--st-muted); font-size: 16px; }
.contact { display: grid; gap: 14px; justify-items: start; max-width: 44em; }
.contact-email { font: 600 clamp(20px, 3.2vw, 30px)/1.2 var(--st-font); letter-spacing: -0.015em; color: var(--st-text); text-decoration: none;
  border-bottom: 2px solid var(--st-accent); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact-email:hover { color: var(--st-link); }

/* Text pages: about, privacy, terms, 404 */
main.prose, main.legal { max-width: 820px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--st-gutter) 80px; display: grid;
  grid-template-columns: minmax(0, 1fr); gap: 16px; }
main.prose h1, main.legal h1 { font-size: clamp(36px, 5.6vw, 56px); margin-bottom: 6px; }
main.prose h2, main.legal h2 { font-size: clamp(22px, 2.8vw, 28px); margin-top: 26px; }
main.legal h3 { font-size: 19px; }
main.prose p, main.prose li, main.legal p, main.legal li { color: var(--st-text); }
main.legal ol, main.legal ul, main.prose ul { display: grid; gap: 8px; padding-left: 22px; margin: 0; }
.ticks { margin: 0; padding: 0 !important; list-style: none; display: grid; gap: 8px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--st-accent); }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.support-grid section { background: var(--st-bg-2); border: 1px solid var(--st-line); border-radius: 12px; padding: 18px; display: grid; gap: 10px;
  align-content: start; }
.contact-link { font-weight: 600; }
.covered { background: var(--st-bg-2); border: 1px solid var(--st-line); border-radius: 12px; padding: 18px 20px; display: grid; gap: 10px; }
.covered h2 { margin-top: 0 !important; font-size: 19px !important; }
/* the account pages' header link with the profile picture (account.js adds .has-avatar; the v3 header's nav is .st-links) */
.st-links a.has-avatar { display: inline-flex; align-items: center; gap: 8px; }
.lost { display: grid; gap: 18px; justify-items: start; }
.lost .st-mark { width: 88px; height: 88px; }
