/* SLATE — the Hollywood Tooling application system · tokens v0.3
   Adopted 2026-08-27 (owner): Study A chassis + the instrument layer.
   v0.3 (owner ruling 2026-08-28): true translucency on black. The ground
   is roll-sign black (#0d0d0f, the brand's own black); glass is a white
   film at low alpha over a lit wall — the backdrop supplies the color,
   the film only lifts it. Never tint glass with opaque grey.
   Scope: everything lives under .slate — night is the default condition;
   day, safe902, and safered are the other lighting conditions on one
   geometry. Laws that bind here: no grey text (solid inks only); selection
   is a full-row outline, never a one-sided rail; lamps carry recorded
   meanings; one icon per concept; tables and the rail stay opaque. */

.slate {
  /* voices — chassis is the system face (SF on Apple hardware); data is mono */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --data: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* grounds — roll-sign black; the wall carries a faint tungsten bloom
     so the blur has structure and chroma to sample */
  --ground: #0d0d0f;
  --wall: radial-gradient(1100px 640px at 14% -8%, rgba(222, 106, 65, .09), transparent 62%),
          linear-gradient(118deg, #17130f 0%, #0a0a0c 55%, #131013 100%);
  --surface: rgba(255, 255, 255, .05);    /* bars — a film, not paint; pair with --blur */
  --card: #141417;                        /* the opaque card — for what shouldn't float */
  --rail: #101013;

  /* ink — no grey text, no faded tiers: solid inks only.
     Hierarchy comes from weight and size, never from alpha. */
  --ink: #f5f5f7;
  --ink2: #eef0f6;
  --ink3: #d7dae2;
  --line: rgba(255, 255, 255, .09);

  /* accent — tungsten, the house #DE6A41 (owner ruling 2026-08-27) */
  --accent: #DE6A41;
  --on-accent: #241009;

  /* controls */
  --bezel: rgba(255, 255, 255, .085);
  --bezel-line: rgba(255, 255, 255, .11);
  --bezel-shadow: none;
  --field: rgba(255, 255, 255, .06);
  --hover: rgba(255, 255, 255, .05);
  --sel: color-mix(in srgb, var(--accent) 20%, transparent);
  --sel-line: color-mix(in srgb, var(--accent) 40%, transparent); /* full-row outline */

  /* lamps — four states, allocated once: nominal · caution · fault · not run */
  --nominal: #38c793;
  --caution: #e0a63a;
  --fault: #e2484a;

  /* action colors — feedback actions are colorful (owner ruling 2026-08-27) */
  --act-undo: #DE6A41;    /* undo = the house orange, fixed */
  --act-retry: #f25d5f;   /* red = retry */

  /* glass — cards float (owner rulings 2026-08-27 / 08-28: full float).
     Two materials. Cards: a white film at low alpha — the wall shows
     through, the film lifts it. Raised surfaces (dialogs, menus, toasts,
     tooltips): smoked glass — the same film over a dark scrim, because a
     transient floats over content it can't predict and text must survive
     a bright backdrop (HIG: thicker material / dimming layer). */
  --glass: rgba(255, 255, 255, .055);
  --glass-raised: rgba(40, 40, 44, .54);
  --glass-line: rgba(255, 255, 255, .16);

  /* geometry */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .55);          /* cards */
  --shadow-raised: 0 18px 48px rgba(0, 0, 0, .62);   /* transients sit higher */
  --blur: blur(28px) saturate(180%);

  /* the shared grammar (reference): base 13px · controls 28px · touch 44px
     spacing 4 · 8 · 12 · 16 · 24 · 32 · 48 · focus ring 2px accent */
}

