/* polish-tokens.css: the colours of the redesign (feature_polish, html.nd-polish).
   Approved mockup: mockups/studio/polish.html. Plan: mockups/studio/PORT-PLAN.md.

   INERT WITHOUT THE CLASS. Every rule needs html.nd-polish, which the inline
   nd-polish-gate block sets before first paint. With the flag off this file changes nothing.

   WHY :where(). The hub look (core/look-suite.js) is written one step stronger than
   the rules it replaces, and it has to go on beating this file: someone's chosen
   palette outranks the new default. :where() adds the condition without adding any
   weight, so each block here has exactly the specificity of the block it replaces
   and wins only by loading later. The look's selectors are one step above that:
     canon   :root.canon-v5 (0,2,0), dark (0,3,0)        look (0,3,1)
     --app-* :root (0,1,0), [data-theme="light"] (0,2,0) look (0,2,1)
     rail    .nr (0,1,0), dark (0,3,0)                   look (0,3,1)
     canvas  html.canvas-v2 (0,1,1), dark (0,2,1)        look (0,3,1)

   NOT TOUCHED: the drawing legend and the drawing sheet (--d-*), tech colours, and
   the customer pages, which never load this file. */

/* 1. canon: Books and Dispatch */
:root.canon-v5:where(.nd-polish) {
  --c-bg:#f5f5f7; --c-surface:#ffffff; --c-card:#ffffff; --c-card-2:#f5f5f7;
  --c-sunken:#eeeef0; --c-border:rgba(60,60,67,.09); --c-border-2:rgba(60,60,67,.16);
  --c-text:#1d1d1f; --c-text-2:#5f5f66; --c-muted:#636369; --c-cap:#636369;
  --c-accent:#005fb0; --c-accent-h:#004f94; --c-accent-fg:#ffffff;
  --c-accent-soft:rgba(10,112,201,.10); --c-accent-edge:rgba(10,112,201,.30);
  --c-ok:#116a31; --c-warn:#974b00; --c-danger:#bb2219;
  --c-danger-soft:rgba(255,59,48,.11);
  --c-age-0:#0a84ff; --c-age-1:#ff9500; --c-age-2:#ff3b30; --c-age-3:#c4170c;
  --c-in:#0a84ff; --c-out:#30b158; --c-bar:#d4d4d9;
  --c-grid:rgba(60,60,67,.08); --c-axis:rgba(60,60,67,.16);
  --lift:0 0 0 .5px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.035);
  --lift-edge:inset 0 0 0 0 transparent;
  --float:0 0 0 .5px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.1), 0 24px 60px rgba(0,0,0,.14);
  --c-on-wash-danger:#bb2219; --c-on-wash-accent:#005fb0;
  --c-on-wash-ok:#116a31; --c-on-wash-warn:#974b00;
  --c-cta:#005fb0; --c-cta-h:#004f94; --c-cta-fg:#ffffff;
  --c-ok-h:#0d5727; --c-ok-fg:#ffffff;
}
:root.canon-v5:where(.nd-polish)[data-theme="dark"] {
  --c-bg:#000000; --c-surface:#1c1c1e; --c-card:#1c1c1e; --c-card-2:#2c2c2e;
  --c-sunken:#2c2c2e; --c-border:rgba(84,84,88,.36); --c-border-2:rgba(84,84,88,.65);
  --c-text:#f5f5f7; --c-text-2:#aeaeb4; --c-muted:#a3a3a9; --c-cap:#a3a3a9;
  --c-accent:#62b5ff; --c-accent-h:#4dabff; --c-accent-fg:#001b33;
  --c-accent-soft:rgba(41,151,255,.18); --c-accent-edge:rgba(41,151,255,.40);
  --c-ok:#66e27f; --c-warn:#ffc266; --c-danger:#ff8d85;
  --c-danger-soft:rgba(255,69,58,.20);
  --c-age-0:#0a84ff; --c-age-1:#ff9f0a; --c-age-2:#ff453a; --c-age-3:#c4170c;
  --c-in:#0a84ff; --c-out:#30d158; --c-bar:#48484a;
  --c-grid:rgba(255,255,255,.055); --c-axis:rgba(255,255,255,.13);
  --lift:0 0 0 .5px rgba(255,255,255,.07);
  --lift-edge:inset 0 0 0 0 transparent;
  --float:0 0 0 .5px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.6);
  --c-on-wash-danger:#ff8d85; --c-on-wash-accent:#62b5ff;
  --c-on-wash-ok:#66e27f; --c-on-wash-warn:#ffc266;
  --c-cta:#62b5ff; --c-cta-h:#4dabff; --c-cta-fg:#001b33;
  --c-ok-h:#4ad47f; --c-ok-fg:#052e14;
  --c-device:#000000;
  --pl-thumb-dark:#636366;
}

