/* threadwork: Colour Block theme, accessible adaptation (WCAG 2.2 AA).
 * GENERATED from design/tokens.json by design/themes/generate.py. Do not edit by hand.
 * Tokens version 1.0.0. Usage: see design/README.md. */

/* Light theme (default) and everything that is not a colour */
:root {
  color-scheme: light;
  /* Colour roles */
  --background: #FFFFFF;
  --foreground: #1C1917;
  --card: #F7F4EF;
  --card-foreground: #1C1917;
  --popover: #FFFFFF;
  --popover-foreground: #1C1917;
  --primary: #1C1917;
  --primary-foreground: #FFFFFF;
  --primary-hover: #44403C;
  --secondary: #F7F4EF;
  --secondary-foreground: #1C1917;
  --muted: #EFEAE2;
  --muted-foreground: #57534E;
  --disabled: #EFEAE2;
  --disabled-foreground: #57534E;
  --accent: #FEF3C7;
  --accent-foreground: #78350F;
  --destructive: #B91C1C;
  --destructive-foreground: #FFFFFF;
  --border: #E7E0D6;
  --input: #8C857D;
  --link: #92400E;
  --focus-ring: #1C1917;
  --focus-halo: #F59E0B;
  --brand: #F59E0B;
  --brand-foreground: #1C1917;
  --brand-strong: #B45309;
  --brand-subtle: #FEF3C7;
  --brand-subtle-foreground: #78350F;
  --inverse: #1C1917;
  --inverse-foreground: #FFFFFF;
  --inverse-muted-foreground: #D6D3D1;
  --inverse-accent: #F59E0B;
  --inverse-destructive: #FCA5A5;
  --success: #166534;
  --success-subtle: #DCFCE7;
  --success-subtle-foreground: #166534;
  --warning: #92400E;
  --warning-subtle: #FEF3C7;
  --warning-subtle-foreground: #78350F;
  --danger: #B91C1C;
  --danger-subtle: #FEE2E2;
  --danger-subtle-foreground: #991B1B;
  --info: #075985;
  --info-subtle: #E0F2FE;
  --info-subtle-foreground: #075985;
  --thread-line: #B45309;
  --continuum: #1C1917;
  --strand-teacher: #0369A1;
  --strand-sna: #0F766E;
  --strand-parent: #6D28D9;
  --strand-child: #B45309;
  /* Fonts */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* Type scale: size, line height, weight, tracking */
  --text-display-lg: clamp(2.5rem, 1.955rem + 2.727vw, 4rem);
  --leading-display-lg: 1.1;
  --weight-display-lg: 800;
  --tracking-display-lg: -0.0156em;
  --text-display-md: clamp(2rem, 1.682rem + 1.591vw, 2.875rem);
  --leading-display-md: 1.15;
  --weight-display-md: 800;
  --tracking-display-md: -0.0109em;
  --text-heading-lg: 1.625rem;
  --leading-heading-lg: 1.25;
  --weight-heading-lg: 800;
  --text-heading-md: 1.375rem;
  --leading-heading-md: 1.3;
  --weight-heading-md: 800;
  --text-heading-sm: 1.125rem;
  --leading-heading-sm: 1.35;
  --weight-heading-sm: 800;
  --text-body-lg: 1.25rem;
  --leading-body-lg: 1.5;
  --weight-body-lg: 500;
  --text-body: 1rem;
  --leading-body: 1.6;
  --weight-body: 400;
  --text-body-strong: 1rem;
  --leading-body-strong: 1.6;
  --weight-body-strong: 700;
  --text-meta: 0.875rem;
  --leading-meta: 1.5;
  --weight-meta: 500;
  --text-label: 0.8125rem;
  --leading-label: 1.4;
  --weight-label: 700;
  /* Radius */
  --radius: 1.5rem;
  --radius-xs: 0.25rem;
  --radius-sm: 0.75rem;
  --radius-md: 1.125rem;
  --radius-lg: var(--radius);
  --radius-xl: 2rem;
  --radius-pill: 9999px;
  /* Space (4-point grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  /* Borders */
  --border-hairline: 1px;
  --border-control: 2px;
  --border-emphasis: 4px;
  /* Layout */
  --screen-padding: 1.25rem;
  --gutter: 1.5rem;
  --max-width: 75rem;
  --measure: 70ch;
  --icon-button: 2.75rem;
  /* Target size (WCAG 2.2 SC 2.5.8) */
  --target-min: 1.5rem;
  --target-touch: 2.75rem;
  --target-gap: 0.5rem;
  --checkbox-size: 1.5rem;
  /* Density: comfortable (default) */
  --control-height: 3rem;
  --control-height-lg: 3.5rem;
  --input-height: 3.25rem;
  --cell-padding-y: 0.75rem;
  --cell-padding-x: 1rem;
  /* Focus indicator */
  --focus-ring-width: 3px;
  --focus-halo-width: 2px;
  --focus-scroll-padding: 6rem;
  /* Elevation: flat; floating layers only */
  --shadow-overlay: 0 12px 32px rgba(0,0,0,0.16);
  --backdrop: rgba(12,10,9,0.6);
  /* Motion */
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --press-scale: 0.97;
  /* Stacking order */
  --z-base: 0;
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-backdrop: 300;
  --z-dialog: 400;
  --z-toast: 500;
  --z-skip-link: 600;
  /* Breakpoints: for reference only; var() cannot be used in a media query */
  --breakpoint-sm: 30em;
  --breakpoint-md: 48em;
  --breakpoint-lg: 64em;
  --breakpoint-xl: 80em;
  /* Print */
  --print-page-size: A4;
  --print-page-margin: 15mm;
  --print-font-size: 11pt;
  --print-line-height: 1.4;
  --print-heading-lg: 16pt;
  --print-heading-md: 13pt;
  --print-heading-sm: 11pt;
  --print-meta: 9pt;
  --print-ink: #000000;
  --print-paper: #FFFFFF;
  --print-rule: 0.5pt;
  --print-block-gap: 4mm;
}

