/* Argonaut webfonts — THE definition of every font file the product loads.
   Linked from every blade and from resources/js/survey/survey_template.html:
       <link href="/fonts/argonaut-fonts.css" rel="stylesheet" />

   Self-hosted on purpose. These used to come from fonts.googleapis.com via an
   @import inside app.css, which made the browser walk a chain — app.css, then
   the Google stylesheet, then the woff2 on fonts.gstatic.com — before a single
   Georgian glyph could paint. Georgian text rendered in the system fallback
   (Segoe UI on Windows) for the whole of that chain and then reflowed. Serving
   the files from our own origin removes two hops and the flash with them.

   Only the subsets the product actually uses are shipped: Latin + Latin-ext for
   Inter, Georgian for Noto Sans Georgian. The unicode-range on each face is
   what makes one stack serve both languages — see the Typography block in
   resources/css/argonaut-tokens.css, which owns the --font-family-* values.

   Files come from the @fontsource/inter and @fontsource/noto-sans-georgian
   packages; re-copy them from node_modules/@fontsource/*/files/ on upgrade. */

/* Inter 400 — latin */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    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;
}

/* Inter 400 — latin-ext */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-ext-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    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;
}

/* Inter 500 — latin */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    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;
}

/* Inter 500 — latin-ext */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-ext-500-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    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;
}

/* Inter 600 — latin */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-600-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 600;
    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;
}

/* Inter 600 — latin-ext */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-ext-600-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    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;
}

/* Inter 700 — latin */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-700-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    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;
}

/* Inter 700 — latin-ext */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter/inter-latin-ext-700-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    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;
}

/* size-adjust on every Noto Sans Georgian face below — WHY -----------------
   Georgian and Latin are laid out at the same CSS font-size, but Noto Sans
   Georgian paints more ink per character than Inter does, so a Georgian cell
   next to an English one in the same table reads as a larger type size.
   Measured from these exact woff2 files (fontkit, normalised to em):

                        Inter 400      Noto Sans Georgian 400
     x-height             0.546          0.536
     ascender ink top     0.762          0.770
     descender ink        -0.216        -0.250
     ink extent           0.978          1.020   (+4.3%)
     avg advance/char     0.535          0.656   (+23%)

   The x-heights already agree — Noto Sans Georgian is cut to match Noto Sans
   (x-height 0.536), and Inter sits 2% above that. What does NOT agree is the
   ink extent and the advance width, and that is what the eye reads as "bigger".
   size-adjust scales the whole face — height AND advance — before layout, so
   it is the one lever that closes both gaps at once.

   95% matches the Georgian ink extent (1.020) to Inter's (0.978). It is an
   optical correction, not a metric one: tune this single number if Georgian
   still reads heavy (lower) or starts to read small (raise toward 100%). It
   must be a literal percentage — var() is not allowed in @font-face — so all
   four weights below carry the same value and must be changed together.
   Safari <17 ignores size-adjust and renders as before; nothing breaks. */

/* Noto Sans Georgian 400 — georgian */
@font-face {
    font-family: 'Noto Sans Georgian';
    src: url('/fonts/noto-sans-georgian/noto-sans-georgian-georgian-400-normal.woff2') format('woff2');
    size-adjust: 95%;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0589,U+10A0-10FF,U+1C90-1CBA,U+1CBD-1CBF,U+205A,U+2D00-2D2F,U+2E31;
}

/* Noto Sans Georgian 500 — georgian */
@font-face {
    font-family: 'Noto Sans Georgian';
    src: url('/fonts/noto-sans-georgian/noto-sans-georgian-georgian-500-normal.woff2') format('woff2');
    size-adjust: 95%;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    unicode-range: U+0589,U+10A0-10FF,U+1C90-1CBA,U+1CBD-1CBF,U+205A,U+2D00-2D2F,U+2E31;
}

/* Noto Sans Georgian 600 — georgian */
@font-face {
    font-family: 'Noto Sans Georgian';
    src: url('/fonts/noto-sans-georgian/noto-sans-georgian-georgian-600-normal.woff2') format('woff2');
    size-adjust: 95%;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    unicode-range: U+0589,U+10A0-10FF,U+1C90-1CBA,U+1CBD-1CBF,U+205A,U+2D00-2D2F,U+2E31;
}

/* Noto Sans Georgian 700 — georgian */
@font-face {
    font-family: 'Noto Sans Georgian';
    src: url('/fonts/noto-sans-georgian/noto-sans-georgian-georgian-700-normal.woff2') format('woff2');
    size-adjust: 95%;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0589,U+10A0-10FF,U+1C90-1CBA,U+1CBD-1CBF,U+205A,U+2D00-2D2F,U+2E31;
}

/* Mirrors the Typography block in resources/css/argonaut-tokens.css, which is
   the source of truth. Needed here for the pages that load no Vite bundle:
   auth/password-reset, errors/invalid-link, systemInvitationAccept. */
:root {
    --font-family-sans: ui-sans-serif, system-ui, sans-serif,
                        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-family-latin: ui-sans-serif, system-ui, sans-serif;
    --font-family-georgian: 'Noto Sans Georgian', ui-sans-serif, system-ui, sans-serif;
}