/* 2. --app-*: every dialog, and everything Dispatch's bridge reads */
:root:where(.nd-polish) {
  --app-bg:#000000; --app-surface:#1c1c1e; --app-sunken:#2c2c2e; --app-card:#1c1c1e; --app-card-hover:#2c2c2e;
  --app-border:rgba(84,84,88,.36); --app-border-2:rgba(84,84,88,.65);
  --app-text:#f5f5f7; --app-text-2:#aeaeb4; --app-muted:#a3a3a9;
  --app-accent:#62b5ff; --app-accent-fg:#001b33; --app-accent-h:#4dabff;
  --app-accent-soft:rgba(41,151,255,.18); --app-accent-edge:rgba(41,151,255,.40);
  --app-danger:#ff8d85; --app-danger-soft:rgba(255,69,58,.20);
  --app-ok:#66e27f; --app-warn:#ffc266; --app-bad:#ff8d85;
}
:root:where(.nd-polish):is([data-theme="light"], [data-books-theme="light"], .sched-light) {
  --app-bg:#f5f5f7; --app-surface:#ffffff; --app-sunken:#eeeef0; --app-card:#ffffff; --app-card-hover:#f5f5f7;
  --app-border:rgba(60,60,67,.09); --app-border-2:rgba(60,60,67,.16);
  --app-text:#1d1d1f; --app-text-2:#5f5f66; --app-muted:#636369;
  --app-accent:#005fb0; --app-accent-fg:#ffffff; --app-accent-h:#004f94;
  --app-accent-soft:rgba(10,112,201,.10); --app-accent-edge:rgba(10,112,201,.30);
  --app-danger:#bb2219; --app-danger-soft:rgba(255,59,48,.11);
  --app-ok:#116a31; --app-warn:#974b00; --app-bad:#bb2219;
}

/* 3. plenum names: the rail on every app */
:where(.nd-polish) .nr {
  --paper:#f5f5f7; --panel:#ffffff; --panel-2:#f5f5f7; --sunken:#eeeef0;
  --ink:#1d1d1f; --ink-2:#5f5f66; --ink-3:#636369;
  --hair:rgba(60,60,67,.09); --hair-2:rgba(60,60,67,.16);
  --accent:#005fb0; --accent-2:#004f94; --accent-wash:#e6f0f9;
  --accent-ring:rgba(10,112,201,.30);
  --hot:#bb2219; --hot-soft:rgba(255,59,48,.11);
  --sh-1:0 0 0 .5px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  --sh-2:0 0 0 .5px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.1), 0 24px 60px rgba(0,0,0,.14);
  --nr-on-wash:#005fb0; --nr-cta:#005fb0; --nr-cta-hover:#004f94; --nr-cta-ink:#ffffff;
  --nr-on-accent:#ffffff; --nr-danger-ink:#bb2219;
}
:root:where(.nd-polish)[data-theme="dark"] .nr {
  --paper:#000000; --panel:#1c1c1e; --panel-2:#2c2c2e; --sunken:#2c2c2e;
  --ink:#f5f5f7; --ink-2:#aeaeb4; --ink-3:#a3a3a9;
  --hair:rgba(84,84,88,.36); --hair-2:rgba(84,84,88,.65);
  --accent:#62b5ff; --accent-2:#4dabff; --accent-wash:#10283d;
  --accent-ring:rgba(41,151,255,.40);
  --hot:#ff8d85; --hot-soft:rgba(255,69,58,.20);
  --sh-1:0 0 0 .5px rgba(255,255,255,.07);
  --sh-2:0 0 0 .5px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.6);
  --nr-on-wash:#62b5ff; --nr-cta:#62b5ff; --nr-cta-hover:#4dabff; --nr-cta-ink:#001b33;
  --nr-on-accent:#001b33; --nr-danger-ink:#ff8d85;
}