/* Dark theme: follows the device setting unless the page says data-theme="light" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #1C1917;
    --foreground: #FAFAF9;
    --card: #292524;
    --card-foreground: #FAFAF9;
    --popover: #292524;
    --popover-foreground: #FAFAF9;
    --primary: #FAFAF9;
    --primary-foreground: #1C1917;
    --primary-hover: #E7E5E4;
    --secondary: #292524;
    --secondary-foreground: #FAFAF9;
    --muted: #44403C;
    --muted-foreground: #D6D3D1;
    --disabled: #44403C;
    --disabled-foreground: #D6D3D1;
    --accent: #451A03;
    --accent-foreground: #FDE68A;
    --destructive: #F87171;
    --destructive-foreground: #1C1917;
    --border: #44403C;
    --input: #A8A29E;
    --link: #FCD34D;
    --focus-ring: #FCD34D;
    --focus-halo: #0C0A09;
    --brand: #F59E0B;
    --brand-foreground: #1C1917;
    --brand-strong: #FBBF24;
    --brand-subtle: #451A03;
    --brand-subtle-foreground: #FDE68A;
    --inverse: #FAFAF9;
    --inverse-foreground: #1C1917;
    --inverse-muted-foreground: #57534E;
    --inverse-accent: #B45309;
    --inverse-destructive: #B91C1C;
    --success: #86EFAC;
    --success-subtle: #14532D;
    --success-subtle-foreground: #BBF7D0;
    --warning: #FCD34D;
    --warning-subtle: #451A03;
    --warning-subtle-foreground: #FDE68A;
    --danger: #FCA5A5;
    --danger-subtle: #7F1D1D;
    --danger-subtle-foreground: #FECACA;
    --info: #7DD3FC;
    --info-subtle: #0C4A6E;
    --info-subtle-foreground: #BAE6FD;
    --thread-line: #FBBF24;
    --continuum: #FAFAF9;
    --strand-teacher: #7DD3FC;
    --strand-sna: #5EEAD4;
    --strand-parent: #C4B5FD;
    --strand-child: #FBBF24;
  }
}

/* Explicit choice, on <html> or on any element (used by the preview and by a saved preference) */
[data-theme="light"] {
  color-scheme: light;
  --background: #FFFFFF;
  --foreground: #1C1917;
  --card: #F7F4EF;
  --card-foreground: #1C1917;
  --popover: #FFFFFF;
  --popover-foreground: #1C1917;
  --primary: #1C1917;
  --primary-foreground: #FFFFFF;
  --primary-hover: #44403C;
  --secondary: #F7F4EF;
  --secondary-foreground: #1C1917;
  --muted: #EFEAE2;
  --muted-foreground: #57534E;
  --disabled: #EFEAE2;
  --disabled-foreground: #57534E;
  --accent: #FEF3C7;
  --accent-foreground: #78350F;
  --destructive: #B91C1C;
  --destructive-foreground: #FFFFFF;
  --border: #E7E0D6;
  --input: #8C857D;
  --link: #92400E;
  --focus-ring: #1C1917;
  --focus-halo: #F59E0B;
  --brand: #F59E0B;
  --brand-foreground: #1C1917;
  --brand-strong: #B45309;
  --brand-subtle: #FEF3C7;
  --brand-subtle-foreground: #78350F;
  --inverse: #1C1917;
  --inverse-foreground: #FFFFFF;
  --inverse-muted-foreground: #D6D3D1;
  --inverse-accent: #F59E0B;
  --inverse-destructive: #FCA5A5;
  --success: #166534;
  --success-subtle: #DCFCE7;
  --success-subtle-foreground: #166534;
  --warning: #92400E;
  --warning-subtle: #FEF3C7;
  --warning-subtle-foreground: #78350F;
  --danger: #B91C1C;
  --danger-subtle: #FEE2E2;
  --danger-subtle-foreground: #991B1B;
  --info: #075985;
  --info-subtle: #E0F2FE;
  --info-subtle-foreground: #075985;
  --thread-line: #B45309;
  --continuum: #1C1917;
  --strand-teacher: #0369A1;
  --strand-sna: #0F766E;
  --strand-parent: #6D28D9;
  --strand-child: #B45309;
}
[data-theme="dark"] {
  color-scheme: dark;
  --background: #1C1917;
  --foreground: #FAFAF9;
  --card: #292524;
  --card-foreground: #FAFAF9;
  --popover: #292524;
  --popover-foreground: #FAFAF9;
  --primary: #FAFAF9;
  --primary-foreground: #1C1917;
  --primary-hover: #E7E5E4;
  --secondary: #292524;
  --secondary-foreground: #FAFAF9;
  --muted: #44403C;
  --muted-foreground: #D6D3D1;
  --disabled: #44403C;
  --disabled-foreground: #D6D3D1;
  --accent: #451A03;
  --accent-foreground: #FDE68A;
  --destructive: #F87171;
  --destructive-foreground: #1C1917;
  --border: #44403C;
  --input: #A8A29E;
  --link: #FCD34D;
  --focus-ring: #FCD34D;
  --focus-halo: #0C0A09;
  --brand: #F59E0B;
  --brand-foreground: #1C1917;
  --brand-strong: #FBBF24;
  --brand-subtle: #451A03;
  --brand-subtle-foreground: #FDE68A;
  --inverse: #FAFAF9;
  --inverse-foreground: #1C1917;
  --inverse-muted-foreground: #57534E;
  --inverse-accent: #B45309;
  --inverse-destructive: #B91C1C;
  --success: #86EFAC;
  --success-subtle: #14532D;
  --success-subtle-foreground: #BBF7D0;
  --warning: #FCD34D;
  --warning-subtle: #451A03;
  --warning-subtle-foreground: #FDE68A;
  --danger: #FCA5A5;
  --danger-subtle: #7F1D1D;
  --danger-subtle-foreground: #FECACA;
  --info: #7DD3FC;
  --info-subtle: #0C4A6E;
  --info-subtle-foreground: #BAE6FD;
  --thread-line: #FBBF24;
  --continuum: #FAFAF9;
  --strand-teacher: #7DD3FC;
  --strand-sna: #5EEAD4;
  --strand-parent: #C4B5FD;
  --strand-child: #FBBF24;
}

