/* Officer view: one column for a phone held in one hand. The officer's own job is pinned on top;
   everything else is a short list of nearby jobs. Same palette as the control room dashboard. */
:root {
  color-scheme: light;
  --bg: #f5f9fd;
  --surface: #ffffff;
  --sunken: #edf4fc;
  --ink: #0b1b2b;
  --muted: #3f5165;
  --line: #c5d4e3;
  --accent: #0b5fd6;
  --on-accent: #ffffff;
  --g-immediate: #d42a1c;
  --g-priority: #bf6200;
  --on-grade: #ffffff;
  --ok: #14602b;
  --ok-bg: #e3f4e8;
  --sim-bg: #fff1b8;
  --sim-ink: #4a3800;
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-transform: uppercase; letter-spacing: 0.03em; }
h1 { font-size: 24px; font-weight: 700; line-height: 1.1; }
h2 { font-size: 20px; font-weight: 600; color: var(--muted); }
h3 { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; }
p { margin: 0; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.simbar { position: sticky; top: 0; z-index: 5; background: var(--sim-bg); color: var(--sim-ink); font-size: 13px; text-align: center; padding: 4px 12px; border-bottom: 1px solid var(--sim-ink); }
.phone { max-width: 480px; margin: 0 auto; padding: 12px 14px 32px; display: flex; flex-direction: column; gap: 12px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent); color: var(--on-accent); border-radius: 6px; padding: 12px 14px; }
.who { display: flex; flex-direction: column; min-width: 0; font-size: 15px; }
#clock { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.status { background: var(--surface); color: var(--ok); border-radius: 999px; padding: 3px 12px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.status[data-s="busy"] { color: var(--g-priority); }

.alert { background: var(--g-immediate); color: var(--on-grade); border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; animation: drop 0.4s ease-out; }
.alert strong { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.05em; text-transform: uppercase; }
.alert .row { display: flex; gap: 8px; }
.alert button { flex: 1; min-height: 44px; border: 0; border-radius: 4px; background: var(--surface); color: var(--g-immediate); font-weight: 600; cursor: pointer; }
.alert button.quiet { background: transparent; color: var(--on-grade); border: 1px solid var(--on-grade); }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.mine { background: var(--surface); border: 2px solid var(--accent); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.steps { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.steps li { flex: 1; border-top: 4px solid var(--line); padding-top: 4px; }
.steps li.on { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.big { width: 100%; min-height: 52px; border: 0; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 18px; font-weight: 600; cursor: pointer; }
.big:disabled { opacity: 0.6; cursor: default; }
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.results button { min-height: 52px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-weight: 600; cursor: pointer; }

.controls { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); }
.controls select { min-height: 40px; min-width: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; }
.listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hint { font-size: 15px; color: var(--muted); }

.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.job { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--g); border-radius: 6px; overflow: hidden; }
.job[data-g="immediate"] { --g: var(--g-immediate); }
.job[data-g="priority"] { --g: var(--g-priority); }
.job.new { animation: drop 0.5s ease-out; }
.job.gone { opacity: 0.5; }
.job > button { width: 100%; text-align: left; background: transparent; border: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.line1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.grade { color: var(--g); font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.dist { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.where { font-weight: 600; overflow-wrap: anywhere; }
.sub { font-size: 15px; color: var(--muted); }
.late { color: var(--g-immediate); font-weight: 600; }
.more { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.sms { background: var(--sunken); border-radius: 4px 12px 12px 12px; padding: 8px 10px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; font-size: 14px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.note { background: var(--ok-bg); color: var(--ok); border-radius: 4px; padding: 6px 10px; font-weight: 600; }

.foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.foot a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .alert, .job.new { animation: none; } }
