/* ============================================================================
   theme.css - the ONE place colour is defined.

   Read by the classic site (app/static/index.html) and the beta
   (app/static/v2/beta.html + beta.css). No page may define a colour of its
   own; a guard test fails the build if a raw hex reappears outside this file.

   Two tiers, on Maani's rule (round 17): the beta is a new FACE, not new
   content.
     CHROME  - navigation, search, tiles, buttons, surfaces. Carries the
               theme; near-identical greys were collapsed into one ramp.
     CONTENT - anything that draws a serial-numbered item (CC009, GR112,
               CCPrep027...). Named for editability, values FROZEN at what
               they render today. Exception, granted round 17: content
               section HEADERS may take the theme.
   ========================================================================= */
:root{
  /* ---------- CHROME: neutral ramp ---------- */
  --n-0:#ffffff;      /* surfaces, cards            */
  --n-25:#fafbfc;     /* faintest fill              */
  --n-50:#f4f6f8;     /* app background             */
  --n-100:#eef2f7;    /* hover fill                 */
  --n-150:#e7ecf3;    /* selected fill              */
  --n-200:#e2e8f0;    /* borders                    */
  --n-300:#cbd5e1;    /* strong border              */
  --n-400:#b6bec9;    /* disabled                   */
  --n-500:#8c98a8;    /* faint text                 */
  --n-600:#6b7480;    /* muted text                 */
  --n-700:#48566a;    /* secondary text             */
  --n-800:#2a3550;    /* dark chrome                */
  --n-900:#16202c;    /* body text                  */
  --n-950:#0b1020;    /* strongest text             */
  --black:#000000;    /* video stage only           */

  /* ---------- CHROME: brand ---------- */
  --accent:#0b5d55;
  --accent-tint:#f0f7f5;
  --accent-line:#bcd7d1;

  /* ---------- CHROME: states ---------- */
  --ok:#15803d;      --ok-tint:#f0fdf4;
  --warn:#b4530a;    --warn-tint:#fffaeb;
  --danger:#b42318;  --danger-tint:#fef2f2;
  --info:#2563eb;    --info-tint:#e7effe;

  /* ---------- CHROME: one hue per collection ----------
     Shared by the classic rail, the beta browse menu and the home tiles.
     Option A (six independent hues for the didactics), chosen round 17. */
  /* Chief Conference and Grand Rounds swapped hues, Maani round 18. The
     collection registry names the TOKEN, never a hex, so this one edit moves
     the colour on the home tiles, the browse rail, the collection pages and
     every badge at once. */
  --k-case:#2a78d6;      /* Chief Conference     */
  --k-gr:#17934b;        /* Grand Rounds         */
  --k-core:#0891b2;      /* Core Curriculum      */
  --k-br:#b45309;        /* Board Review         */
  --k-course:#1e3a8a;    /* Courses              */
  --k-mm:#9333ea;        /* Others: M&M, JC, QI  */
  --k-atlas:#d3372c;     /* Surgical Atlas/Videos*/
  --k-imaging:#0d9488;   /* ENT Imaging          */
  --k-review:#e8590c;    /* Subspecialty Reviews */
  --k-prep:#4f46e5;      /* Conference Prep      */
  --k-podcast:#d6367f;   /* Podcasts             */
  --k-book:#64748b;      /* Textbooks            */
  --k-note:#475569;      /* Notebook             */
  --k-card:#1f2937;      /* Flashcards (a tool, not a collection) */

  /* ---------- CHROME: player ---------- */
  --pl-bg:#11182f; --pl-ctl:#2a3550; --pl-accent:#4f8cff;

  /* ---------- CHROME: notebook ---------- */
  --nb-dark:#2a2f3a; --nb-sepia:#f6efdf; --nb-rule:#bcd3fb; --nb-grip:#b9c8e2;

  /* ---------- CHROME: stats chart ramp ----------
     Came out of the dataviz palette validator (monotone lightness, adjacent
     dL >= .06, light end clears 2:1 on white). Re-run it before editing. */
  --st-1:#1e40af; --st-2:#2563eb; --st-3:#60a5fa; --st-4:#bfdbfe;

  /* ======================= CONTENT - values frozen ======================= */
  /* Emphasis channels. Reviews and prep sheets use different greys for the
     same "skippable" channel today; both are preserved rather than quietly
     unified. Say the word to make them match. */
  --text-term:#0b1020;        /* bold  = a term            */
  --text-aside-rev:#8a94a4;   /* grey  = skippable, reviews*/
  --text-aside-prep:#6b7480;  /* grey  = skippable, prep   */
  --text-pitfall:#b42318;     /* red   = a pitfall         */
  --mark-bg:#fff3a3;          /* highlighter               */

  /* Landmark studies box */
  --lm-bg:#f0f9ff; --lm-line:#cde7f5; --lm-head:#0891b2; --lm-link:#0369a1;

  /* Prep sheet structure. The two band colours are the granted HEADER
     exception: they may be retuned to the theme without touching body text. */
  --band-1:#12324f;   /* section heading   */
  --band-2:#1c4e79;   /* subsection heading*/
  --th-bg:#f1f5f9;    /* table header fill */
  --tr-stripe:#fafbfc;/* even rows         */

  /* The five authored callout boxes. Border and label share one value. */
  --box-trap:#b42318;  --box-trap-bg:#fef3f2;
  --box-pearl:#175cd3; --box-pearl-bg:#eff5ff;
  --box-stat:#b54708;  --box-stat-bg:#fffaeb;
  --box-mnem:#6941c6;  --box-mnem-bg:#f7f2ff;
  --box-land:#067647;  --box-land-bg:#f0fdf5;

  /* Confidence lights. One family, three uses: the strong colour draws the
     beta's goal pills, the -bg/-line pair draws the classic smiley buttons.
     All six are today's values, so nothing moves. */
  --conf-red:#d03b3b;   --conf-red-bg:#fee2e2;   --conf-red-line:#fca5a5;
  --conf-amber:#fab219; --conf-amber-bg:#fef3c7; --conf-amber-line:#fcd34d;
  --conf-green:#0ca30c; --conf-green-bg:#dcfce7; --conf-green-line:#86efac;

  /* Segment-type chips. They say what a block of conference IS, so they keep
     their own hues and are never folded into the collection palette. */
  --seg-chief:#16a34a; --seg-cpc:#2563eb; --seg-cons:#d97706;
  --seg-defer:#dc2626; --seg-mm:#7c3aed;  --seg-lec:#0891b2;

  /* ---------- legacy aliases ----------
     The classic file already carries 336 var() uses under these older names.
     Aliasing them onto the ramp is what makes the retheme land everywhere
     without rewriting those 336 sites. */
  --bg:var(--n-50); --panel:var(--n-0); --ink:var(--n-900);
  --muted:var(--n-700); --line:var(--n-200);
  --chief:var(--seg-chief); --cpc:var(--seg-cpc); --cons:var(--seg-cons);
  --defer:var(--seg-defer); --mm:var(--seg-mm); --lec:var(--seg-lec);
  --band:var(--band-1); --band2:var(--band-2);

  /* the beta's own older names, aliased the same way */
  --surface:var(--n-0); --surface2:var(--n-100); --chip:var(--n-100);
  --ink2:var(--n-700); --ink3:var(--n-500); --accent-ink:var(--n-0);
  --k-lecture:var(--k-gr);
  --good:var(--conf-green); --warn:var(--conf-amber); --crit:var(--conf-red);
}
