/*
 * Served as a static file, so it is cached and never starts the Worker. Same
 * tokens as rosarealism.com; dark follows the device setting.
 */

/*
 * Fraunces and Instrument Sans, served from /fonts rather than Google Fonts,
 * so a visitor's browser asks no one else for them. Variable files, cut to
 * Latin and Latin Extended; the OFL license for each sits next to them.
 */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f5ede5;
  --wash: #efe2d4;
  --surface: #f9f4ee;
  --raised: #fbf7f2;
  --sunken: #efe6dc;
  --line: rgba(92, 61, 46, 0.14);
  --edge: rgba(92, 61, 46, 0.26);
  --ink: #3b2a1f;
  --muted: #6b584b;
  --faint: #8a776a;
  --forest: #4a5c3d;
  --accent: #556232;
  --on-accent: #f5ede5;
  --shadow: 0 1px 2px -1px rgb(92 61 46 / 0.18), 0 6px 18px -10px rgb(92 61 46 / 0.35);

  --operational: #4f8a4b;
  --degraded: #c2703f;
  --down: #b54848;
  --maintenance: #3d6976;
  --unmonitored: #9a8f84;
  --empty: rgba(92, 61, 46, 0.14);

  --display: 'Fraunces', ui-serif, Georgia, serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #191410;
    --wash: #211a15;
    --surface: #1f1914;
    --raised: #241d17;
    --sunken: #16110d;
    --line: rgba(230, 219, 205, 0.1);
    --edge: rgba(230, 219, 205, 0.2);
    --ink: #e6dbcd;
    --muted: #b8aa9b;
    --faint: #8f8375;
    --forest: #a9c08c;
    --accent: #a8bd7f;
    --on-accent: #191410;
    --shadow: 0 1px 2px -1px rgb(0 0 0 / 0.4), 0 8px 22px -12px rgb(0 0 0 / 0.6);

    --operational: #7fb873;
    --degraded: #e3a06d;
    --down: #e58b8b;
    --maintenance: #7fb8c9;
    --unmonitored: #7b7167;
    --empty: rgba(230, 219, 205, 0.1);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 30rem at 50% -10rem, var(--wash), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: -999px; top: 12px; z-index: 10;
  background: var(--forest); color: var(--on-accent); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Header */

