/* css/theme-dark-contrast.css: the dark theme's text contrast (round 50, EAA-06; WCAG 1.4.3, EN 301 549 9.1.4.3).
   Hand-written; never css/stitch/** (generated) and never css/theme-light.css (generated by scripts/theme-light-scan.mjs).
   Dark is the default (js/core/theme.js DEFAULT_PREF), and the designs' greys were drawn for it but measured only in light
   (scripts/light-audit.mjs, css/theme-light.css). This sheet is the mirror: the same utilities theme-light.css maps from
   these greys, in the same scope (the screen, the overlay, the partner drawer), lifted to at least 4.5:1 on both dark
   surfaces: the canvas #050510 (--sys-canvas) and the highest card #181B25 (--sys-raised-3).
   Text colour only: no border, fill, ring or icon stroke changes here. Left as drawn: a disabled control and what is in it
   (WCAG exempts it, and it must look off), and text on an opaque light chip (a lighter grey would lose contrast there).
   Each line says the design's colour and its ratio on canvas / card, then the new colour and its ratio. Ratios are WCAG 2.x
   relative luminance; a colour with alpha is composited over each surface first.
   It must load after css/stitch/** (the screen's own sheets): its selectors outrank theirs ([data-screen="X"] .class) by the
   id in :is(), so the order among the static sheets does not matter; put it after css/theme-light-screens.css. */

/* ── the label staircase: --sys-label-3 (search placeholders, hints, secondary lines) ─────────────────────────────────
   tokens.css rgba(235,235,245,.36): 2.88 / 3.00; the home's apple-liquid-glass.css .46: 4.07 / 4.06
   → .55: 5.44 / 5.24. It also tints a few grabbers and dividers drawn with it: they get a little lighter. */
html:not([data-apple-theme="light"]),
html:not([data-apple-theme="light"]) #screen-outlet :is([data-screen="B1"], [data-screen^="B1."]) {
  --sys-label-3: rgba(235, 235, 245, 0.55);
}

/* ── greys ──────────────────────────────────────────────────────────────────────────────────────────────────────── */

/* slate-500 #64748B 4.26 / 3.61, slate-500/80 3.08 / 2.78 → #8592A7 6.44 / 5.45 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-slate-500, .text-slate-500\/80, .text-\[\#64748B\], .text-text-dim, .text-text-4, .text-text-muted):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #8592A7;
}
/* slate-600 #475569 2.68 / 2.27 → #7D8AA0 5.81 / 4.92 (a step under slate-500, as drawn) */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-slate-600, .text-\[\#475569\]):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #7D8AA0;
}
/* gray-500 #6B7280 4.19 / 3.55 → #858C98 5.99 / 5.07 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-gray-500, .text-\[\#6B7280\]):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #858C98;
}
/* gray-600 #4B5563 2.68 / 2.27 → #7E8592 5.46 / 4.63 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-gray-600, .text-\[\#4B5563\]):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #7E8592;
}
/* zinc-500 #71717A 4.20 / 3.55 → #8A8A93 5.93 / 5.02; zinc-600 #52525B 2.60 / 2.20 → #85858E 5.55 / 4.70 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-zinc-500:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #8A8A93;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-zinc-600:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #85858E;
}
/* neutral-500 #737373 4.28 / 3.62 → #8B8B8B 5.95 / 5.04; neutral-600 #525252 2.60 / 2.20 → #868686 5.57 / 4.72 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-neutral-500:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #8B8B8B;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-neutral-600:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, :is(.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50, .bg-gray-100) *) {
  color: #868686;
}

/* ── the Material roles used as text ───────────────────────────────────────────────────────────────────────────── */

/* outline-variant #494454 as text 2.16 / 1.83, outline-variant/60 1.46 / 1.40 → #8E889C 5.94 / 5.03 and #8A8498 5.63 / 4.77
   (the role's hue kept; .border-outline-variant is a border and stays) */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-outline-variant, .text-\[\#494454\]):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *) {
  color: #8E889C;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-outline-variant\/60:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *) {
  color: #8A8498;
}
/* on-surface-variant #CBC3D7 passes as drawn (11.90 / 10.08); its faded steps do not:
   /40 2.63 / 2.72, /50 3.54 / 3.50, /60 4.68 / 4.46 → rgb(203 195 215 / .64) 5.21 / 4.89 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-on-surface-variant\/40, .text-on-surface-variant\/50, .text-on-surface-variant\/60):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *) {
  color: rgb(203 195 215 / 0.64);
}
/* outline #958EA0 passes as drawn (6.43 / 5.44); outline/70 3.60 / 3.35 → outline/.90 5.35 / 4.66 */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .text-outline\/70:not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *) {
  color: rgb(149 142 160 / 0.9);
}

/* ── white films used as text ──────────────────────────────────────────────────────────────────────────────────────
   white/30 2.54 / 2.71, white/35 3.08 / 3.22, white/40 3.72 / 3.80 → white/.52 5.67 / 5.49.
   white/20 and /25 are left: on the customer screens they are separators («•», «·») and a progress ring's track, not text. */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.text-white\/30, .text-white\/35, .text-white\/40):not(:disabled, [aria-disabled="true"], :disabled *, [aria-disabled="true"] *, svg *) {
  color: rgb(255 255 255 / 0.52);
}

/* ── placeholders (a hint the customer reads before typing: held to text's 4.5:1 here) ─────────────────────────────
   slate-500 4.26 / 3.61 → #8592A7 6.44 / 5.45; slate-600 2.68 / 2.27 → #7D8AA0 5.81 / 4.92; gray-500 4.19 / 3.55 →
   #858C98 5.99 / 5.07; outline-variant 2.16 / 1.83 → #8E889C 5.94 / 5.03; on-surface-variant/50 and /60 → .64 5.21 / 4.89;
   outline/70 → .90 5.35 / 4.66; white/30 → .52 5.67 / 5.49. The inputs whose own sheets draw #64748B (glass-input and the
   address inputs of car wash, freight and vehicle) the same as slate-500. */
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-slate-500, .placeholder-slate-500, .placeholder-\[\#64748B\], .placeholder-text-4, .glass-input, .sys-cw-addr-input, .sys-frk-addr-input, .sys-veh-addr-input):not(:disabled)::placeholder {
  color: #8592A7;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-slate-600, .placeholder-slate-600):not(:disabled)::placeholder {
  color: #7D8AA0;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-gray-500, .placeholder-gray-500):not(:disabled)::placeholder {
  color: #858C98;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-outline-variant, .placeholder-outline-variant):not(:disabled)::placeholder {
  color: #8E889C;
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-on-surface-variant\/50, .placeholder\:text-on-surface-variant\/60):not(:disabled)::placeholder {
  color: rgb(203 195 215 / 0.64);
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) .placeholder\:text-outline\/70:not(:disabled)::placeholder {
  color: rgb(149 142 160 / 0.9);
}
html:not([data-apple-theme="light"]) :is(#screen-outlet,#overlay-outlet,.p-drawer-shell) :is(.placeholder\:text-white\/30, .placeholder-white\/30):not(:disabled)::placeholder {
  color: rgb(255 255 255 / 0.52);
}
