/*
 * Nugget Ops TV board — instrument-panel dark theme.
 *
 * Scale: the whole board is designed on a 120rem × 67.5rem stage (16:9).
 * html font-size is derived from the viewport so 1rem = 16px on a 1920×1080
 * TV and everything scales proportionally on any screen.
 *
 * Palette: dataviz reference dark categorical/status steps, validated against
 * the card surface #1c222c (CVD ΔE 23.7, all ≥3:1). Text wears ink tokens
 * only; series color lives on marks and key-dots.
 */

:root {
  /* planes & chrome — value steps sized for a TV in a lit room: every layer
     is a full visible step from its neighbor, and secondary inks stay
     readable after a panel's gamma washes the darks together. Palette
     re-validated against --surface (CVD ΔE 23.7, all series ≥3:1). */
  --plane:      #10151d;
  --surface:    #1c222c;
  --surface-2:  #2a3341;
  --surface-3:  #364154;
  --hairline:   #3b4657;
  --baseline:   #4e5c72;
  --ink:        #f5f7fa;
  --ink-2:      #c6cfdc;
  --ink-3:      #96a2b4;

  /* categorical series — service projects (fixed assignment, never re-ranked) */
  --c-pm:        #3987e5;  /* Preventive Maintenance */
  --c-installs:  #199e70;  /* Installs */
  --c-training:  #c98500;  /* Training */
  --c-refurb:    #9085e9;  /* Refurb & QC */
  --c-emergency: #e66767;  /* Emergency Callouts */
  --c-shipping:  #d55181;  /* Shipping & Packing */
  --c-repairs:   #d95926;  /* Repairs */

  /* status — reserved, always paired with icon + label */
  --s-good:     #0ca30c;
  --s-warn:     #fab219;
  --s-serious:  #ec835a;
  --s-critical: #d03b3b;

  --font-ui:   "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 0.75rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: min(calc(100vw / 120), calc(100vh / 67.5)); }

body {
  background: var(--plane);
  color: var(--ink);
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* faint microplate well-grid on the page plane — the room tone, not a graphic */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle 1px at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 1.5px);
  background-size: 1.75rem 1.75rem;
  pointer-events: none;
}

.stage {
  position: relative;
  width: 120rem;
  height: 67.5rem;
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
}

/* ---------- top bar ---------- */

.topbar {
  height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 0.5rem;
}

