/* ResinCraft Status: "Amethyst Lab" (see web/DESIGN.md). The posting page loads this too, with admin.css on top. */

/* ---------- Fonts (published under the website's /assets/fonts/) ---------- */
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/assets/fonts/martian-mono-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-thai-thai-400-normal.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-thai-thai-600-normal.woff2') format('woff2');
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* ---------- Tokens ---------- */
:root {
  /* Blueprint paper (light). */
  --bg: #eef2f2;
  --bg-2: #e4eaeb;
  --panel: #f8faf9;
  --panel-2: #eaf0f0;
  --line: #cfd9db;
  --line-strong: #aebcc0;
  --text: #0e171d;
  --muted: #4a5a64;
  --faint: #7b8a93;
  --violet: #7c3aed;
  --violet-ink: #6526d9;
  --violet-deep: #43169a;
  --violet-soft: #7c3aed14;
  --violet-glow: #8b46ff55;
  --copper: #b4622b;
  --copper-soft: #b4622b1a;
  --link: #0b67a0;
  --lit: #1f9d55;
  --lit-glow: #2ee07a66;
  --ok: #1f8a4c;
  --warn: #a8650a;
  --bad: #c41e1e;
  --nav-bg: #eef2f2d9;
  --grid-minor: #0b67a00d;
  --grid-major: #0b67a01a;
  --shadow-sm: 0 1px 0 #ffffffb3 inset, 0 1px 2px #0e171d14;
  --shadow: 0 1px 0 #ffffffb3 inset, 0 12px 30px -14px #0e171d33;
  --shadow-lg: 0 40px 80px -30px #0e171d40;
  --radius: 6px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --display: 'Martian Mono', 'IBM Plex Sans Thai', ui-monospace, Consolas, monospace;
  --font: 'Hanken Grotesk', 'IBM Plex Sans Thai', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Martian Mono', 'IBM Plex Sans Thai', ui-monospace, Consolas, monospace;

  /* Status levels (names the scripts use: admin.js sets --state to var(--slow) etc.). */
  --up: var(--lit);
  --slow: var(--warn);
  --part: var(--copper);
  --down: var(--bad);
  --maint: var(--link);
  --none: #d3dcde;            /* a day with no data */
  --up-soft: color-mix(in srgb, var(--lit) 12%, transparent);
  --down-soft: color-mix(in srgb, var(--bad) 10%, transparent);
  --ink-mix: 78%;             /* state colours as text: darkened a little on paper for contrast */
  --accent: var(--violet);       /* old name, kept for anything that still uses it */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    /* Graphite (dark). */
    --bg: #101318;
    --bg-2: #0c0f13;
    --panel: #161a21;
    --panel-2: #1c212a;
    --line: #262c37;
    --line-strong: #36404f;
    --text: #e9edf2;
    --muted: #9aa5b4;
    --faint: #6b7686;
    --violet: #8b46ff;
    --violet-ink: #b28cff;
    --violet-deep: #4c1d95;
    --violet-soft: #8b46ff24;
    --violet-glow: #8b46ff66;
    --copper: #e08a4f;
    --copper-soft: #e08a4f1f;
    --link: #7fd1ff;
    --lit: #3ee08f;
    --lit-glow: #3ee08f66;
    --ok: #3ee08f;
    --warn: #ffc24a;
    --bad: #ff5a5a;
    --nav-bg: #101318d9;
    --grid-minor: #7fd1ff08;
    --grid-major: #7fd1ff12;
    --shadow-sm: 0 1px 0 #ffffff08 inset, 0 1px 2px #0008;
    --shadow: 0 1px 0 #ffffff0a inset, 0 14px 40px -16px #000c;
    --shadow-lg: 0 50px 110px -30px #000e;
    --none: #2a313c;
    --ink-mix: 100%;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #101318;
  --bg-2: #0c0f13;
  --panel: #161a21;
  --panel-2: #1c212a;
  --line: #262c37;
  --line-strong: #36404f;
  --text: #e9edf2;
  --muted: #9aa5b4;
  --faint: #6b7686;
  --violet: #8b46ff;
  --violet-ink: #b28cff;
  --violet-deep: #4c1d95;
  --violet-soft: #8b46ff24;
  --violet-glow: #8b46ff66;
  --copper: #e08a4f;
  --copper-soft: #e08a4f1f;
  --link: #7fd1ff;
  --lit: #3ee08f;
  --lit-glow: #3ee08f66;
  --ok: #3ee08f;
  --warn: #ffc24a;
  --bad: #ff5a5a;
  --nav-bg: #101318d9;
  --grid-minor: #7fd1ff08;
  --grid-major: #7fd1ff12;
  --shadow-sm: 0 1px 0 #ffffff08 inset, 0 1px 2px #0008;
  --shadow: 0 1px 0 #ffffff0a inset, 0 14px 40px -16px #000c;
  --shadow-lg: 0 50px 110px -30px #000e;
  --none: #2a313c;
  --ink-mix: 100%;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
[hidden] { display: none !important; }

/* Status levels: one --state colour per class. */
.up { --state: var(--up); }
.slow { --state: var(--slow); }
.down { --state: var(--down); }
.part { --state: var(--part); }
.maint { --state: var(--maint); }
.unknown, .none { --state: var(--faint); }

/* ---------- Header ---------- */
.top {
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-family: var(--display); font-size: 14px; font-weight: 400; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { flex: none; }
.brand b { font-weight: 700; }
.top-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.top-links a { color: var(--muted); white-space: nowrap; }
.top-links a:hover { color: var(--text); }
.top-links .report-link { font-weight: 600; color: var(--link); }
.subscribe-link { font-weight: 600; }
.back { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; }

/* ---------- Cards: blueprint corner ticks ---------- */
.summary, .group, .report {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.summary::before, .summary::after,
.group::before, .group::after,
.report::before, .report::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--line-strong);
  pointer-events: none;
  transition: border-color .2s var(--ease);
}
.summary::before, .group::before, .report::before { top: 6px; left: 6px; border-top-width: 2px; border-left-width: 2px; }
.summary::after, .group::after, .report::after { right: 6px; bottom: 6px; border-right-width: 2px; border-bottom-width: 2px; }
.summary:hover::before, .summary:hover::after,
.group:hover::before, .group:hover::after,
.report:hover::before, .report:hover::after { border-color: var(--violet); }

/* ---------- Status lamp ---------- */
.dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--state, var(--faint));
}
.dot::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 3px;
  box-shadow: 0 0 10px 2px var(--state, transparent);
  opacity: 0;
}
.up .dot { background: var(--lit); }
.up .dot::after { box-shadow: 0 0 10px 3px var(--lit-glow); opacity: 1; animation: breathe 2.8s ease-in-out infinite; }
.slow .dot::after, .down .dot::after, .part .dot::after { opacity: .35; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Overall banner ---------- */
.summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 32px 0 24px;
  padding: 24px 26px;
  border-left: 4px solid var(--state, var(--line-strong));
}
.summary h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.summary p { margin: 4px 0 0; font-size: 14px; }
.summary .dot { width: 14px; height: 14px; border-radius: 3px; }
.summary.up { background: linear-gradient(90deg, color-mix(in srgb, var(--lit) 7%, var(--panel)), var(--panel) 55%); }
.summary.slow, .summary.part, .summary.down, .summary.maint {
  background: linear-gradient(90deg, color-mix(in srgb, var(--state) 9%, var(--panel)), var(--panel) 60%);
}
.loading .dot { background: var(--faint); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- Notices ---------- */
.notice {
  margin: 0 0 16px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--state, var(--copper));
  box-shadow: var(--shadow-sm);
}
.notice h3 { font-size: 15px; margin-bottom: 4px; }
.notice p { margin: 4px 0 0; white-space: pre-line; }
.notice .when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------- Groups and parts ---------- */
.group { margin: 0 0 20px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 22px 13px; border-bottom: 1px solid var(--line); }
.group-head h2, .sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-head h2::before, .sec-title::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--copper); }
.group-head .extra { font-family: var(--mono); font-size: 11.5px; color: var(--copper); white-space: nowrap; }
.comp { padding: 18px 22px 15px; }
.comp + .comp { border-top: 1px solid var(--line); }
.comp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comp-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.comp-name h3 { font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.comp-about { margin: 2px 0 0 20px; font-size: 13.5px; color: var(--muted); }
.state {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: color-mix(in srgb, var(--state) var(--ink-mix), var(--text));
}

/* 90-day uptime */
.bars { display: flex; gap: 2px; height: 32px; margin: 14px 0 7px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 1px; background: var(--none); cursor: default; transition: opacity .15s var(--ease); }
.bar.up { background: var(--up); }
.bar.slow { background: var(--slow); }
.bar.down { background: var(--down); }
.bar.part { background: var(--part); }
.bar.maint { background: var(--maint); }
.bars:hover .bar { opacity: .45; }
.bars .bar:hover { opacity: 1; }
.scale { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.scale .mid { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; }
.scale .mid::before, .scale .mid::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.d30 { display: none; }

/* ---------- Posted incidents and maintenance ---------- */
.sec-title { margin: 8px 0 12px; }
.incident {
  margin: 0 0 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--state);
  overflow: hidden;
}
.incident.live { box-shadow: var(--shadow); }
.day .incident { margin: 8px 0 0; border-radius: var(--radius); }
.inc-head { padding: 14px 18px 10px; }
.incident.live .inc-head { background: color-mix(in srgb, var(--state) 10%, transparent); border-bottom: 1px solid var(--line); }
.inc-head h3 { font-size: 15px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.day .inc-head { padding: 10px 14px 4px; }
.day .inc-head h3 { font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 0; color: color-mix(in srgb, var(--state) var(--ink-mix), var(--text)); }
.window { margin: 3px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.upds { padding: 6px 18px 12px; }
.day .upds { padding: 0 14px 10px; }
.upd { padding: 8px 0; font-size: 14.5px; overflow-wrap: anywhere; }
.upd + .upd, .more .upd { border-top: 1px solid var(--line); }
.upd b { font-weight: 700; }
.upd-time { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.more summary { cursor: pointer; font-size: 13.5px; color: var(--link); padding: 4px 0; }
.affects { margin: 0; padding: 0 18px 14px; font-size: 13.5px; color: var(--muted); }
.day .affects { padding: 0 14px 10px; }
.affects .lvl { color: color-mix(in srgb, var(--state) var(--ink-mix), var(--text)); }

/* ---------- Past incidents: a circuit trace with a node per day ---------- */
.history { margin: 40px 0 8px; }
.history > h2 { display: flex; align-items: center; gap: 12px; font-size: 18px; margin-bottom: 4px; }
.history > h2::before { content: ''; flex: none; width: 9px; height: 9px; background: var(--copper); }
#incidents { position: relative; margin-top: 14px; padding-left: 24px; }
#incidents::before { content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.day { position: relative; padding: 14px 0; border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 21px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--line-strong);
  background: var(--bg);
}
.day:has(.incident, .inc)::before { border-color: var(--copper); background: var(--copper); }
.day h3 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.day .none { margin: 0; color: var(--muted); font-size: 14px; }
.inc { margin: 8px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--state); }
.inc b { font-weight: 600; }
.inc p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.inc.ongoing { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }

/* ---------- Footer ---------- */
.foot { padding-top: 28px; padding-bottom: 44px; }
.foot p { margin: 4px 0; }
.legal { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--faint); margin-top: 16px !important; }

/* ---------- Tooltip ---------- */
.tip {
  position: fixed;
  z-index: 10;
  max-width: 250px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg), var(--shadow-sm);
  font-size: 13px;
  pointer-events: none;
}
.tip b { display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tip .row { display: flex; align-items: center; gap: 7px; }
.tip .row .dot { width: 8px; height: 8px; }
.tip .row .dot::after { display: none; }
.tip-inc { font-weight: 600; margin: 2px 0; }

/* ---------- Forms and buttons ---------- */
.report {
  margin: 28px 0 8px;
  padding: 22px 24px;
  scroll-margin-top: 16px;
}
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.report-head h2 { font-size: 16px; margin-bottom: 4px; }
.report-head p { margin: 0; max-width: 520px; }
.report-form { display: grid; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field em { font-family: var(--font); font-size: 12.5px; font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: var(--radius);
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { border-color: var(--violet); text-decoration: none; }
.btn.primary {
  position: relative;
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  padding-bottom: 13px;
  box-shadow: inset 0 -3px 0 var(--violet-deep);
}
.btn.primary::before { content: ''; flex: none; width: 8px; height: 8px; background: #ffffff66; transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.btn.primary:hover { border-color: var(--violet); }
.btn.primary:hover::before { background: #fff; box-shadow: 0 0 8px 1px #ffffffb3, 0 0 14px 2px var(--violet-glow); }
.btn.primary:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--violet-deep); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.form-msg { margin: 0; font-size: 14px; color: color-mix(in srgb, var(--bad) var(--ink-mix), var(--text)); }
.report-done {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  color: color-mix(in srgb, var(--lit) var(--ink-mix), var(--text));
  background: var(--up-soft);
  border: 1px solid color-mix(in srgb, var(--lit) 30%, transparent);
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Email updates */
.subscribe { margin-top: 28px; }
.subscribe + .report { margin-top: 16px; }
.subscribe .form-msg, .subscribe .report-done { margin-top: 12px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 320px; max-width: 420px; }
.inline-form input { flex: 1 1 200px; width: auto; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.email-page form { margin-top: 18px; }

/* ---------- 404 and the email pages ---------- */
.nf { text-align: center; padding-top: 64px; padding-bottom: 48px; }
.nf h1 { font-size: clamp(20px, 4.6vw, 28px); letter-spacing: -0.03em; margin: 6px 0 12px; }
.nf > p.muted { margin: 0 auto; max-width: 440px; }
.nf-code { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--violet-ink); }
.nf-code::before { content: ''; width: 7px; height: 7px; background: var(--copper); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.nf-actions .btn { text-decoration: none; }
/* A row of blocks with a hole in it. */
.nf-art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 64px; margin-bottom: 22px; }
.nf-block { width: 36px; height: 36px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line-strong); box-shadow: inset 0 -8px 0 var(--violet-soft), var(--shadow-sm); }
.nf-block.b2, .nf-block.b4 { height: 44px; }
.nf-gap { position: relative; width: 36px; height: 64px; overflow: hidden; }
.nf-gap::after { content: ''; position: absolute; left: 10px; top: 0; width: 16px; height: 16px; border-radius: 2px; background: var(--violet); box-shadow: 0 0 12px 2px var(--violet-glow); animation: nf-fall 2.4s ease-in infinite; }
@keyframes nf-fall {
  0% { transform: translateY(-30px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(70px); opacity: 0; }
}

/* ---------- Motion: cards fade in once, when the first status arrives ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.summary:not(.loading) { animation: rise .45s var(--ease) both; }
.summary:not(.loading) ~ #notices,
.summary:not(.loading) ~ #groups { animation: rise .5s var(--ease) .06s both; }
.summary:not(.loading) ~ .report,
.summary:not(.loading) ~ .history { animation: rise .5s var(--ease) .14s both; }
.nf { animation: rise .5s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  /* Keep fades and glows; drop movement. */
  .summary:not(.loading),
  .summary:not(.loading) ~ #notices,
  .summary:not(.loading) ~ #groups,
  .summary:not(.loading) ~ .report,
  .summary:not(.loading) ~ .history,
  .nf { animation-name: fade; }
  .up .dot::after { animation: none; opacity: .8; }
  .nf-gap::after { animation: none; top: 24px; opacity: .85; }
  .btn.primary:active { transform: none; }
  .bar, .btn { transition: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 620px) {
  /* The last 30 days. */
  .bars .bar:nth-child(-n + 60) { display: none; }
  .bars { gap: 3px; }
  .d90 { display: none; }
  .d30 { display: inline; }
  .back, .subscribe-link { display: none; }
  .summary { gap: 14px; margin-top: 24px; padding: 20px 18px; }
  .summary h1 { font-size: 17px; }
  .comp, .group-head { padding-left: 16px; padding-right: 16px; }
  .comp-about { margin-left: 0; }
  .comp-name h3 { font-size: 15px; }
  .state { font-size: 10px; letter-spacing: 0.05em; }
  .report { padding: 20px 16px; }
  .report-head .btn { width: 100%; }
  .inline-form { max-width: none; }
  .inline-form .btn { width: 100%; }
  #incidents { padding-left: 20px; }
  .day::before { left: -20px; }
}
@media (max-width: 380px) {
  .brand { font-size: 13px; gap: 8px; }
  .top-links { gap: 12px; }
  .group-head { flex-wrap: wrap; row-gap: 2px; }
}
