/* ==========================================================================
   Uptime monitor - one stylesheet for every page.

   The visual language was set by the dashboard and the rest of the app
   follows it: hairline rules instead of shadows, monospace for anything
   a machine measured, prose sans for anything a person wrote, and almost
   no border radius. Nothing here is a framework - it is about 600 lines
   and it loads before the first paint, which matters for a page whose job
   is to render when other things are broken.
   ========================================================================== */

:root {
  --paper:#f1f3f5; --panel:#ffffff; --rail:#e7ebef;
  --ink:#16202b; --ink-2:#55636f; --ink-3:#67757f;
  --rule:#e3e7eb; --up:#12997f; --down:#d14a33; --nodata:#d5dbe1; --latency:#1f6fb2;
  --hatch:rgba(0,0,0,.28);
  /* type=time og type=number tegnes av nettleseren selv. Uten color-scheme
     blir de staaende lyse i moerkt tema - hvit boks, svart klokkeikon. */
  color-scheme:light; accent-color:var(--latency);
  /* --rule er en dekorativ haarstrek (1.2:1). Rammen rundt et felt er
     derimot det eneste som viser at det er et felt, og maa naa 3:1. */
  --field:#818d97;
  /* Muted ink for the sidebar only. --ink-3 was picked against --paper and
     measures 3.96:1 on the darker --rail, under the 4.5:1 floor for small
     text, so light mode steps up one token. Dark mode clears it at 6.55:1
     and keeps the recessive step. */
  --rail-mute:#55636f;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,"SF Mono","Cascadia Mono","Segoe UI Mono","Roboto Mono",Menlo,Consolas,"DejaVu Sans Mono",monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper:#1e272f; --panel:#2a353f; --rail:#19222a;
    --ink:#e8eef2; --ink-2:#b3bfc8; --ink-3:#9aa7b2;
    --rule:#3a4651; --up:#279c88; --down:#e0603f; --nodata:#465360; --latency:#5488e2;
    --hatch:rgba(0,0,0,.42);
    color-scheme:dark;
    --field:#7c8792;
    --rail-mute:#9aa7b2;
  }
}

