/* Gurva's two themes, dark and light, as colour tokens (the Owner, 25 Oct: "we need light theme for each page - for full
   built every device/screen"). This file and tokens.css are the only places a colour is written: every other theme-aware
   sheet (brand.css, room.css, class-calm.css, class-layout.css) draws with these variables (tests/test_themes.py greps them).

   Which set applies:
   - by default, the device's own setting (prefers-color-scheme);
   - a choice made in Settings or the ⋮ menu (Light / Dark / System), saved on the device (theme.js), sets
     <html data-theme="light|dark">, which wins over the device's setting.

   Two families of tokens:
   - the class (/room, its landing, the picker, the sheets, the summary): --q-*, one neutral base in four steps, one
     saffron accent (the logo's), one type family;
   - the app's other screens (sign-in, the dashboards, accounts, payments): the brand's roles (--wall, --paper, --ink …,
     brand.css maps app.css onto them) and a few role colours below (--brand-ink, --brand-fill, tints).

   The board in light: a light board with dark ink (a printed page), not a dark slab on a light screen: it reads better
   in daylight on a phone and keeps the screen one calm surface. The live teacher's own video keeps her classroom
   background in both themes; only its frame line follows the theme.

   Contrast: every text pair below is at least 4.5:1 (WCAG AA), checked in Chromium by tests/test_themes.py. */

/* ── light: the default set ────────────────────────────────────────────────────────────────────── */
:root {
  /* the class */
  --q-bg: #F4F5F7;
  --q-surface: #FFFFFF;
  --q-raise: #EDEFF2;
  --q-line: #D5D9DF;
  --q-text: #14181D;
  --q-muted: #4A525C;
  --q-faint: #5C6470;
  --q-accent: #EA580C;          /* the logo's saffron: the mic, Start, and her speaking (fills and lines) */
  --q-accent-fill: #C2410C;     /* the same hue under white text (5.2:1) */
  --q-accent-soft: #B23C0B;     /* the same hue as text on the base (5.6:1 on --q-bg) */
  --q-on-accent: #FFFFFF;
  --q-now: #14181D;             /* the sentence she is on */
  --q-now-bg: rgba(234, 88, 12, 0.10);
  --q-hl: rgba(234, 88, 12, 0.08);   /* the board's current line */
  --q-shadow: rgba(20, 24, 29, 0.14);
  --q-veil: rgba(20, 24, 29, 0.45);
  --q-scrim: rgba(255, 255, 255, 0.90);   /* her caption over her video */
  --q-scrim-text: #14181D;
  --q-listen: #15803D;          /* the mic listening on its own (white icon: 5.0:1) */
  --q-listen-ring: rgba(21, 128, 61, 0.45);
  --q-listen-text: #15803D;
  --q-option-text: #14181D;
  --q-option-bg: #FFFFFF;
  --q-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A525C' stroke-width='2'/%3E%3C/svg%3E");
  --q-logo: url("/static/brand/logo-light-transparent.svg");
  --q-scheme: light;

  /* the app's other screens */
  --brand-ink: #312E81;         /* indigo as text and lines */
  --brand-ink-strong: #1E1B4B;
  --brand-fill: #312E81;        /* indigo under white text (10.4:1) */
  --brand-fill-hover: #1E1B4B;
  --on-fill: #FFFFFF;
  --accent-ink-text: #C2410C;   /* saffron as text */
  --neutral-fill: #E2E8F0;
  --control-off: #CBD5E1;
  --dot-off: #64748B;
  --tile-wash: #E0E7FF;
  --tint-warn: #FFF7ED;
  --tint-warn-line: #FED7AA;
  --tint-warn-ink: #7C2D12;
  --tint-ok: #ECFDF5;
  --tint-ok-ink: #047857;
  --tint-bad: #FFF1F2;
  --tint-bad-ink: #991B1B;
  --tint-brand-line: #C7D2FE;
  --shadow-ink: rgba(15, 23, 42, 0.08);
  --shadow-deep: rgba(15, 23, 42, 0.22);
  --veil: rgba(15, 23, 42, 0.55);
  --paused-veil: rgba(248, 250, 252, 0.86);
  --label-scrim: rgba(15, 23, 42, 0.78);
  --ring-brand: rgba(49, 46, 129, 0.32);
  --nav-hover: #EEF2FF;
  --chevron-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23312E81' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rule-line: #E0E7FF;
  --ring-accent: rgba(234, 88, 12, 0.35);
  --bp-paper: #FFFFFF;   /* the book's page: paper in both themes */
  --app-scheme: light;
}

/* the brand's fixed colours (the slate board, its chalk) and its notebook lines, in both themes */
:root[data-brand="v2"] {
  --board-hi: #1E293B; --frame-2: #1E293B; --chalk-2: #94A3B8; --chalk-blue: #A5B4FC; --margin: #FDA4AF;
  --rule: var(--rule-line);
  --chalk-glow: rgba(241, 245, 249, 0.3); --chalk-rule: rgba(241, 245, 249, 0.22); --quote-line: rgba(165, 180, 252, 0.55);
}