/* 4. plenum names: the Canvas dashboard. --d-* and the chart steps stay. */
html.canvas-v2:where(.nd-polish) {
  --paper:#f5f5f7; --panel:#ffffff; --panel-2:#f5f5f7; --sunken:#eeeef0;
  --ink:#1d1d1f; --ink-2:#5f5f66; --ink-3:#636369;
  --hair:rgba(60,60,67,.09); --hair-2:rgba(60,60,67,.16);
  --accent:#005fb0; --accent-2:#004f94; --accent-wash:#e6f0f9;
  --accent-ring:rgba(10,112,201,.30);
  --hot:#bb2219; --hot-soft:rgba(255,59,48,.11);
  --sh-1:0 0 0 .5px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  --sh-2:0 0 0 .5px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.1), 0 24px 60px rgba(0,0,0,.14);
  --nr-on-wash:#005fb0; --nr-cta:#005fb0; --nr-cta-hover:#004f94; --nr-cta-ink:#ffffff;
  --nr-on-accent:#ffffff; --nr-danger-ink:#bb2219;
}
html.canvas-v2:where(.nd-polish)[data-theme="dark"] {
  --paper:#000000; --panel:#1c1c1e; --panel-2:#2c2c2e; --sunken:#2c2c2e;
  --ink:#f5f5f7; --ink-2:#aeaeb4; --ink-3:#a3a3a9;
  --hair:rgba(84,84,88,.36); --hair-2:rgba(84,84,88,.65);
  --accent:#62b5ff; --accent-2:#4dabff; --accent-wash:#10283d;
  --accent-ring:rgba(41,151,255,.40);
  --hot:#ff8d85; --hot-soft:rgba(255,69,58,.20);
  --sh-1:0 0 0 .5px rgba(255,255,255,.07);
  --sh-2:0 0 0 .5px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.6);
  --nr-on-wash:#62b5ff; --nr-cta:#62b5ff; --nr-cta-hover:#4dabff; --nr-cta-ink:#001b33;
  --nr-on-accent:#001b33; --nr-danger-ink:#ff8d85;
}

/* 5. Where today's darker greys were carrying a tinted or faded surface. canon-contrast-sweep.js --polish
   found both; the new --c-text-2 and --app-text-2 are lighter, and these fell under 4.5:1. */

/* A job block on the board is a light tint of its tech's colour (4.31:1 on a lilac block). */
:root:where(.nd-polish)[data-theme="light"] .sched-app .sched-event { --sc-ink2:#4f4f56; --sc-muted:#4f4f56; --c-text-2:#4f4f56; --c-muted:#4f4f56; }

/* Tax's sub-rows fade their label with an inline opacity of .8 (3.98:1). Keep the fade, on stronger ink. */
:root.canon-v5:where(.nd-polish) .tx-row .k[style*="opacity"] { color:var(--c-text); }

/* The Canvas dashboard's shortcut help button (3.06:1). Its hover keeps its own colours. */
:root:where(.nd-polish) .shortcut-help-btn:not(:hover) { color:#5f5f66; }
:root:where(.nd-polish)[data-theme="dark"] .shortcut-help-btn:not(:hover) { color:#aeaeb4; }
