/* Car Test for Artists · Console design tokens
   Generated by build-tokens.mjs together with tokens.json. Edit that file, not this one.
   Light is the default. Dark applies under prefers-color-scheme: dark (unless [data-theme="light"])
   and whenever [data-theme="dark"] is set on an ancestor (usually <html>). */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Color roles (light) */
  --ct-color-bg: #D5D7D2; /* Page: the aluminium chassis */
  --ct-color-surface-1: #E8E9E5; /* Faceplates, panels, sheets */
  --ct-color-surface-2: #C6C9C3; /* Wells, sidebars, grouped controls */
  --ct-color-key-neutral: #CDD0CA; /* Cap of the tertiary (aluminium) key, switch and fader caps */
  --ct-color-field-bg: #F1F2EE; /* Text-field face, like a scribble strip */
  --ct-color-fader-cap: #E3E4E0; /* Fader and switch caps that sit in a slot */
  --ct-color-on-fader-cap: #1B1D1C; /* The index line on a fader cap */
  --ct-color-slot: #2B2F2C; /* Fader slots and switch tracks (recessed, dark) */
  --ct-color-ink-1: #1B1D1C; /* Primary text and icons */
  --ct-color-ink-2: #4F5451; /* Secondary text, engraved labels */
  --ct-color-line: #A9ADA8; /* Decorative dividers only (not control edges) */
  --ct-color-line-strong: #686D69; /* FIX(new) Control edges: inputs, checkboxes, outlines (3:1) */
  --ct-color-primary: #EA5D24; /* FIX was #E4511B. The orange key: play, the one main action */
  --ct-color-on-primary: #1B1D1C; /* Text on primary */
  --ct-color-secondary: #2347D1; /* The blue key: compare, save, supporting actions */
  --ct-color-on-secondary: #FFFFFF; /* Text on secondary */
  --ct-color-tertiary: #1F3FBF; /* FIX was #2347D1. Links, selected row, active tab (as text) */
  --ct-color-on-tertiary: #FFFFFF; /* Text on a tertiary fill */
  --ct-color-good: #2E9E4F; /* LED and fill: saved, watching, paired */
  --ct-color-on-good: #1B1D1C; /* Text on good fill */
  --ct-color-good-ink: #196A33; /* FIX(new) good as text */
  --ct-color-warn: #D99A00; /* LED and fill: check these, waiting */
  --ct-color-on-warn: #1B1D1C; /* Text on warn fill */
  --ct-color-warn-ink: #755000; /* FIX(new) warn as text */
  --ct-color-crit: #A81224; /* FIX was #C4162A. LED, outline and fill: errors, offline, destructive */
  --ct-color-on-crit: #FFFFFF; /* Text on crit fill */
  --ct-color-crit-ink: #A81224; /* crit as text */
  --ct-color-focus: #2347D1; /* Focus ring */
  --ct-color-screen: #2B2F2C; /* LCD screen background */
  --ct-color-on-screen: #FF8A4C; /* LCD lit text */
  --ct-color-on-screen-2: #C9A48C; /* FIX(new) LCD secondary text */
  --ct-color-led-off: #9A9E99; /* Unlit LED */
  --ct-color-inverse: #1B1D1C; /* Toast and tape-label fill */
  --ct-color-on-inverse: #ECEDE9; /* Text on inverse */
  --ct-color-scrim: rgba(18, 20, 19, 0.45); /* Behind sheets */
  --ct-color-art-1: #E4511B; /* Generated artwork, orange */
  --ct-color-art-2: #2347D1; /* Generated artwork, blue */
  --ct-color-art-3: #F2C230; /* Generated artwork, yellow */
  --ct-color-qr-ink: #111312; /* QR modules; fixed in both themes so phones can scan */
  --ct-color-qr-paper: #F4F4F1; /* QR plate; fixed in both themes */

  /* Material: bevels, shadows, texture (light) */
  --ct-key-edge: rgba(0, 0, 0, 0.28);
  --ct-key-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.04));
  --ct-key-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 0 rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.14);
  --ct-key-shadow-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --ct-panel-border: rgba(0, 0, 0, 0.12);
  --ct-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.12);
  --ct-recess-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  --ct-field-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
  --ct-overlay-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 -2px 0 rgba(0, 0, 0, 0.06), 0 18px 48px rgba(0, 0, 0, 0.28);
  --ct-engrave: 0 1px 0 rgba(255, 255, 255, 0.55);
  --ct-led-glow: 0 0 6px;
  --ct-led-rim: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  --ct-art-rim: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  --ct-screen-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 45%);
  --ct-texture-brushed: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 3px, rgba(0, 0, 0, 0.018) 3px 4px);
}

