/* =============================================================================
   ATUM — assets/css/fonts.css
   THE FACES, AND THE TWO STACKS THAT NAME THEM. Nothing else.

   Split out of base.css on 2026-08-16. The reason is the new homepage: it is a
   self-contained document with its own inline stylesheet and no base.css, and
   once the language picker moved into the shared footer it could render Thai,
   Cyrillic, Devanagari and Han. Without this file it would have fallen back to
   whatever the visitor's system happened to have. One declaration, five pages.

   LOAD IT FIRST, before base.css and before any page's own <style>.


   Six languages, four scripts, five typefaces — but a visitor only ever
   downloads the ones their page actually contains, because every face below
   declares a `unicode-range`. An English reader gets the two Latin files and
   nothing else; the Thai, Cyrillic and Chinese files sit on the shelf until a
   character from that script is rendered.

   WHAT THE LATIN FACES ACTUALLY COVER — checked against the binaries on
   2026-08-11, because assuming this is how the page ends up silently set in
   Segoe UI:

     Schibsted Grotesk   Latin + Latin Ext.  NO Cyrillic, NO Thai, NO CJK.
     Geist Mono          Latin + Latin Ext + CYRILLIC (Google never published
                         a Cyrillic slice; the face has one, so we cut our own).
     Neither has U+202F, the narrow no-break space French punctuation needs.

   So four faces were added. The font subsetter rebuilds them, and also proves
   that every character in every language pack is covered.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/schibsted-var-latin.woff2') format('woff2');
  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-202E, U+2030-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/schibsted-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, 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: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/geistmono-var-latin.woff2') format('woff2');
  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-202E, U+2030-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/geistmono-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, 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;
}

/* --- Cyrillic, sans. Golos Text: a Cyrillic-first grotesque whose metrics
   land almost exactly on Schibsted Grotesk's — x-height 0.530 vs 0.527 em,
   cap height 0.700 vs 0.703 — so "Atum" in Latin and Русский in Cyrillic sit
   on the same line without a visible step. Schibsted has no Cyrillic. */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/golos-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+2116;
}

/* --- Cyrillic, mono. Geist Mono's OWN Cyrillic, cut from the upstream
   variable font. Same typeface as the Latin labels, so a mono micro-label
   does not change character when the site switches to Russian. */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/geistmono-var-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+2116;
}

/* --- Thai. Noto Sans Thai, loopless, weight axis only (wdth pinned to 100).
   Descender is -0.450 em against Schibsted's -0.258, because Thai stacks
   marks below the line as well as above it — that is why :lang(th) further
   down carries more line-height and no negative tracking. */
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/notosansthai-var-thai.woff2') format('woff2');
  unicode-range: U+0E00-0E7F;
}

/* --- Devanagari. Noto Sans Devanagari, loopless grotesque, weight axis only
   (wdth pinned to 100). The whole block is carried, not the characters in use,
   because Devanagari builds conjuncts out of combinations rather than out of a
   fixed list — a subset cut from today's sentences breaks the first time
   somebody rewrites one.

   It is 75 KB rather than the 20 KB Thai costs, and the difference is not
   padding: most of it is the conjunct substitution table. Cutting that is
   cutting the thing that makes क + ् + ष render as क्ष instead of three
   letters in a row. An English, Dutch, French, Russian or Chinese reader never
   downloads a byte of it.

   The range deliberately stops at the block. U+200C and U+200D, the joiners
   that force or forbid a conjunct, are NOT claimed here — the Latin faces claim
   that range already, and a joiner matched to a Latin face splits the shaping
   run and breaks the very conjunct it was inserted to control. The Hindi text
   is written without them. */
@font-face {
  font-family: 'Noto Sans Devanagari';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/notosansdev-var-deva.woff2') format('woff2');
  unicode-range: U+0900-097F, U+A8E0-A8FF;
}

/* --- Simplified Chinese. Noto Sans SC, subset to the characters the Chinese
   pack actually uses plus the CJK punctuation and fullwidth forms. The full
   face is 16.9 MB across 30,890 codepoints, which is not something to send to
   a phone. ADDING A CHINESE CHARACTER THAT WAS NOT THERE BEFORE MEANS
   RE-RUNNING THE FONT SUBSETTER — otherwise it falls back in silence.

   The range deliberately claims the Western marks Chinese sets wide
   (“ ” ‘ ’ — …), so that when 'Noto Sans SC' is promoted to the front of the
   stack for :lang(zh) they come out fullwidth. In every other language
   Schibsted is earlier in the stack and keeps them Latin. */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/notosanssc-hans.woff2') format('woff2');
  unicode-range: U+00B7, U+2014, U+2018-201D, U+2026, U+2E80-2EFF, U+3000-303F,
    U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE10-FE1F, U+FF00-FFEF;
}

/* --- One glyph, 600 bytes: U+202F NARROW NO-BREAK SPACE, which French sets
   before ; : ! ? and inside « ». Not one of the four Latin faces on this site
   has it — checked. Without this the browser silently borrows a space from
   the OS, and on a platform that has no U+202F at all it draws a .notdef box
   in the middle of a French sentence. First in every stack; it claims two
   codepoints, so it is skipped instantly for everything else. */
@font-face {
  font-family: 'Atum NNBSP';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/atum-nnbsp.woff2') format('woff2');
  unicode-range: U+2009, U+202F;
}

:root {
  --font-sans: 'Schibsted Grotesk', 'Atum NNBSP', 'Golos Text', 'Noto Sans Thai',
               'Noto Sans Devanagari', 'Noto Sans SC', ui-sans-serif, system-ui,
               'Segoe UI', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'Atum NNBSP', 'Noto Sans Thai',
               'Noto Sans Devanagari', 'Noto Sans SC',
               ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