.top { padding: 22px 0 0; }
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--forest); text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.brand-name { font: 500 1.3rem/1.1 var(--display); letter-spacing: -0.01em; }
.brand-sub { display: block; font: 500 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: 500 0.92rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--edge); background: transparent; color: var(--ink);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.button.primary { background: var(--forest); border-color: var(--forest); color: var(--on-accent); box-shadow: var(--shadow); }
.short { display: none; }
.button.quiet { border-color: transparent; color: var(--muted); padding: 0 12px; }
.button.quiet:hover { color: var(--accent); border-color: var(--line); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.tabs { display: flex; gap: 8px; margin-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.tabs a:hover { color: var(--ink); border-color: var(--edge); }
.tabs a[aria-current='page'] { background: var(--raised); color: var(--ink); border-color: var(--edge); box-shadow: var(--shadow); }

/* main.wrap, because .wrap's side padding would otherwise reset the top and bottom. */
main.wrap { padding-top: 28px; padding-bottom: 56px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; color: var(--forest); margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.15; }
h2 { font-size: 1.35rem; line-height: 1.2; }
h3 { font-size: 1.08rem; line-height: 1.3; }
p { margin: 0; }
.lead { color: var(--muted); margin-top: 8px; max-width: 46rem; }
.small { font-size: 0.86rem; }
.faint { color: var(--faint); }
.muted { color: var(--muted); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.card { background: var(--raised); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.pad { padding: 20px; }
@media (min-width: 640px) { .pad { padding: 22px 26px; } }

/* States */

.s-operational { --state: var(--operational); }
.s-degraded { --state: var(--degraded); }
.s-down { --state: var(--down); }
.s-maintenance { --state: var(--maintenance); }
.s-unmonitored { --state: var(--unmonitored); }

.state-icon { color: var(--state); display: inline-flex; flex: none; }
.state-word { color: var(--state); font-weight: 500; font-size: 0.9rem; white-space: nowrap; }

/* Banner */

.banner { border-radius: 20px; border: 1px solid color-mix(in srgb, var(--state) 40%, transparent);
  background: color-mix(in srgb, var(--state) 12%, var(--raised)); box-shadow: var(--shadow); }
.banner > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 20px 22px; }
.banner > summary::-webkit-details-marker { display: none; }
.banner .big-icon { color: var(--state); display: inline-flex; }
.banner h1 { color: var(--ink); font-size: clamp(1.4rem, 3.4vw, 1.85rem); }
.banner .checked { color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
.banner .chev { margin-left: auto; color: var(--faint); transition: transform 0.2s; display: inline-flex; }
.banner[open] .chev { transform: rotate(180deg); }
.banner .about { margin: 0 22px 20px; padding-left: 14px; border-left: 3px solid var(--state); color: var(--muted); max-width: 46rem; }

/* Notes and incidents */

.event { border-left: 4px solid var(--state); }
.event + .event { margin-top: 12px; }
.event-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 500;
  color: var(--state, var(--muted)); background: color-mix(in srgb, var(--state, var(--muted)) 14%, transparent); white-space: nowrap; }
.body-text { white-space: pre-wrap; color: var(--ink); margin-top: 10px; overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.facts b { font-weight: 500; color: var(--ink); }
.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding-bottom: 14px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--state, var(--faint)); box-shadow: 0 0 0 3px var(--raised); }
.timeline .when { font-size: 0.82rem; color: var(--faint); }

/* Services */

.group + .group { margin-top: 34px; }
.group-head { margin-bottom: 12px; }
.group-head p { color: var(--faint); font-size: 0.86rem; margin-top: 2px; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.chev { color: var(--faint); display: inline-flex; flex: none; transition: transform 0.2s; transform: rotate(-90deg); }
details[open] > summary > .chev { transform: rotate(0deg); }

/* One service: a card with its own bar, and its parts nested under it. */
.svc { overflow: hidden; }
.svc + .svc { margin-top: 12px; }
.svc > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 18px; min-height: 60px; }
.svc > summary:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.svc-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.svc-name .name { display: block; font-weight: 600; color: var(--ink); }
.svc-name .about { display: block; color: var(--faint); font-size: 0.82rem; }
.svc-right, .sub-right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.uptime { color: var(--muted); font-size: 0.86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-body { border-top: 1px solid var(--line); padding: 14px 18px 18px; background: color-mix(in srgb, var(--ink) 2%, transparent); }

/* The parts, hanging off a line on the left the way a tree does. */
.subs { margin: 16px 0 0 8px; padding-left: 16px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.sub { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; }
.sub::before { content: ''; position: absolute; left: -18px; top: 22px; width: 16px; height: 14px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 10px; transform: translateY(-12px); }
.sub > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; min-height: 48px; }
.sub > summary:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); border-radius: 14px; }
.sub-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; font-size: 0.94rem; }
.sub-name > span:last-child { overflow-wrap: anywhere; }
.sub-mini { width: 9rem; display: flex; }
.sub[open] .sub-mini { visibility: hidden; }
.sub-body { padding: 2px 14px 14px; }
.part-about { font-size: 0.82rem; color: var(--faint); margin-bottom: 10px; }

@media (max-width: 640px) {
  .svc > summary { padding: 12px 14px; }
  .svc-body { padding: 12px 14px 14px; }
  .svc-name .about { display: none; }
  .svc-right { flex-direction: column; align-items: flex-end; gap: 2px; }
  .sub > summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .sub-mini { display: none; }
  .sub-right { flex-direction: column; align-items: flex-end; gap: 2px; }
  .subs { margin-left: 2px; padding-left: 12px; }
  .sub::before { left: -14px; width: 12px; }
}

/* Bars */

.bar-wrap { display: grid; gap: 7px; }
.bar-ends { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--faint); font-weight: 500; }
.bar { display: flex; align-items: center; gap: 4px; min-height: 22px; border-radius: 8px; cursor: pointer; touch-action: manipulation; }
.bar.mini { min-height: 10px; gap: 2px; cursor: default; width: 100%; }
.bar.mini .run { height: 4px; }
.bar.mini .dot { width: 4px; height: 4px; }
/* Runs and dots share one height, so a bad day sits in the line rather than above it.
   Days without data are a thin track, so the measured days stand out. */
.run { height: 8px; border-radius: 999px; background: var(--state, var(--empty)); min-width: 8px; }
.run.none { background: var(--empty); height: 2px; opacity: 0.5; }
.run.future { background: var(--empty); height: 2px; opacity: 0.3; }
.run.trouble { display: flex; min-width: 16px; }
.run.trouble > span { flex: 1; }
.bar.mini .run.trouble { min-width: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--state); flex: none; }

