/* ============================================================
   Zero Day Certified — TYPE SYSTEM v3  (2026-09-20)
   The shared layer. Link after style.css (and after any page <style>).
   Pair: DM Sans for language · DM Mono for evidence.
   Floor 15px · every value px · weights/colours as the page sets them.
   Part A  tokens        Part B  roles (.t-*)        Part C  style.css mapping
   Page-specific mappings live in their own file (index-v4: type-apply.css).
   ============================================================ */

/* ---------- A · tokens ---------- */
:root{
  /* size / line — the only pairs in the system */
  --t15:15px;  --l15:22px;    /* floor: body · small · label · key · nav · button · note · chrome */
  --t18:18px;  --l18:28px;    /* lead (section byline) · heading-xs */
  --t20:20px;  --l20:26px;    /* inner heading: card / step / row title · data-lg */
  --t24:24px;  --l24:32px;    /* hero lead · panel head · pull quote */
  --t32:32px;  --l32:40px;    /* stat-sm: tile values, hero metrics */
  --t48:48px;  --l48:52px;    /* closing h2 · stat-md */
  --t56:56px;  --l56:60px;    /* section h2 — one size */
  --t64:64px;  --l64:68px;    /* stat-lg: the one big number on an interior page */
  --t72:72px;  --l72:76px;    /* page h1 · split hero h1 · one-line vision h1 */
  --t92:92px;  --l92:84px;    /* stat figures (Numbers) */
  --t104:104px;--l104:100px;  /* vision hero h1 — set solid-minus (0.96) so the two lines sit tight */
  --t220:220px;--l220:176px;  /* stat counter (Numbers) — one per site */
  /* tracking */
  --k-label:1.5px; --k-0:0; --k-20:0; --k-24:-0.5px; --k-32:-0.5px; --k-48:-1px; --k-56:-1.5px; --k-64:-2px; --k-72:-2px; --k-92:-5px; --k-104:-3px; --k-220:-13px;
  /* gaps — the space below a line is set by the role above it */
  --g-4:4px; --g-8:8px; --g-16:16px; --g-32:32px; --g-48:48px; --g-64:64px;
  /* measure */
  --m-h1:880px; --m-h2:720px; --m-lead:600px; --m-text:600px;
}

/* ---------- B · roles ---------- */
.t-h1        { font-family:var(--sans); font-size:var(--t72); line-height:var(--l72); font-weight:600; letter-spacing:var(--k-72); max-width:var(--m-h1); text-wrap:balance; }
.t-h2        { font-family:var(--sans); font-size:var(--t56); line-height:var(--l56); font-weight:600; letter-spacing:var(--k-56); max-width:var(--m-h2); text-wrap:balance; }
.t-h2-close  { font-family:var(--sans); font-size:var(--t48); line-height:var(--l48); font-weight:600; letter-spacing:var(--k-48); text-wrap:balance; }
.t-panel     { font-family:var(--sans); font-size:var(--t24); line-height:var(--l24); font-weight:600; letter-spacing:var(--k-24); }
.t-title     { font-family:var(--sans); font-size:var(--t20); line-height:var(--l20); font-weight:600; letter-spacing:var(--k-20); }
.t-title-xs  { font-family:var(--sans); font-size:var(--t18); line-height:var(--l18); font-weight:600; letter-spacing:0; }
.t-row       { font-family:var(--sans); font-size:var(--t15); line-height:var(--l15); font-weight:600; letter-spacing:0; }   /* row / node title inside a dense list */
.t-lead-hero { font-family:var(--sans); font-size:var(--t24); line-height:var(--l24); font-weight:400; letter-spacing:var(--k-24); max-width:var(--m-lead); }
.t-lead      { font-family:var(--sans); font-size:var(--t18); line-height:var(--l18); font-weight:400; letter-spacing:0; max-width:var(--m-lead); }
.t-body, .t-small{ font-family:var(--sans); font-size:var(--t15); line-height:var(--l15); font-weight:400; letter-spacing:0; max-width:var(--m-text); }
.t-sub       { font-family:var(--mono); font-size:var(--t15); line-height:24px; font-weight:400; letter-spacing:0; max-width:640px; }   /* mono byline under an instrument h2 */
.t-label     { font-family:var(--mono); font-size:var(--t15); line-height:var(--l15); font-weight:400; letter-spacing:var(--k-label); text-transform:uppercase; }
.t-key       { font-family:var(--mono); font-size:var(--t15); line-height:var(--l15); font-weight:400; letter-spacing:0; }            /* sentence-case mono: ids, prefixes, notes, code */
.t-code      { font-family:var(--mono); font-size:var(--t15); line-height:24px; font-weight:400; letter-spacing:0; }
.t-data-lg   { font-family:var(--mono); font-size:var(--t20); line-height:var(--l20); font-weight:500; letter-spacing:0; font-variant-numeric:tabular-nums; }
.t-stat-sm   { font-family:var(--sans); font-size:var(--t32); line-height:var(--l32); font-weight:600; letter-spacing:var(--k-32); font-variant-numeric:tabular-nums; }
.t-stat-md   { font-family:var(--sans); font-size:var(--t48); line-height:var(--l48); font-weight:700; letter-spacing:var(--k-48); font-variant-numeric:tabular-nums; }
.t-stat-lg   { font-family:var(--sans); font-size:var(--t64); line-height:var(--l64); font-weight:700; letter-spacing:var(--k-64); font-variant-numeric:tabular-nums; }
.t-button    { font-family:var(--sans); font-size:var(--t15); line-height:15px; font-weight:600; letter-spacing:0; text-transform:none; }
.t-unit      { font-weight:400; letter-spacing:0; margin-left:4px; }
.t-stat-lg .t-unit{ font-size:var(--t24); } .t-stat-md .t-unit{ font-size:var(--t20); } .t-stat-sm .t-unit{ font-size:var(--t15); }

