
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 600;
  font-display: swap;
  src: url('/assets/barlow-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('/assets/barlow-700.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --ground: #eef0f2;
  --face: #ffffff;
  --label: #fbfbfa;
  --ink: #16191d;
  --muted: #4f5760;
  --rail: #c9ced4;
  --track: #e2e5e9;
  --hover: #e6e9ed;
  --handle: #16191d;
  --on: #1f8a4c;
  --trip: #c8321f;
  --off: #7d858e;
  --new: #52667d;
  --signal: #f2c230;
  --signal-ink: #16191d;
  --focus: #b88a06;
  --label-font: 'Barlow Semi Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --body-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #111316;
    --face: #1a1d21;
    --label: #202429;
    --ink: #e8ebee;
    --muted: #9aa3ad;
    --rail: #2c3137;
    --track: #23272c;
    --hover: #262b31;
    --handle: #e8ebee;
    --on: #3dbb6e;
    --trip: #ec5a45;
    --off: #767e88;
    --new: #8497ad;
    --focus: #f2c230;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 var(--body-font);
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in oklab, var(--signal) 55%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: inherit; text-decoration-color: var(--rail); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--ink); }

.page { max-width: 44rem; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 20px; }

/* A block of the board: printed label strip over a flat face. */
.block { background: var(--face); border: 1px solid var(--rail); border-radius: 6px; overflow: hidden; }
.strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 8px 16px;
  background: var(--label); border-bottom: 1px solid var(--rail);
}
.strip h2, .caps {
  margin: 0; font: 700 15px/1.2 var(--label-font); letter-spacing: 0.08em; text-transform: uppercase;
}
.strip .aside { font-size: 13px; color: var(--muted); }
.strip.is-down { background: color-mix(in oklab, var(--trip) 8%, var(--label)); box-shadow: inset 0 2px 0 color-mix(in oklab, var(--trip) 40%, transparent); }

/* Masthead: the page's own label strip, logo and client name printed on it. */
.masthead .strip { justify-content: flex-start; gap: 12px; min-height: 56px; padding: 10px 16px; border-bottom: 0; }
.masthead:has(.desc) .strip { border-bottom: 1px solid var(--rail); }
.masthead img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; background: var(--face); border: 1px solid var(--rail); }
.masthead h1 { margin: 0; font: 700 24px/1.15 var(--label-font); text-wrap: balance; }
.masthead .desc { margin: 0; padding: 12px 16px 14px; color: var(--muted); max-width: 65ch; }

/* Breaker handle: position carries the state, as on the dashboard. */
.handle { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.handle .window { width: 20px; height: 6px; border-radius: 1px; background: var(--off); }
.handle .track { position: relative; width: 20px; height: 44px; border: 1px solid var(--rail); border-radius: 3px; background: var(--track); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.12); }
.handle .knob { position: absolute; left: 2px; right: 2px; height: 18px; border-radius: 2px; background: var(--handle); box-shadow: 0 1px 1px rgb(0 0 0 / 0.25); top: 2px; }
.handle.is-up .window { background: var(--on); }
.handle.is-down .window { background: var(--trip); }
.handle.is-down .knob { top: 22px; }
.handle.is-paused .knob { top: 12px; }
.handle.is-pending .window { background: var(--new); opacity: 0.5; }
.handle.small .window { width: 14px; height: 4px; }
.handle.small .track { width: 14px; height: 36px; }
.handle.small .knob { height: 14px; }
.handle.small.is-down .knob { top: 18px; }
.handle.small.is-paused .knob { top: 10px; }

