/* ==========================================================================
   Inter — the project typeface
   --------------------------------------------------------------------------
   This is the single place the Inter faces are declared. Every page in the
   project links this file first, then its own stylesheet.

   Self-hosted rather than loaded from Google Fonts: production is FTP-deployed
   to shared hosting, and a blocked or slow third-party font request would leave
   the panel rendering in a fallback face.

   One variable file covers weights 100-900, so a page that uses 400/600/700
   still makes exactly one font request per unicode range.
   ========================================================================== */

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

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               'Liberation Mono', 'Courier New', monospace;
}

/* --------------------------------------------------------------------------
   Legacy stylesheet overrides
   --------------------------------------------------------------------------
   Two stylesheets in this project ship a hard-coded typeface and cannot simply
   be re-edited:

     css/app.css            a 3.8 MB prebuilt Tailwind v2 bundle set to Nunito.
                            The Tailwind config it was built from is not in the
                            repository, so it cannot be rebuilt — it is patched
                            from here instead.
     backend/css/styles.css the SB Admin 2 theme, which sets a system stack.

   frontend/css/style.css is NOT patched here: its SCSS source lives in
   frontend/scss/ and was refactored properly and recompiled.

   font-family inherits, so setting it on the root plus the form elements that
   opt out of inheritance is enough. Selectors that declare their own family —
   icon fonts such as Material-Design-Iconic-Font, and monospace blocks — are
   deliberately left alone, which is why this is not a blanket `* { }` rule.
   -------------------------------------------------------------------------- */

html,
body {
  font-family: var(--font-sans);
}

/* Form controls do not inherit font-family from their ancestors. */
button,
input,
optgroup,
select,
textarea {
  font-family: var(--font-sans);
}

/* Tailwind's utility and preflight rules are more specific than a bare `body`,
   so the two places it pins Nunito are matched directly. */
.font-sans,
body.font-sans {
  font-family: var(--font-sans) !important;
}

/* Keep code and pre in a monospace face; the rules above would otherwise win
   over the legacy stylesheets that set it. */
code,
kbd,
samp,
pre,
.mono {
  font-family: var(--font-mono);
}
