/* =====================================================================================================
   tokens-c.css — Direction C "Soft glass", the ONE token set for Taishan Sales v3 (J299, 2026-10-04)
   -----------------------------------------------------------------------------------------------------
   Load order: LAST stylesheet in prototype/index.html, portal.html and proposal.html (after auth.css),
   followed only by components-c.css. It wins by order at equal specificity; no !important anywhere.

   Three layers in this file:
     1. Fonts      DM Sans (self-hosted, variable 100–1000, already in the repo) + a metrics-matched
                   Arial fallback computed from the real font files (evidence/font-metrics.txt).
     2. C tokens   --c-* colour, --glass-*, --fs-/--fw-/--lh-/--tr- type, --sp-* space, --r-* radii,
                   --sh-* shadows, --focus-*, --dur-/--ease motion, --tap/--ctl-h sizes, --z-* layers.
                   Dark first (the default look), light second (kept: the app has a light/dark switch).
     3. Aliases    every legacy custom property the existing 17 sheets read is re-pointed at a C token,
                   so slice 0 re-colours and re-types the whole app with NO markup change. The full
                   old -> new table is at the bottom of this file (section 4).

   Restraint rules of C, written into the tokens (DECISION.md):
     R-glow   one FIXED layer of soft light fields behind everything (J308: four, see --glow-page), never on a scrolling layer
              (--glow-page, used once by body::before in components-c.css).
     R-blur   (J308, "soft glass plus") three glass levels: L1 panes (fill, hairline, highlight, shadow;
              blur off by measurement, --blur-pane), L2 bars and sticky panels (--blur-2), L3 overlays (--blur-3), section 2d.
              Never on rows of a long list, on anything that animates its size, or on documents.
     R-paper  documents (proposal, agreement, certificate, client page) stay flat paper: --paper-* tokens,
              no glass, no blur, no glow, same family, tabular amounts.
   Type rules: one family; 8 fixed sizes + one fluid display size; weights 400 and 600 only
   (600 = every emphasis: headings, labels, buttons, money); nothing below 13 px; inputs 16 px on phones.
   ===================================================================================================== */

/* ---------- 1. FONTS --------------------------------------------------------------------------------
   Files ALREADY ON DISK (no download): D:/orca/taishan-sales-v3/builder/public/fonts/studio/
     dm-sans.woff2            36,932 B  sha256 9fea608a…7543  latin
     dm-sans-latin-ext.woff2  18,228 B  sha256 a5d38fe9…0f49  latin-ext
   Variable font, one axis wght 100–1000 (read from its fvar table), SIL OFL 1.1 (builder/src/studio/FONTS.md).
   On Preview the builder output already serves them at /fonts/studio/…; for the local prototype server copy
   the two files into prototype/fonts/studio/ and add both paths to SHARED_STATIC in
   packaging/scripts/assemble-preview.mjs (identical bytes are allowed there, exactly like fonts/auth/inter.woff2).
   Then DELETE the Google @import on studio.css line 1 and the two <link rel=preconnect> in index.html. */
