/* Shared design tokens and component rules for the branded (millionfold) pages
 * (Phase 65 cleanup, ADR-0009/F-032). Four parallel Phase-64 lanes each
 * re-declared the same palette/radius/shadow custom properties and the same
 * pill-button family — index.html and runs.html carried byte-identical
 * :root blocks, and order.html's .btn rule duplicated index.html's own. One
 * file now owns the values every branded page agrees on; a page keeps only
 * the rules that are genuinely its own (a different size, a disabled state,
 * a print-only rule) in its own <style>.
 *
 * Loaded after ../i18n/locale.css (fonts, :lang() stacks, language chrome —
 * unrelated tokens) and before report.css and the page's own <style>, so:
 *  - index.html and runs.html, which never load report.css, get these values
 *    as the final word — identical to what their own local :root blocks
 *    declared before this file existed.
 *  - order.html, report.html and experimental.html load report.css right
 *    after this file; report.css's own :root (Phase 63, kept exactly as is —
 *    the document/print aesthetic is a deliberate divergence, not drift,
 *    see the audit) re-declares --paper/--panel/--ink/--accent/--good/
 *    --hairline-soft with its own values and still wins there, so those
 *    three pages render exactly as before this file existed. report.css
 *    names its hairline and muted-text tokens --line/--muted rather than
 *    --hairline/--graphite, so there is no name collision to reconcile.
 */

:root {
    --paper: #F4F1EA;
    --panel: #FBF9F4;
    /* the printed report sheet (ADR-0009); declared here, used by the report */
    --sheet: #FFFEF9;
    --ink: #17150F;
    --body: #4A463D;
    --graphite: #6B675C;
    --hairline: #DCD6C8;
    --hairline-soft: #E8E3D7;
    --accent: #C8451F;
    --accent-deep: #A03518;
    --good: #2E6B3C;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --shadow-card: 0 18px 40px rgba(23, 21, 15, 0.08);
    --shadow-tile: 0 8px 18px rgba(23, 21, 15, 0.08);
    --shadow-pick: 0 0 0 3px rgba(200, 69, 31, 0.16);
    --ring-good: 0 0 0 2px rgba(46, 107, 60, 0.15);
    /* The 2026-09-26 handover (Phase 124): row hover, the uncertainty bands,
       the selection ring, the modal scrim and the always-visible focus ring. */
    --paper-hover: #EFEAE0;
    --band: rgba(23, 21, 15, 0.16);
    --accent-band: rgba(200, 69, 31, 0.55);
    --accent-ring: rgba(200, 69, 31, 0.14);
    --scrim: rgba(23, 21, 15, 0.42);
    --focus-ring: 0 0 0 3px rgba(200, 69, 31, 0.35);
}

/* The pill-button family (restyled in Phase 124 to the 2026-09-26 handover:
 * primary ink, commerce accent, secondary outline; colour-only
 * transitions and a visible focus ring). A
 * page whose buttons are a deliberately different size or add a state (e.g.
 * order.html's 44px hit-target requirement for the purchase-flow screens,
 * ADR-0009) keeps that delta as its own `.btn { … }` override after this
 * file, never a second full copy of the base — CSS applies the later
 * declaration per property, not per rule, so the override only touches what
 * it names. */
/* A display rule such as .btn's inline-flex outranks the browser's own
   [hidden] default, so a hidden button would still show. */
[hidden] { display: none !important; }
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
    text-decoration: none; cursor: pointer;
    border-radius: 999px; padding: 14px 28px;
    border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
    transition: background-color .12s ease-out, border-color .12s ease-out, color .12s ease-out;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.small { padding: 8px 18px; font-size: 0.85rem; }
/* The confirmation of immediate delivery before checkout (Phase 134). */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
/* The terms (with the refund policy) and the privacy notice, linked from every
   surface that leads to payment (F-038, B-106). They open in a new tab so the
   sitting and the open order stay where they are. */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 0.8125rem; line-height: 1.5; }
.legal-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* The wordmark beside the mark (.nf-mark lives in locale.css, which every
   page loads): Newsreader 500, gap 0.45 of the mark's height. */
.nf-lockup { display: inline-flex; align-items: center; gap: 0.55em; font: 500 1.375rem/1 'Newsreader', var(--serif); letter-spacing: -0.01em; color: var(--ink); }

/* Installable-shell banner (Phase 71, ADR-0010; classes added Phase 74
 * addendum, additive only). app/js/install.js renders the update-ready,
 * install-hint and offline notices as one fixed bar; its accent button is
 * the shell's only accent-colored control outside the pill-button family
 * above, so it keeps its own small classes rather than borrowing .btn's
 * pill shape. app/endless.html (no ui.css) carries the identical rules,
 * literally, in its own <style> block — install.js is the one script both
 * views load, so its class names must resolve on both. */
/* install.js sets --nf-shell-banner to the banner's height (Phase 187): the
   page's end and anything scrolled into view clear it, and each page's
   bottom-pinned bar stands on it. */
@media screen {
    html { scroll-padding-block-end: var(--nf-shell-banner, 0px); }
    body { padding-block-end: var(--nf-shell-banner, 0px); }
}
.nf-shell-banner {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 9999; padding: 10px 16px;
    background: var(--ink); color: var(--paper); font: 14px/1.4 sans-serif;
    display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.nf-shell-banner-btn {
    font: inherit; background: var(--accent); color: #fff; border: 0;
    border-radius: 6px; padding: 6px 12px; cursor: pointer;
}
.nf-shell-banner-link {
    font: inherit; background: transparent; color: inherit; border: 0;
    cursor: pointer; text-decoration: underline; padding: 0;
}
.nf-shell-banner-dismiss {
    font: inherit; background: transparent; color: inherit; border: 1px solid currentColor;
    border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
