/* DAYLIGHT (Brad, 2026-10-10): a high-contrast light theme for full sun, switched on by
   html[data-theme="day"] (shared/theme.js, Settings > Theme). Dark stays the default and is
   untouched: everything here is scoped to the attribute, so html[data-theme="day"] beats :root.
   Body text is >=7:1 (AAA) on every day surface (#fff card, #f2f3f5 bg, #e9ebef bg2, #f3f4f6
   card2, #eceef1 pill). The colour tokens (accent, call types, shifts) stay vivid (Brad 10/11:
   "not faded"): >=4.5:1 (AA) on white and the page, never the 7:1 browns. shared/icons.js and
   calendar-shared.js carry the same day colours for what JS paints.
   Loaded by index, costrecovery and mealcost; the smartboard stays dark. */
html[data-theme="day"]{
  --bg:#f2f3f5; --bg2:#e9ebef; --card:#ffffff; --card2:#f3f4f6; --pill:#eceef1;
  --bdr:#c9ced6; --brd:#c9ced6;   /* dividers and card edges, light like iOS/Material; controls get --ctl */
  --ctl:#858c97;                   /* field/chip/button outline: 3.4:1 on white (non-text 3:1) */
  --text:#0e0f12; --muted:#3a404a; --muted2:#262b33;
  --acc:#b04600; --acc-ink:#ffffff; --gold:#b04600; --ovd:#b8300a;
  --fire:#c62828; --medical:#1565c0; --assist:#127a43; --tc:#7034d9;
  --rescue:#0a7482; --haz:#8f5d00; --alarm:#bb3e0a; --ct-other:#4b5563;
  --shift-a:#c62828; --shift-b:#1d4ed8; --shift-c:#137a3a;
  color-scheme:light;
}
/* Like Apple/Google: vivid by default, the strict 7:1 (AAA) colours only when the phone asks for
   them (iPhone Settings > Accessibility > Increase Contrast). */
@media (prefers-contrast: more){
  html[data-theme="day"]{
    --acc:#6e4000; --gold:#6e4000; --ovd:#7d3300;
    --fire:#8f1f17; --medical:#174c87; --assist:#0f5233; --tc:#5e2b93;
    --rescue:#0a5560; --haz:#5c4400; --alarm:#7a3506; --ct-other:#3f4552;
    --shift-a:#8f1f17; --shift-b:#1a4596; --shift-c:#0f5228;
  }
}
/* Elevation the Apple/Google way (Brad 10/11: "looks off" with dark outlines on every card):
   surfaces are white on the grey page with a soft shadow; only things you tap or type into get
   an outline (inset, so a clipping parent can't cut it; not on focus, where fields draw their
   own amber ring). Cost Recovery already looked like this. */
