/* =====================================================================
   Calpex Plastics · Stage A v2 · Concept C3 "Cinematic Industrial"
   tokens.css — the ONE token file. Every colour, size, space, radius,
   duration, easing, z-index, aspect ratio and component dimension used by
   site.css lives here. Components reference var(--*) only (media-query
   breakpoints are the single allowed literal, per brief).
   Palette and scale: design-language.md §4.1–§4.4 + C3 overrides (§7).
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2?ver=dc6fedb86f") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500-latin.woff2?ver=62dc3fd67e") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback keeps CLS at 0 while Inter swaps in. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark light;   /* opt out of forced-dark recolouring (Samsung Internet, Chrome auto-dark) */
  /* ---------- raw palette: light (information) ----------
     Stage C carry (O1, STAGE-B-PLAN §4.2 accent model): exactly TWO owner-editable colours, the theme.json palette entries
     "Accent on light" (--c-accent) and "Accent on dark" (--c-accent-fill-dark), read --wp--preset--color--*. Every other
     colour reads --wp--custom--color--<slug> (theme.json settings.custom.color, not editable in Global Styles). The three
     accent dependents carry an @derive rule (OKLCH offsets from their owner entry): gen.py writes the hex here and emits
     the same rule as oklch(from var(--wp--preset--color--…) …) into theme.json, so an owner accent edit moves hover,
     on-dark links and the light focus ring with it (static build after `python3 _build/build.py`; WordPress live).
     The fallback hex is the single source: _build/build.py generates theme.json from it. */
  --c-white: var(--wp--custom--color--white, #FFFFFF);
  --c-steel-50: var(--wp--custom--color--steel-50, #F3F5F7);
  --c-steel-100: var(--wp--custom--color--steel-100, #E3E8ED);
  --c-steel-200: var(--wp--custom--color--steel-200, #C9D1D9);
  --c-steel-400: var(--wp--custom--color--steel-400, #7A8693);
  --c-steel-500: var(--wp--custom--color--steel-500, #5E6B78);
  --c-steel-600: var(--wp--custom--color--steel-600, #4A5866);
  --c-ink: var(--wp--custom--color--ink, #0B1520);
  --c-accent: var(--wp--preset--color--accent, #B7110C);   /* owner palette entry "Accent on light" (Global Styles) */
  --c-accent-strong: var(--wp--custom--color--accent-strong, #8F0D09);   /* @derive accent l-0.0811 c*0.8282 h-0.1 (gen.py writes the hex) */
  --c-signal: var(--wp--custom--color--signal, #0F6E8C);
  --c-confirm-bg: var(--wp--custom--color--confirm-bg, #FFF4CC);
  --c-confirm-ink: var(--wp--custom--color--confirm-ink, #5A4500);
  --c-success: var(--wp--custom--color--success, #1C7C4D);
  --c-error: var(--wp--custom--color--error, #B3261E);

  /* ---------- raw palette: dark (stage) ---------- */
  --c-void: var(--wp--custom--color--void, #05090E);
  --c-ink-2: var(--wp--custom--color--ink-2, #111C27);
  --c-graphite: var(--wp--custom--color--graphite, #16212C);
  --c-rule-dark: var(--wp--custom--color--rule-dark, #2A3744);
  --c-control-dark: var(--wp--custom--color--control-dark, #5F6C79);
  --c-text-hi: var(--wp--custom--color--text-hi, #E6EBF0);
  --c-text-mid: var(--wp--custom--color--text-mid, #A9B4BF);
  --c-text-low: var(--wp--custom--color--text-low, #8C98A4);
  --c-accent-fill-dark: var(--wp--preset--color--accent-fill-dark, #D9261C);   /* owner palette entry "Accent on dark" (Global Styles) */
  --c-accent-fill-dark-hover: var(--wp--custom--color--accent-fill-dark-hover, #E0301F);   /* @derive accent-fill-dark l+0.0196 c*0.9993 h+0.95 (gen.py writes the hex) */
  --c-accent-on-dark: var(--wp--custom--color--accent-on-dark, #FF6B6B);   /* @derive accent-fill-dark l+0.1407 c*0.8488 h-6.3 (gen.py writes the hex) */
  --c-signal-dark: var(--wp--custom--color--signal-dark, #86B9CA);
  --c-focus-dark: var(--wp--custom--color--focus-dark, #FFFFFF);

  /* ---------- scrims (graded, built from void #05090E) ---------- */
  --scrim-hero-x: linear-gradient(90deg, rgb(5 9 14 / 0.92) 0%, rgb(5 9 14 / 0.78) 30%, rgb(5 9 14 / 0.28) 56%, rgb(5 9 14 / 0) 72%);
  --scrim-hero-y: linear-gradient(180deg, rgb(5 9 14 / 0.55) 0%, rgb(5 9 14 / 0) 18%, rgb(5 9 14 / 0) 58%, rgb(5 9 14 / 0.9) 86%, rgb(5 9 14 / 1) 100%);
  --scrim-film: linear-gradient(90deg, rgb(5 9 14 / 0.86) 0%, rgb(5 9 14 / 0.5) 34%, rgb(5 9 14 / 0) 60%);
  --scrim-film-y: linear-gradient(180deg, rgb(5 9 14 / 0) 55%, rgb(5 9 14 / 0.82) 100%);
  --scrim-tile: linear-gradient(180deg, rgb(5 9 14 / 0) 40%, rgb(5 9 14 / 0.8) 100%);
  --scrim-real: linear-gradient(180deg, rgb(5 9 14 / 0.4) 0%, rgb(5 9 14 / 0) 22%, rgb(5 9 14 / 0) 62%, rgb(5 9 14 / 0.88) 100%);
  --glass-ink: rgb(11 21 32 / 0.92);
  --glass-void: rgb(5 9 14 / 0.72);
  --veil-dark: rgb(5 9 14 / 0.6);

  /* ---------- semantic aliases (light default) ---------- */
  --surface: var(--c-white);
  --surface-2: var(--c-steel-50);
  --surface-3: var(--c-steel-100);
  --text: var(--c-ink);
  --text-2: var(--c-steel-600);
  --text-3: var(--c-steel-500);
  --rule: var(--c-steel-200);
  --control: var(--c-steel-400);
  --action: var(--c-accent);
  --action-hover: var(--c-accent-strong);
  --on-action: var(--c-white);
  --link-hover: var(--c-accent);
  --annot: var(--c-signal);
  --focus: var(--wp--custom--color--focus, var(--c-accent));
  --chip-render-ink: var(--c-steel-600);
  --chip-real-bg: var(--c-ink);
  --chip-real-ink: var(--c-text-hi);

  /* ---------- typography ---------- */
  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* fluid scale, linear between 375 and 1440 (design-language §4.2) */
  --fs-mega: clamp(3.5rem, 1.035rem + 10.52vw, 10.5rem);   /* 56 -> 168 */
  --fs-hero: clamp(2.5rem, 1.444rem + 4.507vw, 5.5rem);    /* 40 -> 88  */
  --fs-h1: clamp(2.5rem, 1.796rem + 3vw, 4.5rem);          /* 40 -> 72  */
  --fs-h2: clamp(2rem, 1.56rem + 1.88vw, 3.25rem);         /* 32 -> 52  */
  --fs-h3: clamp(1.5rem, 1.324rem + 0.75vw, 2rem);         /* 24 -> 32  */
  --fs-h4: clamp(1.1875rem, 1.121rem + 0.28vw, 1.375rem);  /* 19 -> 22  */
  --fs-lead: clamp(1.125rem, 1.037rem + 0.38vw, 1.375rem); /* 18 -> 22  */
  --fs-body: clamp(1rem, 0.956rem + 0.19vw, 1.125rem);     /* 16 -> 18  */
  --fs-small: clamp(0.875rem, 0.853rem + 0.09vw, 0.9375rem); /* 14 -> 15 */
  --fs-data-xl: clamp(3rem, 1.944rem + 4.51vw, 6rem);      /* 48 -> 96  */
  --fs-data-l: clamp(2.5rem, 2.324rem + 0.75vw, 3rem);     /* 40 -> 48  */
  --fs-data-m: clamp(1.75rem, 1.53rem + 0.94vw, 2.375rem); /* 28 -> 38  */
  --fs-data: clamp(0.875rem, 0.853rem + 0.09vw, 0.9375rem); /* mono 14 -> 15 */
  --fs-label: 0.75rem;                                      /* mono caps 12 */
  --fs-tag: 0.6875rem;                                      /* render tag 11 */
  --lh-mega: 0.92;
  --lh-display: 0.98;
  --lh-hero: 1.0;
  --lh-h1: 1.02;
  --lh-h2: 1.06;
  --lh-h3: 1.15;
  --lh-h4: 1.3;
  --lh-lead: 1.5;
  --lh-body: 1.6;
  --lh-small: 1.5;
  --lh-tight: 1;
  --lh-label: 1.4;
  --fw-body: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-h3: 620;
  --fw-h2: 650;
  --fw-h1: 680;
  --fw-hero: 700;
  --fw-mega: 600;
  --tr-mega: -0.035em;
  --tr-hero: -0.02em;
  --tr-h1: -0.018em;
  --tr-h2: -0.015em;
  --tr-h3: -0.01em;
  --tr-h4: -0.005em;
  --tr-data: -0.02em;
  --tr-label: 0.08em;
  --measure: 50ch;            /* Stage C gate D1b: 66-71 characters of body text (1ch = 1.32-1.42 characters of the body face; 68ch measured 88-94) */
  --measure-lead: 40ch;
  --unit-scale: 0.6em;

  /* ---------- spacing (8 pt) ---------- */
  --s-1: 0.25rem;  /* 4 */
  --s-2: 0.5rem;   /* 8 */
  --s-3: 0.75rem;  /* 12 */
  --s-4: 1rem;     /* 16 */
  --s-5: 1.5rem;   /* 24 */
  --s-6: 2rem;     /* 32 */
  --s-7: 3rem;     /* 48 */
  --s-8: 4rem;     /* 64 */
  --s-9: 6rem;     /* 96 */
  --s-10: 8rem;    /* 128 */
  --s-11: 10rem;   /* 160 */
  --s-12: 12.5rem; /* 200 */
  --section-y: clamp(4rem, 2.592rem + 6vw, 8rem);      /* 64 -> 128 */
  --section-y-sm: clamp(3rem, 2.296rem + 3vw, 5rem);   /* 48 -> 80 */

  /* ---------- grid ---------- */
  --content: 80rem;           /* 1280 */
  --margin: 1.25rem;          /* 20 mobile */
  --margin-b: 1.25rem;        /* S2 m11: the base margin per breakpoint; --margin adds the side safe areas (D-40), see below */
  --gutter: 1rem;             /* 16 mobile */
  --cols: 4;

  /* ---------- shape ---------- */
  --radius-ui: 4px;
  --radius-media: 2px;
  --radius-pill: 999px;
  --hair: 1px;
  --stroke: 2px;
  --focus-w: 2px;
  --focus-off: 2px;

  /* ---------- component dimensions ---------- */
  --util-h: 2rem;             /* 32 */
  --bar-h: 3.5rem;            /* 56 mobile, 64 desktop */
  --subnav-h: 3rem;           /* 48 */
  --tap: 2.75rem;             /* 44 */
  --tap-min: 1.5rem;          /* 24: WCAG 2.5.8 minimum */
  --tap-l: 3.5rem;            /* 56 */
  --btn-h: 3rem;              /* 48 */
  --btn-h-l: 3.5rem;          /* 56 */
  --btn-pad: 1.375rem;
  --icon: 1.25rem;
  --icon-s: 1rem;
  --glyph: 1.5rem;
  --thumb: 4rem;              /* 64 mega menu render thumbs */
  --rail-cell-min: 10rem;
  --dock-h: 4rem;             /* mobile sticky CTA bar */
  --chipbar-h: 2.5rem;        /* 40 chapter chip bar */
  --drop-h: 11rem;
  --field-h: 3rem;
  --tile-meta-h: 5.5rem;
  --tick: 0.5rem;
  --bar-thick: 0.5rem;        /* range rows, mobile */
  --bar-thin: 0.375rem;
  --marker-w: 2px;
  --progress-h: 2px;
  --shadow-none: none;
  --blur-glass: 16px;
  --lift: -2px;
  --nudge: 4px;
  --press-scale: 0.98;
  --reveal-y: 12px;
  --mega-w: 72rem;
  --drawer-w: 100%;
  --wordmark-max: 80rem;


  /* ---------- measures, columns, misc component constants ---------- */
  --mw-hero: 13em; --mw-hero-sub: 32em; --mw-hero-t: 14em; --mw-sub: 36em; --mw-h2: 16em; --mw-line: 28em; --mw-statement: 22em;
  --mw-text: 40em; --mw-lead: 32em; --mw-rfq: 12em; --mw-hint: 26em;
  --hero-copy-w: 52rem; --thero-copy-w: 46rem; --thero-min: 36rem; --thero-max: 52rem;
  --edge: max(var(--margin), calc((100% - var(--content)) / 2));
  --cap-w: 24rem; --cue-w-m: 55%; --cue-w: 60%; --half: 50%;
  --col-label: 9rem; --col-val: 11rem; --col-obj: 14rem; --col-readout: 8rem;
  --path-thumb: 6rem; --path-body-min: 15rem;
  /* @logo:begin  generated by _build/build.py from assets/brand/logo.svg (the only file to edit for a logo swap) */
  --logo-ratio: 2.7312; --ar-wordmark: 1087 / 211;
  /* @logo:end */
  --underline-off: 0.3em; --icon-stroke: 1.75; --stroke-hair: 1; --stroke-dim: 1.5;
  --dash-cl: 8 2 2 2; --dash-len: 1200; --tr-svg: 0.06em;
  --rot-flip: 180deg; --rot-x: 45deg; --center-shift: -50%;
  --zoom-hover: 1.03; --o-glyph: 0.6; --o-dim: 0.35;
  --offscreen: -200%; --dock-off: 110%;
  --pos-die: 50% 50%; --pos-feature: 50% 56%; --pos-cut: 62% 50%; --die-plate-h: 80%; --die-plate-top: 8%; --pos-stripe: 60% 50%; --pos-morph: 50% 45%; --pos-real: 50% 60%;

  /* ---------- aspect ratios ---------- */
  --ar-scope: 2.39 / 1;   /* C3 letterbox */
  --ar-wide: 16 / 9;
  --ar-tile: 4 / 5;
  --ar-square: 1 / 1;
  --ar-photo: 3 / 2;
  --ar-drawing: 2246 / 1620;
  --hero-min: 40rem;      /* 640 */
  --hero-max: 56rem;      /* 896: the next band peeks in at 1080 tall */
  --film-max-h: 82vh;
  --hero-zoom: 125%;
  --plate-right: 4%;
  --plate-right-v: -6%;
  --plate-mask: linear-gradient(90deg, transparent 0%, #000 34%, #000 84%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  --plate-mask-top: linear-gradient(180deg, transparent 0%, #000 18%);
  --cut-plate-h: 84%; --cut-plate-top: 2%; --real-plate-h: 76%; --real-plate-top: 4%;
  --fz-stripe: 1.3; --fy-stripe: -10%;
  --sheet-offset: 0.3333;
  --thero-pos: 70% 50%;
  --thero-sub-w: 34rem;
  --hud-btn-w: 15.5rem;        /* no-JS fallback: the longest play label; site.js writes the real width */
  --hud-cap-w: 34rem;
  --hero-pad-top: clamp(2rem, 7vh, 6rem);

  /* ---------- C3 final: grafted components ---------- */
  --hud-lab-w: 19rem;         /* hero annotation label: one or two lines, no orphan */
  --hud-top: 5%;
  --fs-hero-short: clamp(3.5rem, 1rem + 4.2vw, 4.75rem); /* desktop heights <= 920 */
  --hud-dot: 3px;
  --hdrop-w: 46rem;           /* hero drop zone */
  --srch-w: 22rem;            /* header search panel (Add-on 03 fix OLD-SITE-01) */
  --map-h: 16rem;             /* contact map facade (LEADS-36) */
  --badge-w: 9rem;            /* directory badge (LEADS-37; retired in Add-on 05, unused) */
  --lb-max: 92vw;             /* gallery lightbox (OLD-SITE-21) */
  --ledger-cell-min: 11rem;
  --fam-mark-w: 3px;          /* lit row marker in the capability console */
  --v3d-w: 56rem;
  --dwg-max: 26rem;           /* end-view drawing card */
  --dw-stroke: 1.5; --dw-thin: 1; --dw-text: 11px; --dw-key: 9.5px; --xs-halo: 10px;
  --qc-bar: 0.375rem;
  --xp-frame: 32rem;          /* diameter explorer drawing */
  --xp-thumb: 1.75rem;
  --scale-max-h: 34rem;
  --print-gap: 1rem;
  --xs-text: 16px; --xs-text-s: 12px; --dash-frame: 6 4; --ar-xp: 4 / 3;
  --xp-frame-m: 38vh;         /* sticky explorer drawing on phones */
  --sc-text: 24px; --sc-stroke: 1;  /* size line-up leader labels (SVG user units) */
  --ar-thero-m: 5 / 4;        /* tubing hero, phone */
  --chrome-sub: var(--subnav-h);  /* sticky sub-bar height while it is shown */
  --fade-edge: 2.5rem;        /* overflow cue on scrolling bars */
  --fade-mask-x: linear-gradient(90deg, transparent 0, #000 var(--s-4), #000 calc(100% - var(--fade-edge)), transparent 100%);
  --fade-mask-r: linear-gradient(90deg, #000 calc(100% - var(--fade-edge)), transparent 100%);
  --upto-fade: 38%;           /* open left end of a "max only" range bar */
  --pos-gal-wide: 22% 50%;
  --xp-ratio: 0.75;           /* explorer drawing height / width (4:3) */
  --fn-gap: 0.15em;

  /* ---------- Add-on 02: factory tour (facade, decorative loop, chapters, transcript, About page) ---------- */
  --ar-portrait: 3 / 4;        /* About building photo, desktop */
  --tour-pill-h: 3.5rem;       /* facade play pill (56) */
  --tour-disc: 3rem;           /* white play disc inside the pill (48) */
  --tour-zoom: 1.02;           /* poster hover push-in */
  --tour-seek-h: 2rem;         /* transcript timestamp button (32; the h3 row gives the 44 px target) */
  --tri: polygon(0 0, 100% 50%, 0 100%);   /* play glyph for timestamp buttons */
  --scrim-tour: linear-gradient(90deg, rgb(11 21 32 / 0.9) 0%, rgb(11 21 32 / 0.8) 34%, rgb(11 21 32 / 0.72) 100%);   /* ink (#0B1520): the home tour band sits on the dark surface */
  --scrim-tour-frame: linear-gradient(180deg, rgb(5 9 14 / 0.38) 0%, rgb(5 9 14 / 0) 24%, rgb(5 9 14 / 0) 50%, rgb(5 9 14 / 0.84) 100%);
  --tour-loop-mask: linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
  --hist-dot: 0.5rem;          /* milestone marker on the history rule */

  /* ---------- motion: "line speed" ---------- */
  --dur-press: 90ms;
  --dur-micro: 160ms;
  --dur-ui: 220ms;
  --dur-tile: 240ms;
  --dur-reveal: 480ms;
  --dur-scene: 800ms;
  --dur-draw: 1200ms;
  --stagger: 60ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-scene: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-line: linear;

  /* ---------- layers ---------- */
  --z-media: 0;
  --z-scrim: 1;
  --z-content: 2;
  --z-controls: 3;
  --z-chipbar: 30;
  --z-header: 40;
  --z-dock: 45;
  --z-mega: 50;
  --z-drawer: 60;
  --z-skip: 100;
}

/* @accent-guard:begin  generated by _build/gen.py from the @derive rules above (do not edit by hand). WordPress derives the
   three accent dependents with relative colour syntax (theme.json settings.custom.color); a browser without it keeps the
   computed hex instead of an invalid colour. */
@supports not (color: oklch(from red l c h)) { :root { --c-accent-strong: #8F0D09; --c-accent-fill-dark-hover: #E0301F; --c-accent-on-dark: #FF6B6B; } }
/* @accent-guard:end */

/* ---------- breakpoint token swaps (media-query px allowed) ---------- */
@media (max-width: 359px) {
  :root {
    --margin-b: 1rem;
    --fs-mega: 3rem;      /* 48 at 320 */
    --fs-hero: 2.375rem;  /* 38 at 320 */
    --fs-h1: 2.125rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.375rem;
    --fs-data-xl: 2.75rem;
    --fs-data-l: 2.25rem;
  }
}
@media (min-width: 400px) { :root { --margin-b: 1.5rem; } }
@media (min-width: 768px) { :root { --cols: 8; --margin-b: 2.5rem; --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --cols: 12; --bar-h: 4rem; } }
@media (min-width: 1360px) { :root { --margin-b: 5rem; } }
/* D-40 / S2 mobile m11: viewport-fit=cover is set, so the page margin never falls inside a side safe area (landscape notch).
   env() is 0 everywhere else, so every layout is unchanged where there is no inset. */
:root { --margin: max(var(--margin-b), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
@media (min-width: 1536px) { :root { --plate-right-v: 5%; --plate-right: 10%; } }
/* phone: SVG annotation text renders at >= 11 CSS px (the drawings scale down with their viewBox) */
@media (max-width: 767px) { :root { --section-y: 3.5rem; --dw-key: 11.5px; --dw-text: 12px; --xs-text: 24px; --xs-text-s: 21px; --sc-text: 40px; } }
@media (max-width: 359px) { :root { --dw-key: 13.5px; --dw-text: 13.5px; --xs-text: 27px; --xs-text-s: 25px; } } /* M14: SVG keys stay >= 11 CSS px at 320 (viewBox scales them down) */

/* ---------- surface swap: dark stage ---------- */
[data-surface="dark"], [data-surface="void"] {
  --surface: var(--c-ink);
  --surface-2: var(--c-ink-2);
  --surface-3: var(--c-graphite);
  --text: var(--c-text-hi);
  --text-2: var(--c-text-mid);
  --text-3: var(--c-text-low);
  --rule: var(--c-rule-dark);
  --control: var(--c-control-dark);
  --action: var(--c-accent-fill-dark);
  --action-hover: var(--c-accent-fill-dark-hover);
  --on-action: var(--c-white);
  --link-hover: var(--c-accent-on-dark);
  --annot: var(--c-signal-dark);
  --focus: var(--c-focus-dark);
  --chip-render-ink: var(--c-text-mid);
  --chip-real-bg: var(--c-text-hi);
  --chip-real-ink: var(--c-void);
  color-scheme: dark;
}
[data-surface="void"] { --surface: var(--c-void); }
[data-surface="graphite"] {
  --surface: var(--c-graphite);
  --surface-2: var(--c-ink-2);
  --text: var(--c-text-hi);
  --text-2: var(--c-text-mid);
  --text-3: var(--c-text-low);
  --rule: var(--c-rule-dark);
  --control: var(--c-control-dark);
  --action: var(--c-accent-fill-dark);
  --action-hover: var(--c-accent-fill-dark-hover);
  --link-hover: var(--c-accent-on-dark);
  --annot: var(--c-signal-dark);
  --focus: var(--c-focus-dark);
  color-scheme: dark;
}
[data-surface="light"] {
  --surface: var(--c-white);
  --surface-2: var(--c-steel-50);
  --surface-3: var(--c-steel-100);
  --text: var(--c-ink);
  --text-2: var(--c-steel-600);
  --text-3: var(--c-steel-500);
  --rule: var(--c-steel-200);
  --control: var(--c-steel-400);
  --action: var(--c-accent);
  --action-hover: var(--c-accent-strong);
  --link-hover: var(--c-accent);
  --annot: var(--c-signal);
  --focus: var(--wp--custom--color--focus, var(--c-accent));
  --chip-render-ink: var(--c-steel-600);
  --chip-real-bg: var(--c-ink);
  --chip-real-ink: var(--c-text-hi);
  color-scheme: light;
}
[data-surface="steel"] { --surface: var(--c-steel-50); --surface-2: var(--c-white); }

@media (prefers-reduced-motion: reduce) {
  :root { --dur-reveal: 0ms; --dur-draw: 0ms; --dur-scene: 0ms; --dur-tile: 0ms; --dur-ui: 0ms; --dur-micro: 0ms; --reveal-y: 0px; }
}
html[data-motion="off"] { --dur-reveal: 0ms; --dur-draw: 0ms; --dur-scene: 0ms; --reveal-y: 0px; }

/* ===== @group G1 begin: Chrome and utility (agent-G1, Stage B B-1c). Append-only block, read by components/2NN-*.css.
   Not parsed by gen.py (it reads the first :root block only), so nothing here enters theme.json.
   Contrast (WCAG 2.2): notice label/icon colours on --surface-2: light info 5.29, success 4.76, warning 8.41, error 5.98;
   dark (ink-2) info 8.04, success 7.83, warning 15.64, error 6.21. ===== */
:root {
  --c-success-dark: var(--wp--custom--color--success-dark, #5CC28C);  /* success label on dark: 7.83 on ink-2, 7.41 on graphite */
  --c-error-dark: var(--wp--custom--color--error-dark, #FF6B6B);      /* Stage C carry: error label on dark, its own colour (was the accent-on-dark alias, so it no longer follows an accent edit) */
  --c-notice-info: var(--c-signal);
  --c-notice-success: var(--c-success);
  --c-notice-warning: var(--c-confirm-ink);
  --c-notice-error: var(--c-error);
  --notice-mark: 3px;          /* notice left rule */
  --chev-w: 1.75rem;           /* split mega trigger: chevron button width on fine pointers (28; 44 on coarse) */
  --cmp-w: 26.25rem;           /* consent card, desktop (420) */
  --sform-w: 40rem;            /* page search form (640) */
  --toc-w: 15rem;              /* "On this page" rail (240) */
  --facet-w: 12rem;            /* search facets column (192) */
  --z-banner: 55;              /* consent banner: above dock (45) and mega (50), below drawer (60) */
}
[data-surface="dark"], [data-surface="void"], [data-surface="graphite"] {
  --c-notice-info: var(--c-signal-dark);
  --c-notice-success: var(--c-success-dark);
  --c-notice-warning: var(--c-confirm-bg);
  --c-notice-error: var(--c-error-dark);
}
[data-surface="light"], [data-surface="steel"] {
  --c-notice-info: var(--c-signal);
  --c-notice-success: var(--c-success);
  --c-notice-warning: var(--c-confirm-ink);
  --c-notice-error: var(--c-error);
}
/* ===== @group G1 end ===== */

/* ===== @group G3 begin: Product and data (agent-G3, Stage B). Append-only block, read by components/4NN-*.css.
   Component tokens for assets/css/components/400-455-*.css. Kept in their own :root so gen.py (first :root) and
   theme.json are unchanged. Values reference the scale above; container-query widths (480 / 768 / 1024 px) are the
   D-03 breakpoints, the one allowed literal. */
:root {
  --chip-h: var(--tap);                 /* 44: material / feature / filter chip */
  --cell-pad-y: var(--s-3);             /* 12: data cells (playbook §08.8: 12–16) */
  --cell-pad-x: var(--s-4);             /* 16 */
  --cell-k: 6.5rem;                     /* label column of a table row shown as a card (phones) */
  --snap-w: 82%;                        /* snap-row item on phones: the next item peeks in */
  --ar-lead: 4 / 3;                     /* gallery lead image (desktop) */
  --names-col: 12rem;                   /* grouped name list: min column width */
  --mx-col: 7rem;                       /* matrix: min product-type column */
  --mx-first: 11rem;                    /* matrix: sticky first column */
  --dl-ico: 2.5rem;                     /* downloads: file icon box */
  --faq-rail: 14rem;                    /* FAQ hub: category rail */
  --pfam-thumb: 4.5rem;                 /* family card: photo-strip thumb */
  --hdr-edge: var(--hair);              /* S2 M2: the bar's bottom border; >= 1024 the utility bar's border adds one more */
  --g3-sticky-top: calc(var(--bar-h) + var(--hdr-edge));   /* sticky heads, spec box, FAQ rail/anchors sit under the visible header edge */
  --col-label-l: 12rem;                 /* spec table label column from a 768 px container (S2 m5) */
}
@media (min-width: 1024px) { :root { --hdr-edge: calc(2 * var(--hair)); } }
/* pages with the product sub-nav (T03): stick below it (sub-nav top = bar-h, height = chrome-sub + its 1 px border) */
html:has(.subnav) { --g3-sticky-top: calc(var(--bar-h) + var(--chrome-sub) + var(--hair)); }
/* ===== @group G3 end ===== */

/* ===== @group G4 begin: Forms (agent-G4, Stage B B-1c). Append-only block, read by components/5NN-*.css.
   Not parsed by gen.py (it reads the first :root only), so theme.json is unchanged. No new colours: forms use the
   palette above and the G1 notice colours (--c-notice-*). Pairs used (WCAG 2.2, computed by kit/color.py): ink on white
   18.38 (fields, labels), steel-500 on white 5.45 / on steel-50 4.99 (hints, required tag), error on white 6.54 / on
   steel-50 5.98 (messages, invalid edge), success on white 5.20, steel-400 on white 3.71 (field borders, non-text >= 3),
   ink on steel-50 16.82 (checked choice card). ===== */
:root {
  --chev-size: 0.3125rem;                 /* select chevron: two 5 px triangles, drawn in currentColor (no image request) */
  --select-chev: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  --select-pad-end: var(--s-7);           /* room for the chevron */
  --choice-h: var(--tap-l);               /* 56: radio / checkbox card */
  --step-bar-h: var(--s-1);               /* 4: one segment of the RFQ step progress */
  --aside-top: calc(var(--bar-h) + var(--s-5));   /* sticky RFQ aside sits under the header bar */
  --units-w: 6.5rem;                      /* in/mm segmented control (2 x 52) */
  --field-w-s: 9rem;                      /* short inputs: quantity unit, ZIP */
  --lf-cols: 8fr 4fr;                     /* RFQ full / sample: form + aside, desktop (§12.1 60/40 rounded to the 12-col grid) */
  --ctc-cols: 4fr 3fr 5fr;                /* contact: NAP | routes | form */
}
/* ===== @group G4 end ===== */

/* ===== @group G2 begin: Story and trust blocks (agent-G2, Stage B B-1c). Append-only block, read by components/3NN-*.css.
   Not parsed by gen.py (it reads the first :root only), so theme.json is unchanged. No new colours. Pairs used
   (WCAG 2.2, kit/color.py): text/text-2 on void 16.64/9.48, on white 18.38/7.29; white on accent-fill-dark 4.95 (dark
   CTA), on accent 6.78 (light CTA); markers signal 5.79 on white, signal-dark 9.32 on void; control borders (story
   buttons) 3.71 on white, 3.42 on ink (non-text, >= 3).
   The --cq-* caps resolve against the component (container query units): each is >= its viewport token at every real
   width from 320 up (a full-bleed band is as wide as the viewport), so it only shrinks type and side padding when the
   block sits in a narrow container (a 5/12 aside, the styleguide 375 px frame). ===== */
:root {
  --cq-margin: 6.4cqi;                  /* side padding cap: 6.4% >= --margin (16/20/24/40/80) at 320/360/400/768/1440 */
  --cq-h1: 11.2cqi;                     /* hero H1 cap: >= --fs-h1 (clamp 40->72, 34 below 360) at every width >= 320 */
  --cq-h2: 9cqi;                        /* CTA headline cap: >= --fs-h2 (clamp 32->52, 28 below 360) */
  --ar-hero-split-m: 4 / 3;             /* split hero media, phones (spec: 4:3 or 1:1) */
  --step-dot: 0.75rem;                  /* process-step marker (12) */
  --icard-box: 3rem;                    /* capability glyph box (48) */
  --case-aside-w: 20rem;                /* case-study snapshot sidebar (320) */
  --case-aside-w-l: 24rem;              /* the same from a 1280 px container (384, S2 m9) */
  --quote-photo: 3.5rem;                /* testimonial photo (56) */
  --lm-cover-w: 11rem;                  /* lead-magnet cover preview (176) */
  --ar-sheet: 210 / 297;                /* ISO A4 / letter-ish document cover */
  --story-plate-m: 78%;                 /* story plate width in the phone swipe row: the next plate peeks in */
  --trust-mark: 0.375rem;               /* trust-line square marker (6) */
  --content-l: 90rem;                   /* S2 M4: media cap from 1536 (§08.5 / §15.3.1: media up to 1440, bleed at 1920+) */
  --vw-inner: calc(100vw - 2 * var(--margin));   /* viewport minus the page margins (gallery cap from 1536) */
  --bleed-r: calc((var(--content) - 100cqi) / 2);   /* inside a full-width band container: pull media from the 1280 grid edge to the viewport edge (negative) */
}
/* ===== @group G2 end ===== */

/* ===== @group SC begin: Stage C carry (B3-COMPLETENESS §2, STAGE-B-REVIEW §6): the last literal lengths in template CSS
   (and three in component CSS) are tokens now, with the same values, so every computed value is unchanged. Append-only;
   not parsed by gen.py (it reads the first :root only), so theme.json is unchanged by this block. Documented exceptions
   that stay literal: drawing units scaled by the viewBox in T07 (critique L3; the 15px labels and the ±4px shifts are SC2
   tokens since the final gate), self-relative transform percentages (translateX(calc(var(--x) * -100%)), translateY(calc(-100% - var(--hair)))) and
   viewport units 100vh / 100svh. ===== */
:root {
  --t08-card-max: 40rem;        /* T08 industry image / glance card cap (640; the 960/1280 files are its 1.5x / 2x sources) */
  --tnbadge-w-s: 6rem;          /* T11 contact: badge in the NAP column (96; retired in Add-on 05, unused) */
  --tnbadge-w-m: 7rem;          /* the same from a 768 px container (112) */
  --mapf-pin-w: 22rem;          /* T11 contact: map facade pin card (352) */
  --fs-code: 0.9em;             /* T17 legal: inline code, relative to its line */
  --ctable-col-m: 8em;          /* T17 cookie table: 4th column minimum (desktop table layout) */
  --ctable-col-l: 12em;         /* T17 cookie table: purpose column minimum */
  --mark-top-sq: 0.6em;         /* T03 uses list: square marker on the first line */
  --mark-top-dash: 0.75em;      /* T07 pros / cons list: dash marker on the first line */
  --names-gap: 0.25em;          /* T02-m phone name rows: gap between a name and its note */
  --tag-gap: 1ch;               /* T01 3D viewer tag: gap between wrapped tag parts */
  --cmp-max-h: 85%;             /* consent card, phones: maximum height share of the viewport */
  --mix-backdrop: 94%;          /* lightbox backdrop: share of the void colour in the colour-mix */
  --lh-snug: 1.2;               /* two-line labels inside the mobile dock buttons */
}
/* ===== @group SC2 begin: Stage C final-gate fixes (stage-c/GATE-FIX.md). Append-only, same values as the literals they replace
   (computed values unchanged); not parsed by gen.py. The T07 SVG user units are tokens now too (gate X7a / S23). ===== */
:root {
  --t07-dwg-tab: 30rem;         /* T07 hero drawing card cap at 768-1023 (480) */
  --t07-dw-key: 15px;           /* T07 phone drawing labels: 15 SVG user units keep labels >= 12 CSS px from 320 */
  --t07-dw-dy: 4px;             /* T07 phone drawing: label / sub-label shift (24 units apart) */
}
/* ===== @group SC2 end ===== */
/* ===== @group SC end ===== */

/* ===== @group WS begin: wide screens and the first screen (owner Safari review 2026-11-14; DECISIONS WS-01..WS-06).
   Not parsed by gen.py (it reads the first :root only), so theme.json is unchanged (contentSize stays the 80rem base).
   1. Content column: up to 1439 px nothing changes. From 1440 px the column is no longer held at 1280 CSS px: it runs to the
      page margins up to 100rem, so the side space stays the 80 px margin up to 1760 px and grows gently after that.
   2. Whole-scale growth on big screens: from 1920 px the root size grows with the window (16 px at 1920 -> 20 px at 2560, then
      held), so type, spacing, the header and the 100rem column grow together (2000 CSS px of content at 2560). Media queries
      are unaffected (they use the initial size); the user's own browser text size still scales the whole site (% based).
   3. --bleed-r reads the real grid width once the column is fluid (it was 1280 minus the band width), so bled media still
      ends exactly at the viewport edge.
   4. --first-screen: the height of the first screen under the header (and under the product sub-nav on pages that have one).
      The opening band of the marketing pages is at least this tall on desktop (970-first-screen.css), so the band edge sits
      on the bottom of the window instead of part of the next band showing. ===== */
@media (min-width: 1440px) { :root { --content: 100rem; --content-l: calc(var(--content) + 10rem); } }
@media (min-width: 1920px) { :root { font-size: clamp(100%, 0.625vw + 25%, 125%); } }
:root {
  --bleed-r: calc((min(var(--content), 100cqi - 2 * var(--margin)) - 100cqi) / 2);
  --first-screen: calc(100vh - var(--util-h) - var(--bar-h) - var(--hdr-edge));
}
@supports (height: 100svh) { :root { --first-screen: calc(100svh - var(--util-h) - var(--bar-h) - var(--hdr-edge)); } }
html:has(.subnav) { --first-screen-sub: calc(var(--subnav-h) + var(--hair)); }
/* ===== @group WS end ===== */
