/* ============================================================================
   AlphaOro typography — SINGLE SOURCE OF TRUTH
   ----------------------------------------------------------------------------
   Loaded globally by base.html. Components use the text-style CLASSES below
   (.t-section, .t-kpi, .t-body, .t-sub, .t-tablehead) — never raw
   font-size / font-family / font-weight. See CLAUDE.md "Typography".

   Rule: --font-brand (serif) is the "Weighbridge" wordmark ONLY. Everything
   else is --font-sans. Serif section headings are retired.

   Rollout: applied to the Weighbridge dashboard first (reference). Lab + Pad
   dashboards cascade next; the grep lint (scripts/check_typography.py) turns
   on CI-wide once all three are converted.
   ========================================================================= */

:root {
  /* --font-sans / --font-serif live in app.css. --font-brand aliases the
     serif face but names its ONLY sanctioned use: the wordmark. */
  --font-brand: var(--font-serif);

  /* Ink ramp for text (—ink already exists in app.css as the darkest). */
  --ink:   var(--ink, #322618);        /* body / values */
  --ink-2: #6f6250;                    /* section headings, muted */
  --ink-3: #9b8d76;                    /* sub-lines, meta, table headers */
}

/* V30.112 - the same ramp as values, for a rule a class cannot reach (a component's own <style>, a row its script repaints):
   a size and a weight are read from here, never written raw. scripts/check_typography.py holds the Liquidator to this. */
:root {
  --t-size-micro: 9px;       /* a caps tag on a tile (.t-perm-flag) */
  --t-size-tablehead: 10px;  /* .t-tablehead */
  --t-size-sub: 11px;        /* .t-sub */
  --t-size-section: 11.5px;  /* .t-section */
  --t-size-key: 12px;        /* .t-key, .t-kpi-unit */
  --t-size-body: 12.5px;     /* .t-body */
  --t-size-value: 13px;      /* a figure in a row (.t-perm-module) */
  --t-size-band: 14px;       /* .t-band */
  --t-size-row: 15px;        /* a Liquidator payment / margin row (V30.174) */
  --t-size-calc: 14px;       /* a Liquidator Buying calculation row: its labels and figures (V30.174) */
  --t-size-grade: 14px;      /* .t-grade: a figure in a Grade Vault grade box (v5) */
  --t-size-lead: 16px;       /* .t-lead: a header's value */
  --t-size-modal: 17px;      /* .t-modal-title */
  --t-size-figure: 20px;     /* .t-figure */
  --t-size-title: 22px;      /* .t-page-title */
  --t-size-kpi: 30px;        /* .t-kpi */
  --t-weight-medium: 500;
  --t-weight-demi: 600;
  --t-weight-bold: 700;
  --t-weight-heavy: 800;
}

/* Numerals line up everywhere (KPIs, tables, money). */
:root { font-variant-numeric: tabular-nums; }

/* ---- Text styles (the ONLY sanctioned type ramp) ------------------------ */

.t-section {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-2);
  margin: 0;
}

.t-kpi {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.t-kpi-sm {                      /* V29.995 - a second figure beside a KPI, the Arrivals tile's "3 trucks" */
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.t-kpi-unit {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}

.t-body {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.t-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}

.t-tablehead {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-3);
}

/* V29.715 - a chart key chip's words (the Overview's keys, on their own row under each title) */
.t-key {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

/* Role Permissions screen (V29.034) — sans throughout, per house system.
   Kept here so the component CSS carries zero raw font declarations. */
.t-perm-title  { font-family: var(--font-sans); font-size: 22px;   font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.t-perm-h2     { font-family: var(--font-sans); font-size: 18px;   font-weight: 800; letter-spacing: -0.2px; color: var(--ink); margin: 0; }
.t-perm-module { font-family: var(--font-sans); font-size: 13px;   font-weight: 700; color: var(--ink); }
.t-perm-level  { font-family: var(--font-sans); font-size: 12px;   font-weight: 800; }
.t-perm-seg    { font-family: var(--font-sans); font-size: 11.5px; font-weight: 700; }
.t-perm-cap    { font-family: var(--font-sans); font-size: 10.5px; font-weight: 500; line-height: 1.45; color: var(--ink-2); }
.t-perm-flag   { font-family: var(--font-sans); font-size: 9px;    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.t-perm-num    { font-family: var(--font-sans); font-variant-numeric: tabular-nums; }

/* V29.787 - the blend start reminder's pop-up title (static/js/blend_start_nag.js): a question the
   reader answers, so a sentence-case sans heading, not the uppercase section label. */
/* V29.790 - a page's own title (the Audit module) */
.t-page-title  { font-family: var(--font-sans); font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.t-modal-title { font-family: var(--font-sans); font-size: 17px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.25; color: var(--ink); margin: 0; }
/* a sentence that leads a section - the planning page's plan written as a sentence, a verdict's detail */
.t-lead        { font-family: var(--font-sans); font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--ink-2); }

/* V29.885 - a dashboard section's title (Buying analysis: "Ore supply", "Deals done") under its caps kicker,
   and a figure in a strip of counts beside a card's heading */
.t-display    { font-family: var(--font-sans); font-size: 24px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.2; color: var(--ink); }
.t-figure     { font-family: var(--font-sans); font-size: 20px; font-weight: 800; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }

/* V30.094 - a band's heading over its tinted panel (the Executive's lot's journey: PAD · LABS · COMMERCIAL) */
.t-band       { font-family: var(--font-sans); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-2); }

/* Grade Vault v5 (Ruan, 9 Nov 2026) - the figure in a grade box: a bag, Commercial Mean and Min, Dirimencia, Re-sample. No colour of its own:
   the box sets the dark figure, a struck or re-sample box its own. */
.t-grade      { font-family: var(--font-sans); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* The wordmark — the sole serif surface. */
.t-brand { font-family: var(--font-brand); }