/* ————— day — same geometry, lit ————— */
.slate.day {
  --ground: #fff;
  --wall: linear-gradient(118deg, #f7f7f9 0%, #ededf1 55%, #f4f4f7 100%);
  --surface: rgba(246, 246, 248, .80);
  --card: #fff;
  --rail: #eceef0;

  --ink: #1d1d1f;
  --ink2: #26262c;
  --ink3: #3f3f47;
  --line: rgba(0, 0, 0, .10);

  --accent: #B34D28;
  --on-accent: #fff;

  --bezel: #fff;
  --bezel-line: rgba(0, 0, 0, .14);
  --bezel-shadow: 0 .5px 1.5px rgba(0, 0, 0, .10);
  --field: rgba(0, 0, 0, .035);
  --hover: rgba(0, 0, 0, .045);
  --sel: color-mix(in srgb, var(--accent) 13%, transparent);
  --sel-line: color-mix(in srgb, var(--accent) 38%, transparent);

  --nominal: #1e8a5c;
  --caution: #9a6b12;
  --fault: #c22f31;

  --act-undo: #B34D28;
  --act-retry: #c22f31;

  --glass: rgba(255, 255, 255, .62);
  --glass-raised: rgba(250, 250, 252, .82);
  --glass-line: rgba(255, 255, 255, .85);

  --shadow: 0 12px 32px rgba(29, 29, 31, .14);
  --shadow-raised: 0 18px 48px rgba(29, 29, 31, .22);
}

/* ————— safe 902 — Ilford 902 reference: >580nm, amber on black.
   The darkroom has no day service. ————— */
.slate.safe902 {
  --ground: #16120a;
  --wall: radial-gradient(1100px 640px at 14% -8%, rgba(255, 158, 61, .07), transparent 62%),
          linear-gradient(118deg, #1d160b 0%, #150f07 55%, #1a130a 100%);
  --surface: rgba(255, 176, 100, .055);   /* the amber film — glass under the lamp */
  --card: #1e1710;
  --rail: #120d05;

  /* all text reads under the safelight — solid ambers, >580nm */
  --ink: #ffd6a3;
  --ink2: #f5b76e;
  --ink3: #dd9a4f;
  --line: rgba(255, 176, 100, .13);

  --accent: #ff9e3d;
  --on-accent: #201203;

  --bezel: rgba(255, 176, 100, .06);
  --bezel-line: rgba(255, 176, 100, .17);
  --field: rgba(255, 176, 100, .05);
  --hover: rgba(255, 176, 100, .06);
  --sel: color-mix(in srgb, var(--accent) 20%, transparent);
  --sel-line: color-mix(in srgb, var(--accent) 42%, transparent);

  --nominal: #ecb87f;
  --caution: #e0a63a;
  --fault: #ff5a47;

  --act-undo: #ffb066;
  --act-retry: #ff5a47;

  --glass: rgba(255, 176, 100, .06);
  --glass-raised: rgba(64, 46, 22, .56);
  --glass-line: rgba(255, 190, 120, .20);
}


/* ————— safe red — the deep-red reference lamp: red on near-black.
   Everything collapses into the red palette; distinction stays in the
   labels. Text runs at the lamp's contrast — that is the reference. ————— */
.slate.safered {
  --ground: #100101;
  --wall: radial-gradient(1100px 640px at 14% -8%, rgba(204, 26, 26, .07), transparent 62%),
          linear-gradient(118deg, #170303 0%, #0e0101 55%, #140202 100%);
  --surface: rgba(204, 26, 26, .06);      /* the red film — glass under the lamp */
  --card: #1c0303;
  --rail: #0c0101;

  --ink: #cc1a1a;
  --ink2: #b30000;
  --ink3: #800000;
  --line: #3d0000;

  --accent: #cc1a1a;
  --on-accent: #140000;

  --bezel: rgba(204, 26, 26, .06);
  --bezel-line: #3d0000;
  --field: rgba(204, 26, 26, .05);
  --hover: rgba(204, 26, 26, .07);
  --sel: color-mix(in srgb, var(--accent) 20%, transparent);
  --sel-line: color-mix(in srgb, var(--accent) 42%, transparent);

  --nominal: #800000;
  --caution: #b30000;
  --fault: #cc1a1a;

  --act-undo: #b30000;
  --act-retry: #cc1a1a;

  --glass: rgba(204, 26, 26, .07);
  --glass-raised: rgba(43, 5, 5, .58);
  --glass-line: rgba(204, 26, 26, .18);
}
