/* S42A Ops polish. Loaded LAST on schedule, setup and admin, so these few rules win without touching the large
   page sheets. What and why, with the apps each rule copies, is in docs/UX-BENCHMARK-2026-10-11.md.
   Colours come from tokens.css; this file only adds the tokens it needs and never a raw colour in a rule. */

/* --- Fills that carry white words pass WCAG AA (4.5:1); words on a tint use a darker or lighter ink ------------- */
:root {
  --accent-fill: #D62A42;      /* the red, one step deeper: white on it is 4.9:1 (the bright red was 4.2:1) */
  --accent-text: #FF6B7D;      /* red words on a dark panel: 6.6:1 */
}
html[data-theme="light"] {
  --accent-fill: #D61F3D;      /* already AA on white words: 5.1:1 */
  --accent-text: #B7132F;
  --good: #07704C;             /* green words on their own tint were 4.4:1; now 5.3:1 */
  --amber: #8F5100;            /* amber words on their own tint were 4.3:1; now 5.4:1 */
}
button.primary, a.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); }
.bell .badge, #gr-count.badge { background: var(--accent-fill); }
.day.today .day-h { color: var(--accent-text); }
.steps li.active .n { background: var(--accent-fill); border-color: var(--accent-fill); }   /* setup: the step you are on */

/* --- Touch: on a phone or a tablet every control is at least 44 px (Apple's minimum; Square and Deputy keep
       their schedule controls this size on a phone). A mouse keeps the denser desktop sizes. -------------------- */
@media (pointer: coarse), (max-width: 760px) {
  button, select, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]) { min-height: 44px; }
  button.sm { min-height: 44px; }
  button.icon, button.ghost.icon, #gr-btn, #bell, #refresh { min-width: 44px; min-height: 44px; }
  button.link { min-height: 44px; }
  .switcher a { min-height: 44px; }
  .brand { min-height: 44px; min-width: 44px; }
  .me-btn { min-height: 44px; }
  .qbadge.sm, .roster .qbadge.sm { min-width: 44px; min-height: 44px; }
  .roster .qbadge.sm { width: 44px; height: 44px; }
  a.call-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  html .leaflet-bar a, html .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }   /* Leaflet's sheet loads later */
  /* the fence's drag handle keeps its 22 px look but catches a 44 px finger */
  .leaflet-marker-icon.sm-edge { overflow: visible; }
  .leaflet-marker-icon.sm-edge::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
  .sm-radius input { min-height: 44px; }
  /* the page sheets give these their own smaller sizes; on a phone they grow to the same 44 */
  .tz-pill, .qchip, .qbadge, .chips button, .tabs button, .bp-tabs button, .tc-tabs button, .gr-tabs button, .pw-views button,
  .me-menu button[role="menuitem"], .me-menu .theme-row, .who-line .ban-btn, .pager button, .pw-box button,
  a.btn, a.btn.sm, a.button, .mail-alert a, .gr-search, .gr-acts input, .gr-nets summary, #sources .vendor-name,
  html #msg-pane .msg-search input, html #msg-pane .msg-phone input, details > summary { min-height: 44px; }
  .tx-acts button, .pager button { min-width: 44px; }
  /* the guard pick list scrolls with the shift window, not in a 300 px box inside it (one scroll on a phone) */
  .gpick { max-height: none; overflow: visible; }
}

/* --- The board's legend: a swatch never ends a line without its words ------------------------------------------- */
.legend .lg-item, .legend .cf-lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .lg-item .lg { margin-right: 0; }   /* the old negative margin pulled a loose swatch toward its words */

/* --- Respect "reduce motion" ------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
