:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e4e7ef;
  --border-strong: #d3d8e3;
  --text: #172033;
  --text-2: #3b465c;
  --muted: #6b7489;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --ok: #059669;
  --ok-soft: #e7f8f1;
  --warn: #b45309;
  --warn-soft: #fff5e6;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --side-bg: #0f172a;
  --side-text: #aab4c8;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active: rgba(129, 140, 248, .16);
  --chart-sent: #10b981;
  --chart-failed: #ef4444;
  --chart-in: #6366f1;
  --chart-grid: #e9ecf3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #121a2e;
    --surface-2: #0f1628;
    --border: #232d45;
    --border-strong: #2e3a57;
    --text: #e6eaf3;
    --text-2: #c3cbdb;
    --muted: #8a94ab;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: rgba(129, 140, 248, .14);
    --ok: #34d399;
    --ok-soft: rgba(16, 185, 129, .14);
    --warn: #fbbf24;
    --warn-soft: rgba(245, 158, 11, .14);
    --bad: #f87171;
    --bad-soft: rgba(239, 68, 68, .14);
    --info: #60a5fa;
    --info-soft: rgba(59, 130, 246, .14);
    --side-bg: #080c18;
    --chart-grid: #1f2940;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 20px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 8px 0; }
.icon { width: 16px; height: 16px; flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  background: var(--side-bg); color: var(--side-text);
  padding: 18px 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  padding: 4px 8px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #22d3ee); color: #fff;
}
.brand-mark .icon { width: 17px; height: 17px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--side-text); font-weight: 500;
}
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.nav a .icon { opacity: .85; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .07); margin: 10px 6px; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 6px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.who { display: flex; align-items: center; gap: 9px; color: #e2e8f0; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #334155; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; color: inherit; cursor: pointer;
  font: inherit; padding: 6px 8px; border-radius: 6px;
}
.sidebar .btn-ghost { color: var(--side-text); }
.sidebar .btn-ghost:hover { background: var(--side-hover); color: #fff; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 28px; min-height: 64px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.content { padding: 24px 28px 56px; max-width: 1440px; }
.content > * + *, .stack > * + * { margin-top: 18px; }

/* ---------- pill / badge ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill-ok .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2s infinite; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-warn .dot { background: var(--warn); }
.pill-sep { opacity: .45; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }

.badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge-lg { font-size: 13px; padding: 3px 12px; }
.badge-queued { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-sending { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-sent { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-failed { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-src-bounce { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge-src-complaint { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-src-manual { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* ---------- cards / grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.card-ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok-soft) 50%, var(--surface)); }
.card-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.stat { padding: 16px 18px; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value-sm { font-size: 20px; padding: 5px 0; }
.stat-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.speed { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.speed-value { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.speed-unit { color: var(--text-2); font-weight: 600; }
.speed-limit { color: var(--muted); margin-left: auto; font-size: 12.5px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table thead th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom-color: var(--border-strong); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 600; color: var(--text-2); }
.table-num td, .table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-num thead th:not(:first-child) { text-align: right; }
.table-hover tbody tr:hover { background: var(--surface-2); }
.row-link { cursor: pointer; }
.cell-subject { min-width: 200px; }
.cell-note { min-width: 180px; max-width: 360px; font-size: 13px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px !important; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12.5px; }
.text-bad { color: var(--bad); }
.spacer { flex: 1; }

.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; min-width: 0; }
.dl-compact { grid-template-columns: 130px 1fr; font-size: 13px; }

.pre {
  margin: 0; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.doc .pre + .pre { margin-top: 10px; }
.preview { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 600 13.5px/1.2 var(--font);
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0b1020; } }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-ghost.btn { border-color: transparent; background: transparent; }
.btn-ghost.btn:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-xs { padding: 3px 6px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.link-sm { font-size: 13px; font-weight: 600; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-weight: 600; font-size: 13px; color: var(--text-2); }
.field > span em { font-weight: 400; color: var(--muted); font-style: normal; }
.field small, .form small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 14px/1.4 var(--font);
}
textarea { resize: vertical; }
textarea.mono { font: 12.5px/1.5 var(--mono); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-inline input[type=email] { width: auto; min-width: 260px; flex: 1; max-width: 380px; }
.input-num { width: 96px !important; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline select { width: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; align-items: flex-start; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.choice input { margin-top: 3px; accent-color: var(--primary); }
.choice-body { display: flex; flex-direction: column; gap: 3px; }
.choice-body small { color: var(--muted); font-size: 12.5px; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar form { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filters input[type=search] { flex: 1; min-width: 220px; max-width: 420px; }
.filters select { width: auto; min-width: 170px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-actions form { margin: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.count { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.count-bad { color: var(--bad); }

.subnav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 74px; z-index: 5; }
.subnav a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 13px; }
.subnav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
section[id] { scroll-margin-top: 120px; }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid transparent; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--text-2); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(440px, calc(100vw - 40px));
  margin: 0 !important; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); border-color: currentColor;
  background-color: var(--surface); background-image: linear-gradient(var(--toast-bg), var(--toast-bg));
  animation: toast-in .2s ease-out;
}
.toast.alert-success { --toast-bg: var(--ok-soft); }
.toast.alert-error { --toast-bg: var(--bad-soft); }
.toast.alert-info { --toast-bg: var(--info-soft); }
.toast.alert-warn { --toast-bg: var(--warn-soft); }
.toast.hide { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast-close { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 0 0 6px; margin-left: auto; opacity: .7; }
.toast-close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.copy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copy-row code { flex: 1; min-width: 0; padding: 8px 10px; }
.code-lg { font-size: 14px; }
.steps { margin: 12px 0; padding-left: 20px; color: var(--text-2); }
.steps li { margin: 4px 0; }
.preview-box { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 13px; }
.test-out { margin-top: 12px; }
.test-out.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.test-out.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); color: var(--bad); }

.dkim-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.dkim-item:first-of-type { padding-top: 0; }
.dkim-item:last-child { border-bottom: 0; }
.dkim-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.dkim-head > div:first-child { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dkim-domain { font-size: 15px; }
.dns-record { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dns-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.dns-label { color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 3px; }

.method { display: inline-block; font: 700 12px/1 var(--mono); padding: 4px 7px; border-radius: 6px; margin-right: 6px; vertical-align: 2px; }
.method-post { background: var(--ok-soft); color: var(--ok); }
.method-get { background: var(--info-soft); color: var(--info); }

/* ---------- charts ---------- */
.chart { width: 100%; height: 220px; position: relative; }
.chart-sm { height: 90px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-sent { fill: var(--chart-sent); }
.chart .bar-failed { fill: var(--chart-failed); }
.chart .line-in { fill: none; stroke: var(--chart-in); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot-in { fill: var(--chart-in); }
.chart .live-area { fill: color-mix(in srgb, var(--chart-sent) 22%, transparent); }
.chart .live-line { fill: none; stroke: var(--chart-sent); stroke-width: 2; stroke-linejoin: round; }
.chart .hover-col { fill: transparent; }
.chart .hover-col:hover { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 3;
  background: var(--text); color: var(--surface); font-size: 12px; line-height: 1.5;
  padding: 7px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg-sent { background: var(--chart-sent); }
.lg-failed { background: var(--chart-failed); }
.lg-in { background: var(--chart-in); height: 3px; border-radius: 2px; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #22d3ee 16%, transparent), transparent), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: 0 10px 40px rgba(16, 24, 40, .08); }
.login-card > * + * { margin-top: 18px; }
.login-brand { display: flex; gap: 12px; align-items: center; }
.login-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.login-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1140px) {
  .grid-2, .grid-2-1, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .form-grid, .choice-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; overflow-x: auto; }
  .brand span:last-child { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .nav a span { display: none; }
  .nav a { padding: 9px; }
  .nav a.active { box-shadow: inset 0 -2px 0 #818cf8; }
  .nav-sep { width: 1px; height: 22px; margin: 0 4px; align-self: center; }
  .sidebar-foot { border: 0; padding: 0; }
  .who span:last-child, .sidebar-foot .btn-ghost span { display: none; }
  .topbar { position: static; padding: 14px 16px; }
  .content { padding: 16px 16px 40px; }
  .subnav { top: 8px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 24px; }
}
