/* tensorhaze site kit: th.css
   One stylesheet for every Study, Tool, Writing and About page. Static, no framework, no runtime font requests.
   Order: tokens (generated from design/system/tokens.css) > fonts > @layer th-base, th-layout, th-parts > calm and accessibility fallbacks.
   Page-specific CSS is unlayered, so it always wins over anything here without specificity fights.
   Rules this file enforces: Outfit 300 only at 56 px and above, 400 at 24 px and above, never Outfit below 24 px;
   nothing below 12 px; no weight above 500; one achromatic focus ring; no backdrop-filter; chrome is ink. */

/* tokens:start (generated by design/system/sync-tokens.py; do not edit here) */
/* tensorhaze design tokens: one source for the site, the Library island, every app and the canvas. @version 1.9.0 (16 Nov 2026: Tensorhaze Sans is the UI and body face; body tracking +0.01em)
   Edit this file only. `python3 design/system/sync-tokens.py` writes tokens.json, dist/tokens.ts, dist/TensorhazeTokens.swift
   and the token block of site/kit/th.css from it.
   Rule of thumb: spectral colour lives in the matter (film, particles, cover residue); chrome stays achromatic.
   Inside an app, one restrained accent (--th-accent-<app>) marks selected and active states; everything else stays ink. */
:root {
  /* Ground: depth is a step in luminance, never a shadow */
  --th-void: #08080B;  --th-base: #0B0A0F;  --th-surface-1: #0E0D12;  --th-surface-2: #131218;  --th-surface-3: #1A1821;
  /* Ink ladder (never pure white). Tertiary only at 14 px+ and never for essential text */
  --th-ink: #F4F3F7;  --th-ink-2: #B7B4C2;  --th-ink-3: #7C7889;
  --th-hairline: rgba(244, 243, 247, .06);  --th-hairline-strong: rgba(244, 243, 247, .10);
  /* Control edges (input, switch track, check ring, segmented edge) must reach 3:1 against their ground; hairlines (1.26:1) do not.
     ink-3 on surface-1 is 4.52:1. Hairlines stay for containers and dividers only. */
  --th-control-line: var(--th-ink-3);
  --th-fill-ghost: rgba(244, 243, 247, .06);  --th-nav-tint: rgba(8, 8, 11, .72);  --th-nav-tint-scrolled: rgba(8, 8, 11, .92);
  /* Tensor Spectral: the film grade (concepts/src/grade_tensor_spectral.py). Matter only, never chrome */
  --th-approach: #2F6BFF;  --th-violet: #7A3CFF;  --th-violet-mid: #8B5CFF;  --th-recede: #FF2A8A;  --th-core: #FF9A3C;  --th-white-gold: #FFF4DC;
  /* Tools in spectral order, approach to recede (OKLCH middle stops). Matter only: residue dust and plate rims, never text or chrome.
     Lowest non-text contrast on void is 3.48:1, so these never carry meaning alone. A tool plate's own rim takes the tool's app accent (--th-accent-<app>), not these;
     tool pages still redefine these six page-locally as a cold ramp (build.py): a known deviation, not a rule. */
  --th-tool-1: #2F6BFF;  --th-tool-2: #5C56FF;  --th-tool-3: #7A3CFF;  --th-tool-4: #8B5CFF;  --th-tool-5: #CF43D6;  --th-tool-6: #FF2A8A;
  /* App accents (decided 6 Oct 2026): one per app, its established hue, used sparingly for selected/active states, small highlights
     and identity details. Never a filled primary, never body text, never the focus ring. Each is >= 4.4:1 on void and >= 3.8:1 on surface-3. */
  --th-accent-amethyst: #C9AEF7;  --th-accent-basalt: #6095FA;  --th-accent-timezones: #FF8B66;
  --th-accent-citrine: #E8A33D;  --th-accent-cloud-canvas: #38BDF8;  --th-accent-redirector: #3FD0B0;
  /* GMarks (29 Oct 2026): its Iris edge on graphite, 7.2:1 on void and 6.3:1 on surface-3. Its deeper Iris ramp (#6234A5 to #37135F) is the filled-primary register of that app, an app-specific exception recorded in apps/gmarks.md, not a system accent. */
  --th-accent-gmarks: #B388E3;
  /* Library island: zero-cast graphite, warm white, one blue for marks (progress, active, selection) */
  --lib-ground: #0E0E0F;  --lib-surface: #111112;  --lib-raised: #1D1D20;  --lib-ink: #F7F7F9;  --lib-mark: #0A84FF;
  /* Focus: the same achromatic ring everywhere, including the Library */
  --th-focus: 0 0 0 2px var(--th-void), 0 0 0 4px var(--th-ink);  --th-focus-width: 2px;  --th-focus-offset: 3px;
  /* Type: Outfit for display (24 px+; weight 300 only at 56 px+), Tensorhaze Sans (our own face, 16 Nov 2026: Inter 4.1 with the I and l disambiguated, real optical-size axis 14-32, tuned by the font workshop) for UI and body, Geist Mono for machine data only, Literata for reading in the Library. Geist stays as the fallback. */
  --th-font-display: Outfit, 'Helvetica Neue', system-ui, sans-serif;
  --th-font-ui: 'Tensorhaze Sans', Geist, 'Helvetica Neue', system-ui, sans-serif;
  --th-font-data: 'Geist Mono', ui-monospace, monospace;
  --th-font-read: Literata, Georgia, serif;
  --th-display: 300 clamp(56px, 6.2vw, 88px)/1.04 var(--th-font-display);  --th-display-track: -0.032em;  /* 300 never renders below 56 px */
  --th-display-sm: 400 clamp(36px, 11vw, 55px)/1.06 var(--th-font-display);  /* the 400 variant for phones, where 56 px is too wide: use below 640 px */
  --th-chapter: 400 clamp(40px, 5.2vw, 76px)/1.04 var(--th-font-display);  --th-chapter-track: -0.03em;  /* Horizon-scale chapter heads */
  --th-section: 400 clamp(30px, 3.4vw, 44px)/1.1 var(--th-font-display);  --th-section-track: -0.028em;
  --th-title: 400 24px/1.2 var(--th-font-display);  --th-title-track: -0.02em;
  --th-body: 400 17px/1.55 var(--th-font-ui);  --th-body-track: 0.01em;  /* font workshop engine: +1.2% at 14 px and below, easing to -2.5% at 56 px; 17 px lands at +1.0% */
  --th-type-heading: 500 17px/1.4 var(--th-font-ui);  /* card and row titles: between the title and the body */
  --th-small: 400 14px/1.5 var(--th-font-ui);
  --th-caption: 400 12px/1.4 var(--th-font-ui);  /* the floor: nothing smaller */
  --th-label: 500 12px/1.3 var(--th-font-ui);  --th-label-track: 0.11em;  /* uppercase */
  --th-data: 400 12px/1.4 var(--th-font-data);
  /* Shape (design/system/shape-and-gradients.md): pill for every control, concentric continuous corners for containers, nothing between 0 and 16 px */
  --th-r-pill: 999px;  --th-r-sheet: 40px;  --th-r-card: 32px;  --th-r-inner: 24px;  --th-r-min: 16px;   /* +8 per step: sheet 40 holds a 24 inset child at 16, card 32 holds an 8 inset child at 24, inner 24 holds an 8 inset child at 16 */
  /* Retired names, aliased for one release: new code uses --th-r-* */
  --th-radius-pill: var(--th-r-pill);  --th-radius-card: var(--th-r-card);  --th-radius-plate: var(--th-r-card);
  --th-radius-lg: var(--th-r-card);  --th-radius-md: var(--th-r-inner);  --th-radius-sm: var(--th-r-min);
  /* Wordmark gradients. One per screen; the section owns it: Home spectral, Studies doppler, Writing and Library redshift, Tools approach.
     Each has an sRGB fallback here and the exact oklab version in the @supports block below. Matter and wordmark only, never chrome or labels. */
  --th-grad-spectral: linear-gradient(100deg, #2F6BFF 0%, #8B5CFF 38%, #FF2A8A 70%, #FFB547 100%);
  --th-grad-doppler: linear-gradient(100deg, #2F6BFF 0%, #525DFF 8.3%, #5F6CFF 16.7%, #658DFF 25%, #83AFFB 33.3%, #C1D3EF 41.7%, #FFF4DC 50%, #FFC085 58.3%, #FF904C 66.7%, #FF6E6D 75%, #FF4184 83.3%, #EB3BAA 91.7%, #CF43D6 100%);
  --th-grad-redshift: linear-gradient(100deg, #FFF4DC 0%, #FFDFAE 8.3%, #FFC97C 16.7%, #FFB24B 25%, #FF9863 33.3%, #FF7B74 41.7%, #FF5A80 50%, #FE2C8B 58.3%, #E845A4 66.7%, #D152BC 75%, #BB59D2 83.3%, #A35CE9 91.7%, #8B5CFF 100%);
  --th-grad-approach: linear-gradient(100deg, #1FC8FF 0%, #20B3FF 8.3%, #239DFF 16.7%, #2886FF 25%, #2E6DFF 33.3%, #4962FF 41.7%, #5C58FF 50%, #6B4CFF 58.3%, #783FFF 66.7%, #8D42F6 75%, #A345EC 83.3%, #B946E1 91.7%, #CF43D6 100%);
  --th-grad-ring: linear-gradient(100deg, #2F6BFF 0%, #5C67FF 8.3%, #7A61FF 16.7%, #9F5DEC 25%, #D550B7 33.3%, #FF5A80 41.7%, #FFF4DC 50%, #FF5A80 58.3%, #D550B7 66.7%, #9F5DEC 75%, #7A61FF 83.3%, #5C67FF 91.7%, #2F6BFF 100%);
  --th-grad: var(--th-grad-spectral);   /* the screen's own gradient: a section or page sets it to one of the five above */
  /* Logo v1.1 (v1 approved by Igor 6 Oct 2026; v1.1 makes the crisp glass render the baseline and supersedes the soft one; open for refinement). Source of truth: design/system/logo/LOGO-SPEC.md; assets in design/system/logo/.
     The mark's own gradient, thick end (deep royal violet) to thin end (soft gold), 13 anchors interpolated in oklab. It belongs to the
     logo only: it does not replace Spectral or any section gradient, and never colours chrome or text. The sRGB fallback is the flat SVG's own stops. */
  --th-logo-1: #3A1CC0;  --th-logo-2: #4F29E0;  --th-logo-3: #6B35EE;  --th-logo-4: #8744F2;  --th-logo-5: #A24FEE;  --th-logo-6: #BC52DF;  --th-logo-7:
  #D44FC9;  --th-logo-8: #E946AB;  --th-logo-9: #F4478C;  --th-logo-10: #FA5C75;  --th-logo-11: #FF7B65;  --th-logo-12: #FF9D58;  --th-logo-13: #FFBC52;
  --th-grad-logo: linear-gradient(90deg, #3A1CC0 0%, #4925DA 6.25%, #5D30E8 12.5%, #7238F0 18.75%, #8744F2 25%, #9B4DF0 31.25%, #AF51E8 37.5%, #C252DA 43.75%, #D44FC9 50%, #E547B3 56.25%, #EE479B 62.5%, #F64985 68.75%, #FA5C75 75%, #FE7369 81.25%, #FF8C5E 87.5%, #FFA556 93.75%, #FFBC52 100%);
  /* Geometry, as fractions of the canvas width (1000-unit canvas): ring radius, thickest and thinnest stroke, the hole's offset angle (up and
     to the right), the optical shift to the right, wordmark width and tracking (TENSORHAZE, Outfit 300, caps), and where the wordmark's
     gradient starts on the palette. Cover: ring radius on an Apple Music cover and its flat background (dark only; violet recommended). */
  --th-logo-ring-r: 0.3;  --th-logo-ring-thick: 0.04;  --th-logo-ring-thin: 0.0018;  --th-logo-hole-angle: 24deg;  --th-logo-optical-shift: 0.01;
  --th-logo-wordmark-w: 0.38;  --th-logo-wordmark-track: 0.18em;  --th-logo-wordmark-from: 0.18;
  --th-logo-cover-ring-r: 0.25;  --th-logo-cover-bg: #1E0B40;  --th-logo-cover-plum: #2B0E3E;  --th-logo-cover-graphite: #1B1618;
  /* Proposed, not tested: clear space around the ring (fraction of the ring radius) and the smallest ring diameter that keeps the wordmark;
     below it use the ring-only mark. */
  --th-logo-clear: 0.25;  --th-logo-min-lockup: 160px;
  --th-control-h: 44px;  --th-control-h-dense: 40px;  --th-circle: 44px;  --th-circle-media: 60px;
  /* App shell (the tools' own screens): dense rows, inset fields, toasts. design/system/apps/README.md */
  --th-row-h: 40px;  --th-row-h-dense: 36px;  --th-field-inset: inset 0 0 12px rgba(0, 0, 0, .25);  --th-toast-ms: 6000ms;
  --th-plate-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35);  /* at most one per screen */
  /* Spacing: a 4 pt scale. Use these steps for padding, gaps and margins; native apps read the same numbers (points). */
  --th-space-1: 4px;  --th-space-2: 8px;  --th-space-3: 12px;  --th-space-4: 16px;  --th-space-5: 20px;  --th-space-6: 24px;
  --th-space-8: 32px;  --th-space-10: 40px;  --th-space-12: 48px;  --th-space-16: 64px;  --th-space-20: 80px;  --th-space-24: 96px;
  /* Layout */
  --th-gutter: 16px;  --th-measure: 66ch;  --th-nav-h: 68px;  --th-wrap: 1240px;
  /* Stacking scale (skip link, sheet, header, overlays); nothing else uses a z-index above 5 */
  --th-z-overlay: 6;  --th-z-header: 8;  --th-z-sheet: 9;  --th-z-skip: 20;
  /* Chapter ambience (1.8.0, RESERVED: no kit stylesheet or page paints these yet): nebula washes on near-black, one per chapter, following Spectral. Each is three radial-gradient stops at low alpha, painted once on a
     fixed or absolute layer behind the chapter, never animated (at most a slow translate of the layer). Seeds are the owner's atlas page: indigo #312e81, magenta #701a4d.
     Chapters: Home Spectral, Studies Doppler, Tools Cold Approach, Writing and Library Redshift. They are matter-level colour: never behind small text without a scrim, never on controls. */
  --th-nebula-indigo: #312e81;  --th-nebula-magenta: #701a4d;
  --th-ambient-spectral: radial-gradient(1200px 520px at 20% -10%, rgba(49, 46, 129, .62), transparent 60%), radial-gradient(900px 520px at 110% 20%, rgba(112, 26, 77, .48), transparent 55%), radial-gradient(760px 480px at 50% 118%, rgba(255, 154, 60, .07), transparent 60%);
  --th-ambient-doppler: radial-gradient(1200px 520px at 12% -12%, rgba(49, 46, 129, .62), transparent 60%), radial-gradient(900px 560px at 108% 26%, rgba(112, 26, 77, .40), transparent 56%), radial-gradient(760px 460px at 30% 118%, rgba(47, 107, 255, .11), transparent 60%);
  --th-ambient-cold: radial-gradient(1200px 520px at 16% -10%, rgba(49, 46, 129, .72), transparent 60%), radial-gradient(900px 520px at 106% 22%, rgba(31, 200, 255, .09), transparent 56%), radial-gradient(800px 480px at 60% 118%, rgba(122, 60, 255, .15), transparent 60%);
  --th-ambient-redshift: radial-gradient(1100px 520px at 86% -12%, rgba(112, 26, 77, .58), transparent 58%), radial-gradient(900px 560px at -6% 32%, rgba(49, 46, 129, .34), transparent 56%), radial-gradient(760px 440px at 42% 118%, rgba(255, 181, 71, .07), transparent 60%);
  --th-ambient: var(--th-ambient-spectral);   /* the page's own wash: a chapter sets it to one of the four above */
  /* Glass (1.8.0): floating chrome only, at most two surfaces on a screen: the app tab bar and the Library filter dock. Each draws its glass on a ::before layer behind its controls,
     built from these tokens. Never content, never on another glass layer. The header is a tint without blur, and the "On this page" pill is a plain opaque dark pill: neither is glass.
     Elevation is by luminance, so the glass carries no drop shadow (--th-glass-shadow-none): a 72% tint, a blur-and-saturate backdrop and a rim whose top-left edge is the brighter one.
     Calm mode, reduced transparency, Save-Data and a browser without backdrop-filter swap the tint for --th-glass-bg-solid and draw no blur, so the surface stays legible.
     The tint never goes thinner than .61 on dark: text on it holds 4.5:1. */
  --th-glass-bg: rgba(16, 15, 21, .72);  --th-glass-bg-solid: rgba(19, 18, 24, .96);  --th-glass-blur: 22px;  --th-glass-saturate: 180%;
  --th-glass-rim: inset 1px 1px 0 rgba(244, 243, 247, .26), inset -1px -1px 0 rgba(244, 243, 247, .07), inset 0 0 0 1px rgba(244, 243, 247, .07);
  --th-glass-shadow-none: 0 0 0 0 transparent;
  /* App tile and plate identity (1.8.0): the app tile is a 64 px squircle (radius 18, continuous) with the tool's own glyph, a rim tinted by its accent (--th-tile-rim of the accent) and a small status dot.
     --th-plate-rim and --th-plate-rim-lit are the Home tool plate's rim (1.8.1: its shipped values): 24% of the accent at the edge of the lit area, 92% under the pointer. RESERVED: the Home plate still carries them as page-local literals. */
  --th-r-tile: 18px;  --th-tile: 64px;  --th-tile-rim: 42%;  --th-plate-rim: 24%;  --th-plate-rim-lit: 92%;
  /* Reveal and carousel (1.8.0, RESERVED: no page consumes these four): the index stagger (set --i per card, 64 ms apart, at most six steps) and a carousel slide of 24 px that fades toward the direction of travel.
     What ships on the kit pages is .th-reveal: one fade-up of 12 px over --th-dur-enter on --th-ease-decay, with no stagger. */
  --th-reveal-step: 64ms;  --th-reveal-steps: 6;  --th-slide: 24px;  --th-slide-dur: 420ms;
  /* Figures (1.8.0, values aligned to the shipped figures in 1.8.1; th.css still holds them as literals): hairlines 1.25 px, one lit path at 1.75 px, numbered callouts of 24 px. */
  --th-fig-line: 1.25px;  --th-fig-line-lit: 1.75px;  --th-fig-callout: 24px;
  /* Text over media (1.8.0, RESERVED as tokens: the Home page draws the same bottom scrim inline): the scrim sits behind the text, over the film or image, and holds AA on every frame. */
  --th-scrim-top: linear-gradient(180deg, rgba(8, 8, 11, .72), rgba(8, 8, 11, 0));  --th-scrim-bottom: linear-gradient(0deg, rgba(8, 8, 11, .78), rgba(8, 8, 11, 0));  --th-scrim-flat: rgba(8, 8, 11, .56);
  /* "On this page" rail (1.8.0): a docked rail from 1100 px (224 px wide, as shipped; th.css holds it as --th-rail), a sticky plain dark pill below it (44 px; not glass). RESERVED as tokens. */
  --th-rail-w: 224px;  --th-rail-pill-h: 44px;
  /* States: hover adds light, never lift */
  --th-disabled-opacity: .45;  /* a disabled control: ink at 45 % */
  --th-hover: rgba(244, 243, 247, .04);  --th-fill-ghost-hover: rgba(244, 243, 247, .10);  --th-ink-hover: #E6E4EC;
  /* Motion: mass, not bounce. Animate transform and opacity only; nothing loops; work stops when settled or offscreen. */
  --th-ease-standard: cubic-bezier(.2, 0, 0, 1);  --th-ease-decay: cubic-bezier(.16, 1, .3, 1);  --th-ease-exit: cubic-bezier(.4, 0, 1, 1);
  --th-dur-micro: 120ms;  --th-dur-short: 200ms;  --th-dur-exit: 280ms;  --th-dur-enter: 700ms;  --th-dur-fade: 160ms;  --th-chase-tau: 0.42s;
  --th-stagger: 40ms;  --th-press-scale: 0.97;  --th-motion-distance: 1;
  /* Springs: "<response s> <damping fraction>" (SwiftUI's terms). The CSS easings below are generated from them by sync-tokens.py.
     snappy: controls, toggles, segment and tab indicators, press release. smooth: sheets, panels, layout moves (critically damped). */
  --th-spring-snappy: 0.3 0.86;  --th-spring-smooth: 0.45 1;
  /* spring:start (generated by sync-tokens.py from the --th-spring-* lines; do not edit) */
  --th-ease-snappy: linear(0, 0.054, 0.177, 0.323, 0.467, 0.597, 0.705, 0.792, 0.859, 0.908, 0.944, 0.968, 0.984, 0.994, 1, 1.003, 1.005, 1.005, 1.005, 1.004, 1.003, 1.003, 1.002, 1.001, 1);  --th-dur-snappy: 420ms;
  --th-ease-smooth: linear(0, 0.059, 0.184, 0.326, 0.462, 0.58, 0.678, 0.756, 0.818, 0.865, 0.901, 0.927, 0.947, 0.962, 0.972, 0.98, 0.986, 0.99, 0.993, 0.995, 0.996, 0.997, 0.998, 0.999, 1);  --th-dur-smooth: 670ms;
  /* spring:end */
}
@media (min-width: 720px) { :root { --th-gutter: 24px; } }
@media (min-width: 1100px) { :root { --th-gutter: 56px; } }
/* Browsers without CSS linear() (Safari before 17.2) get the nearest cubic curve instead of no transition. */
@supports not (transition-timing-function: linear(0, 1)) { :root { --th-ease-snappy: cubic-bezier(.2, .9, .25, 1); --th-ease-smooth: var(--th-ease-standard); } }
/* Reduced motion: nothing moves or scales; state changes crossfade over --th-dur-fade, which stays. */
@media (prefers-reduced-motion: reduce) { :root { --th-dur-enter: 0ms; --th-dur-exit: 0ms; --th-dur-short: 0ms; --th-dur-micro: 0ms; --th-motion-distance: 0; --th-press-scale: 1; } }
@supports (background: linear-gradient(in oklab, red, blue)) {
  :root {
    --th-grad-doppler: linear-gradient(100deg in oklab, #2F6BFF 0%, #5C56FF 12%, #6AA0FF 30%, #FFF4DC 50%, #FF9A3C 64%, #FF2A8A 86%, #CF43D6 100%);
    --th-grad-redshift: linear-gradient(100deg in oklab, #FFF4DC 0%, #FFB547 24%, #FF2A8A 58%, #8B5CFF 100%);
    --th-grad-approach: linear-gradient(100deg in oklab, #1FC8FF 0%, #2F6BFF 34%, #7A3CFF 68%, #CF43D6 100%);
    --th-grad-ring: linear-gradient(100deg in oklab, #2F6BFF 0%, #8B5CFF 22%, #FF2A8A 40%, #FFB547 47%, #FFF4DC 50%, #FFB547 53%, #FF2A8A 60%, #8B5CFF 78%, #2F6BFF 100%);
    --th-grad-logo: linear-gradient(90deg in oklab, #3A1CC0 0%, #4F29E0 8.3%, #6B35EE 16.7%, #8744F2 25%, #A24FEE 33.3%, #BC52DF 41.7%, #D44FC9 50%, #E946AB 58.3%, #F4478C 66.7%, #FA5C75 75%, #FF7B65 83.3%, #FF9D58 91.7%, #FFBC52 100%);   /* 13 anchors, linear in oklab (the spec's pchip curve is in the SVG and PNG files) */
  }
}
/* tokens:end */

/* ---------- fonts: self-hosted woff2 subsets (OFL notices in fonts/) ---------- */
/* Tensorhaze Sans: our own UI and body face (design/system/type/README.md). Variable: wght 100-900 and a real optical-size axis 14-32 that the browser drives from the font size. */
@font-face { font-family: 'Tensorhaze Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Tensorhaze Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Tensorhaze Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-latin.woff2) format('woff2'); 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+2190-21FF, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Tensorhaze Sans'; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-italic-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Tensorhaze Sans'; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Tensorhaze Sans'; font-style: italic; font-weight: 400 700; font-display: swap; src: url(fonts/tensorhaze-sans-italic-latin.woff2) format('woff2'); 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+2190-21FF, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-latin.woff2) format('woff2'); 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; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-mono-latin.woff2) format('woff2'); 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; }
@font-face { font-family: Outfit; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/outfit-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Outfit; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/outfit-latin.woff2) format('woff2'); 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; }
/* Literata: for reading in the Library only. Optical size fixed at 16, weights 400-600. Fetched only by pages that use it. */
@font-face { font-family: Literata; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/literata-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Literata; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/literata-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Literata; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/literata-latin.woff2) format('woff2'); 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; }
@font-face { font-family: Literata; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/literata-italic-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Literata; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/literata-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Literata; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/literata-italic-latin.woff2) format('woff2'); 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; }

/* kit-level custom properties that are not part of the shared token file */
:root {
  --th-nav-total: calc(var(--th-nav-h) + env(safe-area-inset-top, 0px));
  --th-lit: var(--th-approach);          /* the one lit diagram path / chapter accent; matter only; pages override */
  --th-rail: 224px;                      /* chapter index rail width at 1100 px and up (same as tokens.css --th-rail-w; 208 wrapped "What the servers can see"); labels of about 26 characters stay on one line */
  --th-strip-h: 52px;                    /* the "On this page" strip below 1100 px: a 44 px pill and 4 px above and below it */
  --th-dur-tint: 400ms;                  /* colour, border and background crossfades of controls (hover, current) */
  --th-dur-tint-slow: 500ms;             /* the same for larger surfaces (cards, plates, the film's fade-in) */
  --th-read-col: 660px;                  /* the reading column of an essay: 33 em at its 20 px body, about 70 characters a line */
}

@layer th-base, th-layout, th-parts;

/* continuous corners (Apple's squircle) for containers where the browser supports it; pills keep plain round corners */
@supports (corner-shape: squircle) {
  .th-plate, .th-card, .th-toolplate, .th-option, .th-pn > a[rel], .th-gated, .th-empty, .th-footer-band, .th-sheet, .th-formula, .th-hero-icon { corner-shape: squircle; }
}


/* =====================================================================
   BASE
   ===================================================================== */
@layer th-base {
  *, *::before, *::after { box-sizing: border-box; }
  html { color-scheme: dark; background: var(--th-void); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    margin: 0; min-height: 100vh; padding-top: var(--th-nav-total);
    background: var(--th-void); color: var(--th-ink);
    font: var(--th-body); letter-spacing: var(--th-body-track);
    font-variant-numeric: tabular-nums; font-synthesis: none;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
    overflow-wrap: break-word; hyphens: auto;   /* never overflow-wrap:anywhere: it splits words mid-letter */
  }
  body.th-flush { padding-top: 0; }
  h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul, pre { margin: 0; }
  h1, h2, h3, h4, h5, h6 { font: inherit; letter-spacing: inherit; }
  ul, ol { padding: 0; }
  b, strong { font-weight: 500; }
  a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  img, video, picture { display: block; max-width: 100%; height: auto; }
  svg { max-width: 100%; }
  button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  table { border-collapse: collapse; border-spacing: 0; }
  hr { border: 0; border-top: 1px solid var(--th-hairline-strong); margin: 0; }
  [hidden] { display: none !important; }
  ::selection { background: rgba(244, 243, 247, .22); color: var(--th-ink); }
  [id] { scroll-margin-top: calc(var(--th-nav-total) + 8px); }

  /* one focus ring everywhere: 2 px ink at a 3 px offset, achromatic */
  :focus-visible { outline: var(--th-focus-width) solid var(--th-ink); outline-offset: var(--th-focus-offset); }
  :focus:not(:focus-visible) { outline: none; }
  dialog:focus { outline: none; }

  .th-skip {
    position: fixed; z-index: var(--th-z-skip); left: var(--th-gutter); top: -120px;
    height: var(--th-control-h); padding: 0 22px; display: inline-flex; align-items: center;
    border-radius: var(--th-r-pill); background: var(--th-ink); color: var(--th-void); font: 500 14px/1 var(--th-font-ui);
  }
  .th-skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }
  .th-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .th-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .th-icon { width: 16px; height: 16px; flex: none; display: block; fill: none; stroke: currentColor; }
  .th-icon--24 { width: 24px; height: 24px; }
  /* where a page uses a link inside running text */
  .th-link { color: var(--th-ink); text-decoration: underline; text-decoration-color: rgba(244, 243, 247, .35); text-underline-offset: .22em; text-decoration-thickness: 1px; transition: text-decoration-color var(--th-dur-exit) var(--th-ease-standard); }
  .th-link:hover { text-decoration-color: var(--th-ink); }

  /* ---- type classes. Outfit: 300 at 56 px+, 400 at 24 px+, never above 500. Tensorhaze Sans for everything smaller. ---- */
  .th-display { font: var(--th-display-sm); letter-spacing: var(--th-display-track); text-wrap: balance; }
  @media (min-width: 640px) { .th-display { font: var(--th-display); letter-spacing: var(--th-display-track); } }
  .th-chapter { font: var(--th-chapter); letter-spacing: var(--th-chapter-track); text-wrap: balance; }
  .th-section { font: var(--th-section); letter-spacing: var(--th-section-track); text-wrap: balance; }
  .th-title { font: var(--th-title); letter-spacing: var(--th-title-track); }
  .th-title-lg { font: 400 clamp(28px, 2.6vw, 36px)/1.12 var(--th-font-display); letter-spacing: var(--th-section-track); }
  .th-sub { font: 500 17px/1.35 var(--th-font-ui); letter-spacing: -.01em; }
  .th-lede { font: 400 clamp(17px, 1.5vw, 19px)/1.55 var(--th-font-ui); letter-spacing: var(--th-body-track); color: var(--th-ink-2); max-width: var(--th-measure); text-wrap: pretty; }
  .th-body { font: var(--th-body); letter-spacing: var(--th-body-track); }
  .th-small { font: var(--th-small); }
  .th-caption { font: var(--th-caption); color: var(--th-ink-2); }
  .th-label { font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); }
  .th-data { font: var(--th-data); color: var(--th-ink-2); font-variant-numeric: tabular-nums; }   /* machine data only */
  .th-ink-2 { color: var(--th-ink-2); }
  .th-nw { white-space: nowrap; }
  .th-ink-3 { color: var(--th-ink-3); }   /* 14 px and up, non-essential text only */

  /* reading column: paragraphs, lists and sub-heads at 66 ch */
  .th-prose { max-width: var(--th-measure); }
  .th-prose > * + * { margin-top: 1em; }
  .th-prose > .th-sub { margin-top: 1.8em; }
  .th-prose > .th-sub + * { margin-top: .5em; }
  .th-prose p { text-wrap: pretty; }
  .th-prose li + li { margin-top: .4em; }
  .th-prose li::marker { color: var(--th-ink-2); }
  .th-prose ul, .th-prose ol, ul.th-prose, ol.th-prose { padding-left: 1.25em; }   /* also when the list itself is the .th-prose (credits inside a spec row) */
  /* inline machine literals wrap at any character, so a long file name never widens a phone. Short literals stay whole in practice;
     a table cell that must keep one on a line sets white-space: nowrap on it. */
  .th-prose code, .th-code { font: var(--th-data); font-size: 13px; color: var(--th-ink); background: rgba(0, 0, 0, .25); border-radius: var(--th-r-min); padding: .12em .45em; white-space: normal; overflow-wrap: anywhere; hyphens: none; }
  /* a long machine string on its own line (URL, path): breaks at any character, never hyphenates */
  .th-break { overflow-wrap: anywhere; hyphens: none; }   /* breaks at any character only when it must; add <wbr> after / and - for nicer breaks */

  /* ---- layout ---- */
  .th-wrap { width: min(100% - 2 * var(--th-gutter), var(--th-wrap)); margin-inline: auto; }
  .th-col { max-width: var(--th-measure); }
  .th-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap, 16px); align-content: start; }
  .th-stack > * { min-width: 0; }
  .th-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
  .th-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap, 24px); }
  @media (min-width: 720px) {
    .th-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .th-cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (min-width: 1100px) { .th-cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  .th-reveal { transition: opacity var(--th-dur-enter) var(--th-ease-decay), transform var(--th-dur-enter) var(--th-ease-decay); }
}

/* =====================================================================
   LAYOUT: scenes (ground steps), section head, chapter layout with rail, hero
   ===================================================================== */
@layer th-layout {
  /* Scenes, not boxes: sections change by ground luminance (void > base > surface-1), never by rules or framed cards.
     The ground is a layer behind the scene that bleeds past the wrap (it also works inside the rail layout) and fades in over its first
     --th-edge from the ground of the scene above, so the step between two scenes is a gradient, never a hard line. <main> clips the bleed. */
  .th-scene { --th-scene-pad: clamp(40px, 4.5vw, 64px); --th-edge: clamp(40px, 6vw, 88px); position: relative; padding-block: var(--th-scene-pad); }
  .th-scene[data-ground] { --th-prev: var(--th-void); clip-path: inset(0 -100vmax); }
  .th-scene[data-ground]::before { content: ""; position: absolute; z-index: -1; inset: 0 -100vmax; pointer-events: none; background: linear-gradient(180deg, var(--th-prev), var(--g) var(--th-edge)), var(--g); }
  [data-ground="void"] { --g: var(--th-void); }
  [data-ground="base"] { --g: var(--th-base); }
  [data-ground="s1"] { --g: var(--th-surface-1); }
  .th-scene[data-ground="void"] + .th-scene[data-ground] { --th-prev: var(--th-void); }
  .th-scene[data-ground="base"] + .th-scene[data-ground] { --th-prev: var(--th-base); }
  .th-scene[data-ground="s1"] + .th-scene[data-ground] { --th-prev: var(--th-surface-1); }
  main { overflow-x: clip; }
  .th-scene--tight { --th-scene-pad: clamp(32px, 4vw, 56px); }
  .th-sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: clamp(24px, 3.2vw, 40px); max-width: var(--th-measure); }
  .th-sec-head .th-section { margin: 0; }

  /* the page body below the hero: sticky left rail from 1100 px */
  .th-layout { display: block; isolation: isolate; }
  .th-index { display: none; }
  @media (min-width: 1100px) {
    .th-layout--rail { display: grid; grid-template-columns: var(--th-rail) minmax(0, 1fr); column-gap: 48px; align-items: start; }
    .th-layout--rail > .th-index { display: block; position: sticky; z-index: 2; top: calc(var(--th-nav-total) + 28px); margin-top: var(--th-index-top, clamp(40px, 4.5vw, 64px)); }   /* its first line sits level with the first section head */
    .th-layout--rail > .th-scenes { min-width: 0; }
  }

  /* hero: text first on phones, 5:7 columns from 1100 px */
  .th-hero { padding-block: clamp(20px, 3vw, 36px) clamp(32px, 4vw, 56px); }
  .th-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .th-hero-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; }
  .th-hero-text .th-lede { margin: 0; }
  .th-hero-visual { min-width: 0; }
  @media (min-width: 1100px) {
    .th-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }   /* the title keeps one height from page to page */
  }
  .th-hero--text .th-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .th-hero--text .th-hero-text { max-width: 880px; }
  .th-hero .th-actions { margin-top: 4px; }
  .th-hero .th-actions .th-note { flex-basis: 100%; }
  .th-hero .th-actions > .th-status + .th-note { flex-basis: auto; } /* chip and note on one line */
  .th-actions:has(> .th-status) { column-gap: var(--th-space-3); row-gap: var(--th-space-2); }
  /* every hero is followed by the first scene with less air, so hero and body read as one block (about 96 px at 1440, not 140); the rail starts level with the first section head */
  .th-hero + .th-layout--rail > .th-index { --th-index-top: clamp(24px, 3vw, 40px); }
  .th-hero + .th-wrap > .th-scene:first-child, .th-hero + .th-layout .th-scene:first-child, .th-hero + .th-wrap .th-scenes > .th-scene:first-child { padding-top: clamp(24px, 3vw, 40px); }
  /* ---- essays (a page whose <main> holds an <article class="th-scene"> straight in the wrap): one centred reading column ----
     The column is 660 px (--th-read-col), 20 px Tensorhaze Sans at 1.7 from 720 px up (17 px on a phone), which is 33 em: about 70 characters a line, never the 85 to 90
     of a 66 ch box at 17 px (ch is the width of a zero, wider than an average letter). The back link, the title block, the body, Sources and the previous/next plates
     all share the column and its left edge. */
  main:has(> .th-wrap > article.th-scene) { --th-read-size: clamp(17px, calc(17px + (100vw - 640px) * .0375), 20px); }
  main:has(> .th-wrap > article.th-scene) .th-topbar,
  main:has(> .th-wrap > article.th-scene) .th-hero-text,
  main:has(> .th-wrap > article.th-scene) > .th-wrap > .th-scene { width: min(100%, var(--th-read-col)); max-width: var(--th-read-col); margin-inline: auto; }
  main:has(> .th-wrap > article.th-scene) .th-display { font: 400 clamp(34px, 5vw, 54px)/1.08 var(--th-font-display); letter-spacing: var(--th-section-track); }
  main:has(> .th-wrap > article.th-scene) .th-hero .th-lede { max-width: none; font-size: calc(var(--th-read-size) + 2px); line-height: 1.45; }
  main:has(> .th-wrap > article.th-scene) { --th-essay-gap: var(--th-space-6); }
  main:has(> .th-wrap > article.th-scene) .th-hero { padding-bottom: var(--th-essay-gap); } main:has(> .th-wrap > article.th-scene) .th-hero + .th-wrap > .th-scene:first-child { padding-top: var(--th-essay-gap); }
  @media (min-width: 720px) { main:has(> .th-wrap > article.th-scene) { --th-essay-gap: var(--th-space-8); } }
  main:has(> .th-wrap > article.th-scene) article.th-scene .th-prose { max-width: none; font: 400 var(--th-read-size)/var(--th-read-lh, 1.6) var(--th-font-ui); letter-spacing: -.008em; }   /* 1.6 on a phone, where 17 px lines are short; 1.7 from 720 px */
  @media (min-width: 720px) { main:has(> .th-wrap > article.th-scene) { --th-read-lh: 1.7; } }
  main:has(> .th-wrap > article.th-scene) article.th-scene .th-prose > * + * { margin-top: 1.05em; }
  main:has(> .th-wrap > article.th-scene) article.th-scene .th-prose > .th-sub { margin-top: 2.2em; font: 400 clamp(24px, calc(21px + .8vw), 30px)/1.2 var(--th-font-display); letter-spacing: var(--th-title-track); }
  main:has(> .th-wrap > article.th-scene) article.th-scene .th-prose > .th-sub + * { margin-top: .7em; }
  main:has(> .th-wrap > article.th-scene) article.th-scene .th-prose > .th-quote { margin-block: 1.4em; padding-left: 0; }
  .th-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .th-sentinel { display: block; height: 1px; margin: 0; pointer-events: none; }
}

