/* Call Queue — Shelby Williams for Collin County Commissioner, Precinct 4
   Tokens are lifted verbatim from callqueue-mockup.html, which is visual truth.

   Rules that are not negotiable:
     1. Sans-serif only. No serif anywhere.
     2. 16px is the absolute minimum font size for ANY text, including hints.
     3. Minimum tap target 60px; primary actions 80px+.
     4. Mode color spans the full header on every in-session screen.
     5. Dark ground throughout.
     6. No animation beyond a subtle press state; prefers-reduced-motion respected. */

:root{
  --ground:#061426; --surface:#0E2340; --surface2:#16304F; --line:#20456E;
  --red:#B31942; --navy-lite:#2C6BB8; --gold:#D4A22A;
  --white:#FFFFFF; --muted:#A9BED6; --green:#1E8E5A;
  --warn-bg:#8A4514; --warn-fg:#FFE0B4; --warn-line:#D08432;
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:#000}
body{
  font-family:Inter,-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",Roboto,sans-serif;
  color:var(--white);-webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;
}
/* 430px holds the widest current iPhone; the 14 Pro is 393px and simply fills
   it. dvh keeps the footer off the home indicator when Safari's toolbars are
   showing; the vh line is the fallback for older iOS. */
#app{max-width:430px;margin:0 auto;min-height:100vh;background:var(--ground);position:relative}
#app{min-height:100dvh}
.screen{display:none;min-height:100vh;flex-direction:column}
.screen{min-height:100dvh}
.screen.on{display:flex}
[hidden]{display:none !important}

/* ---------- mode spine ---------- */
.spine{
  padding:calc(14px + var(--safe-t)) 18px 14px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.spine .mode{font-size:18px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.spine .count{font-size:16px;font-weight:600}
.spine .right{display:flex;align-items:center;gap:10px}
.m-donor{background:var(--red)}
.m-vol{background:var(--navy-lite)}
.m-both{background:var(--gold);color:#1A1204}
.m-both .count,.m-both .mode{color:#1A1204}
.m-data{background:var(--surface2)}

/* Sync status: one small dot. No banners, no toasts, no modals. */
.syncwrap{display:flex;align-items:center;gap:6px;font-size:16px;font-weight:700}
.syncdot{
  width:16px;height:16px;border-radius:50%;flex:0 0 auto;
  border:2px solid currentColor;background:currentColor;
}
.syncdot.pending{background:transparent}

/* ---------- chips ---------- */
.chip{
  display:inline-block;font-size:16px;font-weight:800;letter-spacing:.10em;
  text-transform:uppercase;padding:7px 12px;border-radius:4px;
}
.chip-new{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35)}
.chip-fu{background:var(--gold);color:#1A1204}
.chip-un{background:var(--warn-bg);color:var(--warn-fg);border:1px solid var(--warn-line)}

/* ---------- layout ---------- */
.body{flex:1;padding:18px;display:flex;flex-direction:column}
.foot{padding:0 18px calc(26px + var(--safe-b));display:flex;flex-direction:column;gap:10px}
.eyebrow{
  font-size:16px;font-weight:800;letter-spacing:.10em;color:var(--gold);
  text-transform:uppercase;margin:0 0 12px;
}
.eyebrow span{color:var(--muted);letter-spacing:0;text-transform:none;font-weight:500}
h1.name{font-size:36px;line-height:1.08;font-weight:800;margin:12px 0 4px;letter-spacing:-.02em}
.sub{color:var(--muted);font-size:18px;font-weight:600;margin:0 0 16px}

.field{border-top:1px solid var(--line);padding:12px 0}
.field:last-child{border-bottom:1px solid var(--line)}
.label{
  font-size:16px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);margin-bottom:4px;
}
.val{font-size:21px;font-weight:600;line-height:1.3}
.val.big{font-size:30px;font-weight:800;letter-spacing:-.01em}
.val.gold{color:var(--gold)}
.val.dim{font-size:18px;font-weight:500;color:#D3E1F0}
.two{display:flex;gap:12px}
.two .field{flex:1;min-width:0}

.callout{
  background:var(--surface);border-left:5px solid var(--gold);
  padding:13px 15px;border-radius:0 6px 6px 0;margin:16px 0 4px;
}
.callout .val{font-size:19px;font-weight:500;line-height:1.35}

/* Needs Review — you must see this before you say the name out loud. */
.warnstrip{
  background:var(--warn-bg);color:var(--warn-fg);border:1px solid var(--warn-line);
  border-radius:8px;padding:12px 14px;margin:12px 0 0;
  font-size:17px;font-weight:600;line-height:1.35;
}
.warnstrip b{
  display:block;font-size:16px;letter-spacing:.08em;
  text-transform:uppercase;margin-bottom:3px;
}

/* A contact resolved by someone else is removed with a visible line, not silently. */
.removedline{
  background:var(--surface);border-left:5px solid var(--navy-lite);
  padding:12px 14px;border-radius:0 6px 6px 0;margin:0 0 14px;
  font-size:17px;font-weight:600;color:#D3E1F0;line-height:1.35;
}

/* ---------- buttons ---------- */
button{font-family:inherit;border:0;cursor:pointer;display:block;width:100%;color:inherit}
.btn{
  min-height:66px;border-radius:10px;font-size:20px;font-weight:700;padding:16px;
  color:#fff;background:var(--surface2);
  display:flex;align-items:center;justify-content:center;gap:10px;text-align:center;
}
.btn:active{transform:scale(.985)}
.btn[disabled]{opacity:.45}
/* The green dial button intentionally breaks palette. Campaign red on a Call
   button reads as "hang up", and this is the one control that must never be
   misread. Primary actions are 80px+. */
.btn-call{background:var(--green);min-height:80px;font-size:24px;font-weight:800}
.btn-red{background:var(--red)}
.btn-gold{background:var(--gold);color:#1A1204}
.btn-out{background:transparent;border:2px solid var(--line);color:#E2ECF7}
.btn-ghost{background:transparent;color:var(--muted);min-height:54px;font-size:17px;font-weight:600}
.btn-lg{min-height:100px;font-size:25px;font-weight:800;flex-direction:column;gap:5px}
.btn-lg small{font-size:16px;font-weight:500;opacity:.85}
.btn-alt{min-height:60px;font-size:18px;font-weight:700;background:var(--surface2)}
.row2{display:flex;gap:10px}
.row2>*{flex:1}

/* ---------- pills ---------- */
.pills{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}
.pill{
  /* width:auto overrides the blanket `button{width:100%}` above. Without it
     every pill's flex basis is the full container and they stack one per row,
     which also makes the .wide modifier below meaningless. */
  width:auto;
  flex:1 1 auto;min-width:calc(50% - 5px);min-height:60px;border-radius:9px;
  background:var(--surface2);border:2px solid transparent;color:#fff;
  font-size:18px;font-weight:600;display:flex;align-items:center;justify-content:center;
  padding:8px 10px;text-align:center;line-height:1.2;
}
.pill.sel{background:var(--gold);color:#1A1204;border-color:#F2CB65}
.pill.wide{min-width:100%}

/* ---------- inputs ---------- */
textarea,input,select{
  width:100%;background:var(--surface);border:2px solid var(--line);
  border-radius:9px;color:#fff;font-family:inherit;
  /* 19px also keeps iOS from zooming the page on focus (its threshold is 16px). */
  font-size:19px;padding:14px;margin-top:8px;min-height:60px;
}
textarea{min-height:110px;resize:vertical;line-height:1.35}
.hint{font-size:16px;color:var(--muted);margin-top:8px;line-height:1.35}
.hint.warn{color:#FFD9A6}
.rec{
  min-height:90px;border-radius:10px;background:var(--red);font-size:21px;font-weight:800;
  display:flex;align-items:center;justify-content:center;gap:12px;color:#fff;
}
.rec.on{background:#7E1230}
.dot{width:17px;height:17px;border-radius:50%;background:#fff;display:inline-block}
.rec.on .dot{animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}

/* ---------- home / summary / data ---------- */
.hdr{padding:calc(44px + var(--safe-t)) 18px 8px}
.wordmark{font-size:32px;font-weight:900;letter-spacing:.10em;text-transform:uppercase;margin:0}
.hdr p{color:var(--muted);font-size:18px;margin:10px 0 0;font-weight:500}
.stat{
  display:flex;justify-content:space-between;gap:12px;padding:14px 0;
  border-top:1px solid var(--line);font-size:18px;font-weight:600;
}
.stat:last-child{border-bottom:1px solid var(--line)}
.stat b{font-weight:800;font-size:21px;white-space:nowrap}
.sum{color:var(--muted);font-weight:500}
.gap{height:12px}

/* Empty screens are instructions, not apologies. */
.empty{font-size:18px;color:var(--muted);line-height:1.4;margin:0 0 16px}

@media (prefers-reduced-motion:reduce){
  *{animation:none !important;transition:none !important}
  .btn:active{transform:none}
}
