/* friendlyfiredepartment.com — the only stylesheet.
 *
 * Everything under site/ ships VERBATIM: tools/site/build.mjs copies this file rather than
 * generating it, so opening it tells you what the site looks like. That is the whole reason the
 * palette below is written out rather than scraped from the game at build time.
 *
 * ⚠️ BUT THE --ff-* VALUES ARE CHECKED. Every one of them must appear as a colour literal in
 * assets/ui/title.rml, asserted by tools/site/build.mjs — so a palette change in the game fails the
 * site build instead of drifting quietly. A hand-copied palette is exactly the second-copy failure
 * this site is generated to avoid; the check is what makes the copy honest.
 *
 * ⚠️ THE PREFIX IS THE OPT-IN, AND THE RULE IS ONE-DIRECTIONAL. --ff-* is the GAME's palette and is
 * checked. --site-* is for things the game has no opinion about — a link hover, a focus ring, a code
 * ground — and is exempt by construction. The reverse check would be wrong: this site has no SOLO
 * button and no build strip, so it does not use every colour the title screen does.
 */

:root {
    /* --- the game's palette, from assets/ui/title.rml. CHECKED. --- */
    --ff-bg: #04090f;          /* the screen's ground */
    --ff-inset: #070f18;       /* the build strip's well */
    --ff-text: #c8d6dc;        /* body */
    --ff-head: #f0f4f6;        /* the wordmark */
    --ff-accent: #ff8c42;      /* the brand orange — the HUD's own, for the player's name */
    --ff-muted: #6d8592;       /* the tagline */
    --ff-faint: #55707e;       /* the build strip */
    --ff-primary: #c8442a;     /* SOLO OPERATION */
    --ff-primary-hi: #e05436;  /* ...hovered */
    --ff-primary-edge: #7d2718;
    --ff-second: #2a3f52;      /* the secondary buttons */
    --ff-second-hi: #365068;
    --ff-second-edge: #16232e;
    --ff-second-text: #9db9c4;

    /* --- the site's own, which the game has no opinion about --- */
    /* ⚠️ Was --ff-dim, "the pitch": the title screen's pitch colour, and CHECKED as the game's. The
       game dropped its pitch lines on 2026-09-24, so the colour is the site's own now — the check
       would otherwise fail the build over a paragraph that no longer exists. */
    --site-dim: #8fa6b2;       /* secondary copy: the tagline, the beats, the cards, the nav */
    --site-rule: #16232e;
    --site-card-hover: #0a1522;
    --site-max: 44rem;
    --site-wide: 68rem;

    --site-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --site-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

    color-scheme: dark;
}

/* ⚠️ ONE SERVED FACE, AND `swap` RATHER THAN `block`.
 *
 * assets/web/shell.html uses font-display: block deliberately — the game wants a LOUD failure, since
 * a screenshot in Helvetica is one nobody notices. A marketing page wants the opposite: text a
 * visitor can read while 89 KB arrives.
 *
 * Archivo Black only. Inter is 832 KB across two weights and is near-indistinguishable from the
 * platform sans at body size; the wordmark is the one place the face is doing brand work. The stack
 * above still names Inter first, so a machine that already has it uses it for free. */
@font-face {
    font-family: "Archivo Black";
    font-display: swap;
    src: url("/assets/fonts/ArchivoBlack-Regular.ttf") format("truetype");
}

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

body {
    margin: 0;
    background: var(--ff-bg);
    color: var(--ff-text);
    font-family: var(--site-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ff-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ff-primary-hi); }
:focus-visible { outline: 2px solid var(--ff-accent); outline-offset: 2px; }

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

/* ---------------------------------------------------------------- chrome */

.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    max-width: var(--site-wide);
    margin: 0 auto;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--site-rule);
}
.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-right: auto;
    color: var(--ff-head);
    text-decoration: none;
    font-family: "Archivo Black", var(--site-sans);
    font-size: .95rem;
    letter-spacing: .01em;
}
.brand b { color: var(--ff-accent); font-weight: inherit; }
.mark { display: block; }
.topnav-links { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .95rem; }
.topnav-links a { color: var(--site-dim); text-decoration: none; }
.topnav-links a:hover, .topnav-links a[aria-current="page"] { color: var(--ff-accent); }

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    max-width: var(--site-wide);
    margin: 4rem auto 0;
    padding: 1.5rem 1.25rem 3rem;
    border-top: 1px solid var(--site-rule);
    color: var(--ff-faint);
    font-size: .85rem;
}
.footer-brand { display: flex; align-items: center; gap: .5rem; margin-right: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--ff-faint); text-decoration: none; }
.footer-links a:hover { color: var(--ff-accent); }

/* The company line. ⚠️ Its own row rather than a third flex item: the brand and the page links sit
   on one line at every width, and the legal line belongs under them rather than squeezed between. */
.footer-legal { flex-basis: 100%; margin: 0; color: var(--ff-faint); }
.footer-legal a { color: var(--ff-faint); }
.footer-legal a:hover { color: var(--ff-accent); }

/* ---------------------------------------------------------------- home */

.home-main { max-width: var(--site-wide); margin: 0 auto; padding: 0 1.25rem; }

