/* Grid Sentry guard app. Dark navy, one accent (signal blue), and colour only where it means
   something: green = on duty / done, amber = needs attention, red = clock out or a problem.
   Phone first (375 px); the same column simply centres on a laptop. Big targets (56 px),
   plain sans, no icon fonts. No inline styles anywhere: the CSP forbids them. */
:root {
  --bg: #0A1222;
  --bg-2: #0E182C;
  --panel: #121E35;
  --panel-2: #172540;
  --line: #22314F;
  --line-2: #2E4066;
  --text: #EEF2F8;
  --muted: #9AA9C2;
  --faint: #7D8CA6;
  --accent: #4C8DFF;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(76,141,255,.14);
  --good: #3CCB8F;
  --good-soft: rgba(60,203,143,.14);
  --warn: #F4B740;
  --warn-soft: rgba(244,183,64,.14);
  --bad: #F0525C;
  --bad-soft: rgba(240,82,92,.14);
  --brand: #E8324A;
  /* S42A: fills that carry white words pass WCAG AA (4.5:1). The bright --accent and --bad stay for icons,
     borders and words on dark; a button face uses the deeper fill. Words on a tint use the lighter ink. */
  --accent-fill: #2D6BE0;
  --bad-fill: #D7323E;
  --accent-text: #7AAEFF;
  --bad-text: #FF8A91;
  /* S42A: one spacing scale (4-8-12-16-24-32) and one radius family: --r for cards and sheets, --r-ctl for every
     control (buttons, fields, rows, day and minute buttons), a full pill for chips. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r: 16px;
  --r-ctl: 14px;
  --tap: 56px;
  --tabs-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.app { max-width: 480px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(96px + var(--safe-b)); }
.screen { display: flex; flex-direction: column; gap: 14px; animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }
h1 { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; outline: none; }
h2 { font-size: 21px; line-height: 1.25; margin: 0; font-weight: 700; }
h3.sub { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 2px 0; font-weight: 600; }
p { margin: 0; }
b { font-weight: 650; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--text); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* brand mark: the Grid Sentry red tile (icons/mark.png, drawn from the same polygon as the Ops mark) */
.mark { width: 30px; height: 30px; flex: none; background: url(/app/icons/mark.png) center / contain no-repeat; }
.mark.big { width: 68px; height: 68px; }

/* headers */
.top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.hello { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.hello .muted { margin-bottom: 2px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 4px 8px; }
.hero.left { align-items: flex-start; text-align: left; padding-top: 8px; }
.boot { align-items: center; padding-top: 30vh; }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: var(--tap); padding: 14px 18px; border-radius: var(--r-ctl); border: 1px solid transparent;
  font: inherit; font-weight: 650; font-size: 18px; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .choice:focus-visible, .tick-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn.danger { background: var(--bad-fill); color: #fff; }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line-2); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn.busy { opacity: .7; }
.btn.busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.small-btn { min-height: 44px; font-size: 16px; padding: 8px 14px; width: auto; align-self: flex-start; }
.icon-btn {
  width: 48px; height: 48px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--panel);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.icon-btn[disabled] { opacity: .35; cursor: default; }
.action { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.action.two-btn { flex-direction: row; }
.action.two-btn .btn { flex: 1; padding: 14px 10px; gap: 8px; min-width: 0; white-space: nowrap; }
.hint { color: var(--muted); font-size: 14px; text-align: center; }

/* forms */
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.field input {
  font: inherit; font-size: 20px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); min-height: var(--tap); padding: 12px 14px; width: 100%;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.code { font-size: 30px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.err { color: #FFB8BD; font-size: 15px; background: var(--bad-soft); border-radius: 10px; padding: 10px 12px; }
input[type=date] { color-scheme: dark; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card.empty { align-items: center; text-align: center; padding: 28px 18px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.eyebrow .i { width: 18px; height: 18px; }
.when { font-size: 18px; font-weight: 600; }
.addr { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-text); text-decoration: none; border-radius: 10px; }
.addr:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.addr .i { width: 20px; height: 20px; }
.card p.small, .row .small { display: flex; align-items: center; gap: 6px; }
.card p.small .i { width: 18px; height: 18px; }
.shift-card h2 { font-size: 24px; }
.sitebar { display: flex; flex-direction: column; gap: 2px; }
.sitebar b { font-size: 20px; }

/* chips and notes */
.chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--panel-2); color: var(--muted); }
.chip .i { width: 18px; height: 18px; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad-text); }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.badge-ic { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.badge-ic .i { width: 30px; height: 30px; }
.badge-ic.good { background: var(--good-soft); color: var(--good); }
.badge-ic.warn { background: var(--warn-soft); color: var(--warn); }
.badge-ic.bad { background: var(--bad-soft); color: var(--bad); }

/* avatar = last clock-in photo, else initials */
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 96px; height: 96px; font-size: 30px; }
.me-top { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }

/* lists */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row.tall { align-items: flex-start; }
.row.tall .chip { margin-top: 6px; }
.row-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 4px; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-size: 18px; }
.facts.row3 { flex-direction: row; justify-content: space-between; gap: 8px; }
.facts.row3 div { flex: 1; }
.facts.row3 dd { font-size: 16px; font-weight: 600; }
.facts dd small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.nowrap { white-space: nowrap; }

/* briefing and read-and-sign ticks */
.ticks { display: flex; flex-direction: column; gap: 10px; }
.tick-row, .tick {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; min-height: 64px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; color: var(--text); font: inherit; font-size: 18px; cursor: pointer;
}
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick.off { opacity: .55; cursor: default; }
.box { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; flex: none; color: transparent; background: var(--bg-2); }
.box .i { width: 20px; height: 20px; stroke-width: 3; }
.tick-row[aria-checked="true"], .tick:has(input:checked) { border-color: var(--good); background: var(--good-soft); }
.sheet .ticks .tick-row { min-height: 56px; font-size: 17px; }
.tick-row[aria-checked="true"] .box, .tick input:checked + .box { background: var(--good); border-color: var(--good); color: #062014; }
.tick input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }

/* camera */
.cam { position: relative; border-radius: 20px; overflow: hidden; background: #050A14; aspect-ratio: 4 / 5; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam video { transform: scaleX(-1); }
.cam img { object-fit: contain; }            /* the whole stamped photo, corner label included */          /* a mirror feels natural; the saved photo is not mirrored */
.cam [hidden] { display: none; }
.cam-hint { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; padding: 8px 12px; border-radius: 10px; background: rgba(5,10,20,.7); font-size: 15px; }
.gps { min-height: 34px; }

/* the one thing to do while on duty (daily check): a red badge, never a blocker */
.todo { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--bad-soft); border: 1px solid rgba(240,82,92,.55); border-radius: 14px; color: var(--text); font: inherit; }
.todo > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.todo .small { color: #FFC9CD; }
.todo-ic { position: relative; width: 40px; height: 40px; border-radius: 12px; background: var(--bad-fill); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dot-badge { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--bad); }
.todo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* switch */
.switch { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 16px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 52px; height: 32px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* on-duty timer */
.timer { gap: 8px; }
.timer.on { border-color: rgba(60,203,143,.45); background: linear-gradient(180deg, rgba(60,203,143,.10), var(--panel) 70%); }
.timer.on-break { border-color: rgba(244,183,64,.45); background: linear-gradient(180deg, rgba(244,183,64,.10), var(--panel) 70%); }
.timer .eyebrow { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); flex: none; }
.on-break .dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.big-time { font-size: 54px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.05; }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; background: rgba(3,7,15,.66); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 22px 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.sheet > .badge-ic { align-self: center; }
.sheet h2, .sheet > p { text-align: center; }
.sheet.countdown .big-time { text-align: center; font-size: 64px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.choice > span:last-child { display: flex; flex-direction: column; }

/* signature */
.sig-box { position: relative; background: #F7F9FC; border-radius: 16px; height: 220px; overflow: hidden; }
.sig-box canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 18px; right: 18px; bottom: 44px; border-top: 2px dashed #B8C2D3; padding-top: 6px; color: #7A869A; font-size: 14px; pointer-events: none; }

/* bottom tabs: three, icons with one-word labels */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; background: rgba(10,18,34,.96); border-top: 1px solid var(--line); padding: 6px 12px calc(6px + var(--safe-b)); z-index: 20; backdrop-filter: blur(8px); }
.tab { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 60px; background: none; border: 0; border-radius: 12px; color: var(--faint); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tab.on { color: var(--text); background: var(--panel); }
.tab.on .i { color: var(--accent); }
.tabs[hidden] { display: none; }

/* signal banner and toast */
.net { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; justify-content: center; padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--warn); color: #241700; font-weight: 650; font-size: 15px; }
.net[hidden] { display: none; }
/* S42A: the toast drops in at the top, so it never covers the button the guard is about to tap at the bottom. */
.toast { position: fixed; left: 16px; right: 16px; top: calc(12px + var(--safe-t)); max-width: 448px; margin: 0 auto; padding: 14px 16px; border-radius: var(--r-ctl); font-weight: 600; z-index: 60; background: var(--panel-2); border: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.toast .i { flex: none; }
.toast.good .i { color: var(--good); } .toast.bad .i { color: var(--bad); } .toast.warn .i { color: var(--warn); }
.toast.bad { border-color: var(--bad); color: #FFD9DC; }
.toast.good { border-color: var(--good); color: #D4F7E7; }
.toast.warn { border-color: var(--warn); color: #FFEBC2; }
.toast[hidden] { display: none; }

/* days off: seven big day buttons (S33B). Amber = a day the guard asked off. */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  min-height: var(--tap); padding: 6px 0; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.day .i { width: 18px; height: 18px; }
.day.on { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.day:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.day[disabled] { opacity: .5; }
.row .end { margin-left: auto; }
.field small { font-size: 13px; color: var(--faint); }

/* S40A: shift confirmation. One green "Yes, I'm coming" -- there is never a cancel button. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ck { display: flex; flex-direction: column; gap: 10px; }
.ck-card { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.ck-row { margin-top: 8px; width: 100%; }
.row.tall > div { flex: 1; }
.btn.yes { background: var(--good); color: #062014; }
.ck-row .btn.yes { min-height: 52px; font-size: 17px; }
.eta { display: flex; flex-direction: column; gap: 8px; }
.eta-q { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--warn); }
.eta-q .i { width: 20px; height: 20px; }
.eta-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.eta-btn {
  min-height: 64px; padding: 6px 0; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
}
.eta-btn .i { width: 16px; height: 16px; color: var(--muted); }
.eta-btn b { font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.eta-btn span { font-size: 12px; color: var(--muted); }
.eta-btn.on { background: var(--warn-soft); border-color: var(--warn); }
.eta-btn.on .i, .eta-btn.on span { color: var(--warn); }
.eta-btn[disabled] { opacity: .5; cursor: default; }
.eta-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.row .chips { margin-top: 6px; }
.row .chips .chip, .ck-row .chip { margin-top: 0; }
/* the shift an alert opened */
.hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* S40A: app alerts. A plain card on Home, a switch in Me. */
.alerts-head { display: flex; align-items: flex-start; gap: 12px; }
.alerts-head > div { display: flex; flex-direction: column; gap: 2px; }
.row-ic.warn { color: var(--warn); }
.alerts-card .btn.small-btn { align-self: center; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; counter-increment: s; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.steps .i { color: var(--accent); }
button.switch { width: 100%; color: var(--text); font: inherit; font-size: 17px; text-align: left; }
button.switch > span:nth-child(2) { display: inline-flex; color: var(--accent); }
button.switch[aria-checked="true"] .track { background: var(--good); }
button.switch[aria-checked="true"] .track::after { transform: translateX(20px); }
button.switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button.switch[disabled] { opacity: .6; }
.alerts-me p.small { display: flex; align-items: center; gap: 6px; }

@media (min-width: 720px) {
  .app { padding-top: 40px; }
  .cam { aspect-ratio: 4 / 3; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; border-bottom: 1px solid var(--line-2); padding-bottom: 22px; }
}

/* S41A: the Armed line in Me (quals.js) */
.qual-line { display: flex; gap: 12px; align-items: flex-start; }
.qual-line .i { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.qual-line > span { display: flex; flex-direction: column; gap: 2px; }


/* ============================================================== S42A UX polish (benchmarks: docs/UX-BENCHMARK-2026-10-11.md)
   One main action per screen, kept in reach: on a phone the screen's action bar sticks to the bottom (above the tabs
   when they show), like DoorDash Dasher and Uber Driver. Everything else stays secondary. */
.action { position: sticky; bottom: calc(12px + var(--safe-b)); z-index: 5; padding-top: var(--s3); margin-top: 0;
  background: linear-gradient(to bottom, rgba(10,18,34,0), var(--bg) 18px); }
body.with-tabs .action { bottom: calc(var(--tabs-h) + 8px + var(--safe-b)); }
.action .hint { padding-bottom: var(--s1); }

/* Home before clock-in opens: a plain status line, not a grey button that looks broken (Air NZ "Check-in opens"). */
.wait { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-ctl);
  background: var(--accent-soft); color: var(--text); border: 1px solid rgba(76,141,255,.35); }
.wait .i { color: var(--accent-text); }
.wait > span { display: flex; flex-direction: column; }
.wait small { color: var(--muted); font-size: 14px; }

/* Card header: the label on the left, its one small action on the right (Gusto "Edit"). */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; margin: -6px -6px 0 0; }
.btn.edit { width: auto; flex: none; min-height: 44px; padding: 8px 14px; font-size: 16px; gap: 8px; border-color: var(--line-2); }
.btn.edit .i { width: 18px; height: 18px; color: var(--accent-text); }
/* the quiet way out: sign out reads as words, not as another big button (Gusto "Clear data") */
.btn.quiet { background: none; border-color: var(--line); color: var(--bad-text); font-size: 17px; }

/* "Add a day off" opens the form only when asked (one form at a time on Me). */
.more { border-top: 1px solid var(--line); padding-top: var(--s2); }
.more > summary { display: flex; align-items: center; gap: var(--s2); min-height: 48px; cursor: pointer; list-style: none; color: var(--accent-text); font-weight: 650; border-radius: 10px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.more[open] > summary { color: var(--muted); }
.more > .stack { margin-top: var(--s2); }

/* Days off: seven across from 390 px, two rows below that, so no day is narrower than a thumb (44 px). */
.days { gap: var(--s1); margin: 0 -10px; }
@media (max-width: 389px) {
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 6px; }
}

/* On duty: reports and fixes are tools, not the main act -- one quiet list under the break and clock-out pair. */
.duty-tools { display: flex; flex-direction: column; gap: var(--s2); }
.duty-tools .pw-tools { display: flex; flex-direction: column; gap: var(--s2); }
.duty-tools .btn, .duty-tools .btn.small-btn { width: 100%; align-self: stretch; justify-content: flex-start; min-height: 56px; font-size: 17px; padding: 12px 16px;
  background: var(--panel); border-color: var(--line); }
.duty-tools .btn .i { color: var(--accent-text); }
.duty-tools .btn:not(.busy)::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); flex: none; }
.duty-tools .pw-count { margin-left: 4px; }

/* Signature: Clear sits inside the white box, where the finger already is. */
.sig-box + .btn.small-btn { position: relative; z-index: 2; align-self: flex-end; margin: -72px 10px 16px 0; min-height: 44px;
  background: #fff; color: #0A1222; border-color: #C9D2E0; }

/* Location help under the chip on the clock-in screen (DoorDash "Let's give that another try"). */
#gps { display: flex; flex-direction: column; gap: 6px; }   /* the clock-in screen's location line, never .chip.gps */
.gps-help { color: var(--muted); font-size: 15px; display: flex; gap: 8px; align-items: flex-start; }
.gps-help .i { width: 18px; height: 18px; margin-top: 2px; color: var(--warn); }

/* Bottom sheets: a grab bar says "this slides away"; Escape and a tap outside close it. */
@media (max-width: 719px) { .sheet::before { content: ""; align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: -10px 0 2px; } }

/* Loading: grey bars in the shape of what is coming, not the word "Loading". */
.skel { display: flex; flex-direction: column; gap: 10px; }
.skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--line-2) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.skel i:nth-child(1) { width: 40%; } .skel i:nth-child(2) { width: 70%; height: 20px; } .skel i:nth-child(3) { width: 55%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Respect "reduce motion": no slide, no shimmer, no press bounce; the busy spinner turns, slowly, so a tap still shows. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn.busy::after { animation: spin 2.4s linear infinite !important; }
  .btn:active { transform: none; }
}

/* ============================================================== S56A: complete on the phone
   Help one tap from Home; the More card under Me (timesheet link, Help, the walk-through); a guard card line on Home;
   Coming soon said plainly. Then the mobile fixes found at 320 to 390 px (each names what it fixed). */
.hello > div { flex: 1; min-width: 0; }
.hello h1 { overflow-wrap: anywhere; }
.hello-help { flex: none; }
.hello-help .i { color: var(--accent-text); }

/* Home: the guard card is ending (amber) or has ended (red). The whole line is the button to Me. */
.note-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 1px solid; font: inherit; font-size: 16px; font-weight: 600; }
.note-btn > span { flex: 1; display: flex; flex-direction: column; }
.note-btn small { font-size: 14px; font-weight: 500; opacity: .9; }
.note-btn.warn { background: var(--warn-soft); border-color: rgba(244,183,64,.55); color: var(--warn); }
.note-btn.bad { background: var(--bad-soft); border-color: rgba(240,82,92,.55); color: var(--bad-text); }
.note-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Me: More */
.more-card { gap: 8px; }
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--text); font: inherit; font-size: 17px; text-decoration: none; }
.more-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.more-row small { color: var(--muted); font-size: 14px; }
.more-row > .i:first-child { color: var(--accent-text); }
.more-row > .i:last-child { color: var(--muted); width: 18px; height: 18px; }
.more-row.off { cursor: default; }
.more-row.off > .i:first-child { color: var(--muted); }
.more-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Help: questions open in place */
.qa { display: flex; flex-direction: column; gap: 8px; }
.qa-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.qa-row > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 650; }
.qa-row > summary::-webkit-details-marker { display: none; }
.qa-row > summary > span { flex: 1; }
.qa-row > summary > .i:first-child { color: var(--accent-text); }
.qa-row > summary > .i:last-child { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.qa-row[open] > summary > .i:last-child { transform: rotate(90deg); }
.qa-row > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-ctl); }
.qa-row > p { padding: 0 14px 14px 48px; color: var(--text); font-size: 16px; }

/* Coming soon: grey, never a button (nothing is behind it yet) */
.soon { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.soon li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.soon li > .i { color: var(--faint); }
.soon li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.soon b { color: var(--text); font-weight: 600; }
.soon small { font-size: 14px; }
.soon .chip { align-self: center; font-size: 13px; padding: 4px 10px; white-space: nowrap; }

/* Mobile fix 1 (claim a shift, address): two fields side by side pushed the page sideways below 350 px, because a
   date or time input will not shrink under its own text. The columns may now shrink (requests.css does the same for
   the even pair, and stacks it below 360 px). */
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.field input, .field select, .field textarea { min-width: 0; max-width: 100%; }

/* Mobile fix 2 (manager signature box): "Sign here" was grey on white at 3.5:1; now 5.9:1. */
.sig-line { color: #556072; border-top-color: #9AA6B8; }

/* Mobile fix 3 (on-duty timer): "Clocked in" broke onto two lines on small phones and pushed the time down. */
.facts.row3 dt { white-space: nowrap; font-size: 12px; letter-spacing: .03em; }
