/* WordOfBot design tokens. Direction A, "Lab report" (D-dir-1).

   The single source of colour, type, space and radius (D-arch-3). No hex or
   rgb literal may appear in any other stylesheet or page, privacy.html
   included. Sizes are measured from the approved Direction A canvas at 1440
   and 412 wide; fluid values interpolate linearly between those two widths.

   Rust means "about you": the mark, the CTA and the reader's own chip.
   Nothing else on the page is rust.

   Outside this file, --paper is also carried by the theme-color meta
   (D-rule-2), theme_color / background_color in site.webmanifest, and the
   solid backgrounds of apple-touch-icon.png and icon-maskable-512.png
   (generated from this token). The checker asserts the meta and the manifest. */

/* ── Font: one self-hosted variable woff2 (D-arch-2, amended 2026-10-08) ──
   @fontsource-variable/instrument-sans 5.3.0, latin subset, axes
   wght 400..700 and wdth 75..100. SIL OFL 1.1, see fonts/OFL.txt.
   font-display: optional. With swap, a slow font reflowed lines at the swap
   (CLS 0.0002-0.03 measured); optional never swaps mid-view, so CLS is 0.
   The preload means the real font is in hand for nearly every first view. */
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wdth-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: optional;
  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;
}

/* Metric-matched fallbacks, so the swap to the web font moves nothing (CLS 0).
   size-adjust = rendered width of this site's own copy in the Instrument Sans
   instance / its width in the local face, measured in Chromium with kerning
   (batch 1; the batch 0 letter-frequency estimate ignored kerning and ran
   about 1% wide, which reflowed words at the swap). Vertical overrides =
   Instrument Sans typo metrics (USE_TYPO_METRICS: 970 / -250 / 0 per 1000) /
   size-adjust. Helvetica shares Arial's advance widths, so one face serves both.

   Text: wght 400 wdth 100 on Arial, 99 text blocks: 101.64%. */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  font-weight: 400;
  size-adjust: 101.64%;
  ascent-override: 95.43%;
  descent-override: 24.60%;
  line-gap-override: 0%;
}

/* Strong text: wght 650 wdth 100 on Arial Bold, 31 text blocks: 99.11%. */
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"),
    local("Helvetica-Bold");
  font-weight: 500 700;
  size-adjust: 99.11%;
  ascent-override: 97.87%;
  descent-override: 25.22%;
  line-gap-override: 0%;
}

/* Display: wght 700 wdth 78 (0.37135 em) on Arial Bold (0.47735 em). The
   condensed cut is far narrower than any local face, so it gets its own. */
@font-face {
  font-family: "Instrument Sans Display Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"),
    local("Helvetica-Bold");
  font-weight: 700;
  size-adjust: 77.79%;
  ascent-override: 124.69%;
  descent-override: 32.14%;
  line-gap-override: 0%;
}