/* ---------- C · style.css mapping (the 9 pages that run on style.css alone) ---------- */
body{ font-size:var(--t15); line-height:var(--l15); }

/* headings */
.h1, .hero .h1{ font-size:var(--t72); line-height:var(--l72); letter-spacing:var(--k-72); font-weight:600; }
.h2{ font-size:var(--t56); line-height:var(--l56); letter-spacing:var(--k-56); font-weight:600; }
.h3, .step-body h3, .cap-card h3, .belief-card h3, .exec-card h3, .certcard .cert-name{ font-size:var(--t20); line-height:var(--l20); letter-spacing:var(--k-20); }
.h4{ font-size:var(--t18); line-height:var(--l18); letter-spacing:0; }
.team-card .nm, .contact-links .t, .check-row .cr-label, .flowline .fl-node h4, .faqq, .vf-navheader .brand2{ font-size:var(--t15); line-height:var(--l15); letter-spacing:0; }

/* leads · quotes */
.lead{ font-size:var(--t18); line-height:var(--l18); letter-spacing:0; }
.fquote blockquote{ font-size:var(--t24); line-height:var(--l24); letter-spacing:var(--k-24); }
.split .quote, .quotecard blockquote{ font-size:var(--t20); line-height:var(--l18); letter-spacing:var(--k-20); }

/* small — Sans 15/22 */
.navdropmenu a,.navdropmenu a .dd-sub,.dot-sep,.hero-stat .hs-was,.blur-lock .bl-overlay .bl-sub,.prod-frame .pf-stat-sub,.prod-frame table,.prod-frame .pf-sev,.prod-frame .pf-fadezone .pf-lock-sub,.est-line,.est-alert,.pcompare-row > div,.step-body p,.diffcard .cap,.callout,.persona-card p,.cap-card p,.price-card .desc,.price-card ul li,.tm-card .tm-sub,.faqa p,.statcell .l,.chip,.findingcard .yl,.belief-card p,.team-card .rl,.field input,.field select,.field textarea,.privacy,.contact-links .d,.footgrid .fcol a,.footgrid .fcol p,.xy-toast,.vf-desc,.gloss .gtip,.certcard .cert-scope,.check-row .cr-sub,.exec-card p,.video-slot span,.appwin .aw-row,.flowline .fl-node p,.body-md,.stage-detail .sd-txt,.pstep .t,.est-total span,.cta-door .btn-block{
  font-size:var(--t15); line-height:var(--l15); letter-spacing:0;
}