/* More contrast, when the reader asks the device for it */
@media (prefers-contrast: more) {
  :root,
  [data-theme="light"] {
    --muted-foreground: #292524;
    --disabled-foreground: #292524;
    --border: #57534E;
    --input: #1C1917;
    --link: #78350F;
    --brand-strong: #78350F;
    --thread-line: #78350F;
    --focus-ring-width: 4px;
  }
  [data-theme="dark"] {
    --muted-foreground: #F5F5F4;
    --disabled-foreground: #F5F5F4;
    --border: #D6D3D1;
    --input: #FAFAF9;
    --link: #FDE68A;
    --brand-strong: #FDE68A;
    --thread-line: #FDE68A;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --muted-foreground: #F5F5F4;
    --disabled-foreground: #F5F5F4;
    --border: #D6D3D1;
    --input: #FAFAF9;
    --link: #FDE68A;
    --brand-strong: #FDE68A;
    --thread-line: #FDE68A;
  }
}

/* Forced colours (Windows High Contrast): use the reader's system colours */
@media (forced-colors: active) {
  :root,
  [data-theme] {
    --background: Canvas;
    --foreground: CanvasText;
    --card: Canvas;
    --card-foreground: CanvasText;
    --popover: Canvas;
    --popover-foreground: CanvasText;
    --muted: Canvas;
    --muted-foreground: CanvasText;
    --primary: CanvasText;
    --primary-foreground: Canvas;
    --border: CanvasText;
    --input: ButtonBorder;
    --link: LinkText;
    --focus-ring: Highlight;
    --focus-halo: Canvas;
    --thread-line: CanvasText;
    --continuum: CanvasText;
    --strand-teacher: CanvasText;
    --strand-sna: CanvasText;
    --strand-parent: CanvasText;
    --strand-child: CanvasText;
    --disabled-foreground: GrayText;
  }
}

