/* ============================================================
   shell-light.css — the LIGHT palette of the .shock Lab / business app shells
   (owner decision lab_light_theme, 12 Oct 2026). Self-contained: it defines
   every token it sets and needs no other sheet, so the self-contained shells
   (tag, imla, agency, CRM, Deliver, Directory) load it as-is, next to their own
   tokens; the suite-app.css shells load it after core.css / themes.css.
   Loaded by: the 14 Lab app shells, Finance, Directory, CRM, and every
   html.app-mode page. Nothing here applies without html[data-scheme="light"],
   which ONLY theme.js sets, ONLY in the app area — so dark, the marketing site
   and admin are untouched by this file.
   ============================================================ */

/* ------------------------------------------------------------------
   LAB APP SHELLS — the light palette (owner decision lab_light_theme,
   12 Oct 2026). ONE block for every Lab / business app shell.
   Keyed on html[data-scheme="light"], which theme.js sets ONLY in the app
   area (html.app-mode or <html data-dsx-area="app">) and only when the
   scheme in effect is light: an explicit "light" choice, or "auto" (the
   default there) on a system that prefers light. The marketing site and
   admin never get the attribute, so nothing here reaches them. Dark is
   untouched: no rule below applies without data-scheme="light".

   Every value was measured (WCAG 2.x) against the light surfaces of this
   block — #FFFFFF, #F7F7FA, #F3F3F6, #EDEDF2, #EBEBF0, #E2E2EA:
     text   #15161A  ≥14.0:1   dim #565663 ≥5.6:1   faint #5C5C68 ≥5.1:1
     red    #C8070A  ≥4.67:1 (text; --red-strong/--red-text follow it)
     pick   #1A7A30  ≥4.21:1 (≥3:1 as a mark/border; light ink on it 4.90:1)
     unsure #7A5900  ≥5.0:1   info #1B5FD0 ≥4.54:1   danger-strong #B91C1C ≥5.0:1
     danger #DC2626  ≥3.75:1 as a fill/border (non-text); white on it 4.83:1
     control boundary --app-ctl-line #80808C ≥3.03:1 (WCAG 1.4.11)
   Each app keeps its own accent token; apps that do not use these names
   map their own tokens onto this palette in their own sheet, under the
   same selector.

   Image areas are NOT re-coloured: photos, canvases and video keep their
   pixels (no filter, no blend), and the wells they sit in stay achromatic
   — --app-canvas is a neutral grey (R=G=B), and the full-screen loupe /
   compare / secondary-display viewers keep their black.
   ------------------------------------------------------------------ */
:root[data-scheme="light"] {
  color-scheme: light;
  /* core tokens (core.css) */
  --surface: #FFFFFF;
  --panel: #F7F7FA;
  --panel2: #EDEDF2;
  --panel3: #E2E2EA;
  --line:    #D4D4DC;
  --line2: #B9B9C4;
  --text:    #15161A;
  --dim:   #565663;
  --faint: #5C5C68;
  --green:   #1A7A30;
  --yellow: #7A5900;
  --status-green: #0F6D2A;
  --status-amber: #755800;
  --status-blue:  #1D4ED8;
  --status-purple: #6D28D9;
  /* red as TEXT is the base red on a light surface (#C8070A on these = 4.67:1 or
     more). Every shell defines its own --red (core.css or its own :root), so the
     fallback never applies; it is there so this sheet reads no core token bare. */
  --red-strong: var(--red, currentColor);
  --red-text: var(--red, currentColor);
  --danger-strong: #B91C1C;
  --scrim-rgb: 255, 255, 255;
  /* the self-contained shells' common names (agency, CRM, tag, imla, Deliver):
     page background and the status/accent hues they use as TEXT */
  --bg:     #F3F3F6;
  --muted:  var(--dim);
  --amber:  #7A5900;
  --blue:   #1B5FD0;
  --violet: #6D28D9;
  --purple: #6D28D9;
  --cyan:   #0E6E82;
  /* Lab app tokens (suite-app.css) */
  --app-bg:       #F3F3F6;
  --app-surface:  #FFFFFF;
  --app-surface2: #EBEBF0;
  --app-line:     #D4D4DC;
  --app-hover:    #E2E2EA;
  --app-ctl-line: #80808C;
  --app-canvas:   #E3E3E3;   /* neutral well behind a photo: R=G=B */
  --app-shadow:   rgba(16, 16, 24, .16);
  --pick:   #1A7A30;
  --unsure: #7A5900;
  --info:   #1B5FD0;
  /* Names the app sheets read ONLY through a var() fallback (publish.css
     var(--ink,#e9e9e6), suite-stats.css var(--warn,#e3a008) …) and that no
     sheet defines: in dark the fallback still applies, unchanged; in light
     they resolve here. */
  --ink:     var(--text);
  --text-dim: var(--dim);
  --surface-0: #F7F7FA;
  --surface-1: rgba(0, 0, 0, .04);
  --surface-2: rgba(0, 0, 0, .07);
  --ok:      #1A7A30;
  --warn:    #7A5900;
  --bad:     #B91C1C;
  --error:   #B91C1C;
  --reject:  #B91C1C;
  --orange:  #A14A00;
  --indigo:  #4F46E5;
  /* --dlg-*: for panels a script builds with inline styles (Cull's session
     summary …): they read var(--dlg-x, <the old dark literal>), so these exist
     ONLY here — dark keeps its literal. */
  --dlg-bg:    #FFFFFF;
  --dlg-text:  var(--text);
  --dlg-line:  #D4D4DC;
  --dlg-dim:   var(--dim);
  --dlg-tile:  rgba(0, 0, 0, .03);
  --dlg-shadow: rgba(16, 16, 24, .22);
  --dlg-blue:  #1B5FD0;
  --dlg-blue-fill: #1B5FD0;
  /* colour-channel labels (R / G / B tabs in Retouch): read var(--ch-r, <dark literal>) */
  --ink-on-fill: #FFFFFF;   /* text ON a status fill (--green/--pick/--warn…), read as var(--ink-on-fill, <dark ink>) */
  --ch-r: #B42020;
  --ch-g: #1A7A30;
  --ch-b: #1B5FD0;
}

/* Form fields in light (WCAG 1.4.11): the boundary that says "this is a field"
   must reach 3:1 against what it sits on. The app sheets draw it in their line
   colour, which is right for a hairline divider (#D4D4DC, 1.47:1 on white) and
   wrong for a field. :where() keeps this at the specificity of the selector in
   front of it (0,2,0), so any app :focus / :invalid / id rule still wins; only
   border-COLOR changes, so a field drawn without a border stays without one. */
:root[data-scheme="light"] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]), select, textarea) {
  border-color: var(--app-ctl-line, #80808C);
}

/* core.css .btn--primary hovers to #fff — on a light page that is its own ink colour */
:root[data-scheme="light"] .btn--primary:hover { background: #2B2C33; }

/* Marks drawn ON a photo (stars, the unsure dot, the winner star — each with its
   own dark text-shadow) keep the bright dark-palette yellow: the light --unsure is
   a TEXT colour for light surfaces, and a dark brown mark disappears into a photo. */
:root[data-scheme="light"] :is(.thumb__stars, .thumb__unsure, .v-cell__stars),
:root[data-scheme="light"] .thumb.is-winner::after { --unsure: #D9A60A; }
