/* fonts.css — CANONICAL fleet typography. Owner decision 08-17-2026: Inter, fleet-wide.
   ---------------------------------------------------------------------------------------
   This file is the single source of truth. It is COPIED into each app's own css/ directory
   (there is no git and the fleet spans two boxes, so a shared file cannot be mounted).
   Canonical copy + the two font files live at /Prvd/Scripts/Assets/typography/ on
   prvd-internal. Deploy with /Prvd/Scripts/sync_fleet_typography.sh — never hand-edit an
   app's copy, or the fleet drifts again, which is the defect this replaces.

   WHY Inter, and why ONE file: Inter is a variable font. A single @font-face with a
   font-weight RANGE instances every weight from 100 to 900 (CSS Fonts 4). ProvidGuard
   previously declared six separate weights pointing at six BYTE-IDENTICAL copies of this
   same file — correct on screen, six times the bytes. Do not reintroduce per-weight faces.

   FONT URLs ARE RELATIVE ON PURPOSE. `url(fonts/Inter-var.woff2)` resolves against the location
   of THIS STYLESHEET, not the page, so the same file works whether an app is served at the root
   (ProvidSupport, ProvidProposal, ProvidTime) or under a path prefix (PrvdBooks is served under
   /prvdbooks/ and its nginx returns 404 for /, so an absolute /css/... would 404). Do not change
   these back to absolute paths — it would silently break every prefix-served app.

   Two files, not one: these are the standard latin / latin-ext subsets. The unicode-range
   descriptors mean a page that never renders an accented character never downloads the
   85 KB latin-ext file. Keep both declarations and keep the ranges as they are.

   Payload: 48 KB (latin) + 85 KB (latin-ext, on demand) for ALL weights.
*/

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Inter-var.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-206F, U+2074, 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-weight: 100 900;
  font-display: swap;
  src: url(fonts/Inter-var-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;
}

:root {
  /* Use these tokens. Never retype a font stack — that is how ~40 different stacks got
     into 10 apps. Token names match ProvidGuard's existing palette.css so the fleet
     shares one vocabulary. */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

  /* OWNER DECISION 08-17-2026: "If we are using Inter, EVERYTHING must be Inter."
     There is NO second typeface anywhere. --font-mono is retained as an ALIAS of the sans
     stack, not because anything here is monospace, but so that a stray `var(--font-mono)`
     in existing or future code cannot quietly reintroduce a second face. Do not point this
     at a monospace family again without a new decision from the owner.

     Background: the old value led with 'JetBrains Mono', which was never loaded anywhere, so
     IDs and hashes fell back to whatever mono the device had and shifted per machine. That
     drift is the reason for this rule. */
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

  /* Document face for signable/legal documents.
     OWNER DECISION 08-17-2026: "Leave the document pages in Times." This is the ONE
     sanctioned exception to "everything must be Inter", and it is deliberate — do NOT
     migrate it to Inter in a future consistency sweep. Deliberately serif and deliberately
     Word-metric-compatible — it must match the generated PDFs and .docx from
     doc_template.py, so it is NOT part of the Inter rollout. Use this token where a
     document body is rendered on screen, so the pairing stays traceable. */
  --font-doc: 'Times New Roman', 'Liberation Serif', Times, serif;
}

/* Browsers apply their OWN monospace font to these elements by default. Without this rule a
   plain <code>PGSB-IPA-001</code> renders in Consolas / SF Mono / Liberation Mono depending on
   the device, which is exactly how a second typeface kept appearing in table columns while the
   page body was correctly Inter. Setting the family explicitly also cancels the browser's
   "monospace default size" quirk, which otherwise renders these a notch smaller.

   tabular-nums keeps digits on a fixed advance width, so identifier and number columns still
   line up now that they are no longer fixed-pitch. */
code, kbd, samp, pre, tt {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}