html[data-theme="day"] :is(.kpi,.call-card,.pp-libbar,.pp-card,.hz-num:not(.iso):not(.pro),.hz-wind,.hz-row,.set-group,.pd-item,.bc,.plate){border-color:transparent;box-shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.10)}
html[data-theme="day"] .hz-num:is(.iso,.pro){box-shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.10)}
html[data-theme="day"] :is(.srch-inp,.hz-seg,.pp-act,.rng-btn:not(.active)):not(:focus){box-shadow:inset 0 0 0 1px var(--ctl)}
html[data-theme="day"] :is(input:not([type=radio]):not([type=checkbox]),select,textarea){border-color:var(--ctl)}
html[data-theme="day"] :is(.hd-refresh,.hd-pa){background:var(--pill);color:var(--text)}
html[data-theme="day"] nav{background:var(--card);border-top-color:var(--bdr)}
/* mono caps labels: a touch heavier than dark mode (600, not 700, which read clunky) */
html[data-theme="day"] :is(.kpi-l,.pp-count,.pp-sec,.hz-sec,.nb-lbl,.pp-code){font-weight:600}
/* hard-coded dark-theme colours */
html[data-theme="day"] .pp-r-s.pp-ok{color:var(--assist)}
html[data-theme="day"] .pp-tag.ok{color:#0b4a2c;background:color-mix(in srgb,var(--assist) 12%,transparent)}
html[data-theme="day"] .pp-tag.warn{color:var(--haz);background:color-mix(in srgb,var(--haz) 12%,transparent)}
/* hazmat badge A on white: the filled chip is black on yellow already; the outlined HM? needs ink */
html[data-theme="day"] .cc-s.hmq{color:var(--hm-ink);background:#fff1a8;box-shadow:inset 0 0 0 1.4px #6b4f00}
html[data-theme="day"] .cc-a.hmq .tile{color:var(--haz)}
html[data-theme="day"] .cc-s.case{color:#0b4a2c}   /* on its green tint: 7.5:1 */
html[data-theme="day"] :is(.pp-r-s.pp-warn,.pp-r-s.pp-pri){color:var(--haz)}
html[data-theme="day"] :is(.set-warn,.pp-err,.st-err){color:var(--fire)}
html[data-theme="day"] :is(.cal-row-check.off,.cal-ck-box){color:var(--muted)}
html[data-theme="day"] .pp-st i{color:#333}
/* hairlines drawn as near-black rows */
html[data-theme="day"] :is(.dr,.s-row,.p-tbl td,.ps-item,.pc-name,.set-radio,.set-toggle){border-bottom-color:#cfd3da}
html[data-theme="day"] #filter-list label{border-bottom-color:#cfd3da!important}
html[data-theme="day"] .leaflet-control-zoom a{border-color:var(--bdr)!important}
html[data-theme="day"] :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip){background:var(--card)!important}
/* dark glass over the map and the preplan page: white glass by day (the map tiles stay as picked) */
html[data-theme="day"] :is(.map-fbtn,#rng-menu,#me-btn,#map-loading,#map-status,#base-switch,.pp-layer-btn,.pp-card,.pp-selchip,.hyd-banner,.ql-mcard,.pp-zoom){background:rgba(255,255,255,.96);color:var(--text)}
html[data-theme="day"] :is(.map-fbtn,#me-btn,#map-status,#base-switch,.pp-layer-btn){border-color:var(--bdr)}
html[data-theme="day"] :is(.pp-viewer,.pp-page-wrap){background:var(--bg2)}
html[data-theme="day"] .bc{background:var(--card);border:none}
html[data-theme="day"] .bc::before{display:none}
/* calendar: other-month squares and separators were dimmed past AAA */
html[data-theme="day"] .cal-cell.out{opacity:1;background:var(--bg2)}
html[data-theme="day"] :is(.cal-sh-sl,.cal-day-sub-sep,.cal-f-lbl-sub){opacity:1}
/* Cost Recovery status chips (costrecovery.html): light tints, dark ink; the picked one is outlined */
html[data-theme="day"] :is(.statusrow,.case-card) .chip{background:var(--pill);color:var(--muted2)}
html[data-theme="day"] :is(.statusrow,.case-card) .chip.submitted{background:#f6ead6;color:var(--acc)}
html[data-theme="day"] :is(.statusrow,.case-card) :is(.chip.bc,.chip.chief,.chip.admin,.chip.attorney){background:#e3edf7;color:#1a4f86}
html[data-theme="day"] :is(.statusrow,.case-card) .chip.billed{background:#e1f0e7;color:#0f5233}
html[data-theme="day"] :is(.statusrow,.case-card) .chip.warning{background:#f8e7d8;color:#7a3506}
html[data-theme="day"] :is(.statusrow,.case-card) .chip.denied{background:#f8e1df;color:#8a1f17}
html[data-theme="day"] .statusrow .chip{opacity:1}
html[data-theme="day"] .statusrow .chip.on{box-shadow:inset 0 0 0 2px currentColor}
/* the preplan library list: rows on a white sheet, like an iOS list, not floating on the grey */
html[data-theme="day"] .pp-lr{background:var(--card);border-color:var(--bdr)}
