/* IBM Plex Sans is self-hosted in tokens/fonts.css (DR-15). No remote font import. */
/* ============================================================================
   KLARO PRODUCT FOUNDATION — TYPOGRAPHY

   DR-01 · DECIDED 10 Aug 2026 · option B, explicitly ratified. Measured from the shipped files at
   15px/600: Montserrat's digit advance varies 78% unless tnum is forced, and
   its tabular digits cost 13% more width than Plex ("142.0" = 45.7px vs 40.5px)
   — roughly 20px per marker row on a 360px screen. Enforcement fixes the first
   problem; nothing fixes the second.

   ROLE SPLIT (see strategy/04-design-foundation.md §2 for the argument):
     Montserrat   — brand, marketing, display, headings >=20px. UNCHANGED.
     IBM Plex Sans— product body <=18px, all tabular data, tables, charts,
                    report body, doctor and operational surfaces.

   Montserrat's geometric skeleton, wide set width and light optical weight at
   13-16px cannot carry a column of 83 aligned values. This is a role change,
   not a replacement: every visible brand moment stays Montserrat.

   TO REVERT to Montserrat-only, change one line:
     --k-font-ui: var(--k-font-brand);
   ========================================================================= */
:root{
  --k-font-brand:"Montserrat","Helvetica Neue",Arial,sans-serif;   /* @kind font */
  --k-font-ui:"IBM Plex Sans","Montserrat",system-ui,sans-serif;   /* @kind font */
  --k-font-data:"IBM Plex Sans","Montserrat",system-ui,sans-serif; /* @kind font */

  --k-fw-regular:400;   /* @kind font */
  --k-fw-text:450;      /* @kind font */ /* Plex Text, product body default */
  --k-fw-medium:500;    /* @kind font */
  --k-fw-semibold:600;  /* @kind font */
  --k-fw-bold:700;      /* @kind font */
  --k-fw-extrabold:800; /* @kind font */ /* Montserrat display only */

  /* Numerics: lining + tabular everywhere a value can be scanned in a column. */
  --k-numeric:tabular-nums lining-nums; /* @kind other */
  --k-numeric-prose:proportional-nums; /* @kind other */
  /* ---- Measure. Reading width, in CHARACTERS not pixels.
     ch is font-relative, so at 200% text scaling the line stays ~60 characters
     instead of ~120 — the accessibility reason px measure is wrong.

     Retyped as a maxWidth literal on 22 surfaces before this existed (DR-35),
     resolving to 52ch, 55ch and 65ch for the same job on different screens.
     These values NORMALISE that spread; they do not reproduce any one of it.
     Expect prose to run slightly wider than the old hand-set literals. ---- */
  --k-measure:60ch; /* @kind spacing */        /* body prose — standard band 60–75ch; authored literals ran 52–65ch */
  --k-measure-tight:32ch; /* @kind spacing */  /* display — standard band 20–35ch; authored literals ran 28–36ch */

}

/* ---- 2.1 Role classes. Each sets family, size, leading, weight, tracking. ---- */
.k-display   {font-family:var(--k-font-brand);font-size:56px;line-height:1.04;font-weight:800;letter-spacing:-.028em}
.k-h1        {font-family:var(--k-font-brand);font-size:40px;line-height:1.10;font-weight:800;letter-spacing:-.024em}
.k-h2        {font-family:var(--k-font-brand);font-size:31px;line-height:1.16;font-weight:700;letter-spacing:-.018em}
.k-h3        {font-family:var(--k-font-brand);font-size:24px;line-height:1.24;font-weight:700;letter-spacing:-.012em}
.k-h4        {font-family:var(--k-font-brand);font-size:20px;line-height:1.30;font-weight:700;letter-spacing:-.008em}
.k-h5        {font-family:var(--k-font-ui);font-size:17px;line-height:1.38;font-weight:600;letter-spacing:0}
.k-h6        {font-family:var(--k-font-ui);font-size:15px;line-height:1.42;font-weight:600;letter-spacing:.004em}

.k-body-lg   {font-family:var(--k-font-ui);font-size:18px;line-height:1.62;font-weight:450;letter-spacing:0}
.k-body      {font-family:var(--k-font-ui);font-size:16px;line-height:1.60;font-weight:450;letter-spacing:0}
.k-body-sm   {font-family:var(--k-font-ui);font-size:14px;line-height:1.56;font-weight:450;letter-spacing:.002em}