/* Type families. GT America (Grilli Type) is named first; Archivo and Martian Mono are the free
   stand-ins until the licence is bought. Widths come from font-stretch, so the Condensed and
   Compressed cuts slot in through @font-face font-stretch descriptors without touching components. */
:root {
  --ct-font-sans: "GT America", "Archivo", system-ui, sans-serif;
  --ct-font-display: "GT America", "Archivo", "Arial Narrow", sans-serif;
  --ct-font-mono: "GT America Mono", "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ct-stretch-display: 72%;
  --ct-stretch-key: 85%;
  --ct-stretch-normal: 100%;
  --ct-weight-regular: 400;
  --ct-weight-medium: 500;
  --ct-weight-semibold: 600;
  --ct-weight-bold: 700;
  --ct-weight-black: 800;
  --ct-track-engraved: 0.08em;
  --ct-track-key: 0.04em;
  --ct-track-display: 0;

  /* Named type scale: size, line-height, family, weight, stretch, case, tracking */
  --ct-text-display-xl-size: 3.5rem; /* Now Playing title on desktop, the wordmark */
  --ct-text-display-xl-line: 0.92;
  --ct-text-display-xl-family: var(--ct-font-display);
  --ct-text-display-xl-weight: var(--ct-weight-black);
  --ct-text-display-xl-stretch: var(--ct-stretch-display);
  --ct-text-display-xl-case: uppercase;
  --ct-text-display-xl-track: var(--ct-track-display);
  --ct-text-display-l-size: 2.5rem; /* Screen titles (Library), song title in detail */
  --ct-text-display-l-line: 0.95;
  --ct-text-display-l-family: var(--ct-font-display);
  --ct-text-display-l-weight: var(--ct-weight-black);
  --ct-text-display-l-stretch: var(--ct-stretch-display);
  --ct-text-display-l-case: uppercase;
  --ct-text-display-l-track: var(--ct-track-display);
  --ct-text-display-m-size: 1.75rem; /* Sheet and section titles */
  --ct-text-display-m-line: 1;
  --ct-text-display-m-family: var(--ct-font-display);
  --ct-text-display-m-weight: var(--ct-weight-black);
  --ct-text-display-m-stretch: var(--ct-stretch-display);
  --ct-text-display-m-case: uppercase;
  --ct-text-display-m-track: var(--ct-track-display);
  --ct-text-title-size: 1.25rem; /* Panel headings, dialog questions */
  --ct-text-title-line: 1.2;
  --ct-text-title-family: var(--ct-font-sans);
  --ct-text-title-weight: var(--ct-weight-bold);
  --ct-text-title-stretch: var(--ct-stretch-normal);
  --ct-text-title-case: none;
  --ct-text-title-track: var(--ct-track-display);
  --ct-text-body-l-size: 1.125rem; /* Song and version names on the phone (car-readable) */
  --ct-text-body-l-line: 1.35;
  --ct-text-body-l-family: var(--ct-font-sans);
  --ct-text-body-l-weight: var(--ct-weight-semibold);
  --ct-text-body-l-stretch: var(--ct-stretch-normal);
  --ct-text-body-l-case: none;
  --ct-text-body-l-track: var(--ct-track-display);
  --ct-text-body-size: 1rem; /* Running text, field input (16px stops iOS zoom) */
  --ct-text-body-line: 1.45;
  --ct-text-body-family: var(--ct-font-sans);
  --ct-text-body-weight: var(--ct-weight-regular);
  --ct-text-body-stretch: var(--ct-stretch-normal);
  --ct-text-body-case: none;
  --ct-text-body-track: var(--ct-track-display);
  --ct-text-small-size: 0.875rem; /* Meta lines, reasons, helper text */
  --ct-text-small-line: 1.4;
  --ct-text-small-family: var(--ct-font-sans);
  --ct-text-small-weight: var(--ct-weight-regular);
  --ct-text-small-stretch: var(--ct-stretch-normal);
  --ct-text-small-case: none;
  --ct-text-small-track: var(--ct-track-display);
  --ct-text-key-size: 0.9375rem; /* Key (button) legends */
  --ct-text-key-line: 1;
  --ct-text-key-family: var(--ct-font-sans);
  --ct-text-key-weight: var(--ct-weight-bold);
  --ct-text-key-stretch: var(--ct-stretch-key);
  --ct-text-key-case: uppercase;
  --ct-text-key-track: var(--ct-track-key);
  --ct-text-label-size: 0.6875rem; /* Engraved labels on controls and panels */
  --ct-text-label-line: 1.2;
  --ct-text-label-family: var(--ct-font-mono);
  --ct-text-label-weight: var(--ct-weight-medium);
  --ct-text-label-stretch: var(--ct-stretch-normal);
  --ct-text-label-case: uppercase;
  --ct-text-label-track: var(--ct-track-engraved);
  --ct-text-readout-size: 0.8125rem; /* Times, LUFS, file names, codes */
  --ct-text-readout-line: 1.3;
  --ct-text-readout-family: var(--ct-font-mono);
  --ct-text-readout-weight: var(--ct-weight-regular);
  --ct-text-readout-stretch: var(--ct-stretch-normal);
  --ct-text-readout-case: none;
  --ct-text-readout-track: var(--ct-track-display);
  --ct-text-readout-l-size: 2rem; /* LCD time display */
  --ct-text-readout-l-line: 1;
  --ct-text-readout-l-family: var(--ct-font-mono);
  --ct-text-readout-l-weight: var(--ct-weight-regular);
  --ct-text-readout-l-stretch: var(--ct-stretch-normal);
  --ct-text-readout-l-case: none;
  --ct-text-readout-l-track: var(--ct-track-display);

  /* Space (4px step; names are multiples of 4) */
  --ct-space-1: 4px;
  --ct-space-2: 8px;
  --ct-space-3: 12px;
  --ct-space-4: 16px;
  --ct-space-5: 20px;
  --ct-space-6: 24px;
  --ct-space-8: 32px;
  --ct-space-10: 40px;
  --ct-space-12: 48px;
  --ct-space-16: 64px;
  --ct-space-0-5: 2px;

  /* Radius: grows with the size of the object (field < key < panel < sheet) */
  --ct-radius-s: 4px;
  --ct-radius-m: 6px;
  --ct-radius-l: 10px;
  --ct-radius-xl: 16px;
  --ct-radius-round: 999px;

  /* Borders */
  --ct-border-hair: 1px;
  --ct-border-key: 1px;
  --ct-border-control: 1.5px;
  --ct-border-focus: 3px;
  --ct-border-focus-offset: 2px;
  --ct-focus-ring: var(--ct-border-focus) solid var(--ct-color-focus);

  /* Motion: things move when pressed, never by themselves (LED blinks are the exception) */
  --ct-motion-dur-meter: 60ms;
  --ct-motion-dur-press: 120ms;
  --ct-motion-dur-switch: 160ms;
  --ct-motion-dur-sheet: 240ms;
  --ct-motion-dur-blink: 1400ms;
  --ct-motion-ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ct-motion-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ct-press-y: 2px;

  /* Z-index */
  --ct-z-base: 0;
  --ct-z-raised: 1;
  --ct-z-sticky: 100;
  --ct-z-player: 200;
  --ct-z-scrim: 300;
  --ct-z-sheet: 310;
  --ct-z-toast: 400;

  /* Sizes and touch targets. The phone is used in a car: nothing tappable under 44px. */
  --ct-size-touch-min: 44px;
  --ct-size-touch-car: 56px;
  --ct-size-key-h-s: 36px;
  --ct-size-key-h-m: 44px;
  --ct-size-key-h-l: 56px;
  --ct-size-key-h-xl: 72px;
  --ct-size-row-h: 64px;
  --ct-size-row-h-dense: 44px;
  --ct-size-art-s: 44px;
  --ct-size-art-m: 56px;
  --ct-size-icon: 1.25em;
  --ct-size-led: 8px;
  --ct-size-sidebar-w: 232px;
  --ct-size-window-min-w: 960px;
  --ct-size-window-min-h: 600px;
  --ct-size-phone-w: 390px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ct-color-bg: #161817;
    --ct-color-surface-1: #202322;
    --ct-color-surface-2: #2B2F2D;
    --ct-color-key-neutral: #363A38;
    --ct-color-field-bg: #111312;
    --ct-color-slot: #0B0C0C;
    --ct-color-fader-cap: #A3A8A4;
    --ct-color-on-fader-cap: #121212;
    --ct-color-ink-1: #ECEDE9;
    --ct-color-ink-2: #A3A8A4;
    --ct-color-line: #3A3F3C;
    --ct-color-line-strong: #737975;
    --ct-color-primary: #FF6A33;
    --ct-color-on-primary: #121212;
    --ct-color-secondary: #5C7DFF;
    --ct-color-on-secondary: #0C1230;
    --ct-color-tertiary: #8FA6FF;
    --ct-color-on-tertiary: #0C1230;
    --ct-color-good: #4CC46E;
    --ct-color-on-good: #121212;
    --ct-color-good-ink: #4CC46E;
    --ct-color-warn: #F2B92E;
    --ct-color-on-warn: #121212;
    --ct-color-warn-ink: #F2B92E;
    --ct-color-crit: #FF5468;
    --ct-color-on-crit: #121212;
    --ct-color-crit-ink: #FF5468;
    --ct-color-focus: #8FA6FF;
    --ct-color-screen: #0D0F0E;
    --ct-color-on-screen: #FF8A4C;
    --ct-color-on-screen-2: #C9A48C;
    --ct-color-led-off: #3F4441;
    --ct-color-inverse: #ECEDE9;
    --ct-color-on-inverse: #161817;
    --ct-color-scrim: rgba(0, 0, 0, 0.6);
    --ct-color-art-1: #FF6A33;
    --ct-color-art-2: #3D5BE0;
    --ct-color-art-3: #E8B52A;
    --ct-color-qr-ink: #111312;
    --ct-color-qr-paper: #F4F4F1;
    --ct-key-edge: rgba(0, 0, 0, 0.6);
    --ct-key-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
    --ct-key-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 0 rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.35);
    --ct-key-shadow-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.55);
    --ct-panel-border: rgba(255, 255, 255, 0.06);
    --ct-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4);
    --ct-recess-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
    --ct-field-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    --ct-overlay-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 48px rgba(0, 0, 0, 0.6);
    --ct-engrave: 0 -1px 0 rgba(0, 0, 0, 0.7);
    --ct-led-glow: 0 0 8px;
    --ct-led-rim: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
    --ct-art-rim: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    --ct-screen-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 45%);
    --ct-texture-brushed: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px, rgba(0, 0, 0, 0.08) 3px 4px);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --ct-color-bg: #161817;
  --ct-color-surface-1: #202322;
  --ct-color-surface-2: #2B2F2D;
  --ct-color-key-neutral: #363A38;
  --ct-color-field-bg: #111312;
  --ct-color-slot: #0B0C0C;
  --ct-color-fader-cap: #A3A8A4;
  --ct-color-on-fader-cap: #121212;
  --ct-color-ink-1: #ECEDE9;
  --ct-color-ink-2: #A3A8A4;
  --ct-color-line: #3A3F3C;
  --ct-color-line-strong: #737975;
  --ct-color-primary: #FF6A33;
  --ct-color-on-primary: #121212;
  --ct-color-secondary: #5C7DFF;
  --ct-color-on-secondary: #0C1230;
  --ct-color-tertiary: #8FA6FF;
  --ct-color-on-tertiary: #0C1230;
  --ct-color-good: #4CC46E;
  --ct-color-on-good: #121212;
  --ct-color-good-ink: #4CC46E;
  --ct-color-warn: #F2B92E;
  --ct-color-on-warn: #121212;
  --ct-color-warn-ink: #F2B92E;
  --ct-color-crit: #FF5468;
  --ct-color-on-crit: #121212;
  --ct-color-crit-ink: #FF5468;
  --ct-color-focus: #8FA6FF;
  --ct-color-screen: #0D0F0E;
  --ct-color-on-screen: #FF8A4C;
  --ct-color-on-screen-2: #C9A48C;
  --ct-color-led-off: #3F4441;
  --ct-color-inverse: #ECEDE9;
  --ct-color-on-inverse: #161817;
  --ct-color-scrim: rgba(0, 0, 0, 0.6);
  --ct-color-art-1: #FF6A33;
  --ct-color-art-2: #3D5BE0;
  --ct-color-art-3: #E8B52A;
  --ct-color-qr-ink: #111312;
  --ct-color-qr-paper: #F4F4F1;
  --ct-key-edge: rgba(0, 0, 0, 0.6);
  --ct-key-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
  --ct-key-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 0 rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.35);
  --ct-key-shadow-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.55);
  --ct-panel-border: rgba(255, 255, 255, 0.06);
  --ct-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4);
  --ct-recess-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  --ct-field-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  --ct-overlay-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 48px rgba(0, 0, 0, 0.6);
  --ct-engrave: 0 -1px 0 rgba(0, 0, 0, 0.7);
  --ct-led-glow: 0 0 8px;
  --ct-led-rim: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  --ct-art-rim: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --ct-screen-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 45%);
  --ct-texture-brushed: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px, rgba(0, 0, 0, 0.08) 3px 4px);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ct-motion-dur-meter: 0ms;
    --ct-motion-dur-press: 0ms;
    --ct-motion-dur-switch: 0ms;
    --ct-motion-dur-sheet: 0ms;
  }
}
