@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: block; src: url(/vendor/barlow-condensed/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: block; src: url(/vendor/barlow-condensed/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: block; src: url(/vendor/barlow/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: block; src: url(/vendor/barlow/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: block; src: url(/vendor/barlow/barlow-latin-600-normal.woff2) format("woff2"); }

/* Inks lifted from the CFD Paramedic Program mark. The screen lives in a rack
   closet under mixed light, often dark: a black ground keeps it from glaring. */
:root {
  --ink: #05070a;
  --panel: #0a0d12;
  --line: rgb(214 226 255 / 0.1);
  --text: #eef2f8;
  --dim: #93a0b3;
  --faint: #5d6a7d;
  --blue: #2f7ff5;
  --blue-soft: #8bb6ff;
  --yellow: #ffc933;
  --red: #ef3340;
  --stage-w: 1048px;
  --rail-w: 232px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100vw; height: 100vh; overflow: hidden; background: var(--ink); }
body {
  color: var(--text);
  font: 500 16px/1.3 "Barlow", system-ui, sans-serif;
  cursor: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}
/* The design is authored at the panel's native 1280x400; fit.js scales it to the viewport. */
#app {
  position: absolute; left: 0; top: 0;
  width: 1280px; height: 400px;
  display: grid;
  grid-template-columns: var(--stage-w) var(--rail-w);
  transform-origin: 0 0;
}
.num { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 0.86; }
.huge { font-size: 136px; letter-spacing: -0.03em; }
.mid { font-size: 56px; }
.unit { color: var(--dim); font-size: 17px; font-weight: 500; }
.meta { color: var(--dim); font-size: 15px; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 44px; height: 44px; color: var(--yellow); stroke-width: 2.25; align-self: center; }

/* ---------- Stage ---------- */
.stage { position: relative; width: var(--stage-w); height: 400px; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.label {
  position: absolute; left: 0; top: 0;
  padding-left: 14px;
  white-space: nowrap;
  transition: opacity 400ms var(--ease-out);
  will-change: transform;
}
.label b { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.label span { display: block; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.label.is-offline b, .label.is-offline span { color: var(--red); }
.label.is-left { padding: 0 14px 0 0; text-align: right; }

.slide {
  position: absolute; inset: 0;
  padding: 30px 36px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  filter: blur(6px);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out), filter 500ms var(--ease-out), visibility 0s linear 700ms;
}
body[data-slide] .slide.is-active {
  opacity: 1; visibility: visible; transform: none; filter: none;
  transition-delay: 450ms, 450ms, 450ms, 0s; /* let the camera arrive first */
}

.slide-title { font: 600 40px/1 "Barlow Condensed", sans-serif; letter-spacing: -0.01em; text-wrap: balance; }
.slide-sub { margin-top: 8px; }
.big-read { display: flex; align-items: baseline; gap: 12px; }
.read { display: flex; align-items: baseline; gap: 8px; }
.read .ico { width: 26px; height: 26px; align-self: center; color: var(--text); }

.slide[data-scrim]::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.slide[data-scrim="left"]::before { background: linear-gradient(90deg, var(--ink) 0, rgb(5 7 10 / 0.92) 38%, rgb(5 7 10 / 0) 62%); }
.slide[data-scrim="right"]::before { background: linear-gradient(270deg, var(--ink) 0, rgb(5 7 10 / 0.9) 46%, rgb(5 7 10 / 0) 60%); }
.slide[data-scrim="sides"]::before { background: linear-gradient(90deg, var(--ink) 0, rgb(5 7 10 / 0.85) 24%, rgb(5 7 10 / 0) 36%, rgb(5 7 10 / 0) 64%, rgb(5 7 10 / 0.85) 70%, var(--ink) 100%); }
.slide > * { position: relative; }
.slide > .chart, .slide > .chart-label, .slide > .flash, .slide > .hourly, .slide > .wx-alert, .slide > .brand-line { position: absolute; }

/* Brand */
.brand-line { position: absolute; left: 36px; bottom: 26px; color: var(--dim); font-size: 15px; letter-spacing: 0.02em; }

/* Pulse */
.pulse-read { position: absolute; left: 520px; top: 34px; display: grid; gap: 22px; }
.pulse-read .big-read .unit { font-size: 22px; color: var(--text); }
.row-reads { display: flex; gap: 44px; }
.chart { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72px; }
.chart-down-fill { fill: rgb(255 201 51 / 0.12); }
.chart-down { fill: none; stroke: var(--yellow); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-up { fill: none; stroke: var(--blue-soft); stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: 0.8; }
.chart-label { position: absolute; left: 36px; bottom: 76px; font-size: 12px; color: var(--faint); }

/* Clients */
.clients-read { position: absolute; left: 36px; top: 40px; width: 260px; display: grid; gap: 10px; }
.clients-read .huge { font-size: 120px; }
.split { display: flex; height: 6px; gap: 3px; margin-top: 6px; }
.split i { display: block; height: 100%; border-radius: 1px; transition: flex-grow 600ms var(--ease-out); }
.split i:first-child { background: var(--blue); }
.split i:last-child { background: var(--dim); }
.talkers { position: absolute; right: 36px; top: 40px; width: 280px; }
.talkers h3 { font-size: 15px; font-weight: 600; color: var(--dim); margin-bottom: 12px; }
.talkers ol { list-style: none; display: grid; gap: 9px; }
.talkers li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; font-size: 17px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.talkers li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talkers li span:last-child { font: 600 20px "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; }

/* Power */
.power-read { position: absolute; left: 36px; top: 40px; display: grid; gap: 16px; width: 360px; }
.cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; height: 26px; }
.cells i { background: var(--line); border-radius: 2px; }
.cells i.on { background: var(--text); }
.cells.is-battery i.on { background: var(--yellow); }
.power-side { position: absolute; right: 36px; top: 48px; display: grid; gap: 26px; justify-items: end; }

/* Storage */
.storage-read { position: absolute; left: 36px; top: 34px; width: 520px; display: grid; gap: 10px; }
.bays { display: flex; gap: 8px; margin-top: 14px; }
.bay { width: 58px; height: 118px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 7px; display: flex; flex-direction: column; justify-content: space-between; background: rgb(255 255 255 / 0.02); }
.bay i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.bay.is-empty { opacity: 0.35; }
.bay.is-empty i { background: var(--faint); }
.bay.is-warn i { background: var(--yellow); }
.bay.is-fail { border-color: var(--red); }
.bay.is-fail i { background: var(--red); }
.bay b { font: 600 22px "Barlow Condensed", sans-serif; }
.bay span { font-size: 12px; color: var(--dim); }
.note { color: var(--dim); font-size: 15px; max-width: 46ch; }
.storage-side { position: absolute; right: 36px; top: 48px; display: grid; gap: 26px; justify-items: end; }

/* Weather */
.wx-now { position: absolute; left: 36px; top: 44px; display: flex; align-items: flex-start; gap: 18px; }
.wx-ico { width: 64px; height: 64px; margin-top: 10px; color: var(--text); stroke-width: 1.5; }
.wx-now .huge { font-size: 150px; }
.wx-text { display: grid; gap: 6px; padding-top: 14px; }
.wx-cond { font: 600 32px/1 "Barlow Condensed", sans-serif; }
.hourly { position: absolute; left: 36px; right: 36px; bottom: 26px; display: grid; grid-template-columns: repeat(12, 1fr); list-style: none; border-top: 1px solid var(--line); padding-top: 12px; }
.hourly li { display: grid; justify-items: center; gap: 5px; font-size: 13px; color: var(--dim); }
.hourly li b { font: 600 22px "Barlow Condensed", sans-serif; color: var(--text); font-variant-numeric: tabular-nums; }
.hourly li .ico { width: 22px; height: 22px; color: var(--text); }
.hourly li .pop { color: var(--blue-soft); font-variant-numeric: tabular-nums; }
.hourly li .pop.is-zero { color: transparent; }
.wx-alert { position: absolute; right: 36px; top: 40px; max-width: 360px; color: var(--yellow); font-size: 15px; font-weight: 600; text-align: right; }
.wx-alert.is-warning { color: var(--red); }
.flash { position: absolute; inset: 0; background: #dfe8ff; opacity: 0; pointer-events: none; }

/* Radar */
.radar { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease-out), visibility 0s linear 600ms; background: var(--ink); }
body[data-slide="radar"] .radar { opacity: 1; visibility: visible; transition-delay: 300ms, 0s; }
.radar .leaflet-container { background: var(--ink); }
.radar .leaflet-control-attribution { background: rgb(5 7 10 / 0.7); color: var(--faint); font-size: 9px; }
.radar .leaflet-control-attribution a { color: var(--faint); }
.radar-stamp { position: absolute; left: 36px; top: 26px; display: grid; gap: 4px; font: 600 34px/1 "Barlow Condensed", sans-serif; text-shadow: 0 1px 12px rgb(0 0 0 / 0.9); z-index: 2; }
.home-pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text); box-shadow: 0 0 0 4px rgb(5 7 10 / 0.6); }

/* Alert takeover */
.alert-read { position: absolute; left: 36px; top: 40px; width: 560px; display: grid; gap: 12px; }
.alert-title { display: flex; align-items: center; gap: 14px; font: 600 64px/0.95 "Barlow Condensed", sans-serif; color: var(--text); text-wrap: balance; }
.alert-title .ico { width: 52px; height: 52px; color: var(--red); stroke-width: 2.25; }
.alert-detail { font-size: 22px; color: var(--text); }
.alert-hint { margin-top: 18px; font-size: 14px; color: var(--dim); }
body[data-slide="alert"] .stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--red), inset 0 0 120px rgb(239 51 64 / 0.28);
  animation: alarm 1.6s ease-in-out infinite;
}
@keyframes alarm { 50% { box-shadow: inset 0 0 0 3px rgb(239 51 64 / 0.5), inset 0 0 60px rgb(239 51 64 / 0.1); } }

/* ---------- Rail ---------- */
.rail {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px 22px 18px;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.time { display: flex; align-items: baseline; gap: 6px; }
.time .num { font-size: 64px; }
.ampm { font: 600 18px "Barlow Condensed", sans-serif; color: var(--dim); }
.date { margin-top: 6px; color: var(--dim); font-size: 15px; }

.status { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.status-head { display: flex; align-items: center; gap: 9px; font: 600 24px/1 "Barlow Condensed", sans-serif; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: none; }
.status-detail { color: var(--dim); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.status[data-level="warning"] .dot { background: var(--yellow); }
.status[data-level="warning"] .status-head { color: var(--yellow); }
.status[data-level="critical"] .dot { background: var(--red); animation: blink 1s steps(2, jump-none) infinite; }
.status[data-level="critical"] .status-head { color: var(--red); }
@keyframes blink { 50% { opacity: 0.25; } }

.rail-facts { display: grid; gap: 8px; }
.rail-facts div { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.rail-facts dt { display: flex; color: var(--dim); }
.rail-facts .ico { width: 18px; height: 18px; }
.rail-facts dd { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rail-foot { margin-top: auto; display: grid; gap: 8px; }
.slide-name { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--dim); }
.paused, .demo { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 5px; border-radius: 2px; }
.paused { color: var(--ink); background: var(--text); }
.demo { color: var(--ink); background: var(--yellow); margin-left: auto; }
.progress { display: flex; gap: 4px; height: 3px; }
.progress i { flex: 1; background: var(--line); border-radius: 1px; overflow: hidden; }
.progress i::after { content: ""; display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--text); }
.progress i.is-done::after { width: 100%; background: var(--faint); }

.dim { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 4s linear; }

/* A held slide (?slide=) renders its final state at once. */
body.is-still .slide, body.is-still .radar { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .slide, .radar { transition-duration: 0s !important; transition-delay: 0s !important; }
  body[data-slide="alert"] .stage::after, .status .dot { animation: none !important; }
}