.wordmark {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.plate-glyph {
  width: 1.9rem;
  height: 1.25rem;
  background-image: radial-gradient(circle 0.17rem at 50% 50%, var(--c-pm) 0.17rem, transparent 0.19rem);
  background-size: 0.63rem 0.63rem;
  background-position: 0 0;
}

.board-title {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding-left: 1.25rem;
  border-left: 1px solid var(--hairline);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.chip {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 0.35rem;
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.chip-sample { color: var(--s-warn); border-color: rgba(250,178,25,0.35); }
.chip-live { color: var(--s-good); border-color: rgba(12,163,12,0.35); }
.chip-quiet { border: none; color: var(--ink-3); letter-spacing: 0; }

.clock {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rotate-dots { display: flex; gap: 0.5rem; }
.rotate-dots button {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: none;
  background: var(--surface-3);
  cursor: pointer;
  padding: 0;
}
.rotate-dots button[aria-selected="true"] { background: var(--ink-2); }
.rotate-dots button:focus-visible { outline: 2px solid var(--c-pm); outline-offset: 2px; }

/* ---------- boards & cards ---------- */

.board {
  flex: 1;
  display: grid;
  gap: 1.25rem;
  padding: 0.25rem 0.5rem 1rem;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.board.fading { opacity: 0; }
.board[hidden] { display: none; }

.board-service {
  grid-template-columns: 74.75rem 1fr;
  grid-template-rows: 28.5rem 20rem 1fr;
  grid-template-areas:
    "map pipeline"
    "map working"
    "schedule priority";
}
.card-map       { grid-area: map; display: flex; flex-direction: column; }
.card-pipeline  { grid-area: pipeline; display: flex; flex-direction: column; }
.card-working   { grid-area: working; }
.card-schedule  { grid-area: schedule; }
.card-priority  { grid-area: priority; display: flex; flex-direction: column; }
.card-sku       { display: flex; flex-direction: column; } /* dormant — warehouse board */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  min-height: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.card-head h2 {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.22rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.dot-eyebrow {
  width: 1rem;
  height: 0.4rem;
  background-image: radial-gradient(circle 0.11rem at 50% 50%, var(--ink-3) 0.11rem, transparent 0.13rem);
  background-size: 0.36rem 0.36rem;
  opacity: 0.9;
}
.head-note { margin-left: auto; font-size: 1rem; color: var(--ink-3); }
.card-foot { margin-top: auto; font-size: 0.85rem; color: var(--ink-3); padding-top: 0.6rem; }

/* ---------- map ---------- */

.map-count { margin-left: auto; display: flex; align-items: baseline; gap: 0.6rem; }
.map-count strong { font-size: 2.7rem; font-weight: 600; line-height: 1; }
.map-count span { font-size: 1.05rem; color: var(--ink-2); }

.map-wrap { flex: 1; min-height: 0; }
.map-wrap svg { width: 100%; height: 100%; display: block; }

.map-state { fill: var(--surface-2); stroke: var(--hairline); stroke-width: 1; }

.pin { stroke: var(--surface); stroke-width: 2; cursor: default; }
.pin:focus-visible { outline: none; stroke: var(--ink); stroke-width: 2.5; }

.pulse-halo {
  fill: none;
  stroke: var(--c-emergency);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding-top: 0.8rem;
  font-size: 1.08rem;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.legend-key { display: flex; align-items: center; gap: 0.45rem; }
.legend-key .swatch { width: 0.8rem; height: 0.8rem; border-radius: 50%; }
.legend-sep { width: 1px; height: 1.1rem; background: var(--hairline); }
.legend-size { display: flex; align-items: center; gap: 0.4rem; color: var(--ink-3); }
.legend-size .ghost { border: 1.5px solid var(--ink-3); border-radius: 50%; }

/* ---------- stage pipeline ---------- */

.pipeline { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; }

.stage-row {
  display: grid;
  grid-template-columns: 11.5rem 1fr 6.25rem;
  align-items: center;
  gap: 0.9rem;
}
.stage-row.is-hold { border-top: 1px solid var(--hairline); padding-top: 0.55rem; }
.stage-name { font-weight: 500; font-size: 1.1rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-track { position: relative; height: 1.15rem; }
.stage-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--c-pm);
  border-radius: 0 4px 4px 0;
  min-width: 0.25rem;
}
.stage-row.is-hold .stage-bar { background: var(--ink-3); }
.stage-count {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 600;
}
.stage-dwell { text-align: right; font-size: 1.12rem; color: var(--ink-2); white-space: nowrap; }
.stage-dwell strong { color: var(--ink); font-weight: 600; font-size: 1.28rem; }

/* ---------- shared bits ---------- */

.mono { font-family: var(--font-mono); font-size: 1.06rem; color: var(--ink-2); }

/* ---------- working now ---------- */

.work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  justify-content: space-evenly;
  height: calc(100% - 2.2rem);
  transition: opacity 0.28s ease;
}
.work-row {
  display: grid;
  grid-template-columns: 5.6rem 1fr 5.2rem;
  align-items: center;
  gap: 0.9rem;
}
.work-main { min-width: 0; }
.work-client { font-size: 1.2rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-people { font-size: 1.02rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-hours { text-align: right; font-size: 0.95rem; color: var(--ink-2); white-space: nowrap; }
.work-hours strong { font-size: 1.42rem; font-weight: 600; color: var(--ink); }
.work-hours.is-zero, .work-hours.is-zero strong { color: var(--ink-3); font-weight: 400; }
.work-empty, .work-more { font-size: 1rem; color: var(--ink-3); }

/* ---------- ribbon row ---------- */

.card-ribbon { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.card-ribbon .card-head { margin-bottom: 0.55rem; }

.s-ico { width: 1.15rem; text-align: center; }
.wh-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.4rem; }

/* ---------- schedule pile-up strip ---------- */

.sched-cells { display: flex; align-items: stretch; height: calc(100% - 2.6rem); }
.sched-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.sched-cell.is-past { border-left: 1px solid var(--hairline); }
.sched-cell.is-past .sched-bar { background: var(--s-critical); }
.sched-cell.is-past .sched-count { color: var(--s-critical); }
.sched-cell.is-past .sched-label { color: var(--s-critical); font-weight: 600; }
.sched-cell.is-off { border-left: 1px solid var(--hairline); }
.sched-count { font-size: 1.28rem; font-weight: 600; line-height: 1.2; }
.sched-count.is-zero { color: var(--ink-3); font-weight: 400; }
.sched-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0.15rem 0 0.2rem; }
.sched-bar { width: 1.5rem; background: var(--c-pm); border-radius: 4px 4px 0 0; }
.sched-cell.is-off .sched-bar { background: var(--ink-3); }
.sched-label {
  font-size: 0.96rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}
.sched-cell.is-now .sched-label { color: var(--ink-2); font-weight: 600; letter-spacing: 0.06em; }

/* ---------- page-2 gantt ---------- */

.gt-legend { margin-left: auto; display: flex; gap: 1.3rem; font-size: 0.95rem; color: var(--ink-2); align-items: center; }
.gt-legend .legend-key { display: flex; align-items: center; gap: 0.45rem; }
.gt-legend .swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.swatch.is-pto-swatch {
  background: repeating-linear-gradient(45deg, var(--ink-3), var(--ink-3) 2px, transparent 2px, transparent 4px);
  border: 1px solid var(--ink-3);
}

.gt { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.gt-row { display: flex; align-items: stretch; }
.gt-name {
  width: 9.5rem;
  flex: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  padding-right: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gt-track { position: relative; flex: 1; border-top: 1px solid var(--hairline); }
.gt-head .gt-track { border-top: none; height: 1.7rem; }
.gt-day {
  position: absolute;
  top: 0;
  text-align: center;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
}
.gt-day.is-wknd { color: var(--baseline); }
.gt-day.is-today { color: var(--ink); font-weight: 600; }
.gt-wknd { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.035); }
.gt-today { position: absolute; top: 0; bottom: 0; background: rgba(57, 135, 229, 0.10); border-left: 2px solid var(--c-pm); }
.gt-bar {
  position: absolute;
  height: 1.35rem;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  padding: 0 0.45rem;
  overflow: hidden;
  min-width: 0.5rem;
}
.gt-bar.is-pto {
  background: repeating-linear-gradient(45deg, rgba(150, 162, 180, 0.55), rgba(150, 162, 180, 0.55) 4px, rgba(150, 162, 180, 0.15) 4px, rgba(150, 162, 180, 0.15) 8px);
  border: 1px solid var(--ink-3);
}
.gt-bar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.gt-bar.is-pto .gt-bar-label { color: var(--ink); text-shadow: none; }

/* ---------- open tickets by priority ---------- */

.prio-cells { flex: 1; display: flex; align-items: center; }
.prio-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border-left: 1px solid var(--hairline);
}
.prio-cell:first-child { border-left: none; }
.prio-cell.is-off { border-left-color: var(--baseline); }
.prio-cell.is-off:not(.is-zero) .prio-count { color: var(--s-warn); }
.prio-count { font-size: 2.85rem; font-weight: 600; line-height: 1; }
.prio-cell.is-zero .prio-count { color: var(--ink-3); font-weight: 400; }
.prio-label { font-size: 1.05rem; color: var(--ink-2); display: flex; align-items: center; }

/* ---------- SKU audit meter (dormant — reserved for the warehouse board) ---------- */

.sku-meter { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.55rem; }
.sku-figures { display: flex; align-items: baseline; gap: 0.7rem; }
.sku-pct { font-size: 2.7rem; font-weight: 600; line-height: 1; }
.sku-frac { font-size: 1.1rem; color: var(--ink-2); }
.meter-track {
  height: 0.85rem;
  border-radius: 0.45rem;
  background: rgba(57, 135, 229, 0.16);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: var(--c-pm);
  border-radius: 0 0.45rem 0.45rem 0;
  min-width: 0.45rem;
}
.sku-caption { font-size: 0.92rem; color: var(--ink-3); }

/* ================ PAGE 2 · SERVICE DETAIL ================ */

.board-detail {
  grid-template-columns: 37rem 45.75rem 1fr;
  grid-template-rows: 1fr 29rem;
  grid-template-areas:
    "queues center side"
    "queues gantt gantt";
}
.card-gantt { grid-area: gantt; display: flex; flex-direction: column; }
.col-stack { display: flex; flex-direction: column; gap: 1.25rem; min-height: 0; }
#detailQueues { grid-area: queues; }
#detailCenter { grid-area: center; }
#detailSide   { grid-area: side; }
.col-stack > .card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#detailQueues > .card:nth-child(1) { flex: 1.75; }  /* where time goes */
#detailQueues > .card:nth-child(2) { flex: 0.75; }  /* escalated */
#detailCenter > .card:nth-child(1) { flex: 1.1; }   /* FSE scheduling KPIs */
#detailCenter > .card:nth-child(2) { flex: 0.9; }   /* week agenda */
#detailSide > .card:nth-child(1) { flex: 1.1; }  /* response times */
#detailSide > .card:nth-child(3) { flex: 0.6; }  /* unassigned (usually empty) */

.rt-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; }
.rt-row { display: flex; align-items: center; gap: 1rem; }
.rt-main { flex: 1; min-width: 0; }
.rt-label { font-size: 1.2rem; font-weight: 600; }
.rt-note { font-size: 0.92rem; color: var(--ink-3); }
.rt-fig { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
.rt-fig strong { font-size: 2.3rem; font-weight: 600; line-height: 1; }
.rt-delta { font-size: 0.92rem; color: var(--ink-3); }
.rt-delta.is-good { color: var(--s-good); }
.rt-delta.is-bad { color: var(--s-serious); }

.fn-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; }
.fn-row { display: grid; grid-template-columns: 11.5rem 1fr 4.2rem; align-items: center; gap: 0.8rem; }
.fn-name { font-size: 1rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-track { height: 0.8rem; }
.fn-bar { height: 100%; background: var(--c-pm); border-radius: 0 3px 3px 0; }
.fn-bar.is-hot { background: var(--s-serious); }
.fn-val { text-align: right; font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.fn-val strong { font-size: 1.08rem; font-weight: 600; color: var(--ink); }

.head-note.is-worse { color: var(--s-serious); font-weight: 600; }

.dq-list {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  min-height: 0;
  overflow: hidden;
}
.dq-row {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
}
.dq-main { min-width: 0; }
.dq-client { font-size: 1.15rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dq-who { font-size: 0.98rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.35rem; }
.dq-days { text-align: right; font-size: 0.94rem; color: var(--ink-2); white-space: nowrap; }
.dq-days strong { font-size: 1.28rem; font-weight: 600; color: var(--ink); }
.dq-days.is-late strong, .dq-days.is-late { color: var(--s-critical); }
.dq-empty { font-size: 1rem; color: var(--ink-3); }

.matrix { width: 100%; border-collapse: collapse; flex: 1; }
.matrix th {
  font-family: var(--font-cond);
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-align: right;
  padding: 0.3rem 0.55rem;
  border-bottom: 1px solid var(--hairline);
}
.matrix th:first-child { text-align: left; }
.matrix td { padding: 0.3rem 0.55rem; font-size: 1.08rem; border-bottom: 1px solid var(--hairline); }
.matrix tr:last-child td { border-bottom: none; }
.m-tech { font-weight: 500; white-space: nowrap; }
.m-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.m-num.is-zero { color: var(--ink-3); font-weight: 400; }

.ag-days { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; }
.ag-day { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.8rem; align-items: baseline; }
.ag-label { font-family: var(--font-cond); font-weight: 600; font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.ag-items { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; min-width: 0; }
.ag-item { font-size: 1.02rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ag-none { font-size: 0.94rem; color: var(--ink-3); }

/* ================ PAGE 3 · LOGISTICS ================ */

/* Logistics is a single hero for now: SKU audit progress, full board.
   The other cards stay in the DOM (queries + renderers dormant) for the
   full warehouse build-out later. */
.board-logistics { grid-template-columns: 1fr; grid-template-areas: "sku"; }
.lg-wh, .lg-late, .lg-plate, .lg-svc, .lg-inbound { display: none; }
.lg-sku { grid-area: sku; }

.lg-sku { justify-content: center; padding: 4rem 8rem; }
.lg-sku .card-head { justify-content: center; margin-bottom: 3rem; }
.lg-sku .card-head h2 { font-size: 2.4rem; letter-spacing: 0.12em; }
.lg-sku .sku-meter { flex: 0; gap: 2.2rem; }
.lg-sku .sku-figures { justify-content: center; align-items: baseline; gap: 2.5rem; }
.lg-sku .sku-pct { font-size: 17rem; letter-spacing: -0.02em; }
.lg-sku .sku-frac { font-size: 3rem; color: var(--ink-2); }
.lg-sku .meter-track { height: 3.2rem; border-radius: 1.6rem; }
.lg-sku .meter-fill { border-radius: 0 1.6rem 1.6rem 0; min-width: 1.6rem; }
.lg-sku .sku-caption { font-size: 1.7rem; text-align: center; color: var(--ink-2); }
.lg-list {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  min-height: 0;
  overflow: hidden;
}
.lg-list .dq-row { grid-template-columns: 9.5rem 1fr auto; }

.wh-cells { display: flex; align-items: stretch; height: calc(100% - 2.4rem); }
.wh-cell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0 1.4rem;
  border-left: 1px solid var(--hairline);
}
.wh-cell:first-child { border-left: none; padding-left: 0.25rem; }
.wh-value { font-size: 3.2rem; font-weight: 600; line-height: 1; }
.wh-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.wh-name {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-2);
}
.wh-caption { font-size: 0.9rem; color: var(--ink-3); }
.wh-status { display: flex; gap: 1rem; font-size: 1.08rem; color: var(--ink-2); }
.wh-status strong { color: var(--ink); font-weight: 600; }
.wh-status .all-clear { color: var(--ink-3); }

.plate-hero { flex: 1; display: flex; align-items: center; gap: 1.6rem; min-height: 0; }
.plate-figure { display: flex; flex-direction: column; gap: 0.3rem; min-width: 9rem; }
.plate-figure strong { font-size: 5rem; font-weight: 600; line-height: 1; }
.plate-figure span { font-size: 1.02rem; color: var(--ink-2); }
.plate-grid {
  flex: 1;
  align-self: stretch;
  border: 1px solid var(--hairline);
  border-radius: 0.9rem;
  background: var(--surface-2);
  padding: 0.9rem 1rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.45rem;
  align-content: center;
}
.well {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--baseline);
}
.well.filled { background: var(--c-installs); border-color: var(--c-installs); }

/* ================ PARTNER WELCOME PAGE (/ford/one) ================ */

.pstage { justify-content: center; }
.pslide {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.5rem 2rem 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .pslide { transition: none; }
}
.pslide.is-active { opacity: 1; }
.pslide[hidden] { display: none; }

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  text-align: center;
}
.splash-brand { width: 46rem; height: auto; }
.splash-rule { width: 22rem; height: 2px; background: var(--baseline); }
/* The OneService logo is navy/red on transparent — it needs a light chip to
   keep its brand colors legible on the dark stage. */
.splash-guest {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 4.4rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-pm);
}
.splash-logo-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem 2.6rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
}
.splash-logo-card img { display: block; height: 4.2rem; width: auto; }
.splash-welcome {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 3.1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.splash-welcome strong { color: var(--c-pm); font-weight: 600; }

.pframe {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 0.9rem;
  background: #f7f5f1;
}

.pslide-head { display: flex; align-items: baseline; gap: 1.5rem; padding: 0 0.5rem 0.5rem; }
.pslide-head h2 {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 2.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pslide-note { margin-left: auto; font-size: 1.25rem; color: var(--ink-2); }

.pmap { flex: 1; min-height: 0; }
.pmap svg { width: 100%; height: 100%; display: block; }

.wdot {
  fill: var(--c-pm);
  fill-opacity: 0.85;
  stroke: var(--plane);
  stroke-width: 2;
}
.whq { fill: var(--s-warn); stroke: var(--plane); stroke-width: 2; }
.wlabel {
  fill: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 500;
  paint-order: stroke;
  stroke: var(--plane);
  stroke-width: 4;
}
.whq-label { fill: var(--s-warn); }

.pslide { position: relative; }
.wtop {
  position: absolute;
  left: 3rem;
  bottom: 2.5rem;
  background: rgba(28, 34, 44, 0.82);
  border: 1px solid var(--hairline);
  border-radius: 0.75rem;
  padding: 1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 22rem;
}
.wtop-title {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-2);
  margin-bottom: 0.2rem;
}
.wtop-row { display: flex; align-items: center; gap: 0.7rem; font-size: 1.15rem; }
.wtop-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c-pm); }
.wtop-name { flex: 1; color: var(--ink-2); }
.wtop-row strong { font-weight: 600; }

.pfoot {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pfoot-logo { height: 2.6rem; width: auto; opacity: 0.85; }
.topbar-logo { height: 2.9rem; width: auto; }
.lock-logo { height: 3.2rem; width: auto; }

/* ---------- fullscreen button ---------- */

.fs-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.fs-btn.show { opacity: 1; pointer-events: auto; }
.fs-btn .fs-icon-compress { display: none; }
body.is-fullscreen .fs-btn .fs-icon-compress { display: block; }
body.is-fullscreen .fs-btn .fs-icon-expand { display: none; }
.fs-btn:hover { background: var(--surface-3); color: var(--ink); }
.fs-btn:focus-visible { outline: 2px solid var(--c-pm); outline-offset: 2px; opacity: 1; pointer-events: auto; }

/* ---------- tooltip ---------- */

.tooltip {
  position: fixed;
  z-index: 40;
  background: var(--surface-3);
  border: 1px solid var(--baseline);
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.45);
  pointer-events: none;
  max-width: 20rem;
}
.tooltip strong { color: var(--ink); font-weight: 600; }
.tooltip .tt-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.1rem 0; }
.tooltip .tt-key { width: 0.85rem; height: 0.2rem; border-radius: 1px; }

/* ---------- lock screen ---------- */

.lock[hidden] { display: none; }
.lock {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8,10,13,0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
}
.lock-title { color: var(--ink-2); font-size: 1.05rem; }
.pin-dots { display: flex; gap: 0.9rem; }
.pin-dots span {
  width: 1rem; height: 1rem;
  border-radius: 50%;
  border: 1.5px solid var(--baseline);
}
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 4.2rem); gap: 0.8rem; }
.keypad button {
  height: 4.2rem;
  border-radius: 0.7rem;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.5rem;
  cursor: pointer;
}
.keypad button:hover { background: var(--surface-3); }
.keypad button:focus-visible { outline: 2px solid var(--c-pm); outline-offset: 2px; }
.pad-blank { visibility: hidden; }
.lock-hint { font-size: 0.85rem; color: var(--ink-3); max-width: 24rem; line-height: 1.5; }
.lock-error { font-size: 0.95rem; color: var(--s-critical); font-weight: 500; }

/* ---------- a11y ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-halo { animation: none; opacity: 0; }
  .board { transition: none; }
}