.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero-badge { display: block; margin: 0 auto 1rem; }
.wordmark {
    font-family: "Archivo Black", var(--site-sans);
    font-weight: 400;
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1.08;
    color: var(--ff-head);
    margin: 0 0 .35rem;
}
.wordmark .fl { color: var(--ff-accent); }
/* The genre line, and since the pitch lines went the only words under the wordmark — so it carries the
   pitch's old size and colour rather than a subtitle's. */
.hero .tagline { color: var(--site-dim); font-size: 1.15rem; margin: 0; }
/* Sentence case on purpose: an uppercase transform turns "macOS" into "MACOS". */
.hero .status {
    margin: 1rem 0 0;
    font-size: .85rem;
    color: var(--ff-faint);
    text-wrap: balance;
}

/* How a round goes: three beats in the order they happen, numbered by the list itself. */
.round { max-width: 56rem; margin: 0 auto 3.5rem; }
.round h2 {
    margin: 0 0 1.25rem;
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ff-muted);
}
.beats {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: beat;
}
.beats li { counter-increment: beat; }
.beats h3 {
    margin: 0 0 .45rem;
    font-size: 1.05rem;
    color: var(--ff-head);
}
.beats h3::before {
    content: counter(beat) ".";
    margin-right: .45rem;
    color: var(--ff-accent);
}
.beats p { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--site-dim); }

.shot {
    margin: 0 auto 3.5rem;
    max-width: 56rem;
    padding: 0;
}
.shot img,
.shot video {
    display: block;
    height: auto;
    width: 100%;
    border: 1px solid var(--site-rule);
    background: var(--ff-inset);
}
.shot figcaption {
    margin-top: .7rem;
    text-align: center;
    font-size: .9rem;
    color: var(--ff-muted);
}

.lede {
    max-width: var(--site-max);
    margin: 0 auto 3.5rem;
    font-size: 1.15rem;
    color: var(--ff-text);
    text-align: center;
}
.lede p { margin: 0; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
    display: block;
    padding: 1.25rem 1.35rem;
    background: var(--ff-inset);
    border: 1px solid var(--site-rule);
    border-left: 3px solid var(--ff-primary);
    color: var(--ff-text);
    text-decoration: none;
}
.card:hover { border-left-color: var(--ff-accent); background: var(--site-card-hover); color: var(--ff-text); }
.card h2 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--ff-head); }
.card p { margin: 0; font-size: .93rem; color: var(--site-dim); }

/* ---------------------------------------------------------------- pages */

.doc-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    max-width: var(--site-wide);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 0;
}
@media (min-width: 62rem) {
    .doc-wrap { grid-template-columns: minmax(0, 1fr) 13rem; }
}

.prose { max-width: var(--site-max); min-width: 0; }
.prose h1 {
    font-family: "Archivo Black", var(--site-sans);
    font-weight: 400;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    line-height: 1.15;
    color: var(--ff-head);
    margin: 0 0 1.5rem;
}
.prose h2 {
    font-size: 1.35rem;
    color: var(--ff-head);
    margin: 2.75rem 0 .75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--site-rule);
}
.prose h3 { font-size: 1.08rem; color: var(--ff-head); margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--ff-text); }
.prose strong { color: var(--ff-head); }
.prose ol, .prose ul { padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose li::marker { color: var(--ff-accent); }

.anchor {
    margin-left: .4rem;
    color: var(--ff-faint);
    text-decoration: none;
    opacity: 0;
    font-weight: 400;
}
h2:hover .anchor, h3:hover .anchor, .anchor:focus-visible { opacity: 1; }

.prose code {
    font-family: var(--site-mono);
    font-size: .88em;
    background: var(--ff-inset);
    border: 1px solid var(--site-rule);
    border-radius: 3px;
    padding: .08em .35em;
}
pre.code {
    background: var(--ff-inset);
    border: 1px solid var(--site-rule);
    border-left: 3px solid var(--ff-second);
    padding: .9rem 1rem;
    overflow-x: auto;
}
pre.code code { background: none; border: 0; padding: 0; font-size: .88rem; }

.prose img {
    display: block;
    margin: 1.5rem 0;
    border: 1px solid var(--site-rule);
    background: var(--ff-inset);
}

.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .93rem; }
.prose th, .prose td {
    text-align: left;
    padding: .5rem .7rem;
    border-bottom: 1px solid var(--site-rule);
    vertical-align: top;
}
.prose th { color: var(--ff-muted); font-weight: 600; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }

/* The tables are the one thing that genuinely needs to escape the prose column on a phone. */
.prose > table { display: block; overflow-x: auto; }

.toc { font-size: .87rem; align-self: start; }
@media (max-width: 61.99rem) { .toc { display: none; } }
.toc-title { color: var(--ff-muted); text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; margin: 0 0 .5rem; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--site-rule); }
.toc li { margin: 0; }
.toc a { display: block; padding: .2rem 0 .2rem .8rem; color: var(--site-dim); text-decoration: none; }
.toc a:hover { color: var(--ff-accent); }
.toc .d3 a { padding-left: 1.6rem; color: var(--ff-faint); }

.page { max-width: var(--site-max); margin: 0 auto; padding: 4rem 1.25rem 0; }
.page h1 { font-family: "Archivo Black", var(--site-sans); font-weight: 400; color: var(--ff-head); }
