/* WS19-P systemic (a): tokens + accessibility (v2: Codex #66 R1 — one filled primary on the empty dashboard; the quote's contact link), loaded LAST so it wins at equal specificity.
   ~/Projects/reports/ws19p-review.md, themes 1, 2, 4, 5, 8 and 9, with ORCHA's rulings of 2026-09-28. */

/* 1 — muted ink meets AA. #737373 was 4.34:1 on the band (--ink-08 #F4F5F6); #6B6B6B is 4.89:1 there and 5.33:1 on white.
   Dark (#999 on #141414) already passes and is unchanged. */
:root{--ink-45:#6B6B6B}

/* 2 — ONE primary: the platform blue in both themes. Dark used a light grey; it now takes the platform's dark-theme blue
   (the charts' and dashboard's #2F94E4, 5.7:1 against #141414 either way round). Green stays success / money only.
   --primary is the STAFF primary: fixed platform blue, never a tenant's accent, and not re-declared by the chart cards' token
   firewall (which maps --accent to ink inside .an-card / .d-kpi, so an empty chart card's "New quote" read grey). */
body{--primary:#266DF0;--primary-fg:#FFFFFF}
body.dark{--primary:#2F94E4;--primary-fg:#141414;
  --accent:#2F94E4;--accent-2:#2F94E4;--accent-h:#5AAAEB;--accent-emph:#2F94E4;--accent-glow:rgba(47,148,228,.25);--accent-fg:#141414}
body :is(button.d-btn[data-act="newQuote"],button.d-btn[data-act="startQuote"],button.d-btn[data-owner-empty-quote]),
body.dark :is(button.d-btn[data-act="newQuote"],button.d-btn[data-act="startQuote"],button.d-btn[data-owner-empty-quote]){background:var(--primary);border-color:var(--primary);color:var(--primary-fg)}
/* Codex #66 R1 (P2): ONE filled primary — an empty rep dashboard also offered New quote inside the empty Open-quotes card; the
   page header's New quote stays the filled primary, the card's is the outlined secondary */
body .pq-empty :is(button.d-btn[data-act="newQuote"],button.d-btn[data-act="startQuote"]),
body.dark .pq-empty :is(button.d-btn[data-act="newQuote"],button.d-btn[data-act="startQuote"]){background:transparent;border-color:var(--primary);color:var(--primary)}
/* one filled primary per screen: the builder's per-product "Add to quote" is secondary (Review quote is the screen's primary) */
body.builder-active .builder-product .qadd,body.dark.builder-active .builder-product .qadd{background:transparent;border-color:var(--primary);color:var(--primary)}
body.builder-active .builder-product .qadd:hover:not(:disabled){filter:none;background:var(--sel)}
/* the submitted-quote panel's primary was ink-filled (black in light, grey in dark) */
#qdone button.pri{background:var(--primary);border-color:var(--primary);color:var(--primary-fg)}

/* 9 — footer links in the app's ink (weight, not an underline — the house rule), never the browser's default blue / purple */
.foot a,#pfoot a,.foot a:visited,#pfoot a:visited{color:var(--fg);font-weight:var(--fw-med);text-decoration:none}

/* 5 — the accept form's visible labels (app-features v10 wraps each field in label.ab-f) */
.ab-f{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:var(--fs-fine);color:var(--fg)}
.ab-namewrap>.ab-f{flex:1 1 200px}
.ab-f>.ab-namein{flex:none;min-width:0;width:100%}
.ab-f .ab-lbl{font-weight:var(--fw-med)}
.ab-f .ab-hint{color:var(--muted);font-weight:var(--fw-reg)}
.ab-f .ab-star{color:var(--fg);font-weight:var(--fw-med)}

/* 4 — every target is at least 44 px on a coarse pointer. Text actions keep their look (no box, no underline). */
@media (pointer: coarse){
  /* the floor: every control is at least 44 x 44 (!important because it is a floor under rules as specific as
     .topactions .tt.bell{min-width:40px}; it only ever raises a size, never lowers one) */
  :is(button,select,textarea,summary,[role="button"],[role="tab"],input:not([type="checkbox"],[type="radio"],[type="range"],[type="hidden"],[type="file"])){min-height:44px!important}
  :is(button,[role="button"],[role="tab"]){min-width:44px!important}
  .an-more{width:44px;height:44px;min-height:44px}
  .qfchip,.builder-tier-toggle,.cm-avail-quick{min-height:44px}
  .d-tlink,.pq-a .d-tlink,#band .d-tlink{min-height:44px}
  #adminsec button.codebtn,#adminsec select.codebtn,#adminsec .d-btn{min-height:44px}
  .na-open,.rc-a{display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  summary{min-height:44px;align-content:center}
  /* inline links: vertical padding on an inline box widens the hit area without moving the line */
  .foot a,#pfoot a,.ab-legal a,.ab-contact a{padding-block:var(--s4)}
}

/* 8 — the phone top bar stays ONE row. The left group held a 140 px basis for a 40 px menu button, so any extra action
   (the builder's Print, a 320 px screen) wrapped the actions onto a second row. */
@media (max-width:767px){
  .topbar .tb-left{flex:1 1 44px}
  body.repshell .topbar{column-gap:6px;padding-left:12px;padding-right:12px}   /* staff only: the customer header aligns to its content's 16px */
  body.repshell .topbar .topactions{gap:4px}
}
@media (max-width:359px){
  .topbar .tb-switch:has(.ss-static){display:none}   /* a static tile (nothing to switch): the 320 px bar needs its room */
  body.repshell .topbar{column-gap:4px}
  .topbar .topactions #print{padding-left:8px;padding-right:8px;font-size:var(--fs-fine)}
}
