/* tokens.css — the design tokens (§9.2). Names are frozen; values tuned by WP-SHELL. Modules consume, never define. */
:root {
  /* type */
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --font-scale: 1;
  --fs-2xs: calc(10.5px * var(--font-scale)); --fs-xs: calc(11.5px * var(--font-scale)); --fs-sm: calc(12.5px * var(--font-scale));
  --fs-md: calc(13.5px * var(--font-scale)); --fs-lg: calc(15px * var(--font-scale)); --fs-xl: calc(17px * var(--font-scale));
  --fs-2xl: calc(20px * var(--font-scale)); --fs-3xl: calc(26px * var(--font-scale)); --fs-4xl: calc(34px * var(--font-scale));
  --fs-5xl: calc(56px * var(--font-scale));
  --lh-tight: 1.2; --lh-ui: 1.4; --lh-read: 1.65; --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;
  --tracking-eyebrow: .08em;
  /* spacing (4-px base) */
  --sp-0: 0; --sp-1: 2px; --sp-2: 4px; --sp-3: 8px; --sp-4: 12px; --sp-5: 16px; --sp-6: 20px; --sp-7: 24px; --sp-8: 32px;
  --sp-9: 40px; --sp-10: 48px; --sp-11: 64px;
  /* radii */
  --r-1: 4px; --r-2: 6px; --r-3: 8px; --r-4: 12px; --r-5: 16px; --r-6: 22px; --r-pill: 999px; --r-window: 12px;
  /* motion */
  --dur-instant: 80ms; --dur-fast: 150ms; --dur-base: 200ms; --dur-slow: 250ms; --dur-deliberate: 400ms; --dur-ambient: 90s;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0); --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-standard: cubic-bezier(.2, 0, 0, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  /* density (comfortable) */
  --row-h: 32px; --control-h: 32px; --titlebar-h: 38px; --taskbar-h: 56px; --pad-window: 16px; --gap: 12px;
  --strip-h: 20px;
  /* z-layers */
  --z-wallpaper: 0; --z-desktop-icons: 10; --z-widgets: 20; --z-stickies: 30; --z-window-base: 100; --z-snap-preview: 9500;
  --z-taskbar: 10100; --z-startmenu: 10200; --z-flyout: 10300; --z-palette: 10400; --z-context: 10500; --z-toast: 10600;
  --z-modal: 10700; --z-tooltip: 10800; --z-lock: 11000;
  /* glass */
  --glass-blur: 22px; --glass-sat: 150%;
  /* documented module custom properties (§9.4) */
  --ui-table-row-h: var(--row-h);
  --ui-md-max-width: 78ch;
  /* R9 (REDESIGN_PLAN_FINAL D-7, §2.1.3; Appendix W.8) — the second edition's geometry: the places rail and the dock.
     Names pre-landed by the lead (G0.L.5); the shell reads them through workarea.js (G1.S S1). */
  --rail-w: 72px; --dock-h: var(--taskbar-h);
}
:root[data-density="compact"] { --row-h: 26px; --control-h: 28px; --titlebar-h: 32px; --taskbar-h: 48px; --pad-window: 12px; --gap: 8px; --strip-h: 18px; --rail-w: 64px; }