/* ── dark ──────────────────────────────────────────────────────────────────────────────────────── */
/* the set, once: applied by the device's setting (unless light was chosen) and by a dark choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --q-bg: #0F1216; --q-surface: #161A1F; --q-raise: #1E2329; --q-line: #2A3037;
    --q-text: #E8EAED; --q-muted: #A0A7B0; --q-faint: #8A929C;
    --q-accent: #EA580C; --q-accent-fill: #C2410C; --q-accent-soft: #FDBA74; --q-on-accent: #FFFFFF;
    --q-now: #FFFFFF; --q-now-bg: rgba(255, 255, 255, 0.08); --q-hl: rgba(255, 255, 255, 0.05);
    --q-shadow: rgba(0, 0, 0, 0.45); --q-veil: rgba(0, 0, 0, 0.55);
    --q-scrim: rgba(15, 18, 22, 0.78); --q-scrim-text: #FFFFFF;
    --q-listen: #15803D; --q-listen-ring: rgba(22, 163, 74, 0.55); --q-listen-text: #4ADE80;
    --q-option-text: #0F1216; --q-option-bg: #FFFFFF;
    --q-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A0A7B0' stroke-width='2'/%3E%3C/svg%3E");
    --q-logo: url("/static/brand/logo-dark-transparent.svg");
    --q-scheme: dark;

    --canvas: #0F1216; --subtle: #1B2030; --card: #161A1F; --border: #2A3037;
    --text-main: #E8EAED; --text-muted: #A0A7B0;
    --brand-ink: #C7D2FE; --brand-ink-strong: #E0E7FF; --brand-fill: #4338CA; --brand-fill-hover: #3730A3; --on-fill: #FFFFFF;
    --neutral-fill: #2A3037; --control-off: #4B5563; --dot-off: #A0A7B0; --tile-wash: #1E2329;
    --tint-warn: #3A2414; --tint-warn-line: #7C2D12; --tint-warn-ink: #FED7AA;
    --tint-ok: #0F2E24; --tint-ok-ink: #6EE7B7; --tint-bad: #3B1219; --tint-bad-ink: #FDA4AF; --tint-brand-line: #3730A3;
    --accent-ink-text: #FDBA74;
    --shadow-ink: rgba(0, 0, 0, 0.35); --shadow-deep: rgba(0, 0, 0, 0.5); --veil: rgba(0, 0, 0, 0.6);
    --paused-veil: rgba(15, 18, 22, 0.86); --label-scrim: rgba(0, 0, 0, 0.78);
    --ring-brand: rgba(199, 210, 254, 0.35); --nav-hover: #1E2329;
    --chevron-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23C7D2FE' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --rule-line: #2A3037; --ring-accent: rgba(234, 88, 12, 0.45); --bp-paper: #FFFFFF;
    --app-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --q-bg: #0F1216; --q-surface: #161A1F; --q-raise: #1E2329; --q-line: #2A3037;
  --q-text: #E8EAED; --q-muted: #A0A7B0; --q-faint: #8A929C;
  --q-accent: #EA580C; --q-accent-fill: #C2410C; --q-accent-soft: #FDBA74; --q-on-accent: #FFFFFF;
  --q-now: #FFFFFF; --q-now-bg: rgba(255, 255, 255, 0.08); --q-hl: rgba(255, 255, 255, 0.05);
  --q-shadow: rgba(0, 0, 0, 0.45); --q-veil: rgba(0, 0, 0, 0.55);
  --q-scrim: rgba(15, 18, 22, 0.78); --q-scrim-text: #FFFFFF;
  --q-listen: #15803D; --q-listen-ring: rgba(22, 163, 74, 0.55); --q-listen-text: #4ADE80;
  --q-option-text: #0F1216; --q-option-bg: #FFFFFF;
  --q-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A0A7B0' stroke-width='2'/%3E%3C/svg%3E");
  --q-logo: url("/static/brand/logo-dark-transparent.svg");
  --q-scheme: dark;

  --canvas: #0F1216; --subtle: #1B2030; --card: #161A1F; --border: #2A3037;
  --text-main: #E8EAED; --text-muted: #A0A7B0;
  --brand-ink: #C7D2FE; --brand-ink-strong: #E0E7FF; --brand-fill: #4338CA; --brand-fill-hover: #3730A3; --on-fill: #FFFFFF;
  --neutral-fill: #2A3037; --control-off: #4B5563; --dot-off: #A0A7B0; --tile-wash: #1E2329;
  --tint-warn: #3A2414; --tint-warn-line: #7C2D12; --tint-warn-ink: #FED7AA;
  --tint-ok: #0F2E24; --tint-ok-ink: #6EE7B7; --tint-bad: #3B1219; --tint-bad-ink: #FDA4AF; --tint-brand-line: #3730A3;
  --accent-ink-text: #FDBA74;
  --shadow-ink: rgba(0, 0, 0, 0.35); --shadow-deep: rgba(0, 0, 0, 0.5); --veil: rgba(0, 0, 0, 0.6);
  --paused-veil: rgba(15, 18, 22, 0.86); --label-scrim: rgba(0, 0, 0, 0.78);
  --ring-brand: rgba(199, 210, 254, 0.35); --nav-hover: #1E2329;
  --chevron-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23C7D2FE' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --rule-line: #2A3037; --ring-accent: rgba(234, 88, 12, 0.45); --bp-paper: #FFFFFF;
  --app-scheme: dark;
}
