:root {
  color-scheme: dark;
  --black: #080808;
  --surface: #101013;
  --surface-raised: #17171c;
  --purple: #a975cc;
  --purple-deep: #4b0c83;
  --mint: #9ed8cc;
  --text: #f2f6f5;
  --muted: #a9b2b0;
  --line: #34333a;
  --good: #9ed8cc;
  --bad: #ff7184;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--text);
  font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, #4b0c831c, transparent 38%), linear-gradient(315deg, #ffffff08, transparent 32%);
}

main { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 56px 0 30px; }

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.eyebrow { margin-top: 0; color: var(--purple); font: 700 11px/1.2 ui-monospace, monospace; letter-spacing: .2em; }
h1 { margin: .2rem 0 0; font-size: clamp(48px, 7.5vw, 88px); font-weight: 800; line-height: .92; letter-spacing: -.065em; }
h1 span { color: var(--purple); }
.lede { margin-bottom: 0; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); white-space: nowrap; }

.pulse { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid #4d6c66; border-radius: 3px; background: #101816; color: var(--mint); font: 700 11px ui-monospace, monospace; white-space: nowrap; }
.pulse i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px #9ed8cc24; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px transparent; } }

.summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 0; border: 1px solid var(--line); background: var(--surface); }
.summary article { position: relative; padding: 21px 22px; border-right: 1px solid var(--line); }
.summary article::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--purple-deep); }
.summary article:nth-child(1)::before, .summary article:nth-child(3)::before { background: #6b6870; }
.summary article:last-child { border-right: 0; }
.summary span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.summary strong { display: block; margin-top: 8px; color: var(--text); font: 700 27px ui-monospace, monospace; }

.alert-policy { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; margin-bottom: 24px; padding: 17px 19px; border: 1px solid #4b4551; border-left: 3px solid var(--purple); background: #151319; }
.alert-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #5d5366; background: var(--surface); color: var(--purple); font: 700 17px ui-monospace, monospace; }
.alert-policy strong { color: var(--text); font-size: 15px; }
.alert-policy p { margin: 3px 0 0; color: var(--muted); }
.alert-policy b { color: var(--text); font-weight: 600; }

.toolbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
button { padding: 10px 15px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font: 700 12px ui-monospace, monospace; }
button:hover, button.active { border-color: var(--purple); background: #24172d; color: var(--text); }
button:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.filters { display: flex; }
.filters button + button { border-left: 0; }
.refresh { border-color: #5d5366; color: var(--purple); }
.refresh:hover { border-color: var(--purple); background: #24172d; color: var(--text); }

.systems { display: grid; gap: 42px; }
.system-section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.system-section-header p { margin: 0 0 3px; color: var(--muted); font: 11px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.system-section-header h2 { margin: 0; color: var(--text); font-size: 22px; font-weight: 700; }
.system-section-header > span { color: var(--purple); font: 700 11px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.section-pairs { display: grid; gap: 12px; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.system-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pair-column { display: grid; gap: 12px; }

.card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; min-height: 148px; padding: 21px 21px 19px 25px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.card.beta { background: var(--black); }
.card-link { color: inherit; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.card-link:hover { border-color: var(--purple); background: var(--surface-raised); }
.card-link:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #6b6870; }
.card.beta::before { background: var(--purple); }
.card.down::before { background: var(--bad); }
.card h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 700; }
.card .meta { margin: 4px 0 0; color: var(--muted); font: 12px ui-monospace, monospace; }

.badge { align-self: start; padding: 5px 8px; border: 1px solid #4d6c66; border-radius: 2px; background: #101816; color: var(--good); font: 700 10px ui-monospace, monospace; }
.down .badge { border-color: #74404a; background: #251317; color: var(--bad); }
.metrics { grid-column: 1/-1; display: flex; gap: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font: 12px ui-monospace, monospace; }
.metrics b { color: var(--text); font-weight: 600; }
.checked-mobile { display: none; }
.loading { color: var(--muted); }

footer { display: flex; justify-content: space-between; margin-top: 34px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); font: 12px ui-monospace, monospace; }
footer a { color: var(--purple); text-decoration: none; }
footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  main { width: min(100% - 24px, 1180px); padding-top: 34px; }
  .hero { display: block; }
  .lede { white-space: normal; }
  .pulse { display: inline-flex; margin-top: 20px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary article:nth-child(2) { border-right: 0; }
  .summary article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .system-pair, .section-grid { grid-template-columns: 1fr; }
  .system-section-header { align-items: start; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filters { overflow: auto; }
  .filters button { flex: 1; }
  .metrics { gap: 10px; flex-wrap: nowrap; font-size: 11px; }
  .checked-desktop { display: none; }
  .checked-mobile { display: inline; }
  .alert-policy { align-items: start; }
  footer { gap: 16px; flex-direction: column; }
}
