/* Skyburst site. Tokens from projects/block/DESIGN.md ("Night Atlas"): Material 3 chrome
   (BlockTokens.Light / BlockTokens.Dark) follows the system theme; the game stage and the
   Night Chart board skin are always night (BlockTokens.Stage, nightChart-*). Anybody variable
   (wdth 80, wght 800) for display and numbers, system sans for running text. Gold (stage-blast)
   is an accent on night only, never body text on light. */

@font-face {
    font-family: "Anybody";
    src: url("/skyburst/fonts/anybody-var.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 50% 150%;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --bg: #F7F6FB;
    --card: #ECEBF4;
    --card-high: #E4E3EF;
    --ink: #14172B;
    --muted: #464A63;
    --outline: #73778F;
    --link: #2B3A8C;
    --on-link: #FFFFFF;
    --chip: #DDE1FF;
    --on-chip: #0F1A55;
    /* Night stage, identical in both themes */
    --sky: #0A0F24;
    --sky-cell: #111833;
    --sky-line: #1F2A52;
    --sky-edge: #5A67A0;
    --sky-label: #8F9BC9;
    --sky-text: #EEF0FA;
    --sky-muted: #A7B0D6;
    --gold: #FFC23D;
    --on-gold: #1A1200;
    --spark: #FFF4D6;
    --display: "Anybody", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0C1022;
        --card: #161B33;
        --card-high: #20263F;
        --ink: #E5E7F4;
        --muted: #B4B9D4;
        --outline: #8A8FAA;
        --link: #B9C3FF;
        --on-link: #13206A;
        --chip: #2B3A8C;
        --on-chip: #DDE1FF;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 1rem/1.6 var(--body);
    overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2 {
    font-family: var(--display);
    font-weight: 800;
    font-stretch: 80%;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.1rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

.num { font-family: var(--display); font-stretch: 90%; font-weight: 750; font-variant-numeric: tabular-nums; }

.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1rem; }

.skip-link {
    position: absolute; left: 1rem; top: -4rem;
    background: var(--link); color: var(--on-link);
    padding: 0.75rem 1rem; border-radius: 999px; z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header */
.topbar { border-bottom: 1px solid var(--outline); }
.topbar .wrap {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0.5rem 1.5rem; padding-block: 0.5rem;
}
.brand {
    display: flex; align-items: center; gap: 0.6rem; min-height: 48px;
    color: var(--ink); text-decoration: none;
}
.brand img { border-radius: 10px; }
.wordmark { font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: 1.45rem; line-height: 1.1; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.75rem;
    color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 999px;
}
.site-nav a:hover { background: var(--chip); color: var(--on-chip); }

/* Sections */
main { display: block; }
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--outline); }
.lede, .sub { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.answer { font-size: 1.1rem; max-width: 42rem; }
.detail, .prose p, .prose ul { max-width: 42rem; }

/* Night band: the board is always night, in both themes. Set ink, links and focus here. */
.night {
    background: var(--sky);
    color: var(--sky-text);
    background-image:
        linear-gradient(var(--sky-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sky-line) 1px, transparent 1px);
    background-size: 3rem 3rem;
}
.night a { color: var(--gold); }
.night :focus-visible { outline-color: var(--gold); }
.night .sub, .night .lede, .night .cta-note { color: var(--sky-muted); }
.night .crumbs ol { color: var(--sky-muted); }

/* Hero */
.hero { padding: 2rem 0 2.5rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1fr 22rem; } }
.hero-grid > * { min-width: 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; }
.cta-note { margin: 0; color: var(--muted); font-weight: 600; }
.play-badge { display: inline-block; min-height: 48px; border-radius: 8px; }
.play-badge img { width: 188px; height: 56px; }

/* Fuse cord: the lit-line pattern (two-tone dashed cord with spark stars), decoration only */
.fuse {
    display: flex; align-items: center; gap: 0.6rem;
    max-width: 22rem; margin: 0 0 1.5rem;
}
.fuse .cord {
    flex: 1; height: 0.6rem; border-radius: 999px;
    background: repeating-linear-gradient(90deg, var(--spark) 0 0.7rem, var(--gold) 0.7rem 1.4rem);
    box-shadow: 0 0 0 2px var(--sky), 0 0 0 4px var(--gold);
}
.fuse .star {
    width: 1.6rem; height: 1.6rem; flex: none; background: var(--spark);
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* Phone shots: 1 px edge so the night board reads on the night band and on light chrome */
.phone { border: 1px solid var(--sky-edge); border-radius: 12px; background: var(--sky); }
.hero-shot { display: block; max-width: 22rem; margin: 0 auto; }

/* Answer in a card, e.g. the entity paragraph */
.entity { background: var(--card); color: var(--ink); border-radius: 16px; padding: 1.25rem; max-width: 48rem; }
.night .entity { background: var(--sky-cell); color: var(--sky-text); border: 1px solid var(--sky-edge); }
.entity p { margin: 0; }

/* Cards */
.cards { display: grid; gap: 1rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); color: var(--ink); border-radius: 16px; padding: 1.25rem; }
.card p:last-child { margin: 0; }

/* Payout readout: night panel with gold figures (an "armed" accent, as on the board) */
.payouts {
    display: grid; gap: 0.75rem; list-style: none; margin: 1.25rem 0 0; padding: 0; max-width: 46rem;
}
@media (min-width: 40rem) { .payouts { grid-template-columns: repeat(3, 1fr); } }
.payouts li {
    background: var(--sky); color: var(--sky-text); border: 1px solid var(--sky-edge);
    border-radius: 16px; padding: 1rem 1.1rem;
}
.payouts .figure { display: block; color: var(--gold); font-size: 2rem; line-height: 1.1; }
.payouts .what { display: block; color: var(--sky-muted); }

.split { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 48rem) { .split { grid-template-columns: 1fr 15rem; } }
.split > * { min-width: 0; }
.split img { max-width: min(15rem, 100%); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery > li { min-width: 0; }
.shot { margin: 0; }
.shot figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

/* Question links */
.qlinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.qlinks a {
    display: flex; align-items: center; min-height: 48px; padding: 0.5rem 1rem;
    background: var(--chip); color: var(--on-chip); border-radius: 999px;
    font-weight: 600; text-decoration: none;
}
.qlinks a:hover { text-decoration: underline; }
.toc { margin-bottom: 1rem; }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1rem; padding: 0; color: var(--muted); font-size: 0.95rem; }
.crumbs li + li::before { content: "›"; padding: 0 0.5rem; }
.crumbs a { display: inline-block; padding: 0.75rem 0; }

/* Tables: stack into cards at 600 px and below */
table { border-collapse: collapse; width: 100%; max-width: 48rem; margin: 1rem 0 1.5rem; }
caption { display: block; text-align: left; font-weight: 700; margin-bottom: 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--outline); }
thead th { border-bottom: 2px solid var(--ink); }
@media (max-width: 37.5rem) {
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    tr { display: block; background: var(--card); color: var(--ink); border-radius: 12px; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
    td { display: block; border: 0; padding: 0.25rem 0; }
    td::before { content: attr(data-label) ": "; font-weight: 700; }
}

.faq section { padding: 1.5rem 0; border-top: 1px solid var(--outline); }

/* Closing band, night */
.band {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--sky); color: var(--sky-text); border: 1px solid var(--sky-edge);
    border-radius: 16px; padding: 1.5rem;
}
.band :focus-visible { outline-color: var(--gold); }
.band h2 { margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--outline); padding: 2rem 0; margin-top: 1rem; font-size: 0.95rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; list-style: none; margin: 1rem 0; padding: 0; gap: 0 1rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; }
.fine { color: var(--muted); }
.fine p { margin: 0 0 0.5rem; }
