:root {
  color-scheme: dark;
  --bg: #0c1118;
  --surface: #151d29;
  --input: #101721;
  --line: #2a3647;
  --text: #edf2fb;
  --muted: #9cacc2;
  --accent: #75e1c4;
  --danger: #ffa6a1;
  --amber: #ffce8b;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: .24em; }
a:hover { color: #b6ffe9; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.15; letter-spacing: -.04em; }
h2 { font-size: 1.2rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
p { color: var(--muted); }
.topbar { background: #101721; border-bottom: 1px solid var(--line); }
.top-inner, .main { width: min(1320px, 100%); margin: 0 auto; padding-inline: clamp(16px, 4vw, 42px); }
.top-inner { min-height: 62px; display: flex; align-items: center; gap: 30px; }
.top-inner form { margin-left: auto; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); font-weight: 720; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--accent); color: #0b2b24; border-radius: 7px; }
nav { display: flex; align-items: center; gap: 21px; }
nav a { color: var(--muted); text-decoration: none; }
.main { display: grid; gap: 29px; padding-block: 34px 48px; }
.headline, .section-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.headline p, .section-top p { margin-top: 5px; }
.feed, .filters, .pagination { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .86rem; }
.mode, .tag { display: inline-flex; padding: 3px 8px; border-radius: 5px; white-space: nowrap; color: var(--accent); background: #12362f; font-size: .8rem; }
.tag.bad { color: var(--danger); background: #432b32; }
.tag.warn { color: var(--amber); background: #3a3028; }
.tag.neutral { background: #253246; color: #c1ccdf; }
.muted, small { color: var(--muted); }
.good { color: var(--accent); }
.bad { color: var(--danger); }
.warn { color: var(--amber); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.metrics article, .network, .details, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.metrics article { padding: 14px 17px; display: grid; gap: 3px; }
.metrics article > span { font-size: .87rem; color: var(--muted); }
.metrics strong { font-size: 1.62rem; font-variant-numeric: tabular-nums; }
.networks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 10px; }
.network { padding: 14px 17px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 115px), 1fr)); gap: 12px; margin: 12px 0 0; }
.facts dt { color: var(--muted); font-size: .81rem; }
.facts dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.network p { margin-top: 8px; font-size: .85rem; overflow-wrap: anywhere; }
.network details { border-top: 1px solid var(--line); margin-top: 11px; padding-top: 8px; font-size: .9rem; }
summary { cursor: pointer; color: var(--muted); }
button, select, input { font: inherit; color: var(--text); }
button, select { cursor: pointer; }
.quiet, select, input { border: 1px solid var(--line); background: var(--input); border-radius: 6px; padding: 6px 10px; }
.quiet:hover, select:hover { border-color: var(--muted); }
.quiet:disabled { opacity: .46; cursor: default; }
.filters label { color: var(--muted); display: grid; gap: 3px; }
.table-wrap { margin-top: 10px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 720px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
th { color: var(--muted); font-weight: 580; font-size: .82rem; background: var(--input); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover, tr.selected { background: #1d2b37; }
td .quiet { white-space: nowrap; }
td small { display: block; margin-top: 2px; }
td.empty { text-align: center; padding: 27px 12px; color: var(--muted); }
.pagination { justify-content: flex-end; margin-top: 9px; }
.details { margin-top: 12px; padding: 16px; scroll-margin-top: 12px; }
.details a { overflow-wrap: anywhere; }
.details h3:not(:first-child) { margin-top: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); list-style: none; padding: 0; gap: 8px; margin: 9px 0 0; }
.checks li { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; overflow-wrap: anywhere; }
.checks .tag { margin-right: 5px; }
.login { min-height: 100svh; display: grid; place-items: center; padding: 18px; }
.login-card { width: min(100%, 390px); padding: 26px; }
.login h1 { margin: 15px 0 22px; font-size: 1.75rem; }
.login label, .login input, .primary { display: block; width: 100%; }
.login input { margin-top: 6px; min-height: 42px; }
.form-error { min-height: 24px; color: var(--danger); font-size: .9rem; margin-top: 6px; }
.primary { padding: 9px; border: 0; border-radius: 6px; background: var(--accent); color: #09241e; font-weight: 700; }
@media (max-width: 560px) {
  .top-inner { gap: 15px; }
  nav { flex-wrap: wrap; gap: 4px 10px; font-size: .86rem; }
  .main { gap: 24px; padding-top: 24px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metrics article { padding: 10px; }
}

#research > h3, #research .section-top:not(:first-child) { margin-top: 20px; }
.lab-months { margin: 14px 0; }
#lab-detail dd { overflow-wrap: anywhere; }