/* The bank of services */
.summary { padding: 14px 16px 4px; margin: 0; font-weight: 600; }
.summary.is-down { color: var(--trip); }
.bank { list-style: none; margin: 12px 0 0; padding: 12px; border-top: 1px solid var(--rail); background: color-mix(in oklab, var(--track) 45%, var(--face)); display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.breaker {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px;
  border: 1px solid var(--rail); border-radius: 4px; background: var(--face);
  text-decoration: none; color: inherit;
}
.breaker:hover { background: var(--hover); }
.breaker.is-down { border-color: var(--trip); background: color-mix(in oklab, var(--trip) 6%, var(--face)); }
.breaker.is-selected { outline: 2px solid var(--signal); outline-offset: 2px; }
.breaker .name { display: block; font: 600 15px/1.25 var(--label-font); overflow-wrap: anywhere; }
.breaker .word { display: block; font: 700 12px/1.2 var(--label-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.breaker.is-up .word { color: var(--on); }
.breaker.is-down .word { display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 4px; background: var(--trip); color: var(--face); letter-spacing: 0.12em; }
.filter-note { margin: 0; padding: 0 16px 14px; font-size: 13px; color: var(--muted); }

/* Notice */
.notice .body { padding: 14px 16px; }
.notice p { margin: 0; max-width: 65ch; white-space: pre-line; }
.notice .when { margin-top: 6px; font-size: 13px; color: var(--muted); }
.notice .strip .caps::before { content: ''; display: inline-block; width: 14px; height: 4px; margin-right: 8px; vertical-align: middle; border-radius: 1px; background: var(--new); }

/* The ledger */
.ledger { list-style: none; margin: 0; padding: 0; }
.day { display: grid; grid-template-columns: 12.5rem 1fr; gap: 4px 16px; padding: 14px 16px; border-bottom: 1px solid var(--rail); }
.day:last-child { border-bottom: 0; }
.day .date { font: 600 14px/1.4 var(--label-font); letter-spacing: 0.04em; color: var(--muted); }
.day .date time { white-space: nowrap; }
.day.is-today .date { color: var(--ink); }
.day.is-quiet { background: color-mix(in oklab, var(--label) 60%, var(--face)); }
.tab { display: inline-block; margin-bottom: 4px; padding: 1px 6px; border-radius: 4px; background: var(--signal); color: var(--signal-ink); font: 700 11px/1.4 var(--label-font); letter-spacing: 0.12em; }
.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.clear { margin: 0; color: var(--muted); }
.clear strong { color: var(--on); font-weight: 600; }
.entry { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: start; }
.entry .service { font-weight: 600; }
.entry .what { display: block; }
.entry.is-ongoing .what { color: var(--trip); font-weight: 600; }
.entry .cause { display: block; font-size: 13px; color: var(--muted); }
.mark { width: 8px; height: 8px; margin-top: 7px; border-radius: 1px; background: var(--muted); }
.entry.is-ongoing .mark { background: var(--trip); }

/* History: ninety days per service, raised when working, dropped when down. */
.toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px; font: 600 14px/1 var(--label-font); letter-spacing: 0.04em; text-decoration: none; color: var(--ink); }
.toggle svg { width: 16px; height: 16px; }
.toggle svg.is-open { transform: rotate(180deg); }
.toggle:hover { text-decoration: underline; text-decoration-color: var(--rail); }
.pct .since { font: 400 13px/1 var(--body-font); color: var(--muted); }
.history { padding: 4px 16px 12px; display: grid; gap: 4px; }
.service-history { padding: 12px 0; border-bottom: 1px solid var(--rail); }
.service-history:last-of-type { border-bottom: 0; }
.service-history .head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 8px; }
.service-history .pct { font: 600 15px/1.4 var(--label-font); }
.days { display: flex; gap: 1px; height: 30px; }
.days span { flex: 1; min-width: 0; height: 20px; border-radius: 1px; background: color-mix(in oklab, var(--on) 75%, var(--face)); align-self: flex-start; }
.days span.is-down { background: var(--trip); align-self: flex-end; }
.days span.is-none { background: var(--track); align-self: center; height: 10px; }
.range { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { margin: 0; font-size: 13px; color: var(--muted); max-width: 65ch; }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--muted); padding: 0 2px; }
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.brand svg { height: 16px; width: auto; }

/* Not found */
.lost { max-width: 30rem; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.lost h1 { font: 700 26px/1.2 var(--label-font); margin: 0 0 8px; }
.lost p { color: var(--muted); margin: 0; }

@media (max-width: 480px) {
  .day { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .handle .knob { transition: top 150ms cubic-bezier(0.16, 1, 0.3, 1); }
}
