/* ==========================================================================
   Numerian — Shared typography layer
   --------------------------------------------------------------------------
   Single source of truth for typeface selection across BOTH asset dashboards
   (BTC and Gold) and every standalone page.

   Headline typeface : Playfair Display  (400–800)
   Body typeface     : Inter             (300–800)

   Two families, nothing else. Both are open-licence (SIL OFL) and served from
   Google Fonts, which the dashboards already preconnect to. The <link> lives in
   each page's <head> rather than an @import here, because an @import would
   chain a second render-blocking request behind this file.

   Both are variable fonts spanning the full weight range, so every weight the
   dashboards ask for (400–800) maps to a real instance. No synthetic bolding.

   This file MUST be linked before styles.css / gold.css so that per-asset
   :root overrides still win the cascade.
   ========================================================================== */

:root {
    /* Headlines: page titles, section headers, card titles >= 13px.
       Per-asset title mappings live in styles.css / gold.css, because the same
       class name is a different size on each dashboard. */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Body copy, labels, buttons, table cells. */
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;

    /* Brand/wordmark. Aliased to display so the two never drift apart. */
    --font-brand: var(--font-display);

    /* Numeric data: prices, ATR values, table figures -- 326 sites.
       Historically JetBrains Mono (BTC) and IBM Plex Mono (Gold). Now Inter,
       relying on its TABULAR FIGURES rather than a monospaced face to hold
       column alignment (see the font-variant-numeric rule below).

       The token keeps the name --font-mono because 326 call sites reference it
       and the rename would be pure churn -- but it is no longer a monospaced
       stack. Change it here and every numeric cell follows. */
    --font-mono: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;

    /* Weight scale -- use these rather than bare numbers so the mapping between
       a role and a weight stays visible at the point of use. */
    --fw-display-regular: 400;
    --fw-display-medium: 500;
    --fw-body-light: 300;   /* large secondary text only; never below 16px */
    --fw-body-regular: 400;
    --fw-body-medium: 500;
    --fw-body-semibold: 600;
}

/* --- Tabular figures -------------------------------------------------------
   With the monospaced faces gone, digit alignment now depends on Inter's `tnum`
   feature. Without this rule a `1` sets narrower than an `8` and price columns
   go ragged as values tick.

   Applied at the root and inherited, rather than at each of the 326 numeric
   sites: font-variant-numeric is an inherited property, and tabular figures are
   the right default across a data dashboard anyway. */
:root {
    font-variant-numeric: tabular-nums;
}

/* --- Headline mapping ------------------------------------------------------
   Headings inherit from these element rules. Because fonts.css is linked
   BEFORE styles.css / gold.css, any page that sets its own heading
   font-family still wins -- this is a floor, not an override.

   Playfair Display is a high-contrast Didone: it sets wider and airier than the
   grotesques these dashboards were built around, so the negative tracking keeps
   headline blocks from running long. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
}

h1 {
    font-weight: var(--fw-display-medium);
}

h2, h3, h4, h5, h6 {
    font-weight: var(--fw-display-regular);
}
