/*
 * SN-DESIGN-SYSTEM-001 Phase F - self-hosted typefaces for the marketing site.
 *
 * These faces were previously fetched from fonts.googleapis.com / fonts.gstatic.com on every page
 * load. That was a render-blocking third-party request that also disclosed the visitor's IP address
 * to Google from a site whose whole premise is that a sleep assessment leaves no trace of who you
 * are. They are now served same-origin.
 *
 * The three .woff2 files are byte-identical to the Zone 2 CDSS copies (sleepnav-cdss @ 8432f7ed,
 * public/fonts/), so both estates render from the same binaries. scripts/check-fonts.sh pins their
 * sha256 sums and fails the check if either the files or the Google references come back.
 *
 * Licensing: all three are SIL Open Font License 1.1. The OFL requires the copyright notice to
 * travel with the font, so OFL-AtkinsonHyperlegibleNext.txt, OFL-SourceSerif4.txt and
 * OFL-JetBrainsMono.txt sit beside the .woff2 files in this directory and must not be separated
 * from them.
 *
 * Provenance: upstream is the google/fonts repository, main branch, fetched 5 September 2026, all
 * three the variable roman sources. No italic file is shipped, which matches what these pages
 * requested from Google before - only index.html's DM Sans request carried an ital axis, and it
 * asked for a single italic weight - so italic text is browser-synthesised. Upstream .ttf sums:
 *   5a455d1cfa099b601ab70751bb9673e8fe1854dc4500c80e1a220d0d75e31745  AtkinsonHyperlegibleNext[wght]
 *   97b2d4da6e3cb494b5a1e66ae176914d852ccabef49e0c02c0df25f3e39aca0b  SourceSerif4[opsz,wght]
 *   48715a42ec242c21e9f02692891e147d022299a52e48d5e413e1a942193ffeda  JetBrainsMono[wght]
 *
 * The src: URLs are absolute site-root paths. public/ IS the deployed root on Cloudflare Pages
 * (build output directory `public`, no build command), so /fonts/... resolves correctly from every
 * page including the ones under /tools/. No path rewriting was needed against the CDSS original.
 *
 * The unicode-range below is the union of the Google Fonts 'latin' and 'latin-ext' subsets - the
 * exact coverage these pages had before self-hosting. It deliberately reaches past Latin Extended-A
 * into Latin Extended-B: Romanian s-comma (U+0219) and t-comma (U+021B) live at U+0180-024F, so a
 * strict Latin + Latin Extended-A subset would have silently dropped Romanian diacritics.
 */

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    src: url('/fonts/atkinson-hyperlegible-next-latin.woff2') format('woff2-variations');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Source Serif 4';
    src: url('/fonts/source-serif-4-latin.woff2') format('woff2-variations');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/*
 * THE DESIGN TOKENS, carried over from the CDSS (sleepnav-cdss @ 8432f7ed, resources/css/app.css).
 *
 * There they are Tailwind v4 @theme keys; here there is no build step and no Tailwind, so they are
 * plain custom properties on :root. The names and values are identical, so the two estates share
 * one vocabulary.
 *
 * NOTHING IS MIGRATED TO THEM. None of these names is used anywhere in this repository today -
 * checked with a planted positive, 0 uses each - so declaring them cannot restyle a single page.
 * No colour, size, weight, margin or radius on any existing page is changed by this block. It is
 * vocabulary for later work to build against.
 *
 * TYPE SCALE, NAMED BY ROLE so a template cannot pick a size for appearance. A role name has one
 * right answer per context.
 */
:root {
    --text-display: 2.5rem;            /* 40 / 44 - page title, one per page */
    --text-display--line-height: 2.75rem;
    --text-title: 1.75rem;             /* 28 / 34 - section heading */
    --text-title--line-height: 2.125rem;
    --text-subtitle: 1.25rem;          /* 20 / 28 - sub-section, card heading */
    --text-subtitle--line-height: 1.75rem;
    --text-body: 1rem;                 /* 16 / 26 - default */
    --text-body--line-height: 1.625rem;
    --text-support: 0.875rem;          /* 14 / 20 - helper text, metadata, table cells */
    --text-support--line-height: 1.25rem;
    --text-micro: 0.75rem;             /* 12 / 16 - badges, timestamps, legal footnotes */
    --text-micro--line-height: 1rem;

    /* RADIUS. */
    --radius-control: 0.5rem;          /* 8px  - buttons, inputs, anything you click or type in */
    --radius-panel: 0.75rem;           /* 12px - cards, panels, modals */
    --radius-pill: 9999px;             /* badges, chips, avatars */

    /* ELEVATION. One shadow, deliberately. */
    --shadow-panel: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/*
 * The --<name>--line-height double-hyphen suffix is Tailwind v4's convention for attaching a
 * line-height to a --text-* key. With no Tailwind here nothing pairs them automatically: write
 * both, e.g. font-size: var(--text-title); line-height: var(--text-title--line-height);
 *
 * SPACING IS DELIBERATELY NOT DECLARED HERE, matching the CDSS. The sanctioned ladder is
 * 4 8 12 16 24 32 48 64 px. public/index.html already carries its own --space-xs .. --space-2xl
 * scale in its inline :root; that scale is untouched by this file and this file does not shadow it.
 */
