/* Makerspace Nanaimo design tokens
   Shop Floor is the default light theme (:root and html[data-theme="shop-floor"]).
   Night Bench is the official dark theme (html[data-theme="night-bench"] only).
   The data-theme attribute is the canonical theme switch; this file does not
   apply prefers-color-scheme automatically.
   Values in this file and in tokens.json (cssVariables) match exactly.
   Root font size is 16px; rem sizes assume that root.
   Both themes share one type stack: Archivo Black, Atkinson Hyperlegible,
   IBM Plex Mono. Verify with check-tokens.py. */

:root,
html[data-theme="shop-floor"] {
  /* Color — brand and surfaces */
  --color-red: #ED1C24; /* Logo red. Decorative fills, the 4px top bar, and large type (24px+ or 18.67px+ bold) only. Not for body text on cream, white, or void. */
  --color-red-ink: #BE1219; /* AA-safe red for filled accent buttons with white labels (6.38:1). On Shop Floor, also small red text on cream/white. Fails on void (2.79:1); use --color-red-bright there. */
  --color-red-deep: #9F1016; /* Hover background for accent buttons. */
  --color-red-active: #7A0C11; /* Active/pressed background for accent buttons. */
  --color-red-bright: #BE1219; /* Small red text and icons on dark surfaces. Shop Floor: same as red-ink. Night Bench: #FF6B70 (6.43:1 on void, 5.84:1 on raised). */
  --color-indigo: #2E3192; /* Logo indigo. Primary UI color: headings (Shop Floor), nav selected states, primary buttons, links on light, In-progress badge fill. */
  --color-indigo-hover: #25277A; /* Hover background for primary (indigo) buttons. */
  --color-indigo-deep: #1F2168; /* Active/pressed background for primary buttons. */
  --color-indigo-soft: #ECECFA; /* Soft wash: ghost-button hover, info surfaces, table-row hover, avatar fill, Open badge background (Shop Floor). */
  --color-on-indigo-muted: #D5D6E9; /* Secondary text and icons on an indigo (#2E3192) background (7.42:1). */
  --color-void: #12133A; /* Night Bench page canvas #12133A. A fixed palette anchor in both themes. */
  --color-void-raise: #1A1B4A; /* Night Bench raised surface #1A1B4A. A fixed palette anchor in both themes. */
  --color-cream: #F7F1E8; /* Workshop paper #F7F1E8. Literal cream in both themes. Prefer --color-bg for themeable page backgrounds. */
  --color-cream-dark: #EFE6D8; /* Light-theme sunken surface #EFE6D8. Prefer --color-surface-alt in themeable UI. */
  --color-white: #FFFFFF; /* Always true #FFFFFF. Text on indigo and red-ink, and focus rings on dark surfaces. Not a card fill; use --color-surface. */
  --color-ink: #1A1A1A; /* Literal dark ink #1A1A1A. Prefer --color-text in themeable UI. */
  --color-ink-soft: #3F3A36; /* Supporting body text. Remapped in Night Bench. Prefer --color-text-soft in themeable UI. */
  --color-muted: #5C564F; /* Tertiary text. Remapped in Night Bench. Prefer --color-text-muted in themeable UI. */
  --color-line: #D9D0C4; /* Hairline dividers. Shop Floor: decorative only (1.36:1 on cream), never the sole control indicator. Night Bench: #6A6CB0, 3.72:1 on void (UI only, not body text). */
  --color-border: #8B806E; /* Interactive borders (inputs, unselected chips). Shop Floor 3.46:1 on cream; Night Bench 3.72:1 on void / 3.37:1 on raised. */
  --color-success: #146C2E; /* Success text and icons. */
  --color-success-bg: #E3F3E7; /* Success surface. Use the theme's success or text token on this background. */
  --color-warning: #8A5800; /* Warning text and icons. */
  --color-warning-bg: #F8E6C3; /* Warning surface. */
  --color-error: #BE1219; /* Error text and icons. */
  --color-error-bg: #FDECEC; /* Error surface. */
  --color-info: #2E3192; /* Info text. */
  --color-info-bg: #ECECFA; /* Info surface. */
  --color-focus: #2E3192; /* Focus ring on the current theme's default surfaces. Same value as --color-focus-ring. */
  --color-focus-on-dark: #FFFFFF; /* Focus ring on indigo or other dark fills. Always #FFFFFF. */
  /* Color — semantic (themeable UI) */
  --color-bg: #F7F1E8; /* Semantic page background. Themeable. Use this, not --color-cream, in apps. */
  --color-surface: #FFFFFF; /* Semantic raised surface (cards, tables, header chips). Themeable. Use this, not --color-white, in apps. */
  --color-surface-alt: #EFE6D8; /* Semantic alternate / sunken surface (table headers, sidebar headers, incoming chat). */
  --color-text: #1A1A1A; /* Semantic primary text. Themeable. */
  --color-text-soft: #3F3A36; /* Semantic supporting text. Themeable. */
  --color-text-muted: #5C564F; /* Semantic tertiary text, captions, metadata. Themeable. */
  --color-text-inverse: #FFFFFF; /* Text on indigo and red-ink fills. Always #FFFFFF. */
  --color-focus-ring: #2E3192; /* Theme-aware focus ring: indigo on Shop Floor, white on Night Bench. */
  --color-chat-incoming-bg: #EFE6D8; /* Requester / incoming chat bubble background. */
  --color-chat-outgoing-bg: #ECECFA; /* Assignee / outgoing chat bubble background. */
  /* Color — status badges */
  --color-status-open: #2E3192; /* Open badge foreground. */
  --color-status-open-bg: #ECECFA; /* Open badge background. */
  --color-status-progress: #FFFFFF; /* In-progress badge foreground. */
  --color-status-progress-bg: #2E3192; /* In-progress badge background. */
  --color-status-waiting: #8A5800; /* Waiting badge foreground. */
  --color-status-waiting-bg: #F8E6C3; /* Waiting badge background. */
  --color-status-resolved: #146C2E; /* Resolved badge foreground. */
  --color-status-resolved-bg: #E3F3E7; /* Resolved badge background. */
  /* Color — priority badges */
  --color-priority-low: #5C564F; /* Low-priority badge foreground. */
  --color-priority-low-bg: #EFE6D8; /* Low-priority badge background. */
  --color-priority-medium: #1A1A1A; /* Medium-priority badge foreground. */
  --color-priority-medium-bg: #EFE6D8; /* Medium-priority badge background. */
  --color-priority-high: #BE1219; /* High-priority badge foreground. */
  --color-priority-high-bg: #FDECEC; /* High-priority badge background. */
  --color-priority-urgent: #FFFFFF; /* Urgent-priority badge foreground. */
  --color-priority-urgent-bg: #BE1219; /* Urgent-priority badge background. */
  /* Typography */
  --font-family-display: "Archivo Black", "Arial Black", Impact, sans-serif; /* Headlines, hero type, wordmark, app page titles. Archivo Black in both themes. */
  --font-family-sans: "Atkinson Hyperlegible", "Segoe UI", Calibri, sans-serif; /* Body, UI, buttons, navigation, form labels. Atkinson Hyperlegible in both themes. */
  --font-family-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace; /* Overlines, dates, codes, badges, technical labels. */
  --font-size-display: 5rem; /* 80px at a 16px root. Hero headline (marketing). */
  --font-size-h1: 3rem; /* 48px. Marketing page title. */
  --font-size-h2: 2.25rem; /* 36px. Section title; also the desktop app page title. */
  --font-size-h3: 1.5rem; /* 24px. Subsection; also the mobile app page title. Use sans 700 unless a poster treatment is required. */
  --font-size-body: 1.125rem; /* 18px. Default marketing body. */
  --font-size-body-sm: 1rem; /* 16px. Compact UI, header nav, default button label, app body. */
  --font-size-caption: 0.875rem; /* 14px. Minimum size for body, forms, navigation, and buttons. */
  --font-size-overline: 0.875rem; /* 14px. Mono uppercase labels (standard). */
  --font-size-button: 1rem; /* 16px. Default button. */
  --font-size-button-lg: 1.125rem; /* 18px. Large/hero button. */
  --font-size-badge: 0.75rem; /* 12px. Badge, tag, table-header, filter-group, theme-switch, and thread-timestamp labels only. Not body copy. */
  --line-height-display: 0.9; /* For font-size-display and tight poster headlines. */
  --line-height-h1: 1.05;
  --line-height-h2: 1.1;
  --line-height-h3: 1.2;
  --line-height-body: 1.55;
  --line-height-body-sm: 1.5;
  --line-height-caption: 1.4;
  --line-height-overline: 1.3;
  --line-height-button: 1;
  --letter-spacing-display: -0.02em;
  --letter-spacing-tight: -0.01em; /* Wordmark and compact headlines. */
  --letter-spacing-normal: 0;
  --letter-spacing-overline: 0.10em;
  --font-weight-display: 400; /* Archivo Black's only weight. Same in both themes. */
  --font-weight-regular: 400;
  --font-weight-medium: 500; /* IBM Plex Mono overlines, dates, and badge labels. */
  --font-weight-bold: 700; /* Atkinson Hyperlegible bold; button labels; nav. */
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  /* Layout */
  --layout-page-pad: 64px; /* Horizontal page padding from the 1024px breakpoint up. */
  --layout-page-pad-sm: 24px; /* Horizontal page padding below 1024px. */
  --layout-grid-max: 1312px; /* Max content width (1440 minus two 64px page paddings). */
  --layout-grid-gutter: 24px;
  --layout-header-height: 84px; /* Marketing and desktop app header row height. */
  --layout-header-height-sm: 72px; /* Application header height below 768px. */
  --layout-topbar-height: 4px; /* Red brand bar above the header. */
  --layout-shops-height: 100px; /* Homepage workshop strip. */
  --layout-bottom-nav-height: 64px; /* Mobile app bottom navigation bar. */
  --layout-sidebar-width: 340px; /* Desktop ticket-detail sidebar width. */
  --layout-avatar-size: 40px; /* Default thread avatar diameter. */
  --layout-avatar-size-sm: 32px; /* Header user-chip avatar diameter. */
  /* Radius, shadow, controls, logo */
  --radius-sm: 4px; /* Default radius for buttons, inputs, cards, badges, chips. 4px Shop Floor, 8px Night Bench. */
  --radius-none: 0px;
  --shadow-card: 0 8px 24px rgba(26, 26, 26, 0.08);
  --control-tap-min: 48px; /* Default minimum width and height for buttons, inputs, and other tap targets. See the 40px chip exception. */
  --control-button-height: 48px;
  --control-button-height-lg: 56px;
  --control-button-padding-x: 22px;
  --control-button-padding-x-lg: 28px;
  --control-input-height: 48px;
  --control-input-border-width: 2px;
  --control-focus-width: 3px;
  --control-focus-offset: 2px;
  --control-icon-size: 24px; /* Default Lucide icon size. */
  --control-icon-stroke: 2; /* Lucide stroke width. Unitless, as used by the Lucide SVG stroke-width attribute. */
  --control-chip-height: 40px; /* Filter-chip and theme-switch height. Scoped 40px exception; see GUIDELINES.md. */
  --control-theme-switch-height: 40px; /* Same 40px exception as --control-chip-height. */
  --logo-header-size: 60px; /* Height of the full-color mark when accompanied by the typeset wordmark, on desktop and on marketing pages. */
  --logo-header-size-sm: 48px; /* Application header logo height below 768px. Scoped 48px exception; see GUIDELINES.md. */
  --logo-min-decorative: 80px; /* Smallest height for the full-color logo when the in-logo NANAIMO wordmark does not need to be read. */
  --logo-min-readable: 160px; /* Smallest height at which the in-logo NANAIMO bar is treated as readable. */
  --logo-clear-space: 0.10; /* Clear space on every side, as a fraction of the logo's rendered height. The source PNG has no built-in padding. */
}

