:root {
  --brand: #2563eb;
  --bg: #f5f7fa;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafbfd;
  --border: #e3e7ec;
  --border-strong: #cbd5e1;
  --text: #1f2937;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --primary: var(--brand);
  --primary-dark: color-mix(in srgb, var(--brand) 80%, black);
  --primary-soft: color-mix(in srgb, var(--brand) 10%, white);
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 2px 4px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --radius: 10px;
  --radius-sm: 6px;
}
:root.dark {
  --bg: #0b1220;
  --bg-elev: #111827;
  --surface: #111827;
  --surface-soft: #0f172a;
  --border: #1f2937;
  --border-strong: #334155;
  --text: #e2e8f0;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --primary-dark: color-mix(in srgb, var(--brand) 75%, white);
  --primary-soft: color-mix(in srgb, var(--brand) 22%, #0b1220);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
body.centered { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-soft); padding: 2px 6px; border-radius: 4px; font-size: 12.5px; border: 1px solid var(--border); }
pre.code { background: #0f172a; color: #e2e8f0; padding: 12px 16px; border-radius: var(--radius);
  overflow-x: auto; font-size: 12.5px; font-family: 'JetBrains Mono', ui-monospace, monospace;
  border: 1px solid #1f2937; }
:root.dark pre.code { background: #020617; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
  padding: 10px 24px; position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(140%) blur(8px);
}
.topbar .brand { font-weight: 700; font-size: 15px; color: var(--text); letter-spacing: -0.01em; }
.topbar .brand span { color: var(--brand); margin-left: 4px; font-weight: 500; }
.topbar nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; font-size: 13.5px;
}
.topbar nav a:hover { background: var(--surface-soft); color: var(--text); text-decoration: none; }
.topbar nav a.active { background: var(--primary-soft); color: var(--brand); }
.topbar nav a.push-right { margin-left: auto; }

/* Dropdown menu in topbar */
.nav-dropdown { position: relative; }
.nav-dropdown.push-right { margin-left: auto; }
.nav-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); font-weight: 500; font-size: 13.5px;
  font-family: inherit; line-height: inherit;
  transition: background .12s, color .12s;
}
.nav-dropdown-trigger svg { transition: transform .15s; flex-shrink: 0; }
.nav-dropdown-trigger:hover { background: var(--surface-soft); color: var(--text); }
.nav-dropdown.active .nav-dropdown-trigger { background: var(--primary-soft); color: var(--brand); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;
  min-width: 240px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.18), 0 0 0 1px color-mix(in srgb, var(--brand) 6%, transparent);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown:focus-within .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border-radius: 6px; color: var(--text); text-decoration: none;
  background: transparent; transition: background .12s;
}
.nav-dropdown-menu a:hover { background: var(--surface-soft); }
.nav-dropdown-menu a strong { font-size: 13.5px; font-weight: 600; }
.nav-dropdown-menu a .muted { font-size: 11.5px; line-height: 1.3; }
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 4px 8px; }
.topbar .userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.topbar .user-link { padding: 4px 8px; border-radius: 4px; }
.topbar .user-link:hover { background: var(--surface-soft); text-decoration: none; }

.theme-toggle {
  background: transparent; border: 1px solid var(--border); padding: 6px;
  border-radius: 6px; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--surface-soft); }
.theme-toggle .icon-moon { display: none; }
:root.dark .theme-toggle .icon-sun { display: none; }
:root.dark .theme-toggle .icon-moon { display: inline-block; }