/* Reduced motion: state changes still happen, nothing moves */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0.01ms;
    --motion-base: 0.01ms;
    --motion-slow: 0.01ms;
    --press-scale: 1;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Compact density: opt-in for staff data tables. Touch devices keep the 44px target. */
[data-density="compact"] {
  --control-height: 2.5rem;
  --control-height-lg: 3rem;
  --input-height: 2.75rem;
  --cell-padding-y: 0.5rem;
  --cell-padding-x: 0.75rem;
}
[data-density="comfortable"] {
  --control-height: 3rem;
  --control-height-lg: 3.5rem;
  --input-height: 3.25rem;
  --cell-padding-y: 0.75rem;
  --cell-padding-x: 1rem;
}
@media (pointer: coarse) {
  [data-density="compact"] {
    --control-height: 2.75rem;
    --input-height: 2.75rem;
  }
}

/* Print: black on white A4. Shapes, patterns and labels carry the meaning. */
@page {
  size: A4;
  margin: 15mm;
}
@media print {
  :root,
  [data-theme] {
    color-scheme: light;
    --background: #FFFFFF;
    --foreground: #000000;
    --card: #FFFFFF;
    --card-foreground: #000000;
    --popover: #FFFFFF;
    --popover-foreground: #000000;
    --primary: #000000;
    --primary-foreground: #FFFFFF;
    --primary-hover: #000000;
    --secondary: #FFFFFF;
    --secondary-foreground: #000000;
    --muted: #FFFFFF;
    --muted-foreground: #000000;
    --disabled: #FFFFFF;
    --disabled-foreground: #000000;
    --accent: #FFFFFF;
    --accent-foreground: #000000;
    --destructive: #000000;
    --destructive-foreground: #FFFFFF;
    --border: #000000;
    --input: #000000;
    --link: #000000;
    --focus-ring: #000000;
    --focus-halo: #FFFFFF;
    --brand: #FFFFFF;
    --brand-foreground: #000000;
    --brand-strong: #000000;
    --brand-subtle: #FFFFFF;
    --brand-subtle-foreground: #000000;
    --inverse: #FFFFFF;
    --inverse-foreground: #000000;
    --inverse-muted-foreground: #000000;
    --inverse-accent: #000000;
    --inverse-destructive: #000000;
    --success: #000000;
    --success-subtle: #FFFFFF;
    --success-subtle-foreground: #000000;
    --warning: #000000;
    --warning-subtle: #FFFFFF;
    --warning-subtle-foreground: #000000;
    --danger: #000000;
    --danger-subtle: #FFFFFF;
    --danger-subtle-foreground: #000000;
    --info: #000000;
    --info-subtle: #FFFFFF;
    --info-subtle-foreground: #000000;
    --thread-line: #000000;
    --continuum: #000000;
    --strand-teacher: #000000;
    --strand-sna: #000000;
    --strand-parent: #000000;
    --strand-child: #000000;
  }
}