/* label — Mono 15/22 uppercase +1.5px */
.eyebrow,.brand .by,.hero-stat .hs-lbl,.prod-frame .pf-stat-lbl,.prod-frame thead th,.est-control label,.est-total-lbl,.pcompare-row.head > div,.stage-detail .sd-lbl,.callout .src,.persona-card .tag,.tension .tchip,.price-card .fbadge,.price-card .tier,.tm-card .tm-lbl,.tabbtn,.fc-lbl,.fc-vs,.cmprow .today .lbl,.cmprow .zd .lbl,.field label,.footgrid .fcol .ft,.cta-door .mono-lbl,.cta-or,.vf-step .vlbl,.gloss .gtip .gt-term,.certcard .cr .l,.trust-jump a,.exec-card .role,.resp-row .dstat .l,.pill,.statcard .sc-lbl,.xexp-btn,.diffcard .bar .badge,.verify-badge{
  font-family:var(--mono); font-size:var(--t15); line-height:var(--l15); letter-spacing:var(--k-label); text-transform:uppercase;
}
.brand .by{ font-family:'DM Mono', var(--mono); }

/* key — Mono 15/22 sentence case */
.prod-frame .pf-url, .prod-frame .pf-meta, .est-ticks, .est-control output, .step-n, .codeblock-head .cb-file, .trust-strip, .hero-fineprint, .pstep .n, .pstep .clickhint,
.diffcard .bar .file, .price-card .tokens, .fc-flow, .intmark, .stepflow, .tbd, .fquote .attrib, .belief-card .n, .belief-card .core, .team-card .ph, .contact-links .go, .footbottom,
.prototype-banner, .cli-box .prompt, .vf-navheader .links2, .vf-step .vdot, .checkrow, .gloss .gtip a, .certcard .cert-id, .check-row .cr-val, .resplabel, .evrow .evname, .evrow .evtier,
.evlegend, kbd, .kbd, .statcard .sc-trend, .appwin .aw-title, .appwin .aw-tabs, .appwin .aw-row .file, .flowline .fl-node .fl-mark, .annot, .marquee .mq-track span, .quotecard .qc-by,
.metric-sub, .cal-cap, .blur-lock .bl-overlay .bl-lbl, .prod-frame .pf-fadezone .pf-lock-lbl, .est-line strong, .step-body code{
  font-family:var(--mono); font-size:var(--t15); line-height:var(--l15); letter-spacing:0;
}
.codeblock-body, .diffcard .lines{ font-family:var(--mono); font-size:var(--t15); line-height:24px; letter-spacing:0; }

/* closing CTA — the h2-close tier (48/52), not the section tier. audit: the 640px ctaband measure set
   the section h2 at 56 into 5 lines (v4: 39px, 3 lines); 48 on a 760 measure returns it to 3. */
.ctaband .h2, .ctaband h2{ font-size:var(--t48); line-height:var(--l48); letter-spacing:var(--k-48); max-width:760px; }

/* buttons — Sans 15 600 · line-height 20 (btn-lg 22) keeps the v4 42/50px boxes */
.btn, .btn-lg, .btn-sm, .btn-link{ font-size:var(--t15); line-height:20px; letter-spacing:0; }  /* audit: 15px line-height shrank buttons 5–7px; 20 restores the v4 42px box */
.btn-lg{ line-height:22px; }  /* v4 btn-lg = 50px box */

/* stats — mono figures on the ramp */
.hero-stat .hs-val, .tm-card .tm-rate, .statcell .v, .statcard .sc-val, .price-card .amt{ font-size:var(--t32); line-height:var(--l32); letter-spacing:var(--k-32); }
.cal-num{ font-size:var(--t64); line-height:var(--l64); letter-spacing:var(--k-64); }
.est-total, .findingcard .years{ font-size:var(--t48); line-height:var(--l48); letter-spacing:var(--k-48); }
.prod-frame .pf-stat-val{ font-size:var(--t24); line-height:var(--l24); letter-spacing:var(--k-24); }
.certcard .cr .v, .resp-row .dstat .v, .exec-card .ea, .gauge .g-lbl b, .tokenmath .tm-op, .tension .tarrow{ font-size:var(--t20); line-height:var(--l20); letter-spacing:0; }