/* Container */
.container { max-width: 1240px; margin: 0 auto; padding: 24px; }
h1 { font-size: 24px; margin: 0 0 4px 0; letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0 0 12px 0; letter-spacing: -0.01em; }
h3 { font-size: 13px; margin: 0 0 4px 0; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.breadcrumb { color: var(--muted); margin-bottom: 8px; font-size: 13px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); margin: 16px 0;
}
.card.login { width: 380px; }
.card.login h1 { text-align: center; margin-bottom: 4px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-2-50 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
canvas.sparkline { display: inline-block; vertical-align: middle; }

/* Mailbox-error expandable */
.mb-error { display: inline-block; margin-top: 4px; }
.mb-error > summary { cursor: pointer; list-style: none; }
.mb-error > summary::-webkit-details-marker { display: none; }
.mb-error-body { margin-top: 6px; padding: 8px 10px; background: color-mix(in srgb, var(--bad) 8%, transparent);
  border-left: 3px solid var(--bad); border-radius: 4px; font-size: 12px; color: var(--text); max-width: 420px;
  white-space: normal; word-break: break-word; }
.mb-error-body a { color: var(--bad); }
.dot-spin { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); margin-right: 4px; animation: pulse 1.2s ease-in-out infinite; vertical-align: middle; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.impersonation-banner { display: flex; align-items: center; gap: 12px; padding: 8px 24px;
  background: linear-gradient(90deg, var(--warn), color-mix(in srgb, var(--warn) 70%, var(--bad)));
  color: white; font-size: 13.5px; font-weight: 500; position: sticky; top: 0; z-index: 35; }
.impersonation-banner strong { font-weight: 700; }
.btn-impersonation-exit { background: rgba(0,0,0,0.18); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 5px 12px; font-weight: 600; cursor: pointer; border-radius: 4px; }
.btn-impersonation-exit:hover { background: rgba(0,0,0,0.32); }

/* Calendar heatmap (GitHub-style) */
.cal-heatmap { display: grid; grid-template-columns: 30px 1fr; gap: 6px; align-items: start; }
.cal-weekdays { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; padding-top: 0; font-size: 10px; color: var(--muted); }
.cal-grid { display: grid; grid-template-rows: repeat(7, 12px); grid-auto-flow: column; grid-auto-columns: 12px; gap: 3px; }
.cal-day { width: 12px; height: 12px; border-radius: 2px; background: var(--surface-soft); border: 1px solid var(--border); }
.cal-day.pad { background: transparent; border-color: transparent; }
.cal-day.lvl-0 { background: var(--surface-soft); }
.cal-day.lvl-1 { background: color-mix(in srgb, var(--brand) 25%, var(--surface-soft)); }
.cal-day.lvl-2 { background: color-mix(in srgb, var(--brand) 50%, var(--surface-soft)); }
.cal-day.lvl-3 { background: color-mix(in srgb, var(--brand) 75%, var(--surface-soft)); }
.cal-day.lvl-4 { background: var(--brand); }
.cal-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.cal-legend .cal-day { display: inline-block; }

/* KPIs */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  display: block; color: var(--text); text-decoration: none; }
a.kpi.clickable, .kpi.clickable { transition: border-color .12s, transform .08s, box-shadow .12s; }
a.kpi.clickable:hover, .kpi.clickable:hover { border-color: var(--brand); transform: translateY(-1px); text-decoration: none; box-shadow: var(--shadow-md); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border-strong); }
.kpi.pass::before { background: var(--ok); }
.kpi.fail::before { background: var(--bad); }
.kpi.warn::before { background: var(--warn); }
.kpi.danger::before { background: var(--danger); }
.kpi-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.kpi-sub { font-size: 12px; color: var(--muted); }

/* Tables */
table.data { width: 100%; border-collapse: collapse; }
table.data thead th {
  text-align: left; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 8px; border-bottom: 1px solid var(--border); font-weight: 600;
}
table.data tbody td { padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tbody tr:hover { background: var(--surface-soft); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

/* Badges */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--surface-soft); color: var(--muted); border: 1px solid var(--border);
}
.badge.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.danger { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.badge.brand { background: var(--primary-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.badge.small { font-size: 10.5px; padding: 1px 6px; }

/* Forms */
form.row, form.grid-form { display: grid; gap: 10px; }
form.row { grid-template-columns: 1fr auto; align-items: end; }
form.grid-form { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
form.grid-form button { grid-column: 1 / -1; justify-self: start; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.check { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text); }
label.check .hint { flex-basis: 100%; margin-left: 24px; margin-top: 2px; }
label .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; line-height: 1.4; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="color"], select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text); transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type="color"] { padding: 2px; height: 38px; cursor: pointer; width: 48px; flex-shrink: 0; }
.color-pair { display: flex; gap: 6px; align-items: stretch; }
.color-pair input[type="text"] { flex: 1; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; }
.color-pair input[type="text"]:invalid { border-color: var(--bad); }

button, .btn, .btn-primary, .btn-danger, .btn-link, .btn-ghost {
  font: inherit; cursor: pointer; padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  font-weight: 500; transition: background .12s, transform .04s;
}
.btn:hover, button:hover { background: var(--surface-soft); }
button:active, .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--bad); color: white; border-color: var(--bad); }
.btn-ghost { background: transparent; }
.btn-link { background: none; border: none; padding: 4px 8px; color: var(--brand); }
.btn-link.danger { color: var(--bad); }
.btn-link:hover { text-decoration: underline; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; }
.alert-error { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border-left: 3px solid var(--bad); }
.alert-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border-left: 3px solid var(--ok); }

