/* ============================================================================
   studio_dark.css — HAND-WRITTEN. Phase 7: the dark values the HAND sheets
   (studio_qx · studio_snd · studio_p5 · studio_money · studio_cst) need.

   Those sheets are almost entirely var(--token), so they follow his theme on
   their own. This file exists only for the places where one of them had to
   hard-code a literal — and every literal below is HIS OWN dark value, lifted
   from the [data-theme=dark] blocks of the generated sheet:

     .btn.primary ink on --orange   → #0d2b4e   (his `.st-page .btn.primary{color:#0d2b4e}`)
     a chip on --lilac              → #294967 / #d4e4f6  (his `.lookup-tags .badge`)
     a token chip's border          → var(--line)        (his `.st-page .token{border-color:var(--line)}`)
     the "day you showed up" green  → #a0be91            (his `.activity-grid i.level-3`)

   ⛔ WHY --orange needs this at all: his dark palette makes --orange an ALIAS
   of --brand (#80b8ff, a light blue). White text on it is illegible, which is
   exactly why his own sheet flips .btn.primary to #0d2b4e in dark. Any hand
   rule that paints white on var(--orange) has to flip with it.

   BOTH dark paths are emitted, matching what tools/studio_scope.js does for the
   generated sheet: the explicit attribute (htsApplyTheme writes
   :root[data-theme="dark"]) and the system default (no attribute +
   prefers-color-scheme: dark). Loaded LAST so it wins ties.
   ⛔ The login / gate screens are light-only by law and live outside the app
   shell — nothing here can reach them.
   ============================================================================ */

/* ---- 1 · explicit dark (htsApplyTheme → :root[data-theme="dark"]) --------- */

/* ink on --orange → his .btn.primary dark ink */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qx__bigplay,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .lg-audio,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qx__cont,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .daily-res__next,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .hp-form #sfSend,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .trial-overlay__btn,
:root[data-theme="dark"] body.hts-studio.hts-studio .htspw__buy,
:root[data-theme="dark"] body.hts-studio.hts-studio .htsup__buy { color: #0d2b4e; }
:root[data-theme="dark"] body.hts-studio.hts-studio .htspw__buy small { color: #0d2b4e; }

/* his token chips: the border follows --line in dark */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qx__tray .qx__tile:nth-child(3n+1),
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qx__tray .qx__tile:nth-child(3n+2) { border-color: var(--line); }

/* his .mini-art tile on --lilac: the light ink (#355e88) all but disappears on
   his dark --lilac (#263c56); take his dark on-lilac pair instead */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qmode__ic,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .rr-card__ic,
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .daily-intro__ic,
:root[data-theme="dark"] body.hts-studio.hts-studio .htspw__icon { background: #294967; color: #d4e4f6; }

/* a muted caption that was written as a literal */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .qx__missed__en { color: var(--muted); }

/* his "day you showed up" green */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .daily-cell.is-ok { background: #a0be91; }

/* the trial-lock chip: his .scene-label is a near-WHITE pill, and in dark our
   var(--ink) label on it would be white-on-white — his dark badge pair instead */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .trial-overlay__t { background: #294967; color: #d4e4f6; }

/* production's pattern-formula chip is a hard #fff pill; on his dark .pat-formula
   ground (rgb(34,61,93)) that is a white slab. His surface + --brand ink instead.
   Light is left exactly as phase 3 shipped it — this is the dark pass. */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .pat-formula .k { background: var(--surface); color: var(--brand); }

/* ---- 2 · system dark (no attribute + prefers-color-scheme: dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qx__bigplay,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .lg-audio,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qx__cont,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .daily-res__next,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .hp-form #sfSend,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .trial-overlay__btn,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .htspw__buy,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .htsup__buy { color: #0d2b4e; }
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .htspw__buy small { color: #0d2b4e; }

  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qx__tray .qx__tile:nth-child(3n+1),
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qx__tray .qx__tile:nth-child(3n+2) { border-color: var(--line); }

  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qmode__ic,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .rr-card__ic,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .daily-intro__ic,
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .htspw__icon { background: #294967; color: #d4e4f6; }

  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .qx__missed__en { color: var(--muted); }
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .daily-cell.is-ok { background: #a0be91; }
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .trial-overlay__t { background: #294967; color: #d4e4f6; }
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .pat-formula .k { background: var(--surface); color: var(--brand); }
}

/* ---- 3 · fix batch 1: the card-lock chip -------------------------------- */
/* his .scene-label is a near-WHITE pill; on a dark card it needs his dark badge pair,
   the same swap .trial-overlay__t already takes. */
:root[data-theme="dark"] body.hts-studio.hts-studio .st-page .tl-pin { background: #294967; color: #d4e4f6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.hts-studio.hts-studio .st-page .tl-pin { background: #294967; color: #d4e4f6; }
}