/* rhythm — eyebrow → heading 16 · heading → lead 16 · lead → content 64 */
.eyebrow{ margin-bottom:var(--g-16); }
.h1 + .lead, .h2 + .lead, .h1 + p, .h2 + p{ margin-top:var(--g-16); }

/* ≤ 860: display & stat tiers step down one stop; the 15 layer does not move */
@media (max-width:860px){
  .h1, .hero .h1{ font-size:var(--t56); line-height:var(--l56); letter-spacing:var(--k-56); }
  .h2{ font-size:var(--t48); line-height:var(--l48); letter-spacing:var(--k-48); }
  .cal-num{ font-size:var(--t48); line-height:var(--l48); letter-spacing:var(--k-48); }
  .est-total, .findingcard .years{ font-size:var(--t32); line-height:var(--l32); letter-spacing:var(--k-32); }
}

/* ---------- inline floor guard: hand-set font-sizes in markup (9–19px) are lifted to the floor. Headline elements exempt. ---------- */
:not(h1):not(h2):not(.h1):not(.h2)[style*="font-size:9"], :not(h1):not(h2):not(.h1):not(.h2)[style*="font-size: 9"],
:not(h1):not(h2):not(.h1):not(.h2)[style*="font-size:1"]:not([style*="font-size:1"][style*="0px"][style*="font-size:10"]):not([style*="font-size:2"]),
:not(h1):not(h2):not(.h1):not(.h2)[style*="font-size: 1"]{ font-size:var(--t15) !important; line-height:var(--l15) !important; }
.xy-ms-lbl{ font-size:var(--t15); line-height:15px; }

/* ---------- widows: never, anywhere. Headings and short items balance; running text uses the pretty algorithm. ---------- */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .hv-head, .t-h1, .t-h2, .t-h2-close, .t-panel, .t-title, blockquote, .split .quote, .fquote blockquote, .quotecard blockquote{ text-wrap:balance; }
p, li, dd, figcaption, .lead, .body-md, .t-lead, .t-lead-hero, .t-body, .t-small, .t-sub, .t-key, .t-code, .hv-sub, .callout, .cap-card p, .belief-card p, .price-card .desc, .exec-card p, .persona-card p, .faqa p{ text-wrap:pretty; }
/* headline guard: hand-set sizes on headings snap to the tier */
h1[style*="font-size"], .h1[style*="font-size"]{ font-size:var(--t72) !important; line-height:var(--l72) !important; letter-spacing:var(--k-72) !important; }
h2[style*="font-size"], .h2[style*="font-size"]{ font-size:var(--t56) !important; line-height:var(--l56) !important; letter-spacing:var(--k-56) !important; }
@media (max-width:860px){
  h1[style*="font-size"], .h1[style*="font-size"]{ font-size:var(--t56) !important; line-height:var(--l56) !important; letter-spacing:var(--k-56) !important; }
  h2[style*="font-size"], .h2[style*="font-size"]{ font-size:var(--t48) !important; line-height:var(--l48) !important; letter-spacing:var(--k-48) !important; }
}

/* ---------- containers sized for the old type: the section head measure follows the h2 (720), not the old 54ch of 13px body ---------- */
.section-head{ max-width:720px; }
.section-head .h2{ margin-top:var(--g-16); }
/* ≤ 600: a second step for the section h2 so short headlines hold one line in a phone-width column */
@media (max-width:600px){
  .h2, .hv-head, .t-h2{ font-size:40px; line-height:44px; letter-spacing:-1px; }
  h2[style*="font-size"], .h2[style*="font-size"]{ font-size:40px !important; line-height:44px !important; letter-spacing:-1px !important; }
}
/* headline guard, refined: an h2 hand-set at 10–29px is a panel head, not a section headline → panel role 24/32 */
h2[style*="font-size:1"], .h2[style*="font-size:1"], h2[style*="font-size:2"], .h2[style*="font-size:2"],
h2[style*="font-size: 1"], .h2[style*="font-size: 1"], h2[style*="font-size: 2"], .h2[style*="font-size: 2"]{
  font-size:var(--t24) !important; line-height:var(--l24) !important; letter-spacing:var(--k-24) !important;
}