.pagination { display: flex; gap: 12px; align-items: center; margin-top: 12px; }

/* Onboarding */
.onboarding {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); margin: 16px 0;
}
.onboarding-head { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.onboarding-head h2 { font-size: 17px; margin: 0; }
.progress-ring { display: inline-flex; align-items: center; justify-content: center; }
.progress-bar { flex: 1; height: 6px; background: var(--surface-soft); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 70%, white)); transition: width .3s; }
.progress-text { font-size: 12px; color: var(--muted); white-space: nowrap; }

.steps { list-style: none; padding: 0; margin: 16px 0 0 0; display: grid; gap: 10px; }
.steps > li { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: background .12s; }
.steps > li:hover { background: var(--bg-elev); }
.steps > li.done { opacity: 0.65; }
.steps > li.done .step-check { background: var(--ok); border-color: var(--ok); color: white; }
.steps h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; margin: 0 0 2px 0; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); font-size: 12.5px; }
.step-check {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  background: var(--bg-elev);
}
.steps .badge.optional { background: var(--surface-soft); color: var(--muted); border-color: var(--border); font-size: 10px; }

/* Empty states */
.empty { padding: 24px 16px; text-align: center; color: var(--muted); }
.empty p { margin: 4px 0; }

/* Provider presets */
.presets { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
  padding: 8px 10px; background: var(--surface-soft); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.presets .btn-link { padding: 4px 10px; font-size: 13px; }

/* DNS step (domain_detail) */
.dns-step { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--border); }
.dns-step:first-of-type { border-top: 0; }
.dns-step h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; margin: 0 0 6px 0; font-weight: 600; }
.dns-step .step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: white;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; font-size: 13px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row pre.code { flex: 1; margin: 0; overflow-x: auto; font-size: 12px; }
.copy-row .btn { white-space: nowrap; align-self: flex-start; }
.actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 16px; }
.mt-8 { margin-top: 8px; }

/* Help page */
.help-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.help-toc {
  position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); font-size: 13px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.help-toc h3 { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px 0; }
.help-toc ol { list-style: none; padding-left: 0; margin: 0; }
.help-toc ol ol { padding-left: 14px; margin-top: 4px; border-left: 1px solid var(--border); }
.help-toc li { margin: 4px 0; }
.help-toc a { color: var(--text); display: block; padding: 2px 6px; border-radius: 4px; line-height: 1.4; }
.help-toc a:hover { background: var(--surface-soft); text-decoration: none; }

.help-body { min-width: 0; max-width: 820px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 36px; box-shadow: var(--shadow); line-height: 1.6; }
.help-hero { margin-bottom: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.help-hero h1 { margin-bottom: 2px; }
.help-hero p { color: var(--muted); margin: 0; }
.help-body section { padding-top: 24px; scroll-margin-top: 80px; }
.help-body h2 { font-size: 18px; margin-bottom: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.help-body h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14.5px; margin: 16px 0 6px 0; font-weight: 600; }
.help-body ul, .help-body ol { padding-left: 22px; }
.help-body li { margin: 4px 0; }
.help-body table.data { margin: 10px 0 14px 0; }
.help-body details { margin: 8px 0; padding: 8px 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.help-body details > summary { cursor: pointer; font-weight: 500; padding: 4px 0; }
.help-body details[open] > summary { margin-bottom: 6px; }
.help-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Callouts */
.callout {
  border-left: 4px solid var(--brand); background: var(--primary-soft);
  padding: 10px 14px; border-radius: var(--radius-sm); margin: 12px 0; font-size: 13.5px;
}
.callout.tip { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.callout.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.callout.danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.callout strong { color: var(--text); }

/* Toasts */
#toast-host { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; min-width: 240px; max-width: 360px; box-shadow: var(--shadow-md);
  border-left: 3px solid var(--brand);
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
  font-size: 13.5px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--bad); }
.toast-static { padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 12px 0;
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--brand); font-size: 13.5px; }
.toast-static.ok { border-left-color: var(--ok); }
.toast-static.warn { border-left-color: var(--warn); }
.toast-static.error { border-left-color: var(--bad); }