@font-face{font-family:"DM Sans";font-style:normal;font-weight:100 1000;font-display:swap;
  src:url("/fonts/studio/dm-sans.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:"DM Sans";font-style:normal;font-weight:100 1000;font-display:swap;
  src:url("/fonts/studio/dm-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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* Metrics-matched fallback: while DM Sans loads (or if it is blocked), Arial is scaled and its vertical metrics
   overridden so a line of text occupies the same box -> no reflow when the real face swaps in.
   Derived by D:/temp/orch/J299/font-metrics.mjs from dm-sans.woff2 (upm 1000, hhea 992/-310/0, weighted
   average advance 465.7) and C:/Windows/Fonts/arial.ttf (upm 2048, weighted average 903.4).
   Fallback for phones without Arial (Android): Roboto is listed after it in --font, unscaled. */
@font-face{font-family:"DM Sans Fallback";src:local("Arial"),local("ArialMT");
  size-adjust:105.58%;ascent-override:93.96%;descent-override:29.36%;line-gap-override:0%}
/* Manrope: only for the existing "Precision" heading choice in Appearance (kept, see section 2c). Loaded
   lazily by the browser, i.e. only when that choice is active. Same folder, also already on disk, OFL. */
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;
  src:url("/fonts/studio/manrope.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}

/* ---------- 2a. C TOKENS: DARK (default look) ---------------------------------------------------------
   Specificity note: the list below includes :root[data-palette][data-theme=dark] (0,3,0) so it ties
   axiom.css's dark block and wins by load order; plain :root covers pages without data-theme. */
:root,
:root[data-theme=dark],
:root[data-palette][data-theme=dark]{
  color-scheme:dark;

  /* colour: ground and solid surfaces (Taishan website DESIGN-SYSTEM v0.1 palette) */
  --c-bg:#0b0b0c;            /* page */
  --c-bg-2:#101011;          /* sidebar ground */
  --c-surface:#181819;       /* solid card (fallback when glass is off) */
  --c-raised:#232324;        /* hover, counters, pressed */
  --c-sunk:#111112;          /* wells, code, inset strips */
  --c-sheet:#121213;         /* full-screen sheet / picker ground (solid: lists scroll on it) */

  /* colour: glass (J308 "soft glass plus"). Three levels, each a translucent fill over the fixed light fields:
       L1 pane     cards, sections, tiles            --glass-panel   (+ --blur-1 on wide screens only, see 2d)
       L2 raised   top bar, sidebar, sticky panels   --glass-side / --glass-bar / --glass-top  (+ --blur-2)
       L3 overlay  modals, sheets, drawer, toast     --glass-overlay (+ --blur-3)
     Every fill carries a minimum OPAQUE dark tint, so the brightest point of the light fields behind a pane can
     never lift it above the contrast floor: worst case measured in evidence (contrast sampling over rendered pixels). */
  --glass-panel:rgba(38,38,40,.56);        /* L1 */
  --glass-panel-open:rgba(52,52,54,.62);   /* L1 hovered / open line / selected card */
  --glass-sub:rgba(0,0,0,.22);             /* well inside a pane (no blur, no shadow) */
  --glass-ctl:rgba(255,255,255,.075);      /* inner controls on a pane: one step denser than the pane */
  --glass-ctl-hover:rgba(255,255,255,.12);
  --glass-side:rgba(30,30,32,.74);         /* L2 sticky summary panel */
  --glass-bar:rgba(18,18,19,.74);          /* L2 phone action bar, sheet header, workspace header */
  --glass-top:rgba(14,14,15,.66);          /* L2 app top bar */
  --glass-rail:rgba(16,16,17,.62);         /* L2 sidebar */
  --glass-overlay:rgba(24,24,26,.86);      /* L3 modal, sheet, drawer, toast */
  --glass-edge:rgba(255,255,255,.085);     /* hairline, sides */
  --glass-edge-2:rgba(255,255,255,.14);    /* edge of open/selected panel, chips */
  --glass-edge-top:rgba(255,255,255,.17);  /* hairline at the top of a pane: light from above ... */
  --glass-edge-bottom:rgba(255,255,255,.045); /* ... fading down */
  --glass-hi:inset 0 1px 0 rgba(255,255,255,.075); /* the 1 px luminous top edge inside the border */
  --blur-1:blur(20px) saturate(160%);
  --blur-2:blur(28px) saturate(170%);
  --blur-3:blur(40px) saturate(180%);
  --glass-blur:var(--blur-2);              /* older name, L2 */
  /* the light fields: four large, soft, fixed gradients (gold top right, warm neutral bottom left, a faint gold
     centre, a warm grey right). No animation of their own. */
  --glow-page:radial-gradient(52% 44% at 86% -6%,rgba(215,181,120,.19),transparent 70%),
              radial-gradient(48% 46% at 2% 104%,rgba(160,138,104,.13),transparent 70%),
              radial-gradient(34% 30% at 38% 42%,rgba(215,181,120,.055),transparent 70%),
              radial-gradient(36% 40% at 104% 66%,rgba(132,120,104,.09),transparent 70%);

  /* colour: lines */
  --c-line:#343435;          /* solid divider */
  --c-line-soft:rgba(255,255,255,.07);
  --c-line-strong:#5c5140;   /* warm strong divider: totals, table head (decorative) */

  /* colour: fields */
  --c-field:rgba(0,0,0,.30);
  --c-field-edge:rgba(255,255,255,.38);   /* 3.6:1 against a glass panel (non-text 3:1) */
  --c-field-edge-hover:#8a8a8b;

  /* colour: text */
  --c-text:#f4f1eb;          /* 16.0:1 on glass panel */
  --c-text-2:#c5c0b5;        /* 10.0:1 */
  --c-muted:#aaa7a1;         /* 7.5:1 — the floor for any readable text; nothing dimmer carries words */

  /* colour: the one accent (brushed gold). The Palette control overrides these inline (ROLLOUT slice 0). */
  --c-gold:#d7b578;          /* fills, focus ring, checked boxes */
  --c-gold-hover:#e1c57b;
  --c-gold-text:#dfc28d;     /* gold used as text (amounts, "your earnings") */
  --c-gold-soft:#e3c28b;     /* links, quiet gold labels */
  --c-gold-label:#c6a975;    /* picker group labels, kickers */
  --c-gold-surface:#302a20;  /* "Price needed", pending, selected chip */
  --c-gold-line:rgba(215,181,120,.45);
  --c-gold-wash:rgba(215,181,120,.06);    /* parsed-row background */
  --c-on-gold:#171411;       /* text on gold: 9.4:1 */
  /* gold glass: the fill plus a gentle specular highlight from the top left */
  --c-primary:radial-gradient(120% 100% at 22% -30%,rgba(255,250,236,.42),transparent 52%),linear-gradient(180deg,#e8cd8e,#d2ae6f);
  --c-primary-hover:radial-gradient(120% 100% at 22% -30%,rgba(255,250,236,.52),transparent 55%),linear-gradient(180deg,#eed596,#d9b676);

  /* colour: status (each has text, surface and line) */
  --c-ok:#b2c2aa;     --c-ok-surface:#1f261d;     --c-ok-line:#4d5a48;
  --c-warn:#e8bf72;   --c-warn-surface:#2e2516;   --c-warn-line:#6e5428;
  --c-danger:#f1a598; --c-danger-surface:#2c1a17; --c-danger-line:#7a4038;
  --c-info:#aeb9c2;   --c-info-surface:#1b2024;   --c-info-line:#44505a;

  /* colour: data-viz keys used by the earnings split bar (from the mockup) */
  --c-key-1:#8a8f84; --c-key-2:#6f6658; --c-key-3:var(--c-gold);

  /* paper (R-paper): documents are flat light paper in both themes */
  --paper-bg:#f7f4ee; --paper-ink:#1d1b18; --paper-ink-2:#3f3b35; --paper-muted:#5f5a52;
  --paper-line:#e3ddd1; --paper-rule:#1d1b18; --paper-accent:#7a6438; --paper-edge:#d9d2c4;

  /* shadows: three elevation levels only (soft, wide, low opacity), each with the luminous top edge */
  --sh-1:var(--glass-hi),0 1px 2px rgba(0,0,0,.22),0 12px 32px -14px rgba(0,0,0,.55);
  --sh-2:var(--glass-hi),0 2px 8px rgba(0,0,0,.24),0 24px 56px -18px rgba(0,0,0,.62);
  --sh-3:0 4px 16px rgba(0,0,0,.3),0 40px 96px -20px rgba(0,0,0,.72);
  --sh-panel:var(--sh-1);
  --sh-pop:var(--sh-2);
  --sh-float:var(--sh-3);
  --sh-bezel:var(--sh-2);
  --sh-primary:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(110,78,26,.28),0 1px 2px rgba(60,40,10,.3),0 10px 28px -10px rgba(215,181,120,.5);
  --sh-primary-hover:inset 0 1px 0 rgba(255,255,255,.65),inset 0 -1px 0 rgba(110,78,26,.28),0 2px 4px rgba(60,40,10,.3),0 16px 36px -12px rgba(215,181,120,.6);
  --sh-paper:0 15px 45px rgba(0,0,0,.30);
  --scrim:rgba(0,0,0,.62);

  /* focus (one ring everywhere: gold, 2 px, 3 px offset; fields get a 3 px glow instead of an outline) */
  --focus-color:#d7b578;
  --focus-ring:2px solid var(--focus-color);
  --focus-offset:3px;
  --focus-field:0 0 0 3px rgba(215,181,120,.28);
}

/* ---------- 2b. C TOKENS: LIGHT ("daylight" soft glass) ---------------------------------------------
   Kept because the app has a working light/dark switch (top bar + Appearance) and the default follows the
   phone's setting (appearance-boot.js). Recommended to keep: in direct sun a light page reads better, and
   the switch is an existing control. Same structure; gold used as TEXT darkens to #7a5718 for contrast. */
:root[data-theme=light],
:root[data-palette]:not([data-theme=dark]){
  color-scheme:light;
  --c-bg:#f5f3ee; --c-bg-2:#eeebe4; --c-surface:#ffffff; --c-raised:#ece8e0; --c-sunk:#efece6; --c-sheet:#f8f6f2;
  /* frosted white glass: the same three levels, white fills with a minimum opaque tint */
  --glass-panel:rgba(255,255,255,.64); --glass-panel-open:rgba(255,255,255,.84); --glass-sub:rgba(29,27,24,.035);
  --glass-ctl:rgba(255,255,255,.78); --glass-ctl-hover:#ffffff;
  --glass-side:rgba(255,255,255,.8); --glass-bar:rgba(250,248,244,.78); --glass-top:rgba(248,246,242,.72);
  --glass-rail:rgba(246,244,239,.7); --glass-overlay:rgba(252,251,248,.9);
  --glass-edge:rgba(29,27,24,.09); --glass-edge-2:rgba(29,27,24,.16);
  --glass-edge-top:rgba(255,255,255,.95); --glass-edge-bottom:rgba(29,27,24,.11);
  --glass-hi:inset 0 1px 0 rgba(255,255,255,.9);
  --glow-page:radial-gradient(52% 44% at 86% -6%,rgba(201,164,99,.24),transparent 70%),
              radial-gradient(48% 46% at 2% 104%,rgba(176,150,112,.16),transparent 70%),
              radial-gradient(34% 30% at 38% 42%,rgba(214,186,130,.08),transparent 70%),
              radial-gradient(36% 40% at 104% 66%,rgba(150,138,120,.1),transparent 70%);
  --c-line:#ddd8cf; --c-line-soft:rgba(29,27,24,.07); --c-line-strong:#b89d68;
  --c-field:#ffffff; --c-field-edge:rgba(29,27,24,.56); --c-field-edge-hover:#3f3b35;
  --c-text:#1d1b18; --c-text-2:#45413a; --c-muted:#686259;
  --c-gold:#d3b073; --c-gold-hover:#dcbb7c; --c-gold-text:#7a5718; --c-gold-soft:#7a5718; --c-gold-label:#80612a;
  --c-gold-surface:#f6eedd; --c-gold-line:rgba(160,120,50,.45); --c-gold-wash:rgba(201,164,99,.08); --c-on-gold:#171411;
  --c-primary:linear-gradient(180deg,#e3c785,#d3b073); --c-primary-hover:linear-gradient(180deg,#ead092,#dcbb7c);
  --c-ok:#2f6b48; --c-ok-surface:#e7f1e9; --c-ok-line:#a9c8b2;
  --c-warn:#80520f; --c-warn-surface:#fdf1dc; --c-warn-line:#e3c286;
  --c-danger:#a83a29; --c-danger-surface:#fbe9e5; --c-danger-line:#e2a497;
  --c-info:#3d5566; --c-info-surface:#e8eef2; --c-info-line:#b5c4cf;
  --c-key-1:#9aa092; --c-key-2:#b6a78d;
  --sh-1:var(--glass-hi),0 1px 2px rgba(60,45,20,.06),0 12px 32px -14px rgba(60,45,20,.2);
  --sh-2:var(--glass-hi),0 2px 8px rgba(60,45,20,.07),0 24px 56px -18px rgba(60,45,20,.24);
  --sh-3:0 4px 16px rgba(60,45,20,.08),0 40px 96px -20px rgba(60,45,20,.3);
  --sh-primary:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -1px 0 rgba(110,78,26,.22),0 1px 2px rgba(90,64,20,.18),0 10px 26px -10px rgba(160,120,50,.42);
  --sh-primary-hover:inset 0 1px 0 rgba(255,255,255,.7),inset 0 -1px 0 rgba(110,78,26,.22),0 2px 4px rgba(90,64,20,.18),0 16px 34px -12px rgba(160,120,50,.5);
  --sh-paper:0 15px 45px rgba(29,27,24,.12); --scrim:rgba(29,27,24,.42);
  --focus-color:#7a5718; --focus-field:0 0 0 3px rgba(122,87,24,.22);
}

/* ---------- 2c. SIZE, TYPE, SPACE, SHAPE, MOTION (theme-independent) ------------------------------- */
:root{
  /* family: one stack, --font is set in section 3 (it must also beat appearance.css). Chinese fallback kept. */
  --font-heading:var(--font);
  --font-paper:var(--font);   /* documents use the same family (R-paper: flat, not a different face) */

  /* type scale: 8 fixed sizes + 1 fluid. Every legacy size maps to one step (section 4, "sizes"). */
  --fs-xs:13px;     /* captions, tags, kickers, table head, fine print (the floor) */
  --fs-sm:14px;     /* hints, meta, secondary rows, table body on phone */
  --fs-ui:15px;     /* buttons, chips, labels-as-text, nav, list rows */
  --fs-md:16px;     /* body, inputs (16 px stops iOS zoom), line names on phone */
  --fs-lg:17px;     /* line names, line money, large inputs (command bar, picker search) */
  --fs-xl:20px;     /* h2 / section titles, workspace title, stat values */
  --fs-2xl:26px;    /* "Is this correct?", page titles inside a step */
  --fs-3xl:38px;    /* the job total, the one big number per screen */
  --fs-display:clamp(28px,3.4vw,40px); /* h1: client name / view title */

  /* weights: two. DM Sans is variable, so the file is the same either way; two keeps the look calm. */
  --fw-regular:400;
  --fw-strong:600;

  /* line heights */
  --lh-tight:1.1;   /* display, totals */
  --lh-heading:1.25;
  --lh-ui:1.3;      /* buttons, chips, single-line controls */
  --lh-snug:1.45;   /* hints, table cells, dense lists */
  --lh-body:1.55;   /* paragraphs */
  --lh-long:1.65;   /* scope-of-work text, transcripts, documents */

  /* letter spacing */
  --tr-display:-.03em;
  --tr-heading:-.015em;
  --tr-kicker:.08em;   /* the app's existing UPPERCASE kickers ("NEXT TASK", "VISIT / QUICK CONFIGURATOR") */
  --tr-brand:.16em;    /* TAISHAN wordmark only */

  /* numbers and money: tabular lining figures everywhere a number can change in place */
  --num:tabular-nums lining-nums;

  /* spacing (J308): ONE scale on a 4 px base, 4 8 12 16 24 32 48 64, used for every padding, margin and gap.
     --sp-5 (was 20) and --sp-9 (was 56) left the scale: kept only as aliases onto it so nothing else breaks. */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-6:24px; --sp-7:32px; --sp-8:48px; --sp-10:64px;
  --sp-5:var(--sp-6); --sp-9:var(--sp-10);
  --pane-pad:24px;          /* inside a pane: 24 on desktop (32 for a feature pane), 20 on a phone (the brief's value) */
  --card-gap:24px;          /* between cards: 24 desktop, 16 phone */
  --section-gap:32px;       /* between sections; a heading sits --sp-3 above its own content */
  --gutter:16px;            /* page side gutter; 32 px from 820 px */
  --page-max:1280px;        /* reading content */
  --ws-max:1440px;          /* full-window workspace (Measure and price) */
  --side-w:380px;           /* sticky summary column */

  /* radii: soft, three families (controls / panels / pills) */
  --r-check:8px;    /* checkbox box */
  --r-ctl:14px;     /* inputs, selects, picker rows, inner callouts */
  --r-sub:18px;     /* panel inside a panel, table wrap, empty state */
  --r-line:20px;    /* scope line card, parsed row */
  --r-panel:24px;   /* cards, sections, sheets on desktop */
  --r-feature:28px; /* "Is this correct?" and the add-work panel */
  --r-paper:16px;   /* documents */
  --r-pill:999px;   /* buttons, chips, tags, toasts, command bar */

  /* sizes */
  --tap:44px;       /* minimum hit target (j269-tap-targets.test.mjs pins >= 44 px) */
  --ctl-h:48px;     /* inputs, primary buttons */
  --cmd-h:56px;     /* command bar + mic */
  --row-h:52px;     /* picker rows, list rows */
  --icon:20px;

  /* layers (existing banner z-indexes 95-97 and the sign-in gate 999 are kept) */
  --z-bar:20; --z-sheet:40; --z-pop:30; --z-toast:60; --z-modal:90;

  /* motion */
  --ease:cubic-bezier(.32,.72,0,1);
  --ease-out:cubic-bezier(.2,.8,.2,1);
  --dur-1:.15s;     /* colour, border */
  --dur-2:.18s;     /* press, chevrons */
  --dur-3:.24s;     /* sheets, toasts */
}
@media(min-width:820px){:root{--gutter:32px}}
@media(max-width:759px){:root{--pane-pad:20px;--card-gap:16px;--section-gap:24px}}
/* the existing Typography choice in Appearance stays (control kept); it now only swaps the HEADING face.
   Body text is DM Sans in every choice. Default "studio" = DM Sans headings = direction C as mocked. */
:root[data-typography=precision]{--font-heading:"Manrope","DM Sans Fallback",sans-serif}
:root[data-typography=editorial]{--font-heading:Georgia,"Times New Roman",serif}
/* reduced motion: no transitions, no pulse, no drifting glow (the glow itself stays, fixed) */
@media(prefers-reduced-motion:reduce){:root{--dur-1:.01ms;--dur-2:.01ms;--dur-3:.01ms}}
/* ---------- 2d. THE MATERIAL: where blur is allowed, and the solid fallbacks (J308) --------------------------------
   --blur-pane is what an L1 pane (card, tile, section) would use. A card's backdrop is the smooth fixed gradient, so a blur
   there changes almost nothing on screen and costs a re-blur per scrolled frame. Blur stays on the L2/L3 layers that
   float over moving content (top bar, sticky summary, bars, sheets, modal backdrop, phone drawer, toast).
   Nothing that animates its size is blurred; long lists of rows are never blurred (their pane is).
   MEASURED (J308 evidence/perf.txt, headless Chromium, 1440 px): with L1 panes blurred the Sales Bench scrolled at ~47 fps with
   26-41 long frames in 2 s; with them unblurred, 60 fps and none. A pane in the page flow only ever has the fixed, smooth light
   fields behind it, so its blur is visually almost identical to none, but it must be recomputed every scrolled frame. So L1
   panes carry the fill, hairline, top highlight and shadow WITHOUT a blur (--blur-pane:none); blur stays on what floats over
   moving content (top bar, sticky summary, bars, sheets, modal backdrop, toast). One token turns it back on: --blur-pane. */
:root{--blur-pane:none}
/* no backdrop-filter support: every glass layer becomes a solid surface of the same tone; text contrast unchanged */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root,:root[data-theme],:root[data-palette][data-theme]{--glass-panel:var(--c-surface);--glass-panel-open:var(--c-raised);--glass-side:var(--c-surface);--glass-bar:var(--c-bg);
    --glass-top:var(--c-bg);--glass-rail:var(--c-bg-2);--glass-overlay:var(--c-sheet);--blur-pane:none}
}
/* the person asked for less transparency, or for more contrast: solid surfaces, no blur, firmer edges */
@media(prefers-reduced-transparency:reduce){
  :root,:root[data-theme],:root[data-palette][data-theme]{--glass-panel:var(--c-surface);--glass-panel-open:var(--c-raised);--glass-side:var(--c-surface);
    --glass-bar:var(--c-bg);--glass-top:var(--c-bg);--glass-rail:var(--c-bg-2);--glass-overlay:var(--c-sheet);
    --blur-1:none;--blur-2:none;--blur-3:none;--blur-pane:none;--glass-blur:none}
}
@media(prefers-contrast:more){
  :root,:root[data-theme],:root[data-palette][data-theme]{--glass-panel:var(--c-surface);--glass-panel-open:var(--c-raised);--glass-side:var(--c-surface);
    --glass-bar:var(--c-bg);--glass-top:var(--c-bg);--glass-rail:var(--c-bg-2);--glass-overlay:var(--c-sheet);
    --blur-1:none;--blur-2:none;--blur-3:none;--blur-pane:none;--glass-blur:none;
    --glass-edge:var(--c-line-strong);--glass-edge-2:var(--c-line-strong);--glass-edge-top:var(--c-line-strong);--glass-edge-bottom:var(--c-line-strong)}
  :root,:root[data-theme=dark],:root[data-palette][data-theme=dark]{--c-text-2:#e4e0d8;--c-muted:#cdc9c1}
  :root[data-theme=light],:root[data-palette]:not([data-theme=dark]){--c-text-2:#2e2b26;--c-muted:#45413a}
}

/* ---------- 3. ALIASES: legacy names -> C tokens (slice 0 re-skins the app with no markup change) ----
   Same selector list as 2a/2b so these beat studio.css, design-system.css, workspace.css, axiom.css and
   liquid-glass.css by order (and, once ROLLOUT slice 0 imports the old sheets into @layer legacy, by layer).
   accent-theme.js writes inline values for non-gold palettes; slice 0 makes it write the --c-gold* names
   instead of the legacy ones, so the Palette control keeps re-tinting everything. */
:root,
:root[data-theme=dark],
:root[data-palette][data-theme=dark],
:root[data-theme=light],
:root[data-palette]:not([data-theme=dark]){
  /* design-system.css / axiom.css / studio.css / workspace.css :root sets */
  --bg:var(--c-bg);
  --sidebar:var(--c-bg-2);
  --panel:var(--c-surface);
  --inset:var(--c-sunk);
  --line:var(--glass-edge);
  --ink:var(--c-text);
  --muted:var(--c-text-2);
  --subtle:var(--c-muted);
  --gold:var(--c-gold-text);
  --green:var(--c-ok);
  --accent:var(--c-gold-soft);
  --accent-ink:var(--c-on-gold);
  --accent-soft:var(--c-gold-surface);
  --accent-line:var(--c-gold-line);
  --hover:var(--c-raised);
  --button:var(--c-gold);
  --button-hover:var(--c-gold-hover);
  --ring:var(--focus-color);
  --warn:var(--c-warn);
  --warn-bg:var(--c-warn-surface);
  --warn-line:var(--c-warn-line);
  --success:var(--c-ok);
  --success-bg:var(--c-ok-surface);
  --shadow:var(--sh-panel);
  --floating-shadow:var(--sh-float);
  /* appearance.css */
  --heading-font:var(--font-heading);
  --heading-weight:var(--fw-strong);
  --heading-tracking:var(--tr-heading);
  /* liquid-glass.css */
  --glass-fill:var(--glass-panel);
  --glass-highlight:transparent;          /* the diagonal sheen is decoration: off (R-glow) */
  --glass-shadow:var(--sh-panel);
  --ambient-light:rgba(215,181,120,.10);
  --ambient-soft:transparent;
  /* axiom.css */
  --axiom-glow:transparent;               /* replaced by the one fixed page glow (R-glow) */
  --axiom-edge:transparent;
  --axiom-metal:var(--c-primary);
  --axiom-progress:linear-gradient(90deg,var(--c-gold),var(--c-gold-hover));
  /* read but never defined today (evidence/vars-defined.txt) */
  --surface:var(--glass-panel);           /* bench.css .bn-client-link had a transparent background */
  --cc-border:var(--glass-edge-2);        /* bench.css chips/tabs/PLAUD rows used the dark hex fallback in light mode */
  --cc-gold:var(--c-gold);
  --danger:var(--c-danger);
  --danger-bg:var(--c-danger-surface);
  --danger-line:var(--c-danger-line);
}
/* --font is also set by appearance.css :root[data-typography=…] (0,2,0); body text must stay DM Sans: */
:root,:root[data-typography]{--font:"DM Sans","DM Sans Fallback",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}

/* ---------- 4. OLD -> NEW MAP (every custom property defined or read in prototype/*.css) -------------
   Source of the list: evidence/vars-defined.txt (82 defined + 13 read-but-undefined). "alias" = handled in
   section 3, the old name keeps working and can be search-and-replaced later; "keep" = layout/mechanics,
   not a look token; "local" = scoped to one component, re-tinted as shown.

   GLOBAL COLOUR / SURFACE (design-system.css :root + :root[data-theme=dark], axiom.css, studio.css :root,
   workspace.css :root — four competing :root sets today)
     --bg ............... --c-bg                 alias   (design-system.js:41 reads it for <meta name=theme-color>: gets #0b0b0c / #f5f3ee)
     --sidebar .......... --c-bg-2               alias
     --panel ............ --c-surface (solid) / --glass-panel (cards)   alias -> --c-surface
     --inset ............ --c-sunk               alias
     --line ............. --glass-edge           alias   (287 uses: becomes the soft 1 px glass edge)
     --ink .............. --c-text               alias
     --muted ............ --c-text-2             alias   (today --muted is used for body copy, so it maps to text-2)
     --subtle ........... --c-muted              alias
     --gold ............. --c-gold-text          alias   (used as text 108x: needs the text-safe gold)
     --green ............ --c-ok                 alias
     --accent ........... --c-gold-soft          alias
     --accent-ink ....... --c-on-gold            alias
     --accent-soft ...... --c-gold-surface       alias
     --accent-line ...... --c-gold-line          alias
     --hover ............ --c-raised             alias
     --button ........... --c-gold (fill) / --c-primary (gradient, components-c)   alias -> --c-gold
     --button-hover ..... --c-gold-hover         alias
     --ring ............. --focus-color          alias
     --warn / --warn-bg / --warn-line ........ --c-warn / --c-warn-surface / --c-warn-line   alias
     --success / --success-bg ................ --c-ok / --c-ok-surface                      alias
     --shadow ........... --sh-panel             alias
     --floating-shadow .. --sh-float             alias
     --danger / --danger-bg / --danger-line .. --c-danger / --c-danger-surface / --c-danger-line  alias (were undefined)
     --surface .......... --glass-panel          alias   (was undefined)
     --cc-border ........ --glass-edge-2         alias   (was undefined; dark hex fallback leaked into light)
     --cc-gold .......... --c-gold               alias   (was undefined; hex fallback)
   TYPE (appearance.css, studio.css)
     --font ............. --font                 redefined (DM Sans + metrics fallback; the typography choice no longer swaps body text)
     --heading-font ..... --font-heading         alias
     --heading-weight ... --fw-strong            alias   (550/650/400 -> 600)
     --heading-tracking . --tr-heading           alias
     --fs-label ......... (auth.css, 12 px at <=1024 px, unused) -> delete; use --fs-xs
   GLASS / AMBIENT (liquid-glass.css, axiom.css)
     --glass-fill ....... --glass-panel          alias
     --glass-highlight .. none (sheen removed)   alias -> transparent
     --glass-edge ....... --glass-edge           same name, C value (liquid-glass.css defines it; C wins by order)
     --glass-shadow ..... --sh-panel             alias
     --ambient-light .... --glow-page (single fixed glow)   alias -> faint gold
     --ambient-soft ..... none                   alias -> transparent
     --axiom-glow ....... --glow-page            alias -> transparent (one glow per page)
     --axiom-edge ....... none                   alias -> transparent
     --axiom-metal ...... --c-primary            alias
     --axiom-progress ... gold gradient          alias
   LAYOUT / MECHANICS (keep, not look tokens)
     --nav-width (design-system/appearance) keep · --mobile-top / --mobile-bottom (mobile-ux.css) keep ·
     --visible-height (mobile-ux.js) keep · --progress / --value (rail and bars, set inline) keep ·
     --flow-name / --flow-duration / --flow-fraction (journey-detail.js) keep · --wheel-x / --wheel-y (accent wheel) keep ·
     --selected-hue / --selected-saturation (accent-theme.js) keep
   LOCAL: sign-in page and loader (auth.css, scoped to .lk). The "outside" look Luke likes; re-tint only:
     --ink -> --c-text · --muted -> --c-text-2 · --subtle -> --c-muted · --placeholder -> --c-muted ·
     --gold -> --c-gold · --gold-hi -> --c-gold-hover · --light -> #fff4dc (keep, glow tint) · --on-gold -> --c-on-gold ·
     --ground -> --c-bg · --line -> --glass-edge · --edge -> --glass-edge-2 · --field -> --c-field ·
     --button -> --c-primary · --ring -> --focus-field · --bad -> --c-danger · --h-field -> --ctl-h ·
     --r -> --r-ctl · --display / --ui (Inter, Manrope, Geist per data-look) -> --font (DM Sans; ROLLOUT slice 9) ·
     --title-w / --title-opsz -> --fw-strong / drop (DM Sans has no opsz axis) · --tss-text-floor -> --fs-xs ·
     keep (animation mechanics): --cell --d --n --t --in-d --in-t --start --sweep --reach --drift --ease --glow --grain
   LOCAL: Mr.Bin social library (social-library.css, .sl scope; its own yellow/black brand look by design)
     --sl-black -> --c-bg · --sl-card / --sl-card2 -> --c-surface / --c-raised · --sl-ink -> --c-text ·
     --sl-mute -> --c-muted · --sl-line -> --glass-edge-2 · --sl-focus -> --focus-color ·
     --sl-yellow / --sl-red: keep (Mr.Bin brand colours, not Taishan UI) — decision in ROLLOUT slice 10
   LOCAL: certificate (bench.css .bn-cert) --g #b08e48 -> --paper-accent
   SIZES (font-size px -> step). 34 distinct sizes today (evidence/font-sizes.txt):
     0 (icon-only hiding) keep · 5, 7 (.bn-mini-paper miniature) keep as drawing, not text ·
     8, 9, 10, 11, 11.5, 12, 12.5, 13 -> --fs-xs 13 · 13.5, 14 -> --fs-sm 14 · 15 -> --fs-ui ·
     16 -> --fs-md · 17, 18 -> --fs-lg 17 · 19, 20, 21, 22 -> --fs-xl 20 · 23, 24, 25, 26, 27, 28 -> --fs-2xl 26 ·
     29, 30, 31, 32, 34 -> --fs-display · 36, 37, 39 -> --fs-3xl 38 · rem sizes: .6875/.75rem -> xs, .875 -> sm,
     .9375 -> ui, 1 -> md, 1.125 -> lg, 1.45/1.5/1.65/1.75/1.8/1.9rem -> 2xl or display by role.
   WEIGHTS: 300, 400 -> 400 · 500, 550, 600, 650, 700, 800, 900 -> 600 (social library 800/900 is brand, keep).
   ===================================================================================================== */