/* =====================================================================
   PARTS
   ===================================================================== */
@layer th-parts {

  /* ---------- controls ---------- */
  .th-pill {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: var(--th-control-h); padding: 0 28px; border-radius: var(--th-r-pill); border: 1px solid transparent;
    font: 500 14px/1 var(--th-font-ui); letter-spacing: -.005em; white-space: nowrap;
    transition: background-color var(--th-dur-tint) var(--th-ease-decay), border-color var(--th-dur-tint) var(--th-ease-decay), color var(--th-dur-tint) var(--th-ease-decay), scale var(--th-dur-snappy) var(--th-ease-snappy);
  }
  /* press: down at once (micro), back on the snappy spring; scale is compositor-only */
  .th-pill:active, .th-circle:active, .th-seg > button:active { scale: var(--th-press-scale); transition-duration: var(--th-dur-tint), var(--th-dur-tint), var(--th-dur-tint), var(--th-dur-micro); }
  .th-pill--dense { height: var(--th-control-h-dense); padding: 0 24px; }
  @media (pointer: coarse) { .th-pill--dense, .th-seg > button { height: var(--th-control-h); } }   /* dense is for precise pointers; touch keeps 44 px */
  .th-pill--primary { background: var(--th-ink); color: var(--th-void); }          /* one per screen */
  .th-pill--primary:hover { background: var(--th-ink-hover); }
  .th-pill--ghost { background: rgba(244, 243, 247, .05); border-color: var(--th-hairline-strong); color: var(--th-ink); }
  .th-pill--ghost:hover { background: rgba(244, 243, 247, .09); border-color: rgba(244, 243, 247, .16); }
  .th-pill[aria-pressed="true"] { background: var(--th-fill-ghost-hover); box-shadow: inset 0 0 0 1px var(--th-ink); }
  .th-circle {
    position: relative; display: inline-grid; place-items: center; flex: none;
    width: var(--th-circle); height: var(--th-circle); border-radius: 50%;
    background: var(--th-fill-ghost); border: 1px solid var(--th-hairline-strong); color: var(--th-ink);
    transition: background-color var(--th-dur-tint) var(--th-ease-decay), border-color var(--th-dur-tint) var(--th-ease-decay);
  }
  .th-circle:hover { background: var(--th-fill-ghost-hover); border-color: rgba(244, 243, 247, .16); }
  .th-circle--media { width: var(--th-circle-media); height: var(--th-circle-media); }
  .th-circle[aria-pressed="true"] { background: var(--th-fill-ghost-hover); box-shadow: inset 0 0 0 1px var(--th-ink); }
  .th-circle .th-icon { width: 16px; height: 16px; }
  .th-circle--media .th-icon { width: 20px; height: 20px; }
  /* segmented control: buttons with aria-pressed; selection is a ring plus a lighter fill, never colour alone */
  .th-seg { display: inline-flex; flex: none; max-width: 100%; padding: var(--th-space-1); gap: var(--th-space-1); border-radius: var(--th-r-pill); background: var(--th-fill-ghost); border: 1px solid var(--th-control-line); }   /* a control edge: 3:1 or more (--th-control-line), never a hairline */
  .th-seg > button { position: relative; height: 36px; flex: none; white-space: nowrap; padding: 0 20px; border-radius: var(--th-r-pill); font: 500 14px/1 var(--th-font-ui); color: var(--th-ink-2); transition: background-color var(--th-dur-tint) var(--th-ease-decay), color var(--th-dur-tint) var(--th-ease-decay), box-shadow var(--th-dur-snappy) var(--th-ease-snappy), scale var(--th-dur-snappy) var(--th-ease-snappy); }
  .th-seg > button::before { content: ""; position: absolute; inset: -5px -2px; }   /* a 46 px hit area around the 36 px button: a 44 px target without a taller control */
  .th-seg > button:hover { color: var(--th-ink); background: var(--th-hover); }
  .th-seg > button[aria-pressed="true"] { color: var(--th-ink); background: var(--th-fill-ghost-hover); box-shadow: inset 0 0 0 1px var(--th-ink); }
  [disabled], [aria-disabled="true"] { opacity: var(--th-disabled-opacity); pointer-events: none; }
  /* stretched link: the whole card or plate is the hit area of its one link, with no link nested inside a link */
  .th-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .th-hit { position: relative; }

  /* ---------- header, sheet, back link, chapter index, calm toggle ---------- */
  .th-header {
    position: fixed; z-index: var(--th-z-header); top: 0; left: 0; right: 0;
    height: var(--th-nav-total); padding: env(safe-area-inset-top, 0px) max(var(--th-gutter), env(safe-area-inset-right, 0px), calc((100% - var(--th-wrap)) / 2)) 0 max(var(--th-gutter), env(safe-area-inset-left, 0px), calc((100% - var(--th-wrap)) / 2));   /* the wordmark sits on the wrap's own edge, so header and content start on one line */
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--th-void); border-bottom: 1px solid var(--th-hairline);   /* opaque from the first paint: even 3 % of text showing through is visible against the wordmark. Never backdrop-filter */
  }
  .th-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 24px; pointer-events: none; background: linear-gradient(180deg, var(--th-nav-tint-scrolled), rgba(8, 8, 11, 0)); }
  /* Only a header that sits over a film hero (data-th-hero) starts as the .72 tint and turns opaque once the hero is behind it (th.js sets data-solid).
     Pages without that attribute never see the tint, and nothing here is a transition when the header is solid: it is opaque at once, with no fade in which text can show through. */
  .th-header[data-th-hero]:not([data-solid="1"]) { background: var(--th-nav-tint); }
  .th-header[data-th-hero]:not([data-solid="1"])::after { opacity: 0; }
  .th-header[data-th-hero] { transition: background-color var(--th-dur-tint-slow) var(--th-ease-decay); }
  .th-header[data-th-hero][data-solid="1"] { transition: none; }
  /* the wordmark: TENSORHAZE in caps, tracked .18em. Outfit is for 24 px and up, and 300 only from 56 px (QA rules), so the header's is 400 at 24 px; the footer's is 300 above 56 px */
  .th-wordmark { display: inline-flex; align-items: center; min-height: 44px; padding-right: 8px; margin-right: auto; font: 400 24px/1 var(--th-font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--th-ink); white-space: nowrap; }
  .th-header-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .th-nav { display: none; align-items: center; gap: 2px; }
  .th-nav a, .th-nav-link {
    position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--th-r-pill);
    font: 400 14px/1 var(--th-font-ui); color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay), background-color var(--th-dur-tint) var(--th-ease-decay);
  }
  .th-nav a:hover { color: var(--th-ink); background: var(--th-hover); }
  .th-nav a[aria-current="page"] { color: var(--th-ink); }
  .th-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: var(--th-r-pill); background: var(--th-ink); }   /* no accent colour (chrome is ink) */
  /* the header controls are the Home header's pills: a 44 px ghost pill with an icon and a visible label */
  .th-header .th-pill { padding: 0 16px 0 14px; gap: 10px; }
  .th-header .th-pill .th-icon { width: 16px; height: 16px; }
  .th-motion { display: none; }                                  /* phones: Motion lives in the menu sheet, as Full / Reduced */
  @media (min-width: 720px) {
    .th-nav { display: flex; } .th-header { gap: 20px; } .th-header-end { margin-left: 0; }
    .th-motion { display: inline-flex; }
    .th-menu-btn { display: none; }
  }
  @media (min-width: 720px) and (max-width: 899px) { .th-nav a { padding: 0 9px; } .th-nav a[aria-current="page"]::after { left: 9px; right: 9px; } .th-header { gap: 12px; } .th-header .th-pill { padding: 0 14px 0 12px; gap: 8px; } }
  @media (min-width: 900px) { .th-nav a { padding: 0 12px; } }
  html:not(.js) .th-menu-btn, html:not(.js) .th-calm { display: none; }
  .th-calm .th-i-on, .th-calm[aria-pressed="true"] .th-i-off { display: none; }
  .th-calm[aria-pressed="true"] .th-i-on { display: block; }
  .th-pill.th-calm { gap: 10px; }
  /* in the header the motion control is a quiet text control, not a pill: the same weight and ink as the nav links, so it never outweighs them.
     The icon (half and full disc) and a filled hover/pressed ground carry the state; the label stays visible from 720 px up. */
  .th-header .th-pill.th-calm { height: 44px; padding: 0 12px; gap: 8px; background: none; border-color: transparent; box-shadow: none; color: var(--th-ink-2); font-weight: 400; }
  .th-header .th-pill.th-calm:hover { background: var(--th-hover); color: var(--th-ink); }
  .th-header .th-pill.th-calm[aria-pressed="true"] { background: var(--th-fill-ghost); color: var(--th-ink); box-shadow: none; }

  /* menu sheet: a <dialog>, full height from the right, ease-decay in, ease-standard out */
  .th-sheet {
    position: fixed; z-index: var(--th-z-sheet); inset: 0 0 0 auto; margin: 0; width: min(86vw, 360px); max-width: none; height: 100dvh; max-height: none;
    border: 0; border-left: 1px solid var(--th-hairline); border-radius: var(--th-r-sheet) 0 0 var(--th-r-sheet); background: var(--th-surface-1); color: var(--th-ink); overflow: auto; overscroll-behavior: contain;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
    transform: translateX(100%); transition: transform var(--th-dur-exit) var(--th-ease-standard);
  }
  .th-sheet.is-open { transform: none; transition: transform var(--th-dur-enter) var(--th-ease-decay); }
  .th-sheet::backdrop { background: rgba(8, 8, 11, .62); }   /* no blur */
  .th-sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; min-height: 44px; }
  .th-sheet-top .th-label { margin: 0; }
  .th-sheet-nav { display: grid; }
  .th-sheet-nav a { display: flex; align-items: center; min-height: 52px; font: 400 30px/1.1 var(--th-font-display); letter-spacing: -.022em; color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay); }
  .th-sheet-nav a:hover, .th-sheet-nav a[aria-current="page"] { color: var(--th-ink); }
  .th-sheet-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .th-sheet-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--th-hairline-strong); display: grid; justify-items: start; gap: 12px; }
  .th-sheet-foot .th-label { margin: 0; }
  .th-sheet-foot .th-note { max-width: 32ch; }

  .th-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 400 14px/1 var(--th-font-ui); color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay); }
  .th-back:hover { color: var(--th-ink); }
  .th-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }

  /* ---------- "On this page" ----------
     1100 px and up: a sticky rail in the left column. A hairline runs down its left edge, an ink line fills to the current section and a dot
     marks it (both move on transform only); the items are numbered 01 to nn like the section heads. The rail is as tall as the viewport
     allows and scrolls inside itself on a short window, so it never reaches the footer or the content.
     Below 1100 px: a full-width strip (opaque void, a hairline under it) sticks under the header and holds one compact pill, "On this page" plus the current
     section, which opens a bottom sheet with the same list (th.js builds both). Text never slides behind the pill: it scrolls under the strip. */
  .th-index .th-label { margin: 0 0 10px; }
  .th-index ol { list-style: none; }
  .th-index a { color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay); -webkit-tap-highlight-color: transparent; }
  .th-index a:hover, .th-index a[aria-current] { color: var(--th-ink); }
  .th-ix-n { font: 500 12px/1 var(--th-font-ui); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
  .th-ix-t { min-width: 0; }
  .th-toc-btn { display: none; }
  @media (min-width: 1100px) {
    .th-index { max-height: calc(100dvh - var(--th-nav-total) - 56px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 4px; }
    .th-index::-webkit-scrollbar { display: none; }
    .th-index ol { position: relative; }
    .th-ix-line, .th-ix-fill { position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--th-hairline-strong); pointer-events: none; }
    .th-ix-fill { left: 2.5px; width: 2px; border-radius: var(--th-r-pill); background: var(--th-ink); opacity: .9; transform-origin: 50% 0; transform: scaleY(var(--ix-p, 0)); transition: transform var(--th-dur-smooth) var(--th-ease-smooth); }
    .th-ix-dot { position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0; border-radius: 50%; background: var(--th-ink); box-shadow: 0 0 0 4px var(--th-void); opacity: 0; transform: translateY(var(--ix-y, 0px)); transition: transform var(--th-dur-snappy) var(--th-ease-snappy), opacity var(--th-dur-tint) var(--th-ease-decay); pointer-events: none; }
    .th-index[data-ix-on] .th-ix-dot { opacity: 1; }
    .th-index li { position: relative; }
    .th-index a { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; column-gap: 8px; min-height: var(--th-control-h); padding: 6px 4px 6px 16px; border-radius: var(--th-r-pill); font: 400 14px/1.3 var(--th-font-ui); }   /* 44 px rows: the rail is a touch target on a landscape iPad */
    .th-index a .th-ix-n { color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay); }
    .th-index a:hover .th-ix-n, .th-index a[aria-current] .th-ix-n { color: var(--th-ink); }
    .th-index a[aria-current] .th-ix-t { font-weight: 500; }
  }
  @media (min-width: 1100px) and (max-height: 760px) and (pointer: fine) { .th-index a { min-height: 36px; padding-block: 4px; } }   /* a short desktop window only; touch keeps 44 px rows */
  @media (max-width: 1099px) {
    /* the strip: the full width of the viewport (the wrap's gutter taken back), opaque, a hairline under it. It sticks just under the header. */
    .th-layout--rail > .th-index { display: block; position: sticky; z-index: 3; top: var(--th-nav-total); margin: 0 calc(-1 * var(--th-gutter)); padding: 4px var(--th-gutter); background: var(--th-void); border-bottom: 1px solid var(--th-hairline-strong); }
    .th-layout--rail > .th-index::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; pointer-events: none; background: linear-gradient(180deg, var(--th-void), rgba(8, 8, 11, 0)); }   /* text fades under the strip instead of being cut */
    .th-index > .th-label, .th-index > ol, .th-index > .th-ix-wrap { display: none; }
    html:not(.js) .th-index > ol { display: block; margin-bottom: 12px; }
    html:not(.js) .th-index > ol a { display: flex; min-height: 44px; align-items: center; }
    html:not(.js) .th-index > .th-label { display: block; }
    .th-toc-btn {
      display: inline-flex; align-items: center; gap: 10px; max-width: 100%; height: 44px; padding: 0 14px 0 16px; border-radius: var(--th-r-pill);
      font: 500 14px/1 var(--th-font-ui); letter-spacing: -.005em; color: var(--th-ink);
      background: var(--th-surface-1); box-shadow: inset 0 0 0 1px rgba(244, 243, 247, .14), inset 0 1px 0 rgba(244, 243, 247, .10);   /* a plain dark pill with a lit top edge: no blur and no glass */
      transition: background-color var(--th-dur-tint) var(--th-ease-decay), box-shadow var(--th-dur-tint) var(--th-ease-decay), scale var(--th-dur-snappy) var(--th-ease-snappy);
    }
    .th-toc-btn:active { scale: var(--th-press-scale); transition-duration: var(--th-dur-tint), var(--th-dur-tint), var(--th-dur-micro); }
    .th-toc-btn .th-icon { color: var(--th-ink-2); }
    .th-toc-btn .th-toc-cur { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--th-ink-2); font-weight: 400; }
    .th-toc-btn .th-toc-cur:not(:empty)::before { content: ""; display: inline-block; width: 1px; height: 14px; margin: 0 10px 0 0; background: var(--th-hairline-strong); vertical-align: -2px; }
    .th-toc-btn .th-toc-cur b { color: var(--th-ink); font-weight: 500; margin-right: 6px; font-variant-numeric: tabular-nums; }
    .th-toc-btn[aria-expanded="true"] .th-i-chev { transform: rotate(180deg); }
    .th-i-chev { transition: transform var(--th-dur-exit) var(--th-ease-standard); }
    html[data-index] .th-scene[id] { scroll-margin-top: calc(var(--th-nav-total) + var(--th-strip-h) + 8px); }
  }
  @media (max-width: 599px) { .th-toc-btn .th-toc-cur:not(:empty)::before { margin-right: 8px; } .th-toc-btn { gap: 8px; padding-right: 12px; } }
  .th-toc-btn .th-toc-lbl { flex: none; }

  /* the contents sheet: rises from the bottom edge, safe-area aware, 44 px rows */
  .th-toc-sheet {
    position: fixed; z-index: var(--th-z-sheet); inset: auto 0 0 0; margin: 0 auto; width: min(100%, 560px); max-width: none; height: auto; max-height: min(80dvh, 680px);
    border: 0; border-radius: var(--th-r-sheet) var(--th-r-sheet) 0 0; background: var(--th-surface-1); color: var(--th-ink); overflow: auto; overscroll-behavior: contain;
    box-shadow: inset 0 1px 0 var(--th-hairline-strong);
    padding: 8px max(20px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom, 0px) + 20px) max(20px, env(safe-area-inset-left));
    transform: translateY(100%); transition: transform var(--th-dur-exit) var(--th-ease-standard);
  }
  .th-toc-sheet.is-open { transform: none; transition: transform var(--th-dur-enter) var(--th-ease-decay); }
  .th-toc-sheet::backdrop { background: rgba(8, 8, 11, .62); }
  .th-toc-grab { display: block; width: 36px; height: 4px; margin: 4px auto 6px; border-radius: var(--th-r-pill); background: var(--th-hairline-strong); }
  .th-toc-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
  .th-toc-head .th-label { margin: 0; }
  .th-toc-sheet ol { list-style: none; }
  .th-toc-sheet li + li { margin-top: 2px; }
  .th-toc-sheet a { display: grid; grid-template-columns: 34px minmax(0, 1fr) 8px; align-items: center; column-gap: 8px; min-height: 48px; padding: 0 14px 0 8px; border-radius: var(--th-r-pill); font: 400 17px/1.3 var(--th-font-ui); color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay), background-color var(--th-dur-tint) var(--th-ease-decay); }
  .th-toc-sheet a:hover { color: var(--th-ink); background: var(--th-hover); }
  .th-toc-sheet a[aria-current] { color: var(--th-ink); background: var(--th-fill-ghost); }
  .th-toc-sheet a[aria-current]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--th-ink); grid-column: 3; }
  .th-toc-sheet .th-ix-n { color: var(--th-ink-2); }
  .th-toc-sheet a[aria-current] .th-ix-n { color: var(--th-ink); }

  /* ---------- hero visuals ---------- */
  .th-visual { position: relative; aspect-ratio: var(--ar, 16 / 9); width: 100%; overflow: hidden; }
  .th-visual picture, .th-visual img, .th-visual video, .th-visual svg:not(.th-icon) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
  .th-visual video { opacity: 0; transition: opacity var(--th-dur-tint-slow) var(--th-ease-decay); }
  .th-visual.is-live video { opacity: 1; }
  .th-visual [data-th-pause] { position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 44px; height: 44px; background: var(--th-nav-tint); }   /* 44 px (the target minimum) and 16 px in from the frame edge, so it sits clear of the rounded corner; never bottom-left */
  .th-visual [data-th-pause] .th-icon { width: 18px; height: 18px; }
  .th-visual [data-th-pause] .th-i-play, .th-visual [data-th-pause][aria-pressed="true"] .th-i-pause { display: none; }
  .th-visual [data-th-pause][aria-pressed="true"] .th-i-play { display: block; }
  .th-visual [data-th-pause][aria-pressed="true"] { box-shadow: none; }
  .th-visual--portrait { --ar: 4 / 5; }
  .th-hero-visual .th-plate { padding: 0; }
  .th-specimen-body { padding: clamp(16px, 3vw, 28px); }

  /* ---------- surfaces: plate (surface-2, hairline, rim painted with the screen gradient), the one floating plate, cards ---------- */
  .th-plate {
    position: relative; border-radius: var(--th-r-card);
    background: var(--th-surface-2); border: 1px solid var(--th-hairline-strong);
  }
  .th-plate::after, .th-toolplate::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 1;
    box-shadow: inset 0 0 0 1px var(--th-hairline-strong);
  }
  /* the rim is matter: a 1 px ring painted with the screen's one gradient (--th-grad, set per section) */
  @supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
    .th-plate::after, .th-toolplate::after {
      box-shadow: none; padding: 1px; background: var(--th-grad); opacity: .55;
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
      mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    }
  }
  .th-plate--float { box-shadow: var(--th-plate-shadow); }   /* the only wide shadow on a screen */
  .th-plate--bleed { padding: 0; overflow: hidden; }
  .th-plate--bleed::after { inset: 0; }   /* the clip would cut a ring drawn outside the box */
  .th-plate--s1 { background: var(--th-surface-1); }
  .th-card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px; padding: clamp(22px, 3vw, 32px);
    border-radius: var(--th-r-card); background: var(--th-surface-1); border: 1px solid var(--th-hairline);
    transition: background-color var(--th-dur-tint-slow) var(--th-ease-decay), border-color var(--th-dur-tint-slow) var(--th-ease-decay);
  }
  .th-card:hover { background: #121117; border-color: rgba(244, 243, 247, .14); }   /* hover adds light; nothing lifts */
  .th-card .th-title-lg { margin: 0; }
  .th-card__text { color: var(--th-ink-2); font: var(--th-small); font-size: 15px; line-height: 1.55; max-width: 46ch; }
  .th-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 6px; }

  /* tool plate: achromatic body, the residue and rim carry the screen gradient */
  .th-toolplate {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px;
    padding: 24px; border-radius: var(--th-r-card); background: var(--th-surface-2); border: 1px solid var(--th-hairline-strong); overflow: hidden;
    transition: background-color var(--th-dur-tint-slow) var(--th-ease-decay);
  }
  .th-toolplate::before, .th-residue::before {            /* residue: a soft settle of the screen's gradient in the lower corner */
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 1; transition: opacity var(--th-dur-tint-slow) var(--th-ease-decay);
    background: var(--th-grad); -webkit-mask: radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, .24), transparent 70%); mask: radial-gradient(90% 70% at 100% 100%, rgba(0, 0, 0, .24), transparent 70%);
  }
  .th-residue { position: relative; overflow: hidden; }   /* any plate or card can carry the residue */
  .th-residue > * { position: relative; z-index: 1; }
  .th-toolplate:hover { background: #17161d; }
  .th-toolplate > * { position: relative; z-index: 1; }
  .th-toolplate .th-icon--24 { color: var(--th-ink); }
  .th-toolplate .th-title { margin: 0; }
  .th-toolplate__line { color: var(--th-ink-2); font: 400 15px/1.5 var(--th-font-ui); max-width: 34ch; }
  .th-toolplate__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 4px; }
  .th-toolplate .th-pill { justify-self: start; margin-top: 8px; }

  /* Section overviews keep an even rhythm as editorial text wraps and platforms differ. */
  .th-overview { --gap: clamp(16px, 2.4vw, 24px); }
  @media (min-width: 720px) { .th-overview--tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1100px) { .th-overview--tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .th-overview > :is(.th-card, .th-toolplate) { display: flex; flex-direction: column; align-items: flex-start; overflow-wrap: anywhere; }
  .th-overview .th-card:focus-within { background: #121117; border-color: var(--th-control-line); }
  .th-overview .th-card__foot { align-self: stretch; flex-wrap: nowrap; justify-content: space-between; margin-top: auto; padding-top: 6px; }
  .th-card__arrow {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto;
    border: 1px solid var(--th-hairline-strong); border-radius: var(--th-r-pill); color: var(--th-ink-2);
  }
  .th-overview .th-toolplate { padding: clamp(20px, 2.3vw, 26px); }
  .th-overview .th-toolplate:focus-within { background: #17161d; border-color: var(--th-control-line); }
  .th-toolplate__heading { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
  .th-toolplate__glyph {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--th-hairline-strong); border-radius: var(--th-r-min); background: var(--th-fill-ghost);
  }
  .th-toolplate__platform { margin-top: 3px; color: var(--th-ink-2); font: var(--th-small); }
  .th-overview .th-toolplate > .th-status { margin-top: auto; padding-top: 8px; }
  .th-overview .th-toolplate .th-chip:first-child { color: var(--th-ink); }
  .th-overview .th-chip { white-space: normal; }
  .th-overview .th-toolplate > .th-stretch {
    position: static; height: auto; min-height: var(--th-control-h); max-width: 100%; margin-top: 4px;
    padding: 9px 16px; line-height: 1.3; text-align: center; white-space: normal;
  }
  .th-overview .th-toolplate > .th-stretch:active { scale: none; }

  [data-dust="run"]::before { opacity: 0; }   /* th-dust.js: the DOM residue fades in on the settle frame */
  .th-dust-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; transition: opacity var(--th-dur-tint-slow) var(--th-ease-decay); }

  /* ---------- facts strip, status row, badges ---------- */
  /* Separators are a dot in the left padding of every item. The list clips its own left edge, so a wrapped line can never
     start with a dot, and the last item of a line never ends with one. At most 9 items; machine literals only. */
  .th-facts, .th-chips { list-style: none; display: flex; flex-wrap: wrap; row-gap: 4px; padding: 0; overflow: hidden; font: var(--th-data); color: var(--th-ink-2); }
  .th-facts li, .th-chips li { position: relative; flex: none; white-space: nowrap; padding-left: 1.7em; margin-left: -1.7em; margin-right: 1.7em; }
  .th-facts li::before, .th-chips li::before { content: "·"; position: absolute; left: 0; top: 0; width: 1.7em; text-align: center; }
  /* th-chips: the same dotted list in Geist, for plain phrases (not machine data) such as the hero's one-line summary */
  .th-chips { font: var(--th-small); }
  .th-chips li { flex: 0 1 auto; white-space: normal; }
  .th-status { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; min-width: 0; }
  .th-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px 0 8px; border-radius: var(--th-r-pill); background: var(--th-fill-ghost); box-shadow: inset 0 0 0 1px var(--th-hairline-strong); font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); max-width: 100%; padding-block: 4px; white-space: nowrap; }   /* a chip is a few words and never wraps: shorten the copy, not the chip */
  /* Status dot: one 16 px glyph set, drawn as a mask so every state has the same optical size and baseline. A word always travels with it (the word carries the meaning).
     Live = solid. Invitation = hollow ring. In progress, Planning, Pre-alpha = a ring with one even lit arc (270 degrees, round caps; it never spins). Private and Blocked = ring with a small lock. Stale = ring. Nothing in the set is dashed.
     The fill is forced with !important so a page's own `.th-dot { background }` can never blank it. */
  .th-dot { --th-dot-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E"); position: relative; width: 16px; height: 16px; flex: none; border: 0; border-radius: 0; background-color: var(--th-dot-ink, var(--th-ink)) !important; -webkit-mask: var(--th-dot-glyph) center / 100% 100% no-repeat; mask: var(--th-dot-glyph) center / 100% 100% no-repeat; }
  :is([data-state="filled"], [data-state="live"], [data-state="open"], [data-state="shipped"]) > .th-dot { --th-dot-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3C/svg%3E"); }
  :is([data-state="ring"], [data-state="invitation"], [data-state="recorded"], [data-state="stale"]) > .th-dot { --th-dot-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E"); }
  :is([data-state="private"], [data-state="blocked"]) > .th-dot { --th-dot-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Crect x='5.9' y='7.6' width='4.2' height='3.3' rx='.9'/%3E%3Cpath d='M6.9 7.7V6.9a1.1 1.1 0 0 1 2.2 0v.8' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E"); }
  :is([data-state="planning"], [data-state="progress"], [data-state="prealpha"], [data-state="notpublic"]) > .th-dot { --th-dot-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='.3'/%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='24.5 8.2' transform='rotate(-90 8 8)'/%3E%3C/svg%3E"); }
  .th-note { font: var(--th-small); color: var(--th-ink-2); }   /* a short honest note beside the one primary: "Opens in a new tab." */
  .th-hero-icon { display: block; width: 64px; height: 64px; border-radius: var(--th-r-inner); margin-bottom: 4px; box-shadow: 0 0 0 1px var(--th-hairline-strong); }   /* a 64 px product icon above the eyebrow */
  .th-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--th-r-pill); font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink); background: rgba(8, 8, 11, .72); box-shadow: inset 0 0 0 1px rgba(244, 243, 247, .22); }
  .th-badge--corner { position: absolute; top: 14px; right: 14px; z-index: 2; }
  /* TARGET and SAMPLE badges: a solid hairline ring and the ring glyph, never a dashed outline. */
  .th-badge--target { gap: 6px; padding-left: 6px; background: transparent; box-shadow: inset 0 0 0 1px rgba(244, 243, 247, .30); color: var(--th-ink-2); }
  .th-badge--target::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.2' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

  /* ---------- content blocks (the closed set) ---------- */
  /* key-figure strip: 3 to 4 numbers with units and labels */
  .th-figures { display: grid; gap: 28px 32px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .th-figures > div { border-top: 1px solid var(--th-hairline-strong); padding-top: 16px; min-width: 0; }
  .th-figures dt { font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); order: 2; text-wrap: balance; }
  @media (max-width: 639px) { .th-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--th-space-6) var(--th-space-5); } .th-figures > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
  .th-figures > div { display: flex; flex-direction: column; gap: 10px; }
  .th-figures dd { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; order: 1; }
  .th-figure-num { font: 400 clamp(32px, 4vw, 48px)/1.05 var(--th-font-display); letter-spacing: -.028em; }
  .th-figure-unit { font: 400 14px/1 var(--th-font-ui); color: var(--th-ink-2); }
  .th-figures .th-figure-tag { order: 3; display: block; align-self: start; }   /* the badge sits in its own dd so the list stays a valid description list */
  .th-figures .th-badge { align-self: start; order: 3; }

  /* spec sheet (dl): key -> value rows */
  .th-spec { border-top: 1px solid var(--th-hairline-strong); }
  .th-spec > div { display: grid; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--th-hairline); }
  .th-spec dt { font: var(--th-small); color: var(--th-ink-2); }
  .th-spec dd { margin: 0; font: 400 15px/1.5 var(--th-font-ui); min-width: 0; }
  @media (min-width: 640px) { .th-spec > div { grid-template-columns: minmax(150px, 240px) minmax(0, 1fr); } }
  @media (min-width: 720px) { .th-spec > div { grid-template-columns: minmax(230px, 1fr) minmax(0, 2.4fr); } }   /* same columns as .th-rows, so a spec and a list in one section line up */

  /* aligned list: features as rows, not cards */
  .th-rows { list-style: none; border-top: 1px solid var(--th-hairline-strong); counter-reset: r; }
  .th-rows > li { display: grid; gap: 4px 32px; padding: 16px 0; border-bottom: 1px solid var(--th-hairline); }
  .th-rows__t { font: 500 16px/1.4 var(--th-font-ui); letter-spacing: -.005em; }
  .th-rows__d { color: var(--th-ink-2); font: 400 15px/1.55 var(--th-font-ui); max-width: 62ch; }
  @media (min-width: 720px) { .th-rows > li { grid-template-columns: minmax(230px, 1fr) minmax(0, 2.4fr); } }   /* 230 px keeps titles of about 28 characters off a second line at tablet width */
  @media (min-width: 720px) { .th-rows > li:has(> :only-child) { grid-template-columns: minmax(0, 1fr); } }   /* a title-only row (a contents list) uses the full width instead of a narrow first column */
  .th-cover { margin: 0; border-radius: var(--th-r-inner); overflow: hidden; border: 1px solid var(--th-hairline); background: var(--th-void); aspect-ratio: 16 / 9; max-height: 560px; width: 100%; }   /* a record's cover under its title */
  .th-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .th-rows--num > li { counter-increment: r; }
  .th-rows--num .th-rows__t { padding-left: 2.2em; text-indent: -2.2em; }   /* a wrapped title hangs clear of its number */
  .th-rows--num .th-rows__t::before { content: counter(r, decimal-leading-zero); display: inline-block; min-width: 2.2em; text-indent: 0; color: var(--th-ink-2); font-weight: 400; }
  a.th-rows__t { display: flex; align-items: center; min-height: 44px; }   /* a row title that is a link gets a full target */

  /* table: dense 40 px rows; label-over-value on phones (give each td a data-label) */
  .th-table { width: 100%; font: 400 14px/1.4 var(--th-font-ui); }
  .th-scene > .th-stack:has(> .th-table) { max-width: var(--th-measure); }   /* a table beside prose keeps the prose width */
  .th-table th { text-align: left; padding: 10px 16px 10px 0; font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); border-bottom: 1px solid var(--th-hairline-strong); }
  .th-table td { min-height: 40px; padding: 10px 16px 10px 0; vertical-align: top; border-bottom: 1px solid var(--th-hairline); }
  .th-table .th-num { text-align: right; padding: 10px 0 10px 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }   /* two number columns, or a number then a text column, keep a gap */
  .th-table .th-num + :not(.th-num) { padding-left: 20px; }
  .th-table td:first-child { color: var(--th-ink); }
  .th-table td { color: var(--th-ink-2); }
  .th-table tr[aria-selected="true"], tr[aria-selected="true"] { background: var(--th-fill-ghost); }   /* the selected row tint: the same fill as .th-row[aria-selected] */
  @media (max-width: 639px) {
    .th-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .th-table, .th-table tbody, .th-table tr, .th-table td { display: block; }
    .th-table tr { padding: 12px 0; border-bottom: 1px solid var(--th-hairline); }
    .th-table td, .th-table td.th-num, .th-table td.th-num + td { display: grid; gap: 2px; padding: 4px 0; border: 0; text-align: left !important; white-space: normal; }
    .th-table td::before { content: attr(data-label); font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); }
    .th-table td:first-child::before { display: none; }
  }

  /* an inline link in a table, spec or list gets a 44 px hit area without moving the text */
  .th-table td a, .th-spec dd a, .th-rows__d a { padding-block: 13px; }

  /* pipeline / ladder / sequence: ordered steps */
  .th-steps { list-style: none; counter-reset: s; display: grid; gap: 0; }
  .th-steps > li { position: relative; counter-increment: s; display: grid; gap: 4px; padding: 0 0 28px 52px; min-width: 0; }
  .th-steps > li:last-child { padding-bottom: 0; }
  .th-steps > li::before {
    content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--th-surface-2); box-shadow: inset 0 0 0 1px var(--th-hairline-strong); font: 500 13px/1 var(--th-font-ui); color: var(--th-ink);
  }
  .th-steps > li::after { content: ""; position: absolute; left: 15.5px; top: 34px; bottom: 2px; width: 1px; background: var(--th-hairline-strong); }
  .th-steps > li:last-child::after { display: none; }
  .th-steps__t { font: 500 16px/1.35 var(--th-font-ui); }
  .th-steps__d { color: var(--th-ink-2); font: 400 15px/1.55 var(--th-font-ui); max-width: 62ch; }
  .th-steps--lit > li.is-lit::before { background: var(--th-ink); color: var(--th-void); box-shadow: none; }
  @media (min-width: 900px) {
    .th-steps--row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 28px; }
    .th-steps--row > li { padding: 52px 0 0 0; align-content: start; }   /* unequal text keeps the titles on one line */
    .th-steps--row > li::before { top: 0; }
    .th-steps--row > li::after { left: 44px; right: -28px; top: 15.5px; bottom: auto; width: auto; height: 1px; }
  }
  /* sequence: from -> to message rows */
  .th-seq { list-style: none; border-top: 1px solid var(--th-hairline-strong); }
  .th-seq > li { display: grid; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--th-hairline); align-items: baseline; }
  .th-seq__who { display: flex; align-items: center; gap: 10px; font: 500 14px/1.3 var(--th-font-ui); }
  .th-seq__who .th-icon { color: var(--th-ink-2); }
  .th-seq__msg { color: var(--th-ink-2); font: 400 15px/1.5 var(--th-font-ui); }
  @media (min-width: 720px) { .th-seq > li { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); } }

  /* option columns: decisions (chosen, why, what would reverse it) */
  .th-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  @media (min-width: 900px) { .th-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .th-option { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 14px; padding: 24px; border-radius: var(--th-r-card); background: var(--th-surface-1); border: 1px solid var(--th-hairline); }
  .th-option[data-chosen] { background: var(--th-surface-2); border-color: rgba(244, 243, 247, .4); box-shadow: inset 0 1px 0 rgba(244, 243, 247, .12); }
  .th-option[data-chosen] > .th-label { color: var(--th-ink); }
  .th-option h3 { font: 400 24px/1.2 var(--th-font-display); letter-spacing: var(--th-title-track); }
  .th-option dl { display: grid; gap: 12px; margin: 0; }
  .th-option dt { font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink-2); margin-bottom: 4px; }
  .th-option dd { margin: 0; font: 400 15px/1.5 var(--th-font-ui); }

  /* formula block: Geist Mono literals, 12 to 14 px, recessed field */
  .th-formula { display: block; padding: 16px 20px; overflow-x: auto; border-radius: var(--th-r-inner); background: rgba(0, 0, 0, .25); box-shadow: rgba(0, 0, 0, .25) 0 0 12px inset, inset 0 0 0 1px var(--th-hairline); font: 400 13px/1.7 var(--th-font-data); color: var(--th-ink); tab-size: 2; white-space: pre; hyphens: none; font-variant-numeric: tabular-nums; }
  .th-formula .c { color: var(--th-ink-2); }   /* comment / annotation inside a formula */
  .th-formula-cap { margin-bottom: 8px; }
  @media (max-width: 719px) { .th-formula { white-space: pre-wrap; overflow-wrap: anywhere; } .th-formula .c { display: block; margin-bottom: 4px; } }   /* phones: lines wrap and each note drops under its formula, so nothing is hidden off the edge */

  /* specimen plate: the page's one floating plate, with sample data labelled "Sample" */
  .th-specimen { position: relative; }
  .th-specimen .th-specimen-body { padding-top: clamp(44px, 5vw, 56px); }

  /* quote: Outfit 400, ink, no bar */
  .th-quote { max-width: 28em; font: 400 clamp(24px, 2.6vw, 32px)/1.25 var(--th-font-display); letter-spacing: var(--th-section-track); text-wrap: balance; }
  .th-quote cite { display: block; margin-top: 16px; font: 400 14px/1.4 var(--th-font-ui); letter-spacing: 0; color: var(--th-ink-2); font-style: normal; }

  /* sources: a numbered list; .th-ref is the inline [n] marker */
  .th-sources { padding-left: 1.6em; color: var(--th-ink-2); font: 400 14px/1.55 var(--th-font-ui); max-width: 78ch; }
  .th-sources li { padding-left: .3em; }
  .th-sources li + li { margin-top: 10px; }
  .th-sources li::marker { color: var(--th-ink-2); font-variant-numeric: tabular-nums; }
  .th-cites { display: grid; gap: 0; padding: 0; list-style: none; border-top: 1px solid var(--th-hairline-strong); max-width: 78ch; }
  .th-cites li { padding: 14px 0; border-bottom: 1px solid var(--th-hairline); font: 400 15px/1.55 var(--th-font-ui); color: var(--th-ink-2); }
  .th-cites strong { font-weight: 500; color: var(--th-ink); }
  .th-cites a { color: var(--th-ink); text-decoration: underline; text-decoration-color: rgba(244, 243, 247, .35); text-underline-offset: .2em; }
  .th-cites a:hover { text-decoration-color: var(--th-ink); }
  .th-sources a { color: var(--th-ink); text-decoration: underline; text-decoration-color: rgba(244, 243, 247, .35); text-underline-offset: .2em; }
  .th-sources a:hover { text-decoration-color: var(--th-ink); }
  /* inline source marker <sup class="th-ref"><a href="#src-1">1</a></sup>: a raised 12 px numeral (never on the baseline, where it reads as a typo), a little air before it,
     a comma between markers that touch (th.js adds .th-ref--join; the CSS + combinator skips text, so it cannot tell touching from separated), and a 44 px hit area that is invisible and reaches into the line above and below */
  .th-ref { position: relative; top: -.6em; font: 500 12px/0 var(--th-font-ui); font-variant-numeric: tabular-nums; vertical-align: baseline; color: var(--th-ink-2); margin-left: .18em; white-space: nowrap; }
  .th-ref a { position: relative; display: inline; padding: 0 1px; border-radius: 4px; }
  .th-ref a::after { content: ""; position: absolute; inset: -16px -10px; }
  .th-ref a:hover { color: var(--th-ink); }
  .th-nb { white-space: nowrap; }   /* th.js wraps an exponent such as 1e-3 so it never breaks at its hyphen */
  .th-ref--join { margin-left: 0; }
  .th-ref--join::before { content: ","; margin-right: 1px; }
  .th-asof { font: 400 14px/1.4 var(--th-font-ui); color: var(--th-ink-2); }
  /* "Built with": one plain Geist sentence below the fold (replaces the hero facts strip) */
  .th-built { display: grid; gap: 6px; max-width: var(--th-measure); }
  .th-built p { font: 400 15px/1.55 var(--th-font-ui); color: var(--th-ink-2); }

  /* legend: swatch + label; set --c on the swatch (or pass a fill class) */
  .th-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; color: var(--th-ink-2); font: 400 13px/1.4 var(--th-font-ui); }
  .th-legend li { display: inline-flex; align-items: center; gap: 8px; }
  .th-swatch { width: 14px; height: 10px; flex: none; border-radius: var(--th-r-pill); display: inline-block; background: var(--c, rgba(244, 243, 247, .22)); box-shadow: inset 0 0 0 1px var(--th-hairline-strong); }
  /* track: a 36 px bar with quarter gridlines; children are absolutely positioned segments (<i style="left:..;width:..">).
     th-slider adds the pointer affordances of a role="slider" track: keep vertical scrolling on touch, horizontal drag on mouse.
     Give a slider track tabindex="0", role="slider", aria-valuemin/max/now/text and its own keydown handler; it takes the global focus ring. */
  .th-track { position: relative; height: 36px; border-radius: var(--th-r-pill); overflow: hidden; background: rgba(244, 243, 247, .05); box-shadow: inset 0 0 0 1px var(--th-hairline-strong); }
  .th-track::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(25% - 1px), var(--th-hairline-strong) calc(25% - 1px) 25%, transparent 25% calc(50% - 1px), var(--th-hairline-strong) calc(50% - 1px) 50%, transparent 50% calc(75% - 1px), var(--th-hairline-strong) calc(75% - 1px) 75%, transparent 75%); }
  .th-track > i { position: absolute; top: 4px; bottom: 4px; border-radius: var(--th-r-pill); background: rgba(244, 243, 247, .22); }
  .th-track > i.th-track__full { top: 0; bottom: 0; border-radius: 0; }
  .th-track > i.th-track__dim { background: rgba(0, 0, 0, .34); }
  .th-slider { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
  .th-slider:focus-visible { outline-offset: 3px; }

  /* gated state and empty state */
  .th-gated, .th-empty { display: grid; justify-items: start; gap: 12px; padding: 28px; border-radius: var(--th-r-card); }
  .th-gated { background: var(--th-surface-1); border: 1px solid var(--th-hairline-strong); }
  .th-gated .th-icon { width: 20px; height: 20px; color: var(--th-ink-2); }
  .th-empty { border: 1px solid var(--th-hairline-strong); background: rgba(244, 243, 247, .02); color: var(--th-ink-2); }   /* a solid hairline, never dashed */
  .th-gated p, .th-empty p { max-width: 46ch; color: var(--th-ink-2); font: 400 15px/1.55 var(--th-font-ui); }

  /* disclosure: technical details collapsed */
  .th-details { border-top: 1px solid var(--th-hairline-strong); border-bottom: 1px solid var(--th-hairline-strong); }
  .th-details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 8px 0; list-style: none; cursor: pointer; font: 500 15px/1.35 var(--th-font-ui); }
  .th-details summary::-webkit-details-marker { display: none; }
  .th-details summary .th-icon { color: var(--th-ink-2); transition: transform var(--th-dur-exit) var(--th-ease-standard); }
  .th-details[open] summary .th-icon { transform: rotate(180deg); }
  .th-details > :not(summary) { padding-bottom: 20px; }

  /* figures with captions */
  .th-figure { display: grid; gap: 12px; }
  .th-figure figcaption { font: var(--th-caption); font-size: 13px; line-height: 1.5; color: var(--th-ink-2); max-width: 70ch; }

  /* ---------- diagram primitives (SVG). Labels are ink and at least 12 user units at the size they render.
     Design the wide SVG at viewBox width 720 (it never renders narrower) and the tall one at 340; show one per breakpoint. ---------- */
  .th-dg { display: block; width: 100%; height: auto; overflow: visible; font: 500 13px/1.3 var(--th-font-ui); fill: var(--th-ink); --lit: var(--th-lit); }
  .th-dg--tall { display: block; max-width: 420px; margin-inline: auto; }
  .th-dg--wide { display: none; }
  @media (min-width: 720px) { .th-dg--tall { display: none; } .th-dg--wide { display: block; } }
  .th-figure > .th-dg--wide { max-width: 720px; }   /* a section diagram stays at reading size beside its prose */
  /* hero column is under 480 px wide between 1100 and 1279 px: a hero that carries both drawings shows the tall one there */
  @media (min-width: 1100px) and (max-width: 1279px) { .th-hero-visual:has(.th-dg--tall) .th-dg--wide { display: none; } .th-hero-visual:has(.th-dg--wide) .th-dg--tall { display: block; } }
  .th-dg-node { fill: var(--th-surface-2); stroke: var(--th-hairline-strong); stroke-width: 1; }
  .th-dg-node--on { stroke: var(--th-ink); stroke-width: 1.5; }
  .th-dg-node--dim { fill: var(--th-surface-1); }
  .th-dg-label { fill: var(--th-ink); font: 500 14px var(--th-font-ui); letter-spacing: -.005em; }   /* 14 and 13 keep a 720-wide drawing at 12 px or more down to a 600 px column */
  .th-dg-sub { fill: var(--th-ink-2); font: 400 13px var(--th-font-ui); }
  .th-dg-mono { fill: var(--th-ink-2); font: 400 12px var(--th-font-data); }
  .th-dg-edge { fill: none; stroke: var(--th-ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; marker-end: url(#th-dg-arrow); }
  .th-dg-edge--plain { marker-end: none; }
  .th-dg-edge--gap { stroke-dasharray: 3 5; }
  .th-dg-edge--lit { stroke: var(--lit); stroke-width: 2.25; marker-end: url(#th-dg-arrow-lit); }   /* the one lit path */
  .th-dg-zone { fill: rgba(244, 243, 247, .02); stroke: var(--th-hairline-strong); stroke-width: 1; }
  .th-dg-zone-label { fill: var(--th-ink-2); font: 500 13px var(--th-font-ui); letter-spacing: .11em; text-transform: uppercase; }
  .th-dg-mark { fill: var(--th-ink-2); }                       /* identity marks: at most four hues per diagram */
  .th-dg-mark--1 { fill: var(--th-approach); } .th-dg-mark--2 { fill: var(--th-violet-mid); } .th-dg-mark--3 { fill: var(--th-recede); } .th-dg-mark--4 { fill: var(--th-core); }
  .th-dg-lit { stroke: var(--lit); }
  .th-dg-frame { fill: none; stroke: var(--th-hairline-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }   /* the window of a plotted field, so empty margins read as data */
  .th-dg-arrow path { fill: none; stroke: var(--th-ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .th-dg-arrow--lit path { stroke: var(--th-lit); }
  .th-dg-draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--th-ease-decay); }   /* signature moment (the lit path draws): literal on purpose, like the .fg-draw and .fg-part timings below */
  html.th-ready[data-motion="full"] .th-dg-draw:not(.is-in) { stroke-dashoffset: var(--len, 1000); }
  /* ---------- chart: bars and one or two lines, from tokens. Marks are ink (ink-2 at rest); the one highlighted series takes the app accent
     (--th-app-accent, else ink) and also a heavier stroke and a direct label, so colour never carries it alone. Hairline axes and grid, labels are real
     HTML text of 12 px or more (never scaled with the drawing), no red or green. The SVG carries a title and desc; the bars are a list that reads as text. ---------- */
  .th-chart { --th-chart-accent: var(--th-app-accent, var(--th-ink)); display: grid; align-content: start; gap: var(--th-space-4); min-width: 0; }
  .th-chart__bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--th-space-3); }
  .th-chart__bars li { display: grid; grid-template-columns: minmax(72px, 28%) minmax(0, 1fr) auto; align-items: center; gap: var(--th-space-3); font: var(--th-small); color: var(--th-ink-2); }
  .th-chart__bars .th-chart__v { font-variant-numeric: tabular-nums; color: var(--th-ink); min-width: 2.5ch; text-align: right; }
  .th-chart__track { display: block; height: var(--th-space-2); border-radius: var(--th-r-pill); background: var(--th-fill-ghost); overflow: hidden; }
  .th-chart__track > i { display: block; height: 100%; width: calc(var(--v, 0) * 1%); border-radius: inherit; background: var(--th-ink-2); }
  .th-chart__bars li[data-lit] { color: var(--th-ink); }
  .th-chart__bars li[data-lit] .th-chart__track > i { background: var(--th-chart-accent); }
  .th-chart__plot { position: relative; height: 200px; margin: var(--th-space-2) 0 0 var(--th-space-10); }
  .th-chart__plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .th-chart__grid { stroke: var(--th-hairline); stroke-width: 1; vector-effect: non-scaling-stroke; }
  .th-chart__axis { stroke: var(--th-hairline-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
  .th-chart__line { fill: none; stroke: var(--th-ink-2); stroke-width: var(--th-fig-line); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .th-chart__line--lit { stroke: var(--th-chart-accent); stroke-width: var(--th-fig-line-lit); }
  .th-chart__y, .th-chart__x span, .th-chart__end { position: absolute; font: var(--th-caption); font-variant-numeric: tabular-nums; color: var(--th-ink-2); white-space: nowrap; }
  .th-chart__y { right: calc(100% + var(--th-space-2)); transform: translateY(-50%); text-align: right; }
  .th-chart__end { left: calc(100% + var(--th-space-2)); transform: translateY(-50%); }
  .th-chart__end--lit { color: var(--th-ink); font-weight: 500; }
  .th-chart__x { position: relative; height: var(--th-space-5); margin: 0 0 0 var(--th-space-10); }
  .th-chart__x span { top: 0; transform: translateX(-50%); }
  .th-chart__x span:first-child { transform: none; }
  .th-chart__x span:last-child { transform: translateX(-100%); }
  .th-chart--lines { padding-right: var(--th-space-12); }   /* room for the direct labels at the line ends */
  @media (max-width: 599px) { .th-chart__plot { height: 160px; } .th-chart--lines { padding-right: var(--th-space-10); } }
  /* reveal on enter: resolved by default; hidden only after th.js booted, in full motion */
  html.th-ready[data-motion="full"] .th-reveal:not(.is-in) { opacity: 0; transform: translateY(12px); }

  /* ---------- figures: one family for every diagram (drawn by scripts/site/figures.py, see its header) ----------
     A dark card (32 px, --th-r-card) holds a stage (24 px: 32 minus the 8 px inset). Ink strokes at 1.25 px, one lit accent path per figure stroked with
     the screen's gradient, numbered callouts that match the key list, a caption under the card. The drawing is two SVGs on viewBoxes that render
     at about 0.8 to 1.15 scale; the key list is HTML so sentences wrap and nothing clips. Parts fade up in a stagger when the figure enters. */
  .th-fig { display: grid; gap: 14px; margin: 0; min-width: 0; }
  .th-fig__card {
    position: relative; padding: 8px; border-radius: var(--th-r-card);
    background: linear-gradient(180deg, rgba(244, 243, 247, .05), rgba(244, 243, 247, .016) 46%), var(--th-surface-1);
    box-shadow: inset 0 0 0 1px var(--th-hairline-strong), inset 0 1px 0 rgba(244, 243, 247, .08);
  }
  .th-fig__card::after {                      /* the rim is matter: the screen's gradient on a 1 px ring, as on the plates */
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; padding: 1px; background: var(--th-grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  .th-fig__stage {
    position: relative; overflow: hidden; border-radius: max(var(--th-r-min), calc(var(--th-r-card) - 8px)); padding: clamp(12px, 2.2vw, 24px);
    background:
      radial-gradient(90% 70% at 50% 110%, rgba(244, 243, 247, .035), transparent 70%),
      linear-gradient(rgba(244, 243, 247, .028) 1px, transparent 1px) 0 0 / 32px 32px,
      linear-gradient(90deg, rgba(244, 243, 247, .028) 1px, transparent 1px) 0 0 / 32px 32px,
      rgba(8, 8, 11, .62);
    box-shadow: inset 0 0 0 1px var(--th-hairline);
  }
  .th-fig--hero .th-fig__stage { padding: clamp(14px, 2.4vw, 28px); }
  .th-fig__key { list-style: none; display: grid; gap: 4px 28px; margin: 0; padding: 14px 16px 10px; }
  @media (min-width: 720px) { .th-fig__key { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); padding: 16px 16px 12px; } }
  .th-fig__key li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 6px 0; font: 400 14px/1.5 var(--th-font-ui); color: var(--th-ink-2); }
  .th-fig__key b { display: block; color: var(--th-ink); font-weight: 500; }
  .fg-n-i { display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; border-radius: 50%; font: 500 12px/1 var(--th-font-ui); font-style: normal; color: var(--th-ink); box-shadow: inset 0 0 0 1.25px var(--th-ink-2); font-variant-numeric: tabular-nums; }
  .th-fig__cap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: baseline; max-width: 76ch; padding-inline: 4px; font: 400 13px/1.55 var(--th-font-ui); color: var(--th-ink-2); }
  .th-fig__cap:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
  .th-fig__no { font: var(--th-label); letter-spacing: var(--th-label-track); text-transform: uppercase; color: var(--th-ink); white-space: nowrap; }
  @media (max-width: 599px) { .th-fig__cap { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

  .fg { display: block; width: 100%; height: auto; margin-inline: auto; overflow: visible; font: 500 15px/1.3 var(--th-font-ui); fill: var(--th-ink); user-select: none; -webkit-user-select: none; }
  .fg--wide { display: none; max-width: 880px; }
  .fg--tall { display: block; max-width: 380px; }
  @media (min-width: 720px) { .fg--wide { display: block; } .fg--tall { display: none; } }
  /* the hero column is narrow between 1100 and 1279 px: the tall drawing fits it better there */
  @media (min-width: 1100px) and (max-width: 1279px) { .th-hero-visual .th-fig:has(.fg--tall) .fg--wide { display: none; } .th-hero-visual .th-fig:has(.fg--wide) .fg--tall { display: block; } }
  .fg path, .fg line, .fg circle, .fg rect, .fg ellipse { stroke-linecap: round; stroke-linejoin: round; }
  .fg-ink { fill: none; stroke: var(--th-ink-2); stroke-width: 1.25; }
  .fg-dim { stroke: rgba(244, 243, 247, .3); }
  .fg-dash { stroke-dasharray: 3 5; }
  .fg-lead { fill: none; stroke: rgba(244, 243, 247, .38); stroke-width: 1; }
  .fg-box { fill: #141319; stroke: rgba(244, 243, 247, .24); stroke-width: 1.25; }   /* opaque, so a lit path passes behind it */
  .fg-box--off { fill: #0F0E13; stroke: rgba(244, 243, 247, .14); }
  .fg-zone { fill: rgba(244, 243, 247, .02); stroke: rgba(244, 243, 247, .18); stroke-width: 1.25; }   /* a zone is a solid hairline box, never dashed (dashes stay on lines that mean a route that is not taken) */
  .fg-lit { fill: none; stroke-width: 1.75; }                       /* the one lit path: stroke="url(#gradient)" on the element */
  .fg-glow { fill: none; stroke-width: 7; opacity: .2; stroke-linecap: round; }
  /* signature-moment timings (the lit path draws, the parts rise one after another): longer than any UI-state duration token on purpose */
  .fg-draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--th-ease-decay) calc(var(--i, 0) * 90ms + 120ms); }
  .fg-hit { fill: #FF9A3C; }
  .fg-disk { fill: rgba(244, 243, 247, .13); }
  .fg-hole { fill: #000; stroke: var(--th-ink); stroke-width: 1.25; }
  .fg-cam { fill: var(--th-void); stroke: var(--th-ink); stroke-width: 1.25; }
  .fg-camdot { fill: var(--th-ink); }
  .fg-t { fill: var(--th-ink); font: 500 16px var(--th-font-ui); letter-spacing: -.005em; }
  .fg-s { fill: var(--th-ink-2); font: 400 14.5px var(--th-font-ui); }
  .fg-m { fill: var(--th-ink-2); font: 400 14px var(--th-font-data); }
  .fg-big { fill: var(--th-ink); font: 400 30px var(--th-font-display); letter-spacing: -.02em; }
  .fg-n circle { fill: var(--th-void); stroke: var(--th-ink); stroke-width: 1.25; }
  .fg-n text { fill: var(--th-ink); font: 500 14.5px var(--th-font-ui); }
  .fg-k { fill: var(--th-ink-2); font: 500 15px var(--th-font-ui); letter-spacing: .1em; }
  .fg-box--on { stroke: var(--th-ink); fill: #19181F; }
  .fg-box--seal { fill: #161B2B; stroke: rgba(170, 200, 255, .6); }
  .fg-tt { fill: var(--th-ink); font-weight: 500; }
  .fg-sn { fill: var(--th-ink); font: 500 15px var(--th-font-ui); font-variant-numeric: tabular-nums; }
  .lb-a { fill: rgba(244, 243, 247, .13); } .lb-b { fill: rgba(244, 243, 247, .27); }
  /* nested layers drawn in HTML (a seal inside a seal): the text wraps, so it can never clip. Radii step down 24 > 16, never below the 16 px floor (--th-r-min). */
  .th-layers { display: grid; }
  .th-layer { display: grid; gap: 4px; padding: 16px 16px 16px; border-radius: var(--th-r-inner); box-shadow: inset 0 0 0 1.25px rgba(244, 243, 247, .24); background: rgba(244, 243, 247, .02); min-width: 0; }
  .th-layer--1 { padding: 18px 18px 18px; box-shadow: none; background: rgba(244, 243, 247, .028); border: 1.25px solid rgba(244, 243, 247, .16); }
  .th-layer--2 { position: relative; margin-top: 12px; border-radius: var(--th-r-min); box-shadow: none; background: rgba(244, 243, 247, .045); }
  .th-layer--2::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--th-grad); pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }   /* the one lit edge */
  .th-layer--3 { margin-top: 12px; border-radius: var(--th-r-min); background: rgba(8, 8, 11, .55); }
  .th-layer__t { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 16px/1.3 var(--th-font-ui); color: var(--th-ink); min-width: 0; }
  .th-layer__s { margin: 0 0 0 34px; font: 400 14px/1.45 var(--th-font-ui); color: var(--th-ink-2); }
  .th-layer--1 .th-layer__t { font-size: 15px; }
  .th-layer .fg-n-i { flex: none; }
  .pk-total { font: 400 30px var(--th-font-display); }
  /* the stage numbers in the latency table match the numbered blocks in the bars */
  .th-table--steps { counter-reset: st; }
  .th-table--steps tbody tr:not(.th-sum) td:first-child::before { counter-increment: st; content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; font: 500 12px/1 var(--th-font-ui); color: var(--th-ink); box-shadow: inset 0 0 0 1.25px var(--th-ink-2); font-variant-numeric: tabular-nums; vertical-align: 1px; }
  .th-table--steps tbody tr.th-sum td { color: var(--th-ink); }
  /* reveal: parts rise and fade in one after another, the lit path draws; resolved before JS and in calm mode */
  .fg-part { transition: opacity .8s var(--th-ease-decay) calc(var(--i, 0) * 90ms), transform .8s var(--th-ease-decay) calc(var(--i, 0) * 90ms); }
  html.th-ready[data-motion="full"] .th-fig:not(.is-in) .fg-part { opacity: 0; transform: translateY(6px); }
  html.th-ready[data-motion="full"] .th-fig:not(.is-in) .fg-draw { stroke-dashoffset: 1; }

  /* ---------- footer: previous/next, site footer, credits ---------- */
  .th-pn { display: grid; gap: 12px; }
  @media (min-width: 720px) { .th-pn { grid-template-columns: 1fr 1fr; } }
  .th-pn > a[rel] { position: relative; display: grid; gap: 6px; align-content: start; padding: 20px 24px; min-height: 96px; border-radius: var(--th-r-card); background: var(--th-surface-1); border: 1px solid var(--th-hairline); transition: background-color var(--th-dur-tint-slow) var(--th-ease-decay), border-color var(--th-dur-tint-slow) var(--th-ease-decay); }
  .th-pn > a[rel]:hover { background: #121117; border-color: rgba(244, 243, 247, .14); }
  .th-pn .th-label { display: inline-flex; align-items: center; gap: 8px; }
  @media (min-width: 720px) { .th-pn a[rel="next"] { text-align: right; grid-column: 2; } .th-pn a[rel="next"] .th-label { justify-content: flex-end; } }   /* Next always on the right, even alone */
  .th-pn__all { grid-column: 1 / -1; display: flex; justify-content: center; margin: 12px 0 0; }   /* both neighbours: centred under the pair */
  @media (min-width: 720px) {
    .th-pn--next-only .th-pn__all { grid-column: 1; grid-row: 1; align-self: center; justify-content: flex-start; margin: 0; }   /* the first page: "All" takes the empty left slot */
    .th-pn--prev-only .th-pn__all { grid-column: 2; grid-row: 1; align-self: center; justify-content: flex-end; margin: 0; }
  }
  .th-footer { background: var(--th-void); padding-block: clamp(56px, 8vw, 104px) 40px; border-top: 1px solid var(--th-hairline); }
  .th-footer-mark { font: 400 clamp(34px, 10.2vw, 120px)/1 var(--th-font-display); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 clamp(28px, 4vw, 48px); padding-right: .18em; background: var(--th-grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; max-width: 100%; white-space: nowrap; }   /* the wordmark in caps takes the screen's gradient (shape-and-gradients.md); 8.4 em wide, so 10.2 vw fits a 16 px gutter down to 320 px */
  @media (min-width: 560px) { .th-footer-mark { font-weight: 300; } }   /* 300 is allowed from 56 px up (10.2 vw reaches 56 px at 549 px) */
  .th-footer-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 0 32px -12px; }
  .th-footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--th-r-pill); font: 400 15px/1 var(--th-font-ui); color: var(--th-ink-2); transition: color var(--th-dur-tint) var(--th-ease-decay), background-color var(--th-dur-tint) var(--th-ease-decay); }
  .th-footer-nav a:hover { color: var(--th-ink); background: var(--th-hover); }
  .th-footer-nav a[aria-current="page"] { color: var(--th-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }   /* the current page: ink, 2 px underline, as the menu sheet */
  .th-footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
  .th-footer-meta p { font: 400 14px/1.5 var(--th-font-ui); color: var(--th-ink-2); }
  .th-credits { margin-top: 24px; max-width: 90ch; font: 400 12px/1.6 var(--th-font-ui); color: var(--th-ink-2); }
  .th-credits a { color: var(--th-ink); text-decoration: underline; text-decoration-color: rgba(244, 243, 247, .35); text-underline-offset: .2em; }
  .th-footer-band { margin-top: 32px; border-radius: var(--th-r-sheet); overflow: hidden; aspect-ratio: 21 / 6; background: var(--th-surface-1); }
  .th-footer-band img { width: 100%; height: 100%; object-fit: cover; }
}

/* =====================================================================
   CALM MODE, REDUCED MOTION AND ACCESSIBILITY FALLBACKS (unlayered, so they always win)
   ===================================================================== */
/* calm and reduced motion: resolved stills, content always visible. Nothing moves or scales; colour and opacity
   changes crossfade over --th-dur-fade so state changes still read as deliberate (the designed alternative, not "off"). The focus ring appears at once. */
html[data-motion="calm"] *, html[data-motion="calm"] *::before, html[data-motion="calm"] *::after {
  animation-duration: 0s !important; animation-delay: 0s !important; scroll-behavior: auto !important;
  transition-property: opacity, color, background-color, border-color, box-shadow !important; transition-duration: var(--th-dur-fade) !important; transition-delay: 0s !important; transition-timing-function: ease !important;
}
html[data-motion="calm"] :is(.th-pill, .th-circle, .th-seg > button):active { scale: none; }
html[data-motion="calm"] .th-reveal { opacity: 1 !important; transform: none !important; }
html[data-motion="calm"] .th-dg-draw { stroke-dashoffset: 0 !important; }
html[data-motion="calm"] [data-th-pause], html[data-motion="calm"] .th-dust-canvas { display: none !important; }
html[data-motion="calm"] .th-visual video { opacity: 0 !important; }
html[data-motion="calm"] [data-dust="run"]::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; scroll-behavior: auto !important; transition-property: opacity, color, background-color, border-color, box-shadow !important; transition-duration: var(--th-dur-fade) !important; transition-delay: 0s !important; transition-timing-function: ease !important; }
  :is(.th-pill, .th-circle, .th-seg > button):active { scale: none; }
  .th-reveal { opacity: 1 !important; transform: none !important; }
  .th-dg-draw { stroke-dashoffset: 0 !important; }
}
/* before the page has booted nothing is hidden: reveals key off html.th-ready only (see the layer above) */

/* ported from the NZ fallbacks: increased contrast and forced colours; this kit has no blur, so there is no transparency fallback to keep */
@media (prefers-contrast: more) {
  :root { --th-hairline: rgba(244, 243, 247, .28); --th-hairline-strong: rgba(244, 243, 247, .5); --th-ink-2: #D2D0DA; }
  .th-header, .th-header[data-solid="1"] { background: var(--th-void); }
  .th-pill--ghost, .th-circle, .th-chip { box-shadow: inset 0 0 0 1px var(--th-ink); }
}
@media (forced-colors: active) {
  .th-footer-mark { color: CanvasText; background: none; }
  .th-header, .th-sheet, .th-plate, .th-card, .th-toolplate, .th-option, .th-pn > a[rel], .th-gated, .th-formula { background: Canvas; color: CanvasText; border: 1px solid CanvasText; forced-color-adjust: auto; }
  .th-plate::after, .th-toolplate::before, .th-toolplate::after, .th-header::after { content: none; }
  .th-pill--primary { background: ButtonText; color: ButtonFace; }
  .th-pill--ghost, .th-circle, .th-seg > button { border: 1px solid ButtonText; }
  .th-dot { --th-dot-ink: CanvasText; forced-color-adjust: none; }   /* the mask glyphs stay; only the colour is the system's */
  :focus-visible { outline-color: Highlight; }
  .th-dg-node, .th-dg-zone, .th-dg-edge { stroke: CanvasText; }
  .th-chart__line { stroke: CanvasText; } .th-chart__line--lit { stroke: Highlight; } .th-chart__track > i { background: CanvasText; forced-color-adjust: none; }
  .th-dg-edge--lit { stroke: Highlight; }
}
@supports not (clip-path: inset(0 -100vmax)) { .th-scene[data-ground] { box-shadow: none; } }
@media print {
  .th-header, .th-sheet, .th-index, .th-skip, [data-th-pause], .th-calm { display: none !important; }
  body { padding-top: 0; background: #fff; color: #111; }
}