* { box-sizing:border-box; }
body {
  margin:0; background:var(--paper); color:var(--ink); font-family:var(--sans);
  font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
a { color:inherit; }

.eyebrow {
  font-family:var(--mono); font-size:10.5px; text-transform:uppercase;
  letter-spacing:.16em; color:var(--ink-3); margin:0;
}
/* for words a screen reader needs but the layout does not have room for */
.sr {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ==========================================================================
   Shell - sidebar plus content column
   ========================================================================== */

.shell { display:flex; align-items:stretch; min-height:100vh; }

.rail {
  flex:0 0 212px; width:212px; background:var(--rail);
  border-right:1px solid var(--rule);
  position:sticky; top:0; align-self:flex-start; height:100vh;
  display:flex; flex-direction:column; padding:24px 0 18px; overflow-y:auto;
}
/* min-width:0 lets the 24-column grids inside actually shrink; without it a
   flex child refuses to go below its content width and the page scrolls sideways */
.view { flex:1 1 auto; min-width:0; }

.mark { padding:0 20px; text-decoration:none; display:block; }
.mark b {
  display:block; font-family:var(--mono); font-size:13.5px; font-weight:600;
  letter-spacing:-.01em; color:var(--ink);
}
.mark span {
  display:block; font-family:var(--mono); font-size:9px; text-transform:uppercase;
  letter-spacing:.17em; color:var(--rail-mute); margin-top:4px;
}

.nav { display:flex; flex-direction:column; margin-top:30px; }
.nav a {
  position:relative; display:flex; align-items:center; gap:8px;
  padding:8px 20px; color:var(--ink-2); text-decoration:none; font-size:13.5px;
}
.nav a:hover { color:var(--ink); background:var(--panel); }
.nav a.on { color:var(--ink); font-weight:500; }
/* the active marker is a tick in the margin, the same mark the hour axis uses */
.nav a.on::before {
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:2px; height:17px; background:var(--ink);
}
.nav .tally {
  margin-left:auto; display:inline-flex; align-items:center; gap:5px;
  font-family:var(--mono); font-size:11px; color:var(--ink);
  font-variant-numeric:tabular-nums;
}
/* the number is ink so it always passes contrast; the square carries the alarm */
.nav .tally::before {
  content:""; width:7px; height:7px; border-radius:1px; background:var(--down);
}

.rail-foot {
  margin-top:auto; padding:16px 20px 0; border-top:1px solid var(--rule);
  margin-left:0; margin-right:0;
}
.rail-who { font-size:12.5px; color:var(--ink); word-break:break-word; }
.rail-mail {
  font-family:var(--mono); font-size:10.5px; color:var(--rail-mute);
  word-break:break-all; margin-top:2px;
}
.rail-out {
  display:inline-block; margin-top:10px; font-family:var(--mono); font-size:10px;
  text-transform:uppercase; letter-spacing:.11em; color:var(--rail-mute);
  text-decoration:none; border-bottom:1px solid var(--rule); padding-bottom:2px;
}
.rail-out:hover { color:var(--ink); border-color:var(--ink-3); }

.topbar {
  display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  padding:22px 32px 14px; border-bottom:1px solid var(--rule);
}
.stamp {
  font-family:var(--mono); font-size:11px; color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.wrap { max-width:1080px; margin:0 auto; padding:0 32px 72px; }

/* ==========================================================================
   Shared primitives
   ========================================================================== */

.panel {
  background:var(--panel); border:1px solid var(--rule); border-radius:3px;
  padding:18px 20px;
}
.page { padding:44px 0 0; }
.page-title {
  margin:0; font-size:clamp(1.7rem,3vw,2.3rem); font-weight:300;
  letter-spacing:-.026em; line-height:1.1;
}
.page-note { margin:14px 0 0; color:var(--ink-2); max-width:62ch; }
.section { margin-top:44px; }
.section-head {
  display:flex; justify-content:space-between; align-items:baseline;
  gap:16px; margin-bottom:10px;
}
.section-title {
  margin:0 0 4px; font-size:1.35rem; font-weight:300; letter-spacing:-.018em;
}
.section-note { margin:0 0 20px; color:var(--ink-2); max-width:62ch; }
.empty { color:var(--ink-3); font-family:var(--mono); font-size:12px; }

.btn {
  font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.11em;
  color:var(--paper); background:var(--ink); border:1px solid var(--ink);
  border-radius:2px; padding:9px 16px; cursor:pointer; text-decoration:none;
  display:inline-block; line-height:1.4;
}
.btn-quiet {
  color:var(--ink-3); background:none; border-color:var(--rule);
  padding:4px 9px; font-size:10px; letter-spacing:.1em;
}
.btn-quiet:hover { color:var(--ink); border-color:var(--ink-3); }
.btn-danger:hover { color:var(--down); border-color:var(--down); }

.field {
  font-family:var(--mono); font-size:13px; color:var(--ink);
  background:var(--panel); border:1px solid var(--rule); border-radius:2px;
  padding:9px 11px;
}
.field::placeholder { color:var(--ink-3); }

.row-form { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.row-form .field { flex:1 1 280px; min-width:0; }

.note {
  font-family:var(--mono); font-size:11px; color:var(--ink-3); margin:10px 0 0;
}

/* Confirmation after a form post. The coloured edge is a second cue only -
   the sentence itself always says what happened. */
.flashes { list-style:none; margin:22px 0 0; padding:0;
  display:flex; flex-direction:column; gap:7px; }
.flash {
  background:var(--panel); border:1px solid var(--rule); border-left:2px solid var(--ink-3);
  border-radius:2px; padding:11px 14px; font-size:13px;
}
.flash-ok { border-left-color:var(--up); }
.flash-bad { border-left-color:var(--down); }

/* The 24-hour grid. Defined here, not with the dashboard, because the landing
   hero overrides its gap - and at equal specificity the later rule wins, so a
   shared primitive has to be declared before the pages that adjust it. */
.grid24 { display:grid; grid-template-columns:repeat(24,1fr); gap:2px; }
.axis { margin-bottom:6px; }
.tick {
  font-family:var(--mono); font-size:10px; color:var(--ink-3);
  font-variant-numeric:tabular-nums; white-space:nowrap;
}

/* a flat list of rows separated by hairlines - used for members and teams */
.rows { border-top:1px solid var(--rule); }
.rows-row {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px;
  padding:11px 0; border-bottom:1px solid var(--rule);
}
.rows-name { font-size:13.5px; word-break:break-word; }
.rows-sub {
  font-family:var(--mono); font-size:11px; color:var(--ink-3); word-break:break-all;
}
.rows-tag {
  font-family:var(--mono); font-size:9.5px; text-transform:uppercase; letter-spacing:.13em;
  color:var(--ink-3); border:1px solid var(--rule); border-radius:2px; padding:2px 7px;
}
.rows-end { margin-left:auto; }

/* ==========================================================================
   Landing - the only page without the shell
   ========================================================================== */

.lander { max-width:1080px; margin:0 auto; padding:0 32px 72px; }
.lander-top {
  display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  padding:22px 0 0;
}

.hero { padding:76px 0 0; }
.hero h1 {
  margin:0; font-size:clamp(2.3rem,6.4vw,4.4rem); font-weight:300;
  letter-spacing:-.032em; line-height:1.02; max-width:15ch;
}
.hero-sub {
  margin:22px 0 0; font-size:clamp(1rem,1.5vw,1.15rem); color:var(--ink-2);
  max-width:52ch; line-height:1.55;
}

/* The signature: the dashboard's own 24-hour band, blown up to poster scale.
   It is the most characteristic object in this product's world, so it opens
   the page instead of a stock illustration - and it is live, not a mockup. */
.hero-plot { margin:52px 0 0; }
.hero-band { height:58px; gap:3px; }
.hero-band .cell { border-radius:2px; }
.hero-foot {
  display:flex; justify-content:space-between; gap:16px; margin-top:9px;
  font-family:var(--mono); font-size:10px; color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.hero-cta { margin:44px 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:16px 20px; }
.hero-cta .btn { padding:13px 24px; font-size:11.5px; }
.hero-note { font-family:var(--mono); font-size:11px; color:var(--ink-3); margin:0; }

.facts {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:28px 36px;
  margin:86px 0 0; padding-top:34px; border-top:1px solid var(--rule);
}
.fact h2 {
  margin:0 0 9px; font-family:var(--mono); font-size:10.5px; text-transform:uppercase;
  letter-spacing:.16em; color:var(--ink-3); font-weight:400;
}
.fact p { margin:0; color:var(--ink-2); line-height:1.6; }
.fact p b { color:var(--ink); font-weight:500; }

.lander-foot {
  margin-top:76px; padding-top:20px; border-top:1px solid var(--rule);
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px 20px;
  font-family:var(--mono); font-size:10.5px; color:var(--ink-3);
}

/* ==========================================================================
   Monitor page - unchanged from the version that has been running
   ========================================================================== */

.verdict { padding:52px 0 46px; }
.verdict-line {
  margin:0; font-size:clamp(1.75rem,4.6vw,3rem); font-weight:300;
  letter-spacing:-.022em; line-height:1.14; max-width:20ch;
  overflow-wrap:anywhere;   /* en lang url skal ikke sprenge forsiden */
}
.verdict-line em { font-style:normal; font-family:var(--mono); font-size:.82em; font-weight:400; }
.verdict-down em { color:var(--down); }
.verdict-meta {
  margin:18px 0 0; font-family:var(--mono); font-size:12px; color:var(--ink-2);
  font-variant-numeric:tabular-nums;
}

.track {
  background:var(--panel); border:1px solid var(--rule); border-radius:3px;
  padding:16px 18px 14px; margin-bottom:10px;
}
.track-head {
  display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; margin-bottom:14px;
}
.site {
  margin:0; font-family:var(--mono); font-size:15px; font-weight:500;
  letter-spacing:-.01em; word-break:break-all;
}
.badge {
  font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.12em;
  padding:3px 8px; border-radius:2px; border:1px solid currentColor; white-space:nowrap;
}
.badge-up { color:var(--up); }
.badge-down { color:var(--down); }
.badge-pending { color:var(--ink-3); }
.metrics { display:flex; flex-wrap:wrap; gap:0 26px; margin:0 0 0 auto; padding:0; }
.metrics div { display:flex; flex-direction:column; gap:1px; }
.metrics dt {
  font-family:var(--mono); font-size:9.5px; text-transform:uppercase;
  letter-spacing:.13em; color:var(--ink-3);
}
.metrics dd {
  margin:0; font-family:var(--mono); font-size:14px; font-variant-numeric:tabular-nums;
}
.unit { font-size:10px; color:var(--ink-3); margin-left:1px; }
.cert-warn { color:var(--down); }
/* kontrollene, samlet i en stripe nederst i kortet ------------------------- */
.controls {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
  gap:8px 18px; margin-top:12px; padding-top:11px; border-top:1px solid var(--rule);
}
.controls form { margin:0; display:flex; align-items:center; gap:5px; }
/* samme stoerrelse som .metrics dt, saa etikettene i kortet leses som ett sett */
.ctl {
  font-family:var(--mono); font-size:9.5px; text-transform:uppercase;
  letter-spacing:.13em; color:var(--ink-3); white-space:nowrap;
}
.controls input {
  font-family:var(--mono); font-size:11px; color:var(--ink);
  background:var(--panel); border:1px solid var(--field); border-radius:2px;
  padding:4px 6px; font-variant-numeric:tabular-nums;
}
.controls input:hover, .controls input:focus { border-color:var(--ink-3); }
.interval input { width:56px; }
/* fast bredde: ellers er de to tidsfeltene ulike og stripa flytter seg
   naar et vindu blir satt */
.maint input { width:88px; }
.dash { color:var(--ink-3); font-size:11px; }
.badge-paused { color:var(--down); border-color:var(--down); }
.meta-paused { color:var(--down); }
.pause { margin:0; }
.pause .btn-danger { color:var(--down); border-color:var(--down); }
/* ukedagene: sju brytere som ser ut som etikettene rundt seg. Selve
   avkrysningsboksen ligger usynlig over ruta, saa tastatur og skjermleser
   faar en vanlig checkbox mens oeyet faar en knapp. */
.days { display:flex; gap:3px; }
.day { position:relative; display:block; }
.day input {
  position:absolute; inset:0; width:100%; height:100%; margin:0;
  opacity:0; cursor:pointer; padding:0; border:0;
}
.day span {
  display:block; font-family:var(--mono); font-size:9.5px; text-transform:uppercase;
  letter-spacing:.06em; line-height:1.2; padding:5px 5px 4px; border-radius:2px;
  color:var(--ink-3); border:1px solid var(--field); background:var(--panel);
  user-select:none;
}
.day:hover span { border-color:var(--ink-3); color:var(--ink); }
.day input:checked + span { color:var(--paper); background:var(--ink); border-color:var(--ink); }
.day input:focus-visible + span { outline:2px solid var(--latency); outline-offset:1px; }
.controls .btn { white-space:nowrap; }
.stop { margin-left:6px; }

.reason {
  font-family:var(--mono); font-size:11.5px; color:var(--down);
  margin:0 0 12px; word-break:break-word;
}

.band { height:18px; }
.cell { border-radius:1px; background:var(--nodata); position:relative; }
.cell-up { background:var(--up); }
.cell-down {
  background:var(--down);
  background-image:repeating-linear-gradient(45deg,transparent 0 3px,var(--hatch) 3px 6px);
}
/* the newest hour is still being recorded - say so rather than implying it is complete */
.cell-current::after {
  content:""; position:absolute; inset:-3px; border:1px solid var(--ink-3);
  border-radius:2px; animation:breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity:.55; } 50% { opacity:0; } }

.cell:hover::before {
  content:attr(data-tip); position:absolute; bottom:calc(100% + 8px); left:50%;
  transform:translateX(-50%); z-index:5; white-space:pre; pointer-events:none;
  background:var(--ink); color:var(--paper); font-family:var(--mono); font-size:10.5px;
  line-height:1.45; padding:6px 8px; border-radius:2px; text-align:left;
}
/* forankre tooltipen i kantene, ellers dytter den ut sidebredden */
.cell-tip-start:hover::before { left:0; transform:none; }
.cell-tip-end:hover::before { left:auto; right:0; transform:none; }
.trace { display:block; width:100%; height:28px; margin-top:5px; overflow:visible; }
.trace polyline { fill:none; stroke:var(--latency); stroke-width:1.75;
  stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.plot-foot {
  display:flex; justify-content:space-between; gap:16px; margin-top:5px;
  font-family:var(--mono); font-size:10px; color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}

/* scroll-margin: hoppet til #log skal ikke klistre overskriften mot kanten */
.log { margin-top:46px; scroll-margin-top:18px; }
.entry {
  display:grid; grid-template-columns:auto auto 1fr; gap:4px 16px; align-items:baseline;
  padding:9px 0; border-bottom:1px solid var(--rule);
  font-family:var(--mono); font-size:12px;
}
.entry-time { color:var(--ink-3); font-variant-numeric:tabular-nums; white-space:nowrap; }
.entry-site { word-break:break-all; }
.entry-what { color:var(--ink-2); }
.entry-down .entry-what { color:var(--down); }
.entry-up .entry-what { color:var(--up); }

.add { margin-top:46px; padding-top:22px; border-top:1px solid var(--rule); }

/* ==========================================================================
   Graphs
   ========================================================================== */

/* the range filter sits in one row above every chart it governs */
.ranges { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 26px; }
.ranges a {
  font-family:var(--mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.11em;
  color:var(--ink-3); text-decoration:none; border:1px solid var(--rule);
  border-radius:2px; padding:6px 12px;
}
.ranges a:hover { color:var(--ink); border-color:var(--ink-3); }
.ranges a.on { color:var(--paper); background:var(--ink); border-color:var(--ink); }

.tiles {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:10px;
  margin-bottom:38px;
}
.tile {
  background:var(--panel); border:1px solid var(--rule); border-radius:3px;
  padding:14px 16px 15px;
}
.tile dt {
  font-family:var(--mono); font-size:9.5px; text-transform:uppercase;
  letter-spacing:.13em; color:var(--ink-3); margin-bottom:6px;
}
/* a hero number is prose-scale, so it keeps proportional figures - tabular-nums
   is for columns that must line up, which these do not */
.tile dd {
  margin:0; font-size:1.85rem; font-weight:300; letter-spacing:-.025em; line-height:1;
}
.tile dd .unit { font-size:.8rem; font-weight:400; letter-spacing:0; }
.tile dd.small { font-family:var(--mono); font-size:.95rem; font-weight:400;
  letter-spacing:-.01em; word-break:break-all; line-height:1.35; }
.tile-good dd { color:var(--up); }
.tile-bad dd { color:var(--down); }

.chart { margin-bottom:34px; }
.chart-head { display:flex; justify-content:space-between; align-items:baseline;
  gap:16px; margin-bottom:12px; }
.chart-title { margin:0; font-size:14px; font-weight:500; }
.chart-note { font-family:var(--mono); font-size:10px; color:var(--ink-3); }

/* downtime per day - one bar per day, a single series, so one hue and no legend */
/* the baseline is what makes a zero day legible: with an axis to sit on,
   "measured, nothing wrong" and "never checked" stop looking alike */
.days { display:flex; align-items:flex-end; gap:3px; height:132px;
  padding:0; margin:0; list-style:none; border-bottom:1px solid var(--ink-3); }
.day { flex:1 1 0; min-width:0; display:flex; flex-direction:column;
  justify-content:flex-end; height:100%; position:relative; }
.day-fill {
  /* 4px rounded data-end anchored to the baseline; a zero day still shows a
     hairline so the reader can tell "none" from "no data" */
  background:var(--down); border-radius:4px 4px 0 0; min-height:2px;
}
.day-zero .day-fill { background:var(--nodata); }
.day:hover::before,
.sparkhits span:hover::before {
  content:attr(data-tip); position:absolute; bottom:calc(100% + 8px); left:50%;
  transform:translateX(-50%); z-index:5; white-space:pre; pointer-events:none;
  background:var(--ink); color:var(--paper); font-family:var(--mono); font-size:10.5px;
  line-height:1.45; padding:6px 8px; border-radius:2px; text-align:left;
}
.day:first-child:hover::before,
.sparkhits span:first-child:hover::before { left:0; transform:none; }
.day:last-child:hover::before,
.sparkhits span:last-child:hover::before { left:auto; right:0; transform:none; }
.days-axis { display:flex; gap:3px; margin-top:6px; }
.days-axis span {
  flex:1 1 0; min-width:0; text-align:center; font-family:var(--mono); font-size:9.5px;
  color:var(--ink-3); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden;
}
.days-scale {
  display:flex; justify-content:space-between; margin-top:8px;
  font-family:var(--mono); font-size:10px; color:var(--ink-3);
}

/* response time, one small multiple per site - each facet is a single series,
   which is why there is no legend anywhere on this page */
.facet { border-top:1px solid var(--rule); padding:14px 0 16px; }
.facet-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 16px; }
.facet-name { font-family:var(--mono); font-size:12.5px; word-break:break-all; margin:0; }
.facet-stat { margin-left:auto; font-family:var(--mono); font-size:11px;
  color:var(--ink-2); font-variant-numeric:tabular-nums; }
/* An invisible grid laid over the sparkline gives per-bucket tooltips with no
   JavaScript at all - the same trick the dashboard's hour band uses, and the
   reason the hit target is comfortably wider than the line itself. */
.sparkwrap { position:relative; margin-top:9px; }
.sparkhits { position:absolute; inset:0; display:grid; }
.sparkhits span { position:relative; }
.spark { display:block; width:100%; height:46px; overflow:visible; }
.spark polyline { fill:none; stroke:var(--latency); stroke-width:2;
  stroke-linejoin:round; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.spark .gap { stroke:var(--nodata); stroke-width:2; stroke-dasharray:2 3; }
.facet-foot { display:flex; justify-content:space-between; gap:16px; margin-top:5px;
  font-family:var(--mono); font-size:10px; color:var(--ink-3);
  font-variant-numeric:tabular-nums; }

/* the table view - the same numbers as the charts, readable without color */
.tablewrap { overflow-x:auto; }
table.data { width:100%; border-collapse:collapse; font-family:var(--mono); font-size:12px; }
table.data th, table.data td {
  text-align:right; padding:9px 10px; border-bottom:1px solid var(--rule);
  white-space:nowrap; font-variant-numeric:tabular-nums;
}
table.data th {
  font-size:9.5px; text-transform:uppercase; letter-spacing:.12em; color:var(--ink-3);
  font-weight:400; border-bottom-color:var(--ink-3);
}
table.data th:first-child, table.data td:first-child {
  text-align:left; white-space:normal; word-break:break-all; min-width:180px;
}
table.data td.bad { color:var(--down); }

/* ==========================================================================
   Quality floor
   ========================================================================== */

:focus-visible { outline:2px solid var(--latency); outline-offset:2px; }
@media (prefers-reduced-motion: reduce) { *,*::after { animation:none !important; } }

@media (max-width:860px) {
  /* the sidebar becomes a strip across the top - no drawer, no JS, nothing to
     break on the one page you open while something is on fire */
  .shell { display:block; }
  .rail {
    position:static; width:auto; height:auto; flex-basis:auto;
    border-right:0; border-bottom:1px solid var(--rule); padding:16px 0 0;
  }
  .nav { flex-direction:row; margin-top:14px; overflow-x:auto; }
  .nav a { padding:9px 14px; white-space:nowrap; }
  .nav a.on::before { left:0; right:0; top:auto; bottom:0; transform:none;
    width:auto; height:2px; }
  .rail-foot {
    margin-top:0; border-top:1px solid var(--rule); padding:12px 20px;
    display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 14px;
  }
  .rail-mail { display:none; }
  .rail-out { margin-top:0; margin-left:auto; }
  .topbar { padding:18px 16px 12px; }
  .wrap { padding:0 16px 56px; }
  .lander { padding:0 16px 56px; }
}

@media (max-width:560px) {
  .metrics { margin-left:0; gap:0 20px; }
  .controls { justify-content:flex-start; gap:8px 12px; }
  .stop { margin-left:0; }
  .tick-minor { visibility:hidden; }
  .entry { grid-template-columns:1fr; gap:2px; }
  .entry-site { word-break:break-all; }
  .hero { padding:48px 0 0; }
  .hero-band { height:44px; gap:2px; }
  .facts { margin-top:60px; }
  .facet-stat { margin-left:0; }
}
