/* Generated from pageweave-tokens.json. Change the JSON source and rebuild. */
:root {
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-0: 0px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-1: 4px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-2: 8px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-3: 12px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-4: 16px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-5: 20px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-6: 24px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-7: 28px;
  /* One four-pixel rhythm for spacing and controls. */
  --pw-space-8: 32px;
  /* Larger separation on the same four-pixel rhythm. */
  --pw-space-12: 48px;
  /* Larger separation on the same four-pixel rhythm. */
  --pw-space-16: 64px;
  /* Canvas and flat rows stay square. */
  --pw-radius-0: 0;
  /* Soft paper-tile rounding for controls, matching the website tiles. */
  --pw-radius-1: 6px;
  /* Overlays and cards get a softer boundary, like a folded paper tile. */
  --pw-radius-2: 12px;
  /* Public Sans is the Loose Thread UI voice; the native sans keeps controls readable when it is not installed. */
  --pw-font-sans: "Public Sans", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  /* Newsreader carries the Loose Thread voice for titles and moments of welcome; bundled in pageweave-newsreader.woff2. */
  --pw-font-display: "Newsreader", Georgia, "Times New Roman", serif;
  /* Technical values only. */
  --pw-font-mono: "Cascadia Code", Consolas, monospace;
  /* Immediate acknowledgment. */
  --pw-duration-fast: 120ms;
  /* Legible control and state transitions. */
  --pw-duration-base: 200ms;
  /* Short contextual reveal, below 300 ms. */
  --pw-duration-slow: 280ms;
  /* One decelerating easing family. */
  --pw-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Hierarchy uses paper tones and hairlines instead of shadows. */
  --pw-elevation: none;
  /* Fixed readable product type ramp. */
  --pw-type-12: 12px;
  /* Consistent reading and heading rhythm. */
  --pw-line-12: 1.5;
  /* Fixed readable product type ramp. */
  --pw-type-13: 13px;
  /* Consistent reading and heading rhythm. */
  --pw-line-13: 1.5;
  /* Fixed readable product type ramp. */
  --pw-type-14: 14px;
  /* Consistent reading and heading rhythm. */
  --pw-line-14: 1.5;
  /* Fixed readable product type ramp. */
  --pw-type-16: 16px;
  /* Consistent reading and heading rhythm. */
  --pw-line-16: 1.5;
  /* Fixed readable product type ramp. */
  --pw-type-20: 20px;
  /* Consistent reading and heading rhythm. */
  --pw-line-20: 1.25;
  /* Fixed readable product type ramp. */
  --pw-type-24: 24px;
  /* Consistent reading and heading rhythm. */
  --pw-line-24: 1.25;
  /* Regular reading, medium controls, semibold hierarchy, bold emphasis. */
  --pw-weight-400: 400;
  /* Regular reading, medium controls, semibold hierarchy, bold emphasis. */
  --pw-weight-500: 500;
  /* Regular reading, medium controls, semibold hierarchy, bold emphasis. */
  --pw-weight-600: 600;
  /* Regular reading, medium controls, semibold hierarchy, bold emphasis. */
  --pw-weight-700: 700;
  /* A readable connection-line cycle only while the application is loading; removed at readiness and disabled for reduced motion. */
  --pw-duration-loading: 900ms;
  /* Twenty-eight units of the shared four-pixel spacing grid; a compact startup indicator. */
  --pw-loading-track-width: 112px;
}
:root, :root[data-pageweave-theme="night"] {
  color-scheme: dark;
  /* Night charcoal: neutral near-black page colour; the coral thread stands out against it. */
  --pw-canvas: #121316;
  /* Separates active work from the canvas without shadows. */
  --pw-surface: #1B1D21;
  /* Hover, selection and floating controls. */
  --pw-surface-raised: #25282D;
  /* Code, previews and data wells. */
  --pw-surface-sunken: #0D0E10;
  /* Subtle structural separators. */
  --pw-hairline: #2B2E33;
  /* Control boundaries and selection structure, at least 3:1 on night ink. */
  --pw-hairline-strong: #6B7078;
  /* Paper-coloured primary reading text. */
  --pw-text-primary: #F5EEE2;
  /* Supporting text with AA contrast. */
  --pw-text-secondary: #CBD0D6;
  /* Secondary labels remain AA-readable, not disabled-looking. */
  --pw-text-muted: #A3A7AD;
  /* Night thread: the single accent for action, selection and the working thread. */
  --pw-accent: #F28B6C;
  /* Quiet thread tint for selection fills. */
  --pw-accent-muted: #3A2A25;
  /* Readable text on filled thread actions. */
  --pw-accent-on-accent: #1C0E09;
  /* The thread is moving: signature accent identifies active work. */
  --pw-working: #F28B6C;
  /* Semantic amber signals an actionable pause. */
  --pw-waiting-on-you: #E8C48B;
  /* Semantic green signals verified completion. */
  --pw-done: #9BD1B6;
  /* Semantic berry marks errors; always paired with an icon and words so it never reads as the thread accent. */
  --pw-failed: #F59BB8;
  /* Semantic warning color reserved for elevated consequences. */
  --pw-high-risk-warning: #F2BB7C;
  /* Paper focus ring, independent of the thread accent and of hover. */
  --pw-focus-ring: #F5EEE2;
  /* Semantic chess safe feedback, paired with a text label; not a decorative accent. */
  --pw-chess-safe: #76D6A3;
  /* Semantic chess mistake feedback, paired with a text label; not a decorative accent. */
  --pw-chess-mistake: #EAD56B;
  /* Semantic chess blunder feedback, paired with a text label; not a decorative accent. */
  --pw-chess-blunder: #F1A1AD;
  /* Semantic chess best feedback, paired with a text label; not a decorative accent. */
  --pw-chess-best: #86B9FF;
  /* Semantic chess inaccuracy feedback, paired with a text label; not a decorative accent. */
  --pw-chess-inaccuracy: #F3AF73;
  /* White side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-white: #F0F2F7;
  /* Black side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-black: #192131;
}
:root[data-pageweave-theme="daylight"] {
  color-scheme: light;
  /* Warm paper: the Loose Thread page colour, shared with the website. */
  --pw-canvas: #F5EEE2;
  /* Lighter tile paper lifts active work off the canvas without shadows. */
  --pw-surface: #FBF7F0;
  /* Hover, selection and floating controls sit one fold darker than the page. */
  --pw-surface-raised: #EDE3D1;
  /* Code, previews and data wells are pressed into the paper. */
  --pw-surface-sunken: #E6DAC5;
  /* Quiet paper-edge separators. */
  --pw-hairline: #DACDB6;
  /* Control boundaries and selection structure, at least 3:1 on paper. */
  --pw-hairline-strong: #7B8696;
  /* Ink: primary reading contrast. */
  --pw-text-primary: #17304C;
  /* Supporting ink with AA contrast on paper. */
  --pw-text-secondary: #3A4A5E;
  /* Secondary labels remain AA-readable on paper. */
  --pw-text-muted: #526071;
  /* Thread red: the single accent for action, selection and the working thread. */
  --pw-accent: #B0442A;
  /* Quiet thread tint for selection fills. */
  --pw-accent-muted: #F2DDD0;
  /* Paper-white text on filled thread actions. */
  --pw-accent-on-accent: #FFF8F0;
  /* The thread is moving: signature accent identifies active work. */
  --pw-working: #B0442A;
  /* Semantic amber signals an actionable pause. */
  --pw-waiting-on-you: #80561C;
  /* Semantic green signals verified completion. */
  --pw-done: #286349;
  /* Semantic berry marks errors; always paired with an icon and words so it never reads as the thread accent. */
  --pw-failed: #8E1B45;
  /* Semantic warning color reserved for elevated consequences. */
  --pw-high-risk-warning: #8C461A;
  /* Ink focus ring, independent of the thread accent and of hover. */
  --pw-focus-ring: #17304C;
  /* Semantic chess safe feedback, paired with a text label; not a decorative accent. */
  --pw-chess-safe: #176F45;
  /* Semantic chess mistake feedback, paired with a text label; not a decorative accent. */
  --pw-chess-mistake: #866300;
  /* Semantic chess blunder feedback, paired with a text label; not a decorative accent. */
  --pw-chess-blunder: #A52F48;
  /* Semantic chess best feedback, paired with a text label; not a decorative accent. */
  --pw-chess-best: #245FA8;
  /* Semantic chess inaccuracy feedback, paired with a text label; not a decorative accent. */
  --pw-chess-inaccuracy: #9B5518;
  /* White side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-white: #F0F2F7;
  /* Black side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-black: #192131;
}
@media (prefers-reduced-motion: reduce) { :root { --pw-duration-fast: 0ms; --pw-duration-base: 0ms; --pw-duration-slow: 0ms; } }

/* HSL mirrors preserve existing utility-class consumers without a second palette. */
:root,:root[data-pageweave-theme="night"]{
  --pw-hsl-canvas: 225.00 10.00% 7.84%;
  --pw-hsl-surface: 220.00 10.00% 11.76%;
  --pw-hsl-surface-raised: 217.50 9.76% 16.08%;
  --pw-hsl-surface-sunken: 220.00 10.34% 5.69%;
  --pw-hsl-hairline: 217.50 8.51% 18.43%;
  --pw-hsl-hairline-strong: 216.92 5.73% 44.51%;
  --pw-hsl-text-primary: 37.89 48.72% 92.35%;
  --pw-hsl-text-secondary: 212.73 11.83% 81.76%;
  --pw-hsl-text-muted: 216.00 5.75% 65.88%;
  --pw-hsl-accent: 13.88 83.75% 68.63%;
  --pw-hsl-accent-muted: 14.29 22.11% 18.63%;
  --pw-hsl-accent-on-accent: 15.79 51.35% 7.25%;
  --pw-hsl-working: 13.88 83.75% 68.63%;
  --pw-hsl-waiting-on-you: 36.77 66.91% 72.75%;
  --pw-hsl-done: 150.00 36.99% 71.37%;
  --pw-hsl-failed: 340.67 81.82% 78.43%;
  --pw-hsl-high-risk-warning: 32.03 81.94% 71.76%;
  --pw-hsl-focus-ring: 37.89 48.72% 92.35%;
  --pw-hsl-chess-safe: 148.13 53.93% 65.10%;
  --pw-hsl-chess-mistake: 50.08 75.15% 66.86%;
  --pw-hsl-chess-blunder: 351.00 74.07% 78.82%;
  --pw-hsl-chess-best: 214.71 100.00% 76.27%;
  --pw-hsl-chess-inaccuracy: 28.13 84.21% 70.20%;
  --pw-hsl-chess-white: 222.86 30.43% 95.49%;
  --pw-hsl-chess-black: 220.00 32.43% 14.51%;
}
:root[data-pageweave-theme="daylight"]{
  --pw-hsl-canvas: 37.89 48.72% 92.35%;
  --pw-hsl-surface: 38.18 57.89% 96.27%;
  --pw-hsl-surface-raised: 38.57 43.75% 87.45%;
  --pw-hsl-surface-sunken: 38.18 39.76% 83.73%;
  --pw-hsl-hairline: 38.33 32.73% 78.43%;
  --pw-hsl-hairline-strong: 215.56 11.39% 53.53%;
  --pw-hsl-text-primary: 211.70 53.54% 19.41%;
  --pw-hsl-text-secondary: 213.33 23.68% 29.80%;
  --pw-hsl-text-muted: 212.90 15.90% 38.24%;
  --pw-hsl-accent: 11.64 61.47% 42.75%;
  --pw-hsl-accent-muted: 22.94 56.67% 88.24%;
  --pw-hsl-accent-on-accent: 32.00 100.00% 97.06%;
  --pw-hsl-working: 11.64 61.47% 42.75%;
  --pw-hsl-waiting-on-you: 34.80 64.10% 30.59%;
  --pw-hsl-done: 153.56 42.45% 27.25%;
  --pw-hsl-failed: 338.09 68.05% 33.14%;
  --pw-hsl-high-risk-warning: 23.16 68.67% 32.55%;
  --pw-hsl-focus-ring: 211.70 53.54% 19.41%;
  --pw-hsl-chess-safe: 151.36 65.67% 26.27%;
  --pw-hsl-chess-mistake: 44.33 100.00% 26.27%;
  --pw-hsl-chess-blunder: 347.29 55.66% 41.57%;
  --pw-hsl-chess-best: 213.18 64.71% 40.00%;
  --pw-hsl-chess-inaccuracy: 27.94 73.18% 35.10%;
  --pw-hsl-chess-white: 222.86 30.43% 95.49%;
  --pw-hsl-chess-black: 220.00 32.43% 14.51%;
}

@media(prefers-color-scheme:light){:root:not([data-pageweave-theme]){
  /* Warm paper: the Loose Thread page colour, shared with the website. */
  --pw-canvas: #F5EEE2;
  /* Lighter tile paper lifts active work off the canvas without shadows. */
  --pw-surface: #FBF7F0;
  /* Hover, selection and floating controls sit one fold darker than the page. */
  --pw-surface-raised: #EDE3D1;
  /* Code, previews and data wells are pressed into the paper. */
  --pw-surface-sunken: #E6DAC5;
  /* Quiet paper-edge separators. */
  --pw-hairline: #DACDB6;
  /* Control boundaries and selection structure, at least 3:1 on paper. */
  --pw-hairline-strong: #7B8696;
  /* Ink: primary reading contrast. */
  --pw-text-primary: #17304C;
  /* Supporting ink with AA contrast on paper. */
  --pw-text-secondary: #3A4A5E;
  /* Secondary labels remain AA-readable on paper. */
  --pw-text-muted: #526071;
  /* Thread red: the single accent for action, selection and the working thread. */
  --pw-accent: #B0442A;
  /* Quiet thread tint for selection fills. */
  --pw-accent-muted: #F2DDD0;
  /* Paper-white text on filled thread actions. */
  --pw-accent-on-accent: #FFF8F0;
  /* The thread is moving: signature accent identifies active work. */
  --pw-working: #B0442A;
  /* Semantic amber signals an actionable pause. */
  --pw-waiting-on-you: #80561C;
  /* Semantic green signals verified completion. */
  --pw-done: #286349;
  /* Semantic berry marks errors; always paired with an icon and words so it never reads as the thread accent. */
  --pw-failed: #8E1B45;
  /* Semantic warning color reserved for elevated consequences. */
  --pw-high-risk-warning: #8C461A;
  /* Ink focus ring, independent of the thread accent and of hover. */
  --pw-focus-ring: #17304C;
  /* Semantic chess safe feedback, paired with a text label; not a decorative accent. */
  --pw-chess-safe: #176F45;
  /* Semantic chess mistake feedback, paired with a text label; not a decorative accent. */
  --pw-chess-mistake: #866300;
  /* Semantic chess blunder feedback, paired with a text label; not a decorative accent. */
  --pw-chess-blunder: #A52F48;
  /* Semantic chess best feedback, paired with a text label; not a decorative accent. */
  --pw-chess-best: #245FA8;
  /* Semantic chess inaccuracy feedback, paired with a text label; not a decorative accent. */
  --pw-chess-inaccuracy: #9B5518;
  /* White side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-white: #F0F2F7;
  /* Black side of chess evaluation bars stays recognizable in both themes. */
  --pw-chess-black: #192131;
  --pw-hsl-canvas: 37.89 48.72% 92.35%;
  --pw-hsl-surface: 38.18 57.89% 96.27%;
  --pw-hsl-surface-raised: 38.57 43.75% 87.45%;
  --pw-hsl-surface-sunken: 38.18 39.76% 83.73%;
  --pw-hsl-hairline: 38.33 32.73% 78.43%;
  --pw-hsl-hairline-strong: 215.56 11.39% 53.53%;
  --pw-hsl-text-primary: 211.70 53.54% 19.41%;
  --pw-hsl-text-secondary: 213.33 23.68% 29.80%;
  --pw-hsl-text-muted: 212.90 15.90% 38.24%;
  --pw-hsl-accent: 11.64 61.47% 42.75%;
  --pw-hsl-accent-muted: 22.94 56.67% 88.24%;
  --pw-hsl-accent-on-accent: 32.00 100.00% 97.06%;
  --pw-hsl-working: 11.64 61.47% 42.75%;
  --pw-hsl-waiting-on-you: 34.80 64.10% 30.59%;
  --pw-hsl-done: 153.56 42.45% 27.25%;
  --pw-hsl-failed: 338.09 68.05% 33.14%;
  --pw-hsl-high-risk-warning: 23.16 68.67% 32.55%;
  --pw-hsl-focus-ring: 211.70 53.54% 19.41%;
  --pw-hsl-chess-safe: 151.36 65.67% 26.27%;
  --pw-hsl-chess-mistake: 44.33 100.00% 26.27%;
  --pw-hsl-chess-blunder: 347.29 55.66% 41.57%;
  --pw-hsl-chess-best: 213.18 64.71% 40.00%;
  --pw-hsl-chess-inaccuracy: 27.94 73.18% 35.10%;
  --pw-hsl-chess-white: 222.86 30.43% 95.49%;
  --pw-hsl-chess-black: 220.00 32.43% 14.51%;
}}