:root {
  /* ── Colour, by role ── */
  --paper:       #f6f5f1;  /* page background; theme-color follows it */
  --ink:         #16150f;  /* primary text, borders, hard shadow, meter fill */
  --ink-2:       #3d3a33;  /* secondary text */
  --muted:       #5f5b52;  /* notes, captions, source lines */
  --chip-ink:    #4f4b43;  /* measurement chip text */
  --rule:        #dcd9d0;  /* section rules, compact card border */
  --chip-border: #c9c5ba;
  --hairline:    #e3e0d8;  /* dividers inside a card */
  --track:       #ecebe5;  /* meter track */
  --card:        #ffffff;  /* scorecard surface */
  --rust:        #b0401f;  /* "about you": mark, CTA, the reader's own chip */
  --rust-ink:    #8f3319;  /* rust text on light, CTA hover */
  --rust-tint:   #fbece6;  /* the reader's own chip background */
  --band:        #121210;  /* the kept dark section */
  --band-ink:    #f2efe8;  /* primary text on band */
  --band-muted:  #c8c3b6;  /* secondary text on band */
  --on-rust:     #ffffff;  /* CTA label */
  --grid-line:   rgb(22 21 15 / 0.045);  /* --ink at 4.5%: hero background grid */

  /* ── Type ── */
  --font-sans: "Instrument Sans", "Instrument Sans Fallback", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Instrument Sans", "Instrument Sans Display Fallback",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;

  /* Sizes: 412 value / 1440 value, from the canvas. */
  --fs-h1:          clamp(2.75rem, 1.898rem + 3.307vw, 4.875rem);   /* 44 / 78 */
  --fs-band:        clamp(2rem, 1.399rem + 2.335vw, 3.5rem);        /* 32 / 56 */
  --fs-h2:          clamp(2rem, 1.599rem + 1.556vw, 3rem);          /* 32 / 48 */
  --fs-figure:      clamp(3.5rem, 3.099rem + 1.556vw, 4.5rem);      /* 56 / 72 */
  --fs-figure-sm:   clamp(3rem, 2.599rem + 1.556vw, 4rem);          /* 48 / 64 */
  --fs-figure-of:   1.75rem;                                         /* 28 */
  --fs-band-sub:    clamp(1.125rem, 0.9747rem + 0.5837vw, 1.5rem);  /* 18 / 24 */
  --fs-wordmark:    clamp(1.25rem, 1.15rem + 0.3891vw, 1.5rem);     /* 20 / 24 */
  --fs-card-title:  1.375rem;                                        /* 22 */
  --fs-lede:        clamp(1.0625rem, 0.9874rem + 0.2918vw, 1.25rem); /* 17 / 20 */
  --fs-cta:         clamp(1.0625rem, 1.037rem + 0.09728vw, 1.125rem); /* 17 / 18 */
  --fs-body:        1rem;                                            /* 16 */
  --fs-label:       0.9375rem;                                       /* 15 */
  --fs-meter:       0.8125rem;                                       /* 13, mono */
  --fs-note:        clamp(0.78125rem, 0.7687rem + 0.04864vw, 0.8125rem); /* 12.5 / 13 */
  --fs-chip:        clamp(0.6875rem, 0.6625rem + 0.09728vw, 0.75rem);  /* 11 / 12, mono */
  --fs-sup:         0.75rem;                                         /* 12 */
  --fs-small:       clamp(0.8125rem, 0.7874rem + 0.09728vw, 0.875rem); /* 13 / 14 */
  --fs-header-btn:  1rem;                                            /* phone 15 */

  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-strong:  650;
  --fw-bold:    700;

  --stretch-display: 78%;

  --lh-display: 0.96;
  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-lede:    1.55;
  --lh-body:    1.6;

  --tracking-display:  -0.025em;
  --tracking-wordmark: -0.02em;
  --tracking-chip:     0.06em;

  /* ── Space ── */
  --sp-1: 0.25rem;   /*  4 */
  --sp-2: 0.5rem;    /*  8 */
  --sp-3: 0.75rem;   /* 12 */
  --sp-4: 1rem;      /* 16 */
  --sp-5: 1.5rem;    /* 24 */
  --sp-6: 2rem;      /* 32 */
  --sp-7: 3rem;      /* 48 */
  --sp-8: 4rem;      /* 64 */
  --sp-9: 6rem;      /* 96 */

  --container:     1280px;
  --gutter:        clamp(1rem, 0.3988rem + 2.335vw, 2.5rem);       /* 16 / 40 */
  --header-pad:    clamp(1.125rem, 0.8745rem + 0.9728vw, 1.75rem); /* 18 / 28 */
  --hero-pad-top:  clamp(2rem, 1.399rem + 2.335vw, 3.5rem);        /* 32 / 56 */
  --hero-pad-bot:  clamp(2.5rem, 1.698rem + 3.113vw, 4.5rem);      /* 40 / 72 */
  --hero-gap:      clamp(2rem, 0.9981rem + 3.891vw, 4.5rem);       /* 32 / 72 */
  --card-pad:      clamp(1.375rem, 1.175rem + 0.7782vw, 1.875rem); /* 22 / 30 */
  --card-pad-sm:   1.625rem;                                        /* 26 */
  --hero-stack:    clamp(1.125rem, 0.8244rem + 1.167vw, 1.875rem);  /* 18 / 30 */
  --hero-card-offset: 5.25rem;  /* 84: where the centred card sat at 1440, note closed */
  --grid-step:     24px;                                            /* 32 on desktop */
  --pad-btn:       18px 30px;
  --pad-btn-sm:    13px 22px;                                       /* phone 12 16 */
  --pad-chip:      6px 10px;
  --gap-chip:      8px;
  --gap-compact:   28px;

  /* ── Fixed sizes ── */
  --mark:          clamp(1.75rem, 1.6rem + 0.5837vw, 2.125rem);    /* 28 / 34 */
  --mark-card:     22px;
  --tap-min:       44px;
  --meter-label:   92px;
  --meter-value:   44px;
  --meter-height:  10px;
  --figure-col:    170px;

  /* ── Radius ── */
  --r-chip:        6px;
  --r-meter:       5px;
  --r-header-btn:  10px;
  --r-button:      12px;
  --r-card-sm:     14px;
  --r-card:        16px;

  /* ── Elevation: hard offset shadow, no blur ── */
  --shadow-x:    clamp(0.375rem, 0.2748rem + 0.3891vw, 0.625rem);  /* 6 / 10 */
  --shadow-card: var(--shadow-x) var(--shadow-x) 0 var(--ink);
}

@media (min-width: 720px) {
  :root {
    --grid-step: 32px;
  }
}

@media (max-width: 559px) {
  :root {
    --pad-btn-sm:   12px 16px;
    --fs-header-btn: 0.9375rem;
  }
}
