/* ==========================================================================
   MDC design tokens. Every colour, size, radius, shadow, easing and layer the
   site shares lives here. Read DESIGN.md before adding to this file.
   Rule: page and section CSS uses these variables; never a raw hex, never a
   one-off font size, never a one-off easing.
   Three surface tiers: 1. paper (crisp cream, one lemon-butter field, aqua image grounds, borderless tinted cards)
                        2. immersive (full-bleed photos, scrims, glass, the transparent header on a photo)
                        3. night (dark bands)
   Components never read --ink / --line directly for text or rules that sit on a surface: they read the SURFACE
   tokens (--fg, --fg-2, --fg-3, --rule, --rule-2, --fg-link, --fg-mark, --fg-em, --face, --state-*), which
   base.css re-points on night (.section-dark, .card-dark, .surface-dark) and photo (.on-photo, .photo-card, .bleed)
   surfaces and resets on a white card (.card-white, .surface-light). So every pattern reads on paper, tint, night
   and photo without a per-component override.
   ========================================================================== */

/* ---- Faces: Newsreader + Instrument Sans from Google Fonts (OFL), self-hosted latin / latin-ext woff2 subsets so they
   load from this origin, preloaded in head.html, font-display: swap. Five faces in use: Newsreader 300, 400 (one
   variable file), 300 italic · Instrument Sans 400, 500 (one variable file). Metric-matched local fallbacks keep the
   layout still if a face ever arrives late. ---- */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url("../assets/fonts/newsreader-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: "Newsreader"; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url("../assets/fonts/newsreader-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("../assets/fonts/newsreader-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; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("../assets/fonts/newsreader-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../assets/fonts/instrument-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../assets/fonts/instrument-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* fallbacks sized to the real faces' average glyph width and vertical metrics */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"), local("Times New Roman"), local("Liberation Serif"); size-adjust: 94%; ascent-override: 78%; descent-override: 28%; line-gap-override: 0%; }
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 102.5%; ascent-override: 94.6%; descent-override: 24.4%; line-gap-override: 0%; }

:root {
  /* ---- Colour: paper (crisp, bright, never khaki) ---- */
  --canvas: #fbf9f4;          /* page background: crisp cream */
  --canvas-2: #ece5d6;        /* sunken area: image placeholders, disclaimer fill */
  --tint: #f2ecdf;            /* the default card on the canvas: a borderless tinted surface (1.12:1 off the canvas) */
  --butter: #fcf19e;          /* THE committed field: a clean lemon butter (hue 53, not custard), one per page.
                                 1.10:1 off the canvas; never faded straight into mist */
  --mist: #d3efe7;            /* clean aqua: image grounds (map, workspace) and the optional aqua field */
  --surface: #ffffff;         /* cards on a coloured field, panels on a field, inputs */
  --surface-2: #fdfcf8;       /* hover fill on white */

  /* ---- Colour: ink (text) ---- */
  --ink: #111b1d;             /* headings, body: 16.6:1 canvas, 15.2:1 butter */
  --ink-2: #3a4548;           /* ledes, card copy: 9.4:1 canvas, 8.6:1 butter, 8.4 tint, 8.1 mist */
  --ink-3: #56615f;           /* meta, captions, placeholders: 6.1 canvas, 5.6 butter, 5.4 tint, 5.3 mist, 6.4 white */

  /* ---- Colour: hairlines ---- */
  --line: rgba(17, 27, 29, 0.10);       /* dividers */
  --line-2: rgba(17, 27, 29, 0.18);     /* ruled grids, secondary button border */
  --control-border: #8b8478;            /* form control border, warm: 3.7:1 white, 3.15:1 tint (WCAG 1.4.11) */

  /* ---- Colour: teal accent family (the only accent) ---- */
  --teal-50: #e9f6f2;         /* tinted fill: selected menu row, small badges */
  --teal-100: #d1eee6;        /* hover of the tinted fill */
  --teal-200: #a8dbd1;        /* ::selection, italic on photos */
  --teal-300: #63c2b4;        /* text / italic on --night (8.6:1) */
  --teal-400: #2bb3a3;        /* LUMINOUS teal: scan line, reticle, dots, halos. Never text on light */
  --teal-500: #128f86;        /* rings, bars, meters, focus. Never small text */
  --teal-600: #00857a;        /* primary button fill: a saturated mid teal, white text 4.53:1 */
  --teal-700: #0a625c;        /* link text, eyebrows: 6.9:1 canvas, 6.3:1 butter, 5.9 mist, 7.2:1 white */
  --teal-800: #0a4c48;        /* text on teal-50 */
  --teal-900: #0b3533;        /* deep teal, dark-button hover */
  --accent: var(--teal-600);              /* the ONE main-action colour (header CTA + hero CTA + primary buttons) */
  --accent-hover: var(--teal-700);
  --accent-em: #009084;                   /* the expressive italic: a bright mid teal for DISPLAY type only (>= 24px):
                                             3.75:1 canvas, 3.4:1 butter, 3.4:1 mist, 4.0:1 white (large text needs 3:1) */
  --accent-em-sm: var(--teal-700);        /* the same emphasis under 24px (h3, card titles) */
  --on-accent: #ffffff;                   /* text on --accent: 4.53:1 */

  /* ---- Colour: night (dark sections) ---- */
  --night: #0d1719;
  --night-2: #172427;
  --night-3: #1f2f32;         /* a hovered / focused night-2 card (on-night 12:1, on-night-2 7.0:1, on-night-3 4.8:1) */
  --on-night: #f2f0eb;        /* 16:1 */
  --on-night-2: #aebbbb;      /* 9.2:1 night, 8.1:1 night-2 */
  --on-night-3: #8c9b9b;      /* meta on night: 6.3:1 night, 5.5:1 night-2 */
  --line-night: rgba(255, 255, 255, 0.14);
  --line-night-2: rgba(255, 255, 255, 0.24);

  /* ---- Colour: results states (data-viz only: range bars, meters, charts, finding chips). Teal stays the one
     brand accent; these say "in range / borderline / out of range" and nothing else. Never a button, link or field.
     *-600 = marks and fills on paper (>= 3:1 on canvas, tint, butter, white) · *-700 = state text on paper (>= 5:1)
     *-300 = marks and text on night or a photo (>= 6:1 night) · *-50 = a chip's fill on paper ---- */
  --flag-50: #fdebe5;         /* out of range: chip fill (flag-800 on it 7.2:1) */
  --flag-300: #f4937a;        /* on night: 8.1:1 night, 7.1:1 night-2 */
  --flag-600: #c4402a;        /* marks on paper: 4.9 canvas, 4.4 butter, 4.3 tint, 5.1 white */
  --flag-700: #a8341f;        /* text on paper: 6.3 canvas, 5.7 butter, 5.6 tint */
  --flag-800: #8f2a17;
  --watch-50: #fcf1d9;        /* borderline: chip fill (watch-800 on it 7.4:1) */
  --watch-300: #f1c15c;       /* on night: 10.9:1 */
  --watch-600: #b97a0e;       /* marks on paper: 3.4 canvas, 3.1 butter, 3.05 tint */
  --watch-700: #8a5800;       /* text on paper: 5.7 canvas, 5.2 butter, 5.1 tint */
  --watch-800: #6e4600;

  /* ---- Immersive tier: photo scrims, on-photo text, glass ----
     Scrims sit between a photo and its text. They are only as dark as the text needs: measured, every on-photo
     text box keeps its brightest-10% background at >= 4.5:1 against white (>= 3:1 for display type). */
  --photo-ink: 8, 15, 16;
  --scrim-bottom: linear-gradient(180deg, rgba(var(--photo-ink), 0) 0%, rgba(var(--photo-ink), 0.06) 38%, rgba(var(--photo-ink), 0.5) 68%, rgba(var(--photo-ink), 0.74) 100%);
  --scrim-left: linear-gradient(90deg, rgba(var(--photo-ink), 0.62) 0%, rgba(var(--photo-ink), 0.44) 32%, rgba(var(--photo-ink), 0.1) 58%, rgba(var(--photo-ink), 0) 72%);
  --scrim-bottom-tall: linear-gradient(180deg, rgba(var(--photo-ink), 0) 0%, rgba(var(--photo-ink), 0.08) 30%, rgba(var(--photo-ink), 0.5) 54%, rgba(var(--photo-ink), 0.8) 100%);   /* phones/tablets: copy in the lower half */
  --scrim-top: linear-gradient(180deg, rgba(var(--photo-ink), 0.42) 0, rgba(var(--photo-ink), 0.16) 96px, rgba(var(--photo-ink), 0) 200px);   /* under the transparent header */
  --scrim-card: linear-gradient(180deg, rgba(var(--photo-ink), 0) 34%, rgba(var(--photo-ink), 0.46) 58%, rgba(var(--photo-ink), 0.86) 100%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");   /* film grain over full-bleed photos */
  --on-photo: #ffffff;
  --on-photo-2: rgba(255, 255, 255, 0.92);
  --on-photo-line: rgba(255, 255, 255, 0.3);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-line: rgba(255, 255, 255, 0.3);
  --glass-hover: rgba(255, 255, 255, 0.24);
  --glass-line-strong: rgba(255, 255, 255, 0.6);
  --glass-light: rgba(255, 255, 255, 0.84);   /* light glass chip on a photo (ink text) */
  --glass-dark: rgba(8, 15, 16, 0.55);        /* dark glass behind small white text on a photo: >= 4.7:1 even over pure white */
  --glass-dark-hover: rgba(8, 15, 16, 0.68);  /* a hovered / focused dark-glass card: darker, never lighter, so its text holds */
  --glass-blur: blur(14px) saturate(1.4);
  --reticle-light: rgba(255, 255, 255, 0.92);
  --scrim-menu: rgba(13, 23, 25, 0.45);

  /* ---- Header ---- */
  --header-solid: rgba(251, 249, 244, 0.92);   /* paper header once the page has scrolled past the photo */
  --logo-on-photo: brightness(0) invert(1);     /* the mark turns white on a photo (CSS filter on the <img>) */

  /* ---- Colour fields (full-bleed bands). Fades are short (--fade px), then the field is solid ---- */
  --fade: clamp(160px, 22vw, 320px);
  --wash-sand: linear-gradient(180deg, var(--canvas) 0, var(--butter) var(--fade));
  --wash-sand-end: linear-gradient(0deg, var(--canvas) 0, var(--butter) var(--fade));
  --wash-field: linear-gradient(180deg, var(--canvas) 0, var(--butter) var(--fade), var(--butter) calc(100% - var(--fade)), var(--canvas) 100%);
  --wash-mist: linear-gradient(0deg, var(--canvas) 0, var(--mist) var(--fade));
  --wash-mist-in: linear-gradient(180deg, var(--canvas) 0, var(--mist) var(--fade));
  --wash-night: radial-gradient(110% 120% at 100% 0%, rgba(43, 179, 163, 0.32) 0%, rgba(43, 179, 163, 0) 55%), var(--night);
  --glow-teal: radial-gradient(closest-side, rgba(43, 179, 163, 0.35), rgba(43, 179, 163, 0));
  --halo: 0 0 0 4px rgba(43, 179, 163, 0.35);
  --halo-faint: rgba(43, 179, 163, 0);
  --halo-mid: rgba(43, 179, 163, 0.32);
  --ring-line-1: rgba(99, 194, 180, 0.5);
  --ring-line-2: rgba(99, 194, 180, 0.3);
  --ring-line-3: rgba(99, 194, 180, 0.16);

  /* ---- Colour: status ---- */
  --danger: #b42318;          /* 6.5:1 white */
  --ring-danger: 0 0 0 3px rgba(180, 35, 24, 0.2);

  /* ---- Focus ring & highlights ---- */
  --ring-color: var(--teal-500);
  --ring: 0 0 0 3px rgba(18, 143, 134, 0.28);
  --ring-strong: 0 0 0 3px rgba(18, 143, 134, 0.34);
  --ring-pulse: 0 0 0 10px rgba(18, 143, 134, 0.14);
  --ring-start: 0 0 0 0 rgba(18, 143, 134, 0.55);
  --link-underline: rgba(10, 98, 92, 0.35);
  --link-underline-night: rgba(99, 194, 180, 0.4);
  --hover-tint: rgba(17, 27, 29, 0.06);

  /* ---- SURFACE tokens: what text, rules and small marks use ON the surface they sit on. These are the paper values;
     base.css re-points them on night and photo surfaces (and back to paper on a white card), so a component written
     with them works on every surface. Things with their own face (buttons, inputs, chips at rest, the selected
     segment, arrow badges) keep --ink on their own --surface face. ---- */
  --fg: var(--ink);                 /* headings, values, labels */
  --fg-2: var(--ink-2);             /* copy, ledes, row labels */
  --fg-3: var(--ink-3);             /* meta, captions, scale numbers */
  --fg-link: var(--teal-700);       /* small teal text: links, tags, eyebrows, numerals (>= 4.5:1) */
  --fg-mark: var(--teal-600);       /* teal marks: arrows, checks, dots, meter fills (>= 3:1) */
  --fg-em: var(--accent-em);        /* the italic in display type (>= 24px) */
  --fg-em-sm: var(--accent-em-sm);  /* the italic in h3 / card titles (< 24px) */
  --fg-inverse: var(--surface);     /* text on a --fg fill (a selected chip, .btn-dark) */
  --fg-link-strong: var(--teal-800);/* the title of a landed #target cell */
  --fg-shadow: none;                /* the soft shadow behind display type: photo surfaces only */
  --rule: var(--line);              /* dividers */
  --rule-2: var(--line-2);          /* ruled grids, accordions, tables, tracks */
  --edge: var(--line-2);            /* a see-through control's hairline (.btn-glass) */
  --edge-strong: var(--ink-3);      /* … on hover */
  --face: var(--tint);              /* the round face of an icon (accordion +), a quiet chip */
  --face-hover: var(--surface);
  --hover-fill: var(--hover-tint);  /* a ghost button's hover fill */
  --ghost-bg: transparent;          /* a ghost button's resting fill (dark glass on a photo, so its words always read) */
  --ghost-bg-hover: var(--hover-tint);
  --fill-strong-hover: var(--teal-900); /* .btn-dark's hover fill (its resting fill is --fg) */
  --card-bg-hover: var(--surface);  /* a link card on hover / keyboard focus: white on paper, night-3 on night,
                                       deeper glass on a photo (never white under light text) */
  --chip-face: var(--surface);      /* a resting chip: a white face on paper, a quiet glass face on night / a photo */
  --chip-edge: var(--line-2);
  --chip-ink: var(--ink);
  --logo-filter: grayscale(1);      /* logos in a .logo-row (white on night / a photo) */
  --state-in: var(--teal-500);      /* results states: marks and fills */
  --state-watch: var(--watch-600);
  --state-out: var(--flag-600);
  --state-in-ink: var(--teal-700);  /* results states: their text */
  --state-watch-ink: var(--watch-700);
  --state-out-ink: var(--flag-700);
  --state-in-bg: var(--teal-50);    /* results states: a finding chip's fill */
  --state-watch-bg: var(--watch-50);
  --state-out-bg: var(--flag-50);
  --viz-track: rgba(17, 27, 29, 0.09);        /* the empty part of a range bar / meter */
  --viz-band: var(--teal-300);                /* the reference (normal) range on a range bar: an opaque mid teal, so it
                                                 reads as a band on every paper surface (>= 1.5:1 off its track and
                                                 >= 1.8:1 off white, canvas, tint and butter; never olive on butter) */
  --viz-field: #cfe7e0;                       /* the reference range as an AREA (a chart's band): a pale opaque mint */
  --viz-grid: rgba(17, 27, 29, 0.16);         /* dashed chart gridlines */
  --viz-dot-ring: var(--surface);             /* the halo round a marker dot (the surface it sits on) */

  /* ---- Type: families and weights (the @font-face rules at the top of this file: 5 faces) ----
     Newsreader 300 (display), 300 italic (display emphasis), 400 (titles, panel headings) · Instrument Sans 400, 500 */
  --font-display: "Newsreader", "Newsreader Fallback", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fw-display: 300;          /* display-1, display-page, display-2, quotes, stat numbers: the fine, high-contrast cut (>= 34px) */
  --fw-title: 400;            /* .h2 panel headings, h3, card titles: the sturdier cut for 18-44px */
  --fw-ui: 500;               /* buttons, labels, eyebrows, strong */

  /* ---- Type: fluid scale. Display sizes keep growing to 1920. Every step is clearly apart from the next ----
     @390 / @768 / @1280 / @1920 */
  --fs-display-1: clamp(3.375rem, 1.1rem + 5.6vw, 8.25rem);    /* 54 / 61 / 89 / 125  home hero h1 only */
  --fs-display-page: clamp(2.75rem, 1.45rem + 4vw, 6.5rem);    /* 44 / 54 / 74 / 100  inner-page hero h1 (stands above every section heading) */
  --fs-display-2: clamp(2.25rem, 1.4rem + 2.7vw, 4.5rem);      /* 36 / 48 / 57 / 72   the heading of a section (641-980: below) */
  --fs-quote: clamp(2rem, 1.15rem + 2.5vw, 3.75rem);           /* 32 / 38 / 50 / 60   statement */
  --fs-h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);            /* 28 / 34 / 42 / 44   panel heading (400) */
  --fs-h3: clamp(1.5rem, 1.25rem + 0.95vw, 2.25rem);           /* 24 / 27 / 32 / 36   big card titles */
  --fs-title: clamp(1.1875rem, 1.1rem + 0.3vw, 1.5rem);        /* 19 / 20 / 21 / 23   titles in card grids */
  --fs-row: clamp(1.125rem, 1.07rem + 0.25vw, 1.3125rem);      /* 18 / 19 / 20 / 21   titles in image-led rows (thumb list) */
     /* at 390 every tier is its own size: 54 / 44 / 36 / 32 / 28 / 24 / 19 (no two tiers collapse into one) */
  --fs-h4: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --fs-lede: clamp(1.0625rem, 0.98rem + 0.4vw, 1.375rem);      /* 17 -> 22 */
  --fs-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);         /* 16 -> 17 */
  --fs-card: 1rem;                                             /* 16  copy inside cards (ink-2) */
  --fs-small: 0.875rem;                                        /* 14  meta, notes */
  --fs-eyebrow: 0.8125rem;                                     /* 13  eyebrows, labels. The floor */
  --fs-stat: clamp(2.75rem, 1.9rem + 3.5vw, 5.5rem);
  --fs-stat-sm: clamp(2.25rem, 1.9rem + 1.4vw, 3.25rem);

  --lh-tight: 1.02;
  --lh-heading: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.6;
  --tracking-display: -0.032em;
  --tracking-display-2: -0.026em;
  --tracking-heading: -0.015em;
  --tracking-eyebrow: 0.12em;
  --measure: 65ch;

  /* ---- Space: 4px base ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  --space-13: 128px;

  /* ---- Layout: ONE container for header, hero and every section ---- */
  --max: 1440px;                                         /* .wrap (and .wrap-wide, now the same edge) */
  --max-narrow: 760px;                                   /* .wrap-narrow: centred text */
  --gutter: clamp(1rem, 0.55rem + 1.85vw, 2.5rem);       /* 16 @390, 24 @768, 33 @1280, 40 @1920 */
  --section-y: clamp(4rem, 2.4rem + 6.6vw, 9rem);        /* 64 / 88 / 122 / 144: the one gap between blocks */
  --section-y-sm: clamp(3rem, 2rem + 4vw, 5.5rem);
  --stack: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);          /* section head -> its content */
  --grid-gap: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);       /* 16 -> 24 */
  --card-pad: clamp(1.25rem, 0.95rem + 1.2vw, 2rem);     /* 20 -> 32 */
  --panel-pad: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);    /* 24 -> 40 */
  --nav-h: 64px;
  --hero-h: clamp(600px, 100svh, 1080px);
  --page-hero-h: clamp(560px, 78svh, 820px);

  /* ---- Shape: two words plus the pill ---- */
  --r-sm: 12px;               /* small inner tiles: code chips, the map inset, notes */
  --r-lg: 24px;               /* every card, panel, media frame and band */
  --r-pill: 999px;            /* buttons, chips, inputs, tags */
  --r-xs: 6px;                /* focus outline on text links only */

  /* ---- Shadows (only on things that float: menus, hovered cards, glass) ---- */
  --shadow-xs: 0 1px 2px rgba(17, 27, 29, 0.05);
  --shadow-sm: 0 1px 2px rgba(17, 27, 29, 0.04), 0 4px 12px -4px rgba(17, 27, 29, 0.08);
  --shadow-md: 0 2px 6px rgba(17, 27, 29, 0.04), 0 16px 36px -14px rgba(17, 27, 29, 0.18);
  --shadow-lg: 0 4px 12px rgba(17, 27, 29, 0.05), 0 36px 72px -28px rgba(17, 27, 29, 0.30);
  --shadow-btn: 0 10px 24px -12px rgba(17, 27, 29, 0.55);
  --shadow-btn-accent: 0 12px 26px -12px rgba(14, 122, 114, 0.7);
  --shadow-btn-photo: 0 12px 28px -12px rgba(0, 0, 0, 0.5);
  --shadow-header: 0 1px 0 var(--line), 0 10px 30px -18px rgba(17, 27, 29, 0.35);
  --text-shadow-photo: 0 1px 14px rgba(0, 0, 0, 0.3);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 450ms;
  --dur-4: 800ms;             /* scroll reveals */
  --dur-5: 1400ms;
  --stagger: 80ms;
  --split-step: 34ms;
  --reveal-rise: 18px;        /* how far a revealed block rises */
  --marquee-dur: 48s;

  /* ---- Layers ---- */
  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 40;
  --z-scrim: 90;
  --z-menu: 100;
  --z-toast: 200;
  --z-skip: 300;
}
/* phones: the display cut steps up to 350 on the same variable face (300-400 axis, no extra file), so a 38-54px
   headline keeps its hairlines at 1x and reads as firmly as Neko's. The italic stays the 300 cut */
@media (max-width: 640px) { :root { --fw-display: 350; } }
/* tablets: a section heading stands at ~48px at 768 (Function's section heads read ~50px there), then meets the desktop
   curve at 981 without a step (49px either side). Phones keep 36px at 390 */
@media (min-width: 641px) and (max-width: 980px) { :root { --fs-display-2: clamp(2.25rem, 0.6rem + 5vw, 3.0625rem); } }