/* Advisor cards */
.advisor { display: grid; gap: 8px; }
.advisor-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft);
  border-left-width: 3px;
}
.advisor-item.ok { border-left-color: var(--ok); }
.advisor-item.info { border-left-color: var(--brand); }
.advisor-item.warn { border-left-color: var(--warn); }
.advisor-item.danger { border-left-color: var(--bad); }
.advisor-item h4 { margin: 0 0 2px 0; font-size: 13.5px; font-weight: 600; }
.advisor-item p { margin: 0; color: var(--muted); font-size: 13px; }
.advisor-icon { font-size: 18px; line-height: 1; }
.advisor-icon.ok { color: var(--ok); }
.advisor-icon.info { color: var(--brand); }
.advisor-icon.warn { color: var(--warn); }
.advisor-icon.danger { color: var(--bad); }

/* Filter bar */
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filterbar label { min-width: 0; }
.filterbar input[type="search"] { min-width: 220px; }
.filterbar .actions { padding: 0; margin: 0; border: 0; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; background: var(--surface-soft); border: 1px solid var(--border); color: var(--muted); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tag-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* Skeletons */
.skel { background: linear-gradient(90deg, var(--surface-soft) 0%, var(--border) 50%, var(--surface-soft) 100%);
  background-size: 200% 100%; animation: skel 1.4s linear infinite; border-radius: 4px; height: 14px; display: block; }
@keyframes skel { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }

/* Landingpage (login) */
.landing { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center;
  width: 100%; max-width: 1100px; padding: 24px; }
.landing-hero h1 { font-size: 42px; line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.02em; }
.landing-hero p { font-size: 16px; color: var(--muted); margin-bottom: 24px; max-width: 480px; }
.landing-feats { display: grid; gap: 14px; max-width: 520px; }
.landing-feat { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.landing-feat .ico { font-size: 18px; }
.landing-feat h4 { margin: 0 0 2px 0; font-size: 14px; font-weight: 600; }
.landing-feat p { margin: 0; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; max-height: none; }
  .landing { grid-template-columns: 1fr; }
}

/* Mobile nav: hamburger toggle */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); padding: 6px 10px; border-radius: 6px; color: var(--text); }
@media (max-width: 800px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
  .topbar .brand { flex: 0 0 auto; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
  .topbar nav { order: 99; flex-basis: 100%; flex-direction: column; gap: 0; display: none; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
  .topbar nav.open { display: flex; }
  .topbar nav a { padding: 10px 8px; border-radius: 4px; }
  .topbar nav a.push-right { margin-left: 0; }
  .nav-dropdown.push-right { margin-left: 0; }
  .nav-dropdown-trigger { width: 100%; padding: 10px 8px; justify-content: flex-start; }
  .nav-dropdown-menu { position: static; opacity: 1; transform: none; pointer-events: auto; box-shadow: none; border: 0; padding: 0 0 0 24px; min-width: 0; background: transparent; gap: 0; }
  .nav-dropdown-menu a { padding: 8px 8px; }
  .nav-dropdown-sep { display: none; }
  .topbar .userbox { flex: 0 0 auto; }
  .topbar .userbox .user-link { display: none; }
  .container { padding: 16px; }
  table.data { font-size: 13px; }
  table.data thead th, table.data tbody td { padding: 8px 6px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2-50 { grid-template-columns: 1fr; }
  .copy-row { flex-direction: column; gap: 6px; }
  .copy-row .btn, .copy-row .btn-primary { align-self: stretch; }
  .filterbar { flex-direction: column; align-items: stretch; }
  .filterbar input[type="search"] { min-width: 0; width: 100%; }
  .help-body { padding: 20px 18px; }
  pre.code { font-size: 11.5px; }
  .landing-hero h1 { font-size: 30px; }
  h1 { font-size: 21px; }
  .onboarding { padding: 16px 18px; }
  .steps > li { grid-template-columns: 24px 1fr; }
  .steps > li a.btn-primary, .steps > li .badge { grid-column: 1 / -1; justify-self: start; }
  .dns-step { grid-template-columns: 28px 1fr; gap: 10px; }
}
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 20px; }
}
