@font-face {
  font-family: "Sofia Sans";
  src: url("/fonts/sofia-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --line: #e3e3e8;
  --text: #19191d;
  --muted: #62626b;
  --brand: #d9545a;
  --glow: rgba(242, 120, 120, .18);
  --ok: #1f9d63;
  --minor: #c98a10;
  --major: #d43d3d;
  --maint: #3d6fe0;
  --empty: #d7d7dd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141417;
    --surface: #1c1c20;
    --line: #2c2c32;
    --text: #f2f2f4;
    --muted: #a1a1ab;
    --brand: #f48a8a;
    --glow: rgba(150, 46, 46, .38);
    --ok: #3ecf8e;
    --minor: #f2b544;
    --major: #f06464;
    --maint: #7aa2ff;
    --empty: #34343b;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Sofia Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: radial-gradient(1100px 520px at 105% -12%, var(--glow), transparent 70%), var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top-inner { display: flex; align-items: center; gap: 14px; height: 76px; }
.brand img { display: block; height: 26px; width: auto; }
.brand-sub { color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.2; }
.follow { margin-left: auto; font-size: 15px; color: var(--muted); text-decoration: none; }
.follow:hover { color: var(--text); text-decoration: underline; }

/* Hero: the status as a sentence */
.hero { margin: 44px 0 40px; padding-left: 22px; border-left: 5px solid var(--empty); }
.hero h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.12; font-weight: 750; letter-spacing: -.015em; margin: 0 0 10px; max-width: 22ch; }
.checked { margin: 0; color: var(--muted); font-size: 15px; }
.hero.s-operationeel { border-left-color: var(--ok); }
.hero.s-verstoring { border-left-color: var(--minor); }
.hero.s-storing { border-left-color: var(--major); }
.hero.s-onderhoud { border-left-color: var(--maint); }

/* Sections */
.section { margin: 0 0 44px; }
.section h2 { font-size: 21px; font-weight: 700; margin: 0 0 14px; letter-spacing: -.005em; }
.explain { color: var(--muted); font-size: 14px; margin: 10px 2px 0; }

/* Active incident as a timeline */
.incident { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px 22px; margin-bottom: 40px; }
.incident h2, .incident h3 { font-size: 21px; line-height: 1.3; margin: 0 0 4px; }
.incident .since { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 9px; bottom: -9px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.timeline li:first-child::after { background: var(--brand); box-shadow: 0 0 0 4px var(--glow); }
.timeline .when { font-size: 14px; color: var(--muted); }
.timeline .kind { font-weight: 700; }
.timeline p { margin: 2px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 15px; }
.links a { color: var(--brand); }

/* Components as rows */
.components { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.row { padding: 16px 22px 18px; }
.row + .row { border-top: 1px solid var(--line); }
.row-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.row-head .name { font-weight: 650; }
.row-head .group { color: var(--muted); font-size: 14px; }
.row-head .state { margin-left: auto; font-weight: 650; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.state.s-operationeel { color: var(--ok); }
.state.s-verstoring { color: var(--minor); }
.state.s-storing { color: var(--major); }
.state.s-onderhoud { color: var(--maint); }
.state.s-onbekend { color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(45, 1fr); gap: 2px; height: 26px; margin-top: 10px; }
.strip span { border-radius: 2px; background: var(--empty); }
.strip .ok { background: var(--ok); }
.strip .minor { background: var(--minor); }
.strip .major { background: var(--major); }
.strip-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; }

/* Maintenance */
.maint { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--maint); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.maint h3 { margin: 0 0 2px; font-size: 18px; }
.maint .since { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.maint p { margin: 0; }

/* History */
.day { display: grid; grid-template-columns: 170px 1fr; gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day .date { color: var(--muted); }
.day .none { color: var(--muted); }
.day details summary { cursor: pointer; font-weight: 650; }
.day details[open] summary { margin-bottom: 12px; }
.day details .incident { margin-bottom: 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 26px 0 44px; color: var(--muted); font-size: 15px; }
.foot p { margin: 0 0 8px; max-width: 62ch; }
.foot a { color: var(--text); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .top-inner { height: 64px; }
  .brand-sub { display: none; }
  .follow { font-size: 14px; }
  .hero { margin: 30px 0 32px; padding-left: 16px; }
  .incident { padding: 20px 18px; }
  .row { padding: 14px 16px 16px; }
  .strip { grid-template-columns: repeat(30, 1fr); }
  .strip span:nth-child(-n+15) { display: none; }
  .day { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .timeline li:first-child::after { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
}