.k-label     {font-family:var(--k-font-ui);font-size:14px;line-height:1.30;font-weight:600;letter-spacing:.004em}   /* DR-34 · heading for a GROUP of fields or rows */
.k-label-sm  {font-family:var(--k-font-ui);font-size:12.5px;line-height:1.30;font-weight:600;letter-spacing:.008em} /* DR-34 · label for ONE field or datum */
.k-caption   {font-family:var(--k-font-ui);font-size:12.5px;line-height:1.46;font-weight:450;letter-spacing:.006em;color:var(--k-text-tertiary)}
.k-fine      {font-family:var(--k-font-ui);font-size:12.5px;line-height:1.50;font-weight:450;letter-spacing:.008em;color:var(--k-text-tertiary)}
/* ---- DR-34 · ratified 10 Aug 2026, option B ------------------------------
   .k-overline carried four jobs at one weight. Two of them are heading-shaped
   and two are not, so authors marked eyebrows as <h3> and the screen-reader
   outline read "Results · 12 August 2026" above the actual finding. Split into
   two named roles; the two labels that already existed finally get stated jobs.

   .k-eyebrow and .k-table-head render near-identically (11.5/700/caps, .18em
   vs .14em) and are deliberately NOT merged: they occupy disjoint contexts. An
   eyebrow never appears inside a table, a column head never above a heading.
   Merging a table concern with a page concern is the defect DR-34 undoes. */

/* Context ABOUT the heading below it. Never itself a heading. */
.k-eyebrow      {font-family:var(--k-font-ui);font-size:11.5px;line-height:1.20;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--k-text-tertiary)}
/* A heading FOR the region beneath it. Mark up as <h2>–<h4>. */
.k-section-label{font-family:var(--k-font-ui);font-size:15px;line-height:1.34;font-weight:600;letter-spacing:.002em;color:var(--k-text-primary)}

/* DEPRECATED — DR-34. Migrate: eyebrow → .k-eyebrow · section heading →
   .k-section-label · field label → .k-label-sm. Not aliased: an alias keeps the
   ambiguity permanently. Survives one minor, removed at the next major. */
.k-overline  {font-family:var(--k-font-ui);font-size:11.5px;line-height:1.20;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--k-text-tertiary)}

/* ---- 2.2 Numeric / data styles. Always tabular. ---- */
.k-value-hero{font-family:var(--k-font-data);font-size:52px;line-height:1.00;font-weight:600;letter-spacing:-.028em;font-variant-numeric:var(--k-numeric)}
.k-value-lg  {font-family:var(--k-font-data);font-size:32px;line-height:1.06;font-weight:600;letter-spacing:-.02em;font-variant-numeric:var(--k-numeric)}
.k-value     {font-family:var(--k-font-data);font-size:19px;line-height:1.20;font-weight:600;letter-spacing:-.008em;font-variant-numeric:var(--k-numeric)}
.k-value-sm  {font-family:var(--k-font-data);font-size:15px;line-height:1.20;font-weight:600;letter-spacing:0;font-variant-numeric:var(--k-numeric)}
.k-unit      {font-family:var(--k-font-ui);font-size:12.5px;line-height:1.20;font-weight:450;color:var(--k-text-tertiary)}
.k-table-cell{font-family:var(--k-font-data);font-size:15px;line-height:1.34;font-weight:450;font-variant-numeric:var(--k-numeric)}
.k-table-head{font-family:var(--k-font-ui);font-size:11.5px;line-height:1.20;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--k-text-tertiary)}
.k-axis      {font-family:var(--k-font-data);font-size:12.5px;line-height:1.10;font-weight:450;font-variant-numeric:var(--k-numeric);color:var(--k-text-tertiary)}

/* ---- 2.3 Mobile overrides. Body never shrinks; display does. ---- */
@media (max-width:599px){
  .k-display{font-size:36px;letter-spacing:-.024em}
  .k-h1{font-size:29px}
  .k-h2{font-size:24px}
  .k-h3{font-size:20px}
  .k-h4{font-size:18px}
  .k-value-hero{font-size:42px}
  .k-value-lg{font-size:27px}
}

/* ---- 2.4 Print / report. Points, not pixels. ---- */
@media print{
  .k-h1{font-size:20pt}.k-h2{font-size:16pt}.k-h3{font-size:13pt}
  .k-body{font-size:10pt;line-height:1.45}.k-body-sm{font-size:9pt}
  .k-table-cell{font-size:8.5pt}.k-table-head{font-size:7pt}
  .k-eyebrow{font-size:7pt}.k-section-label{font-size:10pt}
  .k-fine{font-size:7pt}.k-value-hero{font-size:28pt}
}

/* ---- 2.5 Compact density. Doctor and print ONLY — never a consumer default.
   Separates "smallest legible with a mouse" from the 16px touch/consumer floor. */
.k-dense .k-table-cell{font-size:13px}
.k-dense .k-table-head{font-size:10.5px}
.k-dense .k-section-label{font-size:14px}
.k-dense .k-axis{font-size:11px}
@media print{.k-table-cell{font-size:8.5pt}.k-axis{font-size:8pt}.k-fine{font-size:8pt}}

/* Measure utilities. Apply to the TEXT element, never to a layout container —
   ch resolves against that element's own font, which is the whole point. */
.k-measure{max-width:var(--k-measure)}
.k-measure-tight{max-width:var(--k-measure-tight)}