/* The note on a day */

.pop { position: absolute; z-index: 30; width: min(19rem, calc(100vw - 16px)); border-radius: 14px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--edge); box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.45); }
.pop-head { padding: 12px 16px; background: color-mix(in srgb, var(--state) 16%, var(--raised)); border-bottom: 1px solid var(--line); }
.pop-state { color: var(--state); font-weight: 600; font-size: 1rem; }
.pop-length { color: var(--state); font-size: 0.8rem; margin-top: 2px; }
.pop-date { padding: 12px 16px; font-weight: 600; font-size: 0.9rem; color: var(--ink); display: grid; gap: 4px; }
.pop-date p { font-weight: 400; }
.pop-date p:first-child { font-weight: 600; }
.pop-list { border-top: 1px solid var(--line); padding: 10px 10px 12px; background: var(--sunken); display: grid; gap: 6px; }
.pop-kind { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 0 6px; }
.pop-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9rem; background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--state); }
.pop-link:hover { border-color: var(--edge); border-left-color: var(--state); text-decoration: none; }
.pop-go { color: var(--faint); font-size: 1.2rem; }

/* Happening now */

.open-list { display: grid; gap: 10px; }
.open-incident { display: grid; gap: 8px; padding: 16px 18px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--state);
  background: color-mix(in srgb, var(--state) 8%, var(--raised)); }
.open-incident:hover { text-decoration: none; border-color: var(--edge); border-left-color: var(--state); }
.open-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.open-title { font: 500 1.08rem/1.3 var(--display); color: var(--ink); flex: 1; min-width: 12rem; }
.open-body { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.open-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 0.84rem; color: var(--faint); }
.open-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; }

/* Map */