html[data-theme="night-bench"] {
  /* Color — brand and surfaces */
  --color-red: #ED1C24; /* Logo red. Decorative fills, the 4px top bar, and large type (24px+ or 18.67px+ bold) only. Not for body text on cream, white, or void. */
  --color-red-ink: #BE1219; /* AA-safe red for filled accent buttons with white labels (6.38:1). On Shop Floor, also small red text on cream/white. Fails on void (2.79:1); use --color-red-bright there. */
  --color-red-deep: #9F1016; /* Hover background for accent buttons. */
  --color-red-active: #7A0C11; /* Active/pressed background for accent buttons. */
  --color-red-bright: #FF6B70; /* Small red text and icons on dark surfaces. Shop Floor: same as red-ink. Night Bench: #FF6B70 (6.43:1 on void, 5.84:1 on raised). */
  --color-indigo: #2E3192; /* Logo indigo. Primary UI color: headings (Shop Floor), nav selected states, primary buttons, links on light, In-progress badge fill. */
  --color-indigo-hover: #25277A; /* Hover background for primary (indigo) buttons. */
  --color-indigo-deep: #1F2168; /* Active/pressed background for primary buttons. */
  --color-indigo-soft: #24265A; /* Soft wash: ghost-button hover, info surfaces, table-row hover, avatar fill, Open badge background (Shop Floor). */
  --color-on-indigo-muted: #D5D6E9; /* Secondary text and icons on an indigo (#2E3192) background (7.42:1). */
  --color-void: #12133A; /* Night Bench page canvas #12133A. A fixed palette anchor in both themes. */
  --color-void-raise: #1A1B4A; /* Night Bench raised surface #1A1B4A. A fixed palette anchor in both themes. */
  --color-cream: #F7F1E8; /* Workshop paper #F7F1E8. Literal cream in both themes. Prefer --color-bg for themeable page backgrounds. */
  --color-cream-dark: #EFE6D8; /* Light-theme sunken surface #EFE6D8. Prefer --color-surface-alt in themeable UI. */
  --color-white: #FFFFFF; /* Always true #FFFFFF. Text on indigo and red-ink, and focus rings on dark surfaces. Not a card fill; use --color-surface. */
  --color-ink: #1A1A1A; /* Literal dark ink #1A1A1A. Prefer --color-text in themeable UI. */
  --color-ink-soft: #E7E6F2; /* Supporting body text. Remapped in Night Bench. Prefer --color-text-soft in themeable UI. */
  --color-muted: #C8C6E0; /* Tertiary text. Remapped in Night Bench. Prefer --color-text-muted in themeable UI. */
  --color-line: #6A6CB0; /* Hairline dividers. Shop Floor: decorative only (1.36:1 on cream), never the sole control indicator. Night Bench: #6A6CB0, 3.72:1 on void (UI only, not body text). */
  --color-border: #6A6CB0; /* Interactive borders (inputs, unselected chips). Shop Floor 3.46:1 on cream; Night Bench 3.72:1 on void / 3.37:1 on raised. */
  --color-success: #3DDB7A; /* Success text and icons. */
  --color-success-bg: #0E3A22; /* Success surface. Use the theme's success or text token on this background. */
  --color-warning: #F5C518; /* Warning text and icons. */
  --color-warning-bg: #2A2808; /* Warning surface. */
  --color-error: #FF6B70; /* Error text and icons. */
  --color-error-bg: #3A1520; /* Error surface. */
  --color-info: #C8C6E0; /* Info text. */
  --color-info-bg: #24265A; /* Info surface. */
  --color-focus: #FFFFFF; /* Focus ring on the current theme's default surfaces. Same value as --color-focus-ring. */
  --color-focus-on-dark: #FFFFFF; /* Focus ring on indigo or other dark fills. Always #FFFFFF. */
  /* Color — semantic (themeable UI) */
  --color-bg: #12133A; /* Semantic page background. Themeable. Use this, not --color-cream, in apps. */
  --color-surface: #1A1B4A; /* Semantic raised surface (cards, tables, header chips). Themeable. Use this, not --color-white, in apps. */
  --color-surface-alt: #161748; /* Semantic alternate / sunken surface (table headers, sidebar headers, incoming chat). */
  --color-text: #FFFFFF; /* Semantic primary text. Themeable. */
  --color-text-soft: #E7E6F2; /* Semantic supporting text. Themeable. */
  --color-text-muted: #C8C6E0; /* Semantic tertiary text, captions, metadata. Themeable. */
  --color-text-inverse: #FFFFFF; /* Text on indigo and red-ink fills. Always #FFFFFF. */
  --color-focus-ring: #FFFFFF; /* Theme-aware focus ring: indigo on Shop Floor, white on Night Bench. */
  --color-chat-incoming-bg: #161748; /* Requester / incoming chat bubble background. */
  --color-chat-outgoing-bg: #24265A; /* Assignee / outgoing chat bubble background. */
  /* Color — status badges */
  --color-status-open: #C8C6E0; /* Open badge foreground. */
  --color-status-open-bg: #24265A; /* Open badge background. */
  --color-status-progress: #FFFFFF; /* In-progress badge foreground. */
  --color-status-progress-bg: #2E3192; /* In-progress badge background. */
  --color-status-waiting: #12133A; /* Waiting badge foreground. */
  --color-status-waiting-bg: #F5C518; /* Waiting badge background. */
  --color-status-resolved: #3DDB7A; /* Resolved badge foreground. */
  --color-status-resolved-bg: #0E3A22; /* Resolved badge background. */
  /* Color — priority badges */
  --color-priority-low: #C8C6E0; /* Low-priority badge foreground. */
  --color-priority-low-bg: #24265A; /* Low-priority badge background. */
  --color-priority-medium: #E7E6F2; /* Medium-priority badge foreground. */
  --color-priority-medium-bg: #161748; /* Medium-priority badge background. */
  --color-priority-high: #FF6B70; /* High-priority badge foreground. */
  --color-priority-high-bg: #3A1520; /* High-priority badge background. */
  --color-priority-urgent: #FFFFFF; /* Urgent-priority badge foreground. */
  --color-priority-urgent-bg: #BE1219; /* Urgent-priority badge background. */
  /* Typography */
  --font-family-display: "Archivo Black", "Arial Black", Impact, sans-serif; /* Headlines, hero type, wordmark, app page titles. Archivo Black in both themes. */
  --font-family-sans: "Atkinson Hyperlegible", "Segoe UI", Calibri, sans-serif; /* Body, UI, buttons, navigation, form labels. Atkinson Hyperlegible in both themes. */
  --font-family-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace; /* Overlines, dates, codes, badges, technical labels. */
  --font-size-display: 5rem; /* 80px at a 16px root. Hero headline (marketing). */
  --font-size-h1: 3rem; /* 48px. Marketing page title. */
  --font-size-h2: 2.25rem; /* 36px. Section title; also the desktop app page title. */
  --font-size-h3: 1.5rem; /* 24px. Subsection; also the mobile app page title. Use sans 700 unless a poster treatment is required. */
  --font-size-body: 1.125rem; /* 18px. Default marketing body. */
  --font-size-body-sm: 1rem; /* 16px. Compact UI, header nav, default button label, app body. */
  --font-size-caption: 0.875rem; /* 14px. Minimum size for body, forms, navigation, and buttons. */
  --font-size-overline: 0.875rem; /* 14px. Mono uppercase labels (standard). */
  --font-size-button: 1rem; /* 16px. Default button. */
  --font-size-button-lg: 1.125rem; /* 18px. Large/hero button. */
  --font-size-badge: 0.75rem; /* 12px. Badge, tag, table-header, filter-group, theme-switch, and thread-timestamp labels only. Not body copy. */
  --line-height-display: 0.9; /* For font-size-display and tight poster headlines. */
  --line-height-h1: 1.05;
  --line-height-h2: 1.1;
  --line-height-h3: 1.2;
  --line-height-body: 1.55;
  --line-height-body-sm: 1.5;
  --line-height-caption: 1.4;
  --line-height-overline: 1.3;
  --line-height-button: 1;
  --letter-spacing-display: -0.02em;
  --letter-spacing-tight: -0.01em; /* Wordmark and compact headlines. */
  --letter-spacing-normal: 0;
  --letter-spacing-overline: 0.10em;
  --font-weight-display: 400; /* Archivo Black's only weight. Same in both themes. */
  --font-weight-regular: 400;
  --font-weight-medium: 500; /* IBM Plex Mono overlines, dates, and badge labels. */
  --font-weight-bold: 700; /* Atkinson Hyperlegible bold; button labels; nav. */
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  /* Layout */
  --layout-page-pad: 64px; /* Horizontal page padding from the 1024px breakpoint up. */
  --layout-page-pad-sm: 24px; /* Horizontal page padding below 1024px. */
  --layout-grid-max: 1312px; /* Max content width (1440 minus two 64px page paddings). */
  --layout-grid-gutter: 24px;
  --layout-header-height: 84px; /* Marketing and desktop app header row height. */
  --layout-header-height-sm: 72px; /* Application header height below 768px. */
  --layout-topbar-height: 4px; /* Red brand bar above the header. */
  --layout-shops-height: 100px; /* Homepage workshop strip. */
  --layout-bottom-nav-height: 64px; /* Mobile app bottom navigation bar. */
  --layout-sidebar-width: 340px; /* Desktop ticket-detail sidebar width. */
  --layout-avatar-size: 40px; /* Default thread avatar diameter. */
  --layout-avatar-size-sm: 32px; /* Header user-chip avatar diameter. */
  /* Radius, shadow, controls, logo */
  --radius-sm: 8px; /* Default radius for buttons, inputs, cards, badges, chips. 4px Shop Floor, 8px Night Bench. */
  --radius-none: 0px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --control-tap-min: 48px; /* Default minimum width and height for buttons, inputs, and other tap targets. See the 40px chip exception. */
  --control-button-height: 48px;
  --control-button-height-lg: 56px;
  --control-button-padding-x: 22px;
  --control-button-padding-x-lg: 28px;
  --control-input-height: 48px;
  --control-input-border-width: 2px;
  --control-focus-width: 3px;
  --control-focus-offset: 2px;
  --control-icon-size: 24px; /* Default Lucide icon size. */
  --control-icon-stroke: 2; /* Lucide stroke width. Unitless, as used by the Lucide SVG stroke-width attribute. */
  --control-chip-height: 40px; /* Filter-chip and theme-switch height. Scoped 40px exception; see GUIDELINES.md. */
  --control-theme-switch-height: 40px; /* Same 40px exception as --control-chip-height. */
  --logo-header-size: 60px; /* Height of the full-color mark when accompanied by the typeset wordmark, on desktop and on marketing pages. */
  --logo-header-size-sm: 48px; /* Application header logo height below 768px. Scoped 48px exception; see GUIDELINES.md. */
  --logo-min-decorative: 80px; /* Smallest height for the full-color logo when the in-logo NANAIMO wordmark does not need to be read. */
  --logo-min-readable: 160px; /* Smallest height at which the in-logo NANAIMO bar is treated as readable. */
  --logo-clear-space: 0.10; /* Clear space on every side, as a fraction of the logo's rendered height. The source PNG has no built-in padding. */
}

