/* Server status page. Uses the tokens from app.css; --lv is the level colour of whatever it sits on. */
.st { max-width: 1040px; }
.st h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; }
.st-lede { margin: 0 0 18px; color: var(--muted); max-width: 70ch; }
.st-wait { color: var(--muted); }
.st a { color: var(--field); }
.st time { cursor: help; text-decoration: underline dotted color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.st-muted { color: var(--muted); }

.st [data-level="green"] { --lv: var(--qd-green); }
.st [data-level="amber"] { --lv: var(--qd-orange); }
.st [data-level="red"] { --lv: var(--err); }
.st [data-level="grey"] { --lv: var(--qd-gray); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--lv, var(--qd-green)); }

/* ---------- the hero: one big answer ---------- */
.st-hero {
  position: relative; overflow: hidden;
  margin: 0 0 14px; padding: 22px 22px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: radial-gradient(90% 160% at 0% 0%, color-mix(in srgb, var(--lv) 16%, transparent), transparent 60%), var(--panel);
}
.st-big {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 10px; padding: 8px 20px 8px 14px;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--lv) 45%, transparent);
  background: color-mix(in srgb, var(--lv) 12%, var(--panel));
  font-size: clamp(20px, 4.2vw, 27px); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em;
}
.st-beacon { position: relative; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--lv);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--lv) 55%, transparent); }
.st-beacon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lv);
  animation: st-pulse 2.4s ease-out infinite; }
.st [data-level="red"] .st-beacon::after { animation-duration: 1.2s; }
@keyframes st-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .st-beacon::after { animation: none; opacity: 0; } }
.st-line { margin: 0 0 14px; max-width: 72ch; font-size: 15.5px; line-height: 1.5; }
.st-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.st-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--raise); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.st-facts li[data-level] { border-color: color-mix(in srgb, var(--lv) 55%, var(--line)); }
.st-facts .st-live { padding-right: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.st-live .st-dot { background: var(--qd-green); }

/* ---------- chips and pills ---------- */
.st-chip { font: 600 12.5px/1 var(--code); padding: 4px 8px; border-radius: 6px; color: var(--text);
  background: color-mix(in srgb, var(--field) 10%, var(--raise)); border: 1px solid color-mix(in srgb, var(--field) 25%, var(--line)); }
.st-new { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  line-height: 1.3; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.st-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 650; white-space: nowrap;
  background: color-mix(in srgb, var(--lv) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lv) 45%, transparent); }
.st-code { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 7px; border-radius: 8px;
  font: 700 13px/1 var(--code); letter-spacing: .04em; background: var(--raise); border: 1px solid var(--line); }
.st-code-s { min-width: 30px; height: 22px; font-size: 11.5px; border-radius: 6px; }

/* ---------- region cards ---------- */
.st-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; margin-bottom: 14px; }
.st-card, .st-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 18px; min-width: 0; }
.st-card { box-shadow: inset 0 2px 0 var(--lv); }
.st-panel { margin: 0 0 14px; }
.st-panel h2 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.st-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.st-head h2 { margin: 0; font-size: 17px; font-weight: 650; flex: 1 1 auto; min-width: 0; }
.st-say { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; }
.st-rows { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; font-size: 13.5px; align-items: baseline; }
.st-rows dt { color: var(--muted); }
.st-rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.7; }
.st-sub { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-gps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.st-gp { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 13px; min-width: 0;
  background: color-mix(in srgb, var(--lv) 8%, var(--raise)); border: 1px solid color-mix(in srgb, var(--lv) 30%, var(--line)); }
.st-gp span { white-space: nowrap; font-weight: 600; }
.st-gp b { font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-gp[data-level="red"] b, .st-gp[data-level="amber"] b { color: var(--text); }

/* the 48-hour strip */
.st-strip { margin: 0; }
.st-strip figcaption { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-bars { display: flex; gap: 2px; height: 30px; }
.st-bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--line); }
.st-bar[data-k="g"] { background: var(--qd-green); }
.st-bar[data-k="a"] { background: var(--qd-orange); }
.st-bar[data-k="r"] { background: var(--err); }
.st-bar[data-k="u"] { background: color-mix(in srgb, var(--muted) 28%, var(--raise)); }
.st-bar:hover { filter: brightness(1.25); }
.st-bar:last-child { box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 3px color-mix(in srgb, var(--text) 30%, transparent); }
.st-axis { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.st-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.st-legend li { display: inline-flex; align-items: center; gap: 6px; }
.st-legend li::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.st-legend li[data-k="g"]::before { background: var(--qd-green); }
.st-legend li[data-k="a"]::before { background: var(--qd-orange); }
.st-legend li[data-k="r"]::before { background: var(--err); }
.st-legend li[data-k="u"]::before { background: color-mix(in srgb, var(--muted) 28%, var(--raise)); }

/* ---------- builds, official word, our database ---------- */
.st-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
.st-line-list { list-style: none; margin: 0; padding: 0 0 0 6px; }
.st-stop { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); }
.st-stop:last-child { padding-bottom: 2px; border-left-color: transparent; }
.st-stop::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--muted); }
.st-latest::before { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 35%, var(--panel)); }
.st-stop-head { display: flex; align-items: center; margin: 0 0 8px; }
.st-stop-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.st-stop-rows li { display: flex; align-items: center; gap: 10px; }

.st-posts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.st-post { padding: 10px 12px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.st-post a { font-weight: 600; }
.st-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.st-src { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--field) 14%, transparent); border: 1px solid color-mix(in srgb, var(--field) 35%, transparent); }
.st-none { color: var(--muted); font-size: 14px; }
.st-links { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.st-links a { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); text-decoration: none; }
.st-links a:hover { border-color: var(--field); }
.st-db { margin: 0; font-size: 14px; line-height: 1.5; }

.st-how-box { padding: 0; }
.st-how-box summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; border-radius: 12px; }
.st-how-box summary::-webkit-details-marker { display: none; }
.st-how-box summary h2 { margin: 0; }
.st-how-box summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.st-how-box[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.st-how-box summary:hover h2 { color: var(--field); }
@media (prefers-reduced-motion: reduce) { .st-how-box summary::after { transition: none; } }
.st-how { margin: 0; padding: 0 18px 18px 36px; display: grid; gap: 8px; line-height: 1.55; font-size: 14px; max-width: 80ch; }
.st-foot { color: var(--muted); font-size: 12.5px; }

@media (max-width: 760px) {
  .st-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-regions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .st-hero { padding: 16px 14px 14px; }
  .st-big { padding: 7px 14px 7px 12px; gap: 11px; }
  .st-card, .st-panel { padding: 14px 14px 16px; }
  .st-how-box { padding: 0; }
  .st-how-box summary { padding: 13px 14px; }
  .st-how { padding: 0 14px 16px 30px; }
  .st-rows { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .st-rows dd { margin-bottom: 8px; }
  .st-gp { padding: 5px 10px 5px 9px; }
  .st-bars { gap: 1px; height: 26px; }
}