.map { margin: 0; padding: 12px; overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.marker { cursor: pointer; outline: none; }
.marker .hit { fill: transparent; }
.marker .pin { fill: var(--state); stroke: var(--raised); stroke-width: 1.5; }
.m-colo .pin { opacity: 0.75; }
.m-colo.s-operational .pin { fill: color-mix(in srgb, var(--operational) 70%, var(--faint)); }
.m-rosa .pin { stroke-width: 2.5; }
.m-you .pin { fill: var(--accent); }
.m-checks .pin { fill: var(--raised); stroke: var(--accent); stroke-width: 2.5; }
.marker .pulse { fill: none; stroke: var(--state); stroke-width: 2; opacity: 0.5; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
.marker:focus-visible .pin, .marker:hover .pin { stroke: var(--ink); stroke-width: 2.5; }
@keyframes pulse { from { transform: scale(0.6); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
.map-key { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 6px 2px; font-size: 0.84rem; color: var(--muted); }
.map-key span { display: inline-flex; align-items: center; gap: 7px; }
.map-key i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.k-rosa { background: var(--operational); box-shadow: 0 0 0 2px var(--raised), 0 0 0 3px var(--operational); }
.k-colo { background: color-mix(in srgb, var(--operational) 70%, var(--faint)); opacity: 0.8; }
.k-you { background: var(--accent); }
.k-checks { background: var(--raised); box-shadow: inset 0 0 0 2.5px var(--accent); }

.place-list { list-style: none; margin: 0; padding: 4px 18px; }
.place-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.place-list li:last-child { border-bottom: 0; }
.place-list .part-name { display: block; font-weight: 500; }
.place-list .part-about { display: block; margin: 0; }
.grow { flex: 1; min-width: 0; }

/* Legend */

.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 0.86rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .legend-note { color: var(--faint); margin-left: auto; }

.strip { display: flex; gap: 2px; align-items: flex-end; height: 34px; }
.strip span { flex: 1; border-radius: 3px; background: var(--state, var(--operational)); min-height: 4px; }
.strip span.none { background: var(--empty); }

/* Tiles */

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: 16px 18px; }
.tile .label { font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.tile .value { font: 500 1.9rem/1.1 var(--display); margin-top: 6px; color: var(--state, var(--ink)); font-variant-numeric: tabular-nums; }

.where { display: flex; align-items: center; gap: 14px; }
.where .pin { color: var(--accent); display: inline-flex; }

.latency { display: grid; gap: 10px; }
.latency .row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px 18px; }
@media (min-width: 720px) { .latency .row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; align-items: center; } }
.latency .numbers { display: flex; gap: 16px; font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.latency .numbers b { color: var(--ink); font-weight: 500; }

/* History */

.years { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.years a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 500; }
.years a[aria-current='page'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.month { overflow: hidden; }
.month + .month { margin-top: 12px; }
.month > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 60px; }
.month > summary:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.month .month-name { font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.month .month-up { margin-left: auto; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.month-body { border-top: 1px solid var(--line); padding: 14px 18px 18px; }

/* A day per row, with a line in that day's color down its left side. */
.day-list { list-style: none; margin: 0; padding: 0; }
.day-row { border-left: 3px solid var(--state); padding: 6px 0 6px 14px; }
.day-row.none { border-left-color: var(--empty); }
.day-row + .day-row:not(.s-operational) { margin-top: 8px; }
.day-row:not(.s-operational) + .day-row { margin-top: 8px; }
.day-row .day { font-size: 0.9rem; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
.day-row .day span { color: var(--faint); margin-left: 8px; font-weight: 400; }
.entry { margin-top: 10px; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.entry-head h3 { font-family: var(--sans); font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.entry-head h3 a { color: inherit; text-decoration: none; }
.entry-head h3 a:hover { text-decoration: underline; }
.entry-time { font-size: 0.78rem; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry .body-text { color: var(--muted); margin-top: 4px; }

/* One incident */

.crumbs { display: flex; gap: 8px; color: var(--faint); margin-bottom: 14px; }
.incident { overflow: hidden; border-color: color-mix(in srgb, var(--state) 35%, var(--line)); }
.incident-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding: 16px 20px;
  background: color-mix(in srgb, var(--state) 14%, var(--raised)); border-bottom: 1px solid var(--line); }
.incident-head h1 { font-family: var(--sans); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.incident-impact { color: var(--state); font-size: 0.88rem; font-weight: 500; }
.incident-ref { margin: 12px 20px 0; }
.incident-ref code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; user-select: all; }
.chip-row { padding: 14px 20px 0; }
.chip-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 8px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pop-affects { font-size: 0.78rem; color: var(--faint); margin: -2px 0 4px; padding: 0 2px; }
.chips li { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--edge); font-size: 0.84rem; font-weight: 500; color: var(--muted); background: var(--surface); }
.updates { list-style: none; margin: 0; padding: 14px 20px 6px; display: grid; gap: 16px; }
.update { border-left: 3px solid var(--state); padding-left: 14px; }
.update h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.latest-tag { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--operational); border: 1px solid var(--operational); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.update .body-text { margin-top: 4px; }
.update:not(.latest) .body-text { color: var(--muted); }
.update-time { font-size: 0.8rem; color: var(--faint); margin-top: 6px; }

/* A time in UTC, with the reader's own time above it on hover or focus. */
.stamp[data-local] { position: relative; cursor: help; border-radius: 4px; text-decoration: underline dotted color-mix(in srgb, var(--faint) 60%, transparent); text-underline-offset: 3px; }
.stamp[data-local]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stamp[data-local]::after { content: attr(data-local); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30; padding: 5px 9px; border-radius: 8px;
  white-space: nowrap; font-size: 0.78rem; font-weight: 500; color: var(--ink); background: var(--raised); border: 1px solid var(--edge); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(2px); transition: opacity 0.12s, transform 0.12s, visibility 0.12s; pointer-events: none; }
.entry-time .stamp[data-local]::after { left: auto; right: 0; }
.stamp[data-local]:hover::after, .stamp[data-local]:focus::after { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .stamp[data-local]::after { transition: none; } }
.earlier { display: flex; align-items: center; gap: 12px; margin: 8px 20px 0; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.earlier::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.incident-lasted { padding: 4px 20px 18px; }


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .marker .pulse { animation: none; opacity: 0.4; }
}


/* On a phone the three tabs share the width, so none is cut off, and the
   three header buttons sit in one even row under the name. */
@media (max-width: 560px) {
  .tabs a { flex: 1 1 0; justify-content: center; padding: 0 6px; gap: 6px; font-size: 0.86rem; white-space: nowrap; }
  .tabs a svg { display: none; }
  .actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actions .button { padding: 0 8px; font-size: 0.86rem; }
  .actions .long { display: none; }
  .actions .short { display: inline; }
}