:root, :root[data-theme="dark"] {           /* Ink & Brass */
  --bg-0: #05080f; --bg-1: #0a1020; --bg-2: #0f1830;
  --surface-1: rgba(16, 24, 42, .68);   --surface-2: rgba(20, 30, 52, .84);
  --surface-3: rgba(28, 40, 68, .92);   --surface-solid: #111a2e; --surface-sunken: rgba(4, 8, 16, .45);
  --surface-content: #0e1628;
  --line-1: rgba(226, 204, 158, .09); --line-2: rgba(226, 204, 158, .16); --line-3: rgba(226, 204, 158, .28);
  --text-1: #efe9dc; --text-2: #bdb6a6; --text-3: #a39c8c; --text-4: #8c8779; --text-on-accent: #1a1406;
  --ok: #73cb9e; --ok-bg: rgba(108, 196, 151, .14); --warn: #e6b04f; --warn-bg: rgba(230, 176, 79, .14);
  --danger: #ff887c; --danger-bg: rgba(232, 104, 95, .14); --info: #87bcf3; --info-bg: rgba(116, 169, 224, .14);
  --flag-family: #d8a2e8; --flag-family-bg: rgba(199, 146, 214, .14);
  --flag-verified: #7fd1b0; --flag-checked: #a6c9a2; --flag-pending: #b9c3d5;
  --flag-retired: #7c7c86; --flag-urgent: #ffb168; --flag-live: #6fc3ff;
  --chart-1: #d4a94f; --chart-2: #4fb3a2; --chart-3: #6d9cf0; --chart-4: #e07a6c; --chart-5: #9cc48a; --chart-6: #a9b4c4;
  /* R9 (REDESIGN_PLAN_FINAL §2.2.2, D-13; Appendix W.8) — Vellum (Paper) and the path tint family. D1 values, computed and
     checked by test/tokens-contrast.test.mjs. Vellum Night is a warm near-black (hue ~65°), bone ink; the tints are paler than
     the ground so the numeral on a plate is dark ink. Paths 1–3 and F keep today's chart hues (nothing people know
     recolours); paths 4–8 are new low-chroma tints (OKLCH C ≤ .06) at hues ≥ 30° from every status hue — teal 204 · periwinkle
     286 · rose 353 · olive 110 — and one neutral stone (C .015), never plum; the plate's numeral and the word "Path" are the cue. */
  --surface-paper: #16130f; --text-paper: #ebe3d1;
  --path-1: var(--chart-3); --path-2: var(--chart-4); --path-3: var(--chart-1); --path-4: #9bcbd0; --path-5: #9e9dc4;
  --path-6: #cfacba; --path-7: #c5c89f; --path-8: #a49d95; --path-f: var(--chart-6);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-window: 0 24px 60px rgba(0, 0, 0, .55), 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  --shadow-window-focus: 0 30px 80px rgba(0, 0, 0, .6), 0 10px 24px rgba(0, 0, 0, .4), 0 0 0 1px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, .07);
  --scrim: rgba(3, 6, 12, .55); --selection: rgba(212, 169, 79, .28);
  /* shell-private (not frozen) */
  --w2-highlight: rgba(255, 255, 255, .06);
  --w2-plate-ink: #fffaf0;
  --w2-hover: rgba(226, 204, 158, .07);
  --w2-press: rgba(226, 204, 158, .12);
  --w2-desk-text: #f4efe3;
  --w2-desk-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 0 12px rgba(0, 0, 0, .55);
}
:root[data-theme="light"] {                 /* Parchment & Ink */
  --bg-0: #e6dcc8; --bg-1: #efe7d6; --bg-2: #f6f0e3;
  --surface-1: rgba(252, 249, 242, .74); --surface-2: rgba(255, 253, 248, .9); --surface-3: rgba(255, 255, 255, .96);
  --surface-solid: #fbf8f1; --surface-sunken: rgba(60, 50, 30, .06); --surface-content: #fffdf8;
  --line-1: rgba(27, 34, 51, .08); --line-2: rgba(27, 34, 51, .14); --line-3: rgba(27, 34, 51, .24);
  --text-1: #1a2130; --text-2: #465066; --text-3: #5e6677; --text-4: #777d89; --text-on-accent: #fffaf0;
  --ok: #08643f; --ok-bg: rgba(39, 122, 82, .12); --warn: #804d00; --warn-bg: rgba(149, 96, 10, .12);
  --danger: #aa251f; --danger-bg: rgba(184, 50, 42, .1); --info: #1c5a9e; --info-bg: rgba(47, 109, 179, .1);
  --flag-family: #85389a; --flag-family-bg: rgba(141, 63, 163, .1); --flag-verified: #006042; --flag-checked: #375f34;
  --flag-pending: #4c5363; --flag-retired: #8a8a93; --flag-urgent: #912f00; --flag-live: #005591;
  --chart-1: #956e1e; --chart-2: #1f7a6d; --chart-3: #2d5fbf; --chart-4: #a4382c; --chart-5: #5b8a4a; --chart-6: #56627a;
  /* R9 — Vellum Day (a warm off-white) and the path tints in Parchment & Ink: the same hues, darker, so a plate's numeral is light ink */
  --surface-paper: #f7f1e4; --text-paper: #221c12;
  --path-1: var(--chart-3); --path-2: var(--chart-4); --path-3: var(--chart-1); --path-4: #457276; --path-5: #4d4b6e;
  --path-6: #795965; --path-7: #6a6c45; --path-8: #68625b; --path-f: var(--chart-6);
  --shadow-1: 0 1px 2px rgba(40, 30, 10, .12); --shadow-2: 0 4px 12px rgba(40, 30, 10, .12);
  --shadow-3: 0 12px 32px rgba(40, 30, 10, .16);
  --shadow-window: 0 20px 50px rgba(40, 30, 10, .18), 0 6px 16px rgba(40, 30, 10, .1), inset 0 1px 0 rgba(255, 255, 255, .7);
  --shadow-window-focus: 0 26px 64px rgba(40, 30, 10, .22), 0 8px 20px rgba(40, 30, 10, .12), 0 0 0 1px var(--accent-ring);
  --scrim: rgba(40, 32, 18, .35); --selection: rgba(154, 115, 36, .22);
  --w2-highlight: rgba(255, 255, 255, .7);
  --w2-plate-ink: #fffdf7;
  --w2-hover: rgba(27, 34, 51, .05);
  --w2-press: rgba(27, 34, 51, .09);
  --w2-desk-text: #1a2130;
  --w2-desk-shadow: 0 1px 1px rgba(255, 253, 245, .9), 0 0 10px rgba(255, 250, 235, .8);
}
/* accents: data-accent × data-theme */
:root, :root[data-accent="brass"] { --accent: #d4a94f; --accent-strong: #e8c170; --accent-weak: rgba(212, 169, 79, .16); --accent-ring: rgba(212, 169, 79, .45); }
:root[data-accent="verdigris"] { --accent: #4fb3a2; --accent-strong: #6fd0bf; --accent-weak: rgba(79, 179, 162, .16); --accent-ring: rgba(79, 179, 162, .45); }
:root[data-accent="sapphire"]  { --accent: #6d9cf0; --accent-strong: #8fb4f5; --accent-weak: rgba(109, 156, 240, .16); --accent-ring: rgba(109, 156, 240, .45); }
:root[data-accent="garnet"]    { --accent: #e07a6c; --accent-strong: #ee9a8e; --accent-weak: rgba(224, 122, 108, .16); --accent-ring: rgba(224, 122, 108, .45); }
:root[data-accent="pewter"]    { --accent: #a9b4c4; --accent-strong: #c5ceda; --accent-weak: rgba(169, 180, 196, .16); --accent-ring: rgba(169, 180, 196, .45); }
:root[data-theme="light"][data-accent="brass"]     { --accent: #765402; --accent-strong: #6a4900; --accent-weak: rgba(118, 84, 2, .12); --accent-ring: rgba(118, 84, 2, .4); }
:root[data-theme="light"][data-accent="verdigris"] { --accent: #1f7a6d; --accent-strong: #165d53; --accent-weak: rgba(31, 122, 109, .12); --accent-ring: rgba(31, 122, 109, .4); }
:root[data-theme="light"][data-accent="sapphire"]  { --accent: #2d5fbf; --accent-strong: #214a96; --accent-weak: rgba(45, 95, 191, .12); --accent-ring: rgba(45, 95, 191, .4); }
:root[data-theme="light"][data-accent="garnet"]    { --accent: #a4382c; --accent-strong: #832b21; --accent-weak: rgba(164, 56, 44, .12); --accent-ring: rgba(164, 56, 44, .4); }
:root[data-theme="light"][data-accent="pewter"]    { --accent: #56627a; --accent-strong: #414b5e; --accent-weak: rgba(86, 98, 122, .12); --accent-ring: rgba(86, 98, 122, .4); }
:root[data-motion="reduced"] { --dur-instant: 1ms; --dur-fast: 1ms; --dur-base: 1ms; --dur-slow: 1ms; --dur-deliberate: 1ms; }

/* ══ Round 3 (WP-ACCESS) ══════════════════════════════════════════════════════════════════════════════════════════
   theme.js sets data-contrast="high" (manual, or the OS "more contrast"), data-transparency="reduced|full",
   data-text="100|115|130" and data-forced="active" on <html>. The token NAMES are unchanged; only values move. */

/* larger text: the type scale follows --font-scale (theme.js multiplies it by the preset); hit targets grow too */
:root[data-text="115"] { --row-h: 36px; --control-h: 36px; --titlebar-h: 42px; --taskbar-h: 60px; --strip-h: 22px; --rail-w: 80px; }
:root[data-text="130"] { --row-h: 40px; --control-h: 40px; --titlebar-h: 46px; --taskbar-h: 64px; --strip-h: 24px; --pad-window: 18px; --rail-w: 88px; }
:root[data-density="compact"][data-text="115"] { --row-h: 30px; --control-h: 32px; --titlebar-h: 36px; --taskbar-h: 52px; --strip-h: 20px; }
:root[data-density="compact"][data-text="130"] { --row-h: 34px; --control-h: 36px; --titlebar-h: 40px; --taskbar-h: 56px; --strip-h: 22px; }

/* reduced transparency: every translucent surface becomes its opaque twin; the glass blur is zero (base.css also
   removes every backdrop-filter) */
:root[data-transparency="reduced"] {
  --surface-1: #111a2e; --surface-2: #131d33; --surface-3: #1b2640; --surface-sunken: #070b14;
  --scrim: rgba(3, 6, 12, .82); --glass-blur: 0px; --glass-sat: 100%;
}
:root[data-theme="light"][data-transparency="reduced"] {
  --surface-1: #fbf8f1; --surface-2: #fffdf8; --surface-3: #ffffff; --surface-sunken: #efe9dc;
  --scrim: rgba(40, 32, 18, .6);
}

/* High contrast · dark ("Ink, lit"): pure black, white text, hairlines become real lines, one signal-yellow accent.
   Status hues stay distinct (and never carry meaning alone — every status also has its word or glyph). */
:root[data-contrast="high"], :root[data-contrast="high"][data-accent] {
  --bg-0: #000000; --bg-1: #000000; --bg-2: #0a0a0a;
  --surface-1: #000000; --surface-2: #0b0b0b; --surface-3: #171717; --surface-solid: #000000; --surface-sunken: #111111;
  --surface-content: #000000;
  --line-1: rgba(255, 255, 255, .42); --line-2: rgba(255, 255, 255, .66); --line-3: #ffffff;
  --text-1: #ffffff; --text-2: #f0f0f0; --text-3: #d6d6d6; --text-4: #b8b8b8; --text-on-accent: #000000;
  --ok: #5cf0a0; --ok-bg: rgba(92, 240, 160, .2); --warn: #ffd23f; --warn-bg: rgba(255, 210, 63, .2);
  --danger: #ffa097; --danger-bg: rgba(255, 128, 120, .2); --info: #80c8ff; --info-bg: rgba(128, 200, 255, .2);
  --flag-family: #f2a9ff; --flag-family-bg: rgba(242, 169, 255, .2);
  --flag-verified: #66f2c2; --flag-checked: #bdf5ad; --flag-pending: #d3d9e4;
  --flag-retired: #c4c4cc; --flag-urgent: #ffaa57; --flag-live: #80d8ff;
  --chart-1: #ffd84d; --chart-2: #4ff0d8; --chart-3: #8ab8ff; --chart-4: #ff8a7a; --chart-5: #b4f08a; --chart-6: #e0e6ee;
  --accent: #ffd84d; --accent-strong: #ffe680; --accent-weak: rgba(255, 216, 77, .24); --accent-ring: #ffd84d;
  --shadow-1: none; --shadow-2: 0 0 0 1px rgba(255, 255, 255, .66); --shadow-3: 0 0 0 1px #ffffff;
  --shadow-window: 0 0 0 1px rgba(255, 255, 255, .66); --shadow-window-focus: 0 0 0 2px #ffd84d;
  --scrim: rgba(0, 0, 0, .86); --selection: rgba(255, 216, 77, .5);
  --surface-paper: #000000; --text-paper: #ffffff;   /* R9: Vellum in high contrast is the page itself — pure ground, pure ink */
  --glass-blur: 0px; --glass-sat: 100%;
  --w2-highlight: transparent; --w2-plate-ink: #000000;
  --w2-hover: rgba(255, 255, 255, .16); --w2-press: rgba(255, 255, 255, .26);
  --w2-desk-text: #ffffff; --w2-desk-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 0 #000;
}
/* High contrast · light ("Paper, printed"): white paper, black ink, one deep-blue accent */
:root[data-contrast="high"][data-theme="light"], :root[data-contrast="high"][data-theme="light"][data-accent] {
  --bg-0: #ffffff; --bg-1: #ffffff; --bg-2: #ffffff;
  --surface-1: #ffffff; --surface-2: #ffffff; --surface-3: #f0f0f0; --surface-solid: #ffffff; --surface-sunken: #ececec;
  --surface-content: #ffffff;
  --line-1: rgba(0, 0, 0, .42); --line-2: rgba(0, 0, 0, .66); --line-3: #000000;
  --text-1: #000000; --text-2: #111111; --text-3: #2e2e2e; --text-4: #4d4d4d; --text-on-accent: #ffffff;
  --ok: #00622f; --ok-bg: rgba(0, 98, 47, .12); --warn: #6b4500; --warn-bg: rgba(107, 69, 0, .12);
  --danger: #a00000; --danger-bg: rgba(160, 0, 0, .1); --info: #00408c; --info-bg: rgba(0, 64, 140, .1);
  --flag-family: #6c1a88; --flag-family-bg: rgba(108, 26, 136, .1);
  --flag-verified: #005e3c; --flag-checked: #2e5c26; --flag-pending: #3c4252;
  --flag-retired: #50505a; --flag-urgent: #8c3400; --flag-live: #004e90;
  --chart-1: #7a5600; --chart-2: #005e52; --chart-3: #0038a8; --chart-4: #9a1c10; --chart-5: #2f6420; --chart-6: #3a4458;
  --accent: #0038a8; --accent-strong: #002878; --accent-weak: rgba(0, 56, 168, .14); --accent-ring: #0038a8;
  --shadow-1: none; --shadow-2: 0 0 0 1px rgba(0, 0, 0, .66); --shadow-3: 0 0 0 1px #000000;
  --shadow-window: 0 0 0 1px rgba(0, 0, 0, .66); --shadow-window-focus: 0 0 0 2px #0038a8;
  --scrim: rgba(0, 0, 0, .55); --selection: rgba(0, 56, 168, .22);
  --surface-paper: #ffffff; --text-paper: #000000;
  --w2-highlight: transparent; --w2-plate-ink: #ffffff;
  --w2-hover: rgba(0, 0, 0, .08); --w2-press: rgba(0, 0, 0, .16);
  --w2-desk-text: #000000; --w2-desk-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 1px 0 #fff;
}
