/* CheckMyDNS — design system (2026) */
:root {
  --bg: #f6f8fc;
  --bg-tint: #eef3fd;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --surface-3: #e9eef6;
  --border: #e2e8f1;
  --border-strong: #cdd6e4;
  --text: #0a1222;
  --text-2: #42506a;
  --text-3: #6b7890;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-ink: #ffffff;
  --brand-soft: #e9f0ff;
  --brand-line: #bcd0fb;
  --accent: #f97316;
  --accent-soft: #fff1e6;
  --ok: #059669;
  --ok-soft: #e6f7f0;
  --bad: #e11d48;
  --bad-soft: #fdebef;
  --warn: #d97706;
  --warn-soft: #fff4e2;
  --idle: #94a3b8;
  --land: #d9e2ef;
  --land-line: #c7d3e4;
  --glow-a: rgba(37, 99, 235, .16);
  --glow-b: rgba(249, 115, 22, .10);
  --grid: rgba(10, 18, 34, .045);
  --shadow-sm: 0 1px 2px rgba(10, 18, 34, .05);
  --shadow: 0 1px 2px rgba(10, 18, 34, .04), 0 12px 32px -16px rgba(10, 18, 34, .18);
  --shadow-lg: 0 2px 4px rgba(10, 18, 34, .04), 0 24px 60px -24px rgba(23, 49, 110, .30);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a13; --bg-tint: #0a1222; --surface: #0c1321; --surface-2: #111a2b; --surface-3: #172236;
    --border: #1b2639; --border-strong: #2a3850; --text: #e8edf6; --text-2: #a9b5ca; --text-3: #7d8aa3;
    --brand: #4d8dff; --brand-hover: #6aa0ff; --brand-ink: #04101f; --brand-soft: rgba(77, 141, 255, .12); --brand-line: rgba(77, 141, 255, .35);
    --accent: #fb923c; --accent-soft: rgba(251, 146, 60, .12);
    --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12); --bad: #fb7185; --bad-soft: rgba(251, 113, 133, .12);
    --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --idle: #55637b;
    --land: #18233a; --land-line: #22304a; --glow-a: rgba(77, 141, 255, .18); --glow-b: rgba(251, 146, 60, .08); --grid: rgba(255, 255, 255, .035);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060a13; --bg-tint: #0a1222; --surface: #0c1321; --surface-2: #111a2b; --surface-3: #172236;
  --border: #1b2639; --border-strong: #2a3850; --text: #e8edf6; --text-2: #a9b5ca; --text-3: #7d8aa3;
  --brand: #4d8dff; --brand-hover: #6aa0ff; --brand-ink: #04101f; --brand-soft: rgba(77, 141, 255, .12); --brand-line: rgba(77, 141, 255, .35);
  --accent: #fb923c; --accent-soft: rgba(251, 146, 60, .12);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12); --bad: #fb7185; --bad-soft: rgba(251, 113, 133, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --idle: #55637b;
  --land: #18233a; --land-line: #22304a; --glow-a: rgba(77, 141, 255, .18); --glow-b: rgba(251, 146, 60, .08); --grid: rgba(255, 255, 255, .035);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.02em; font-size: 1.18rem; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand .w-dns { background: linear-gradient(135deg, var(--brand), #22a2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .w-my { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a, .nav-links button.nav-drop {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  color: var(--text-2); font-size: .94rem; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.nav-links a:hover, .nav-links button.nav-drop:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-links li { position: relative; }
.nav-links .sub { position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; list-style: none; margin: 0; }
.nav-links li:hover > .sub, .nav-links li:focus-within > .sub { display: block; }
.nav-links .sub a { display: flex; width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: transparent; border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: all .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; box-shadow: var(--shadow-lg);
    display: none; margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button.nav-drop { padding: 12px; font-size: 1rem; }
  .nav-links .sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .nav-actions { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: 56px 0 28px; }
.hero::before {
  content: ""; position: absolute; inset: -68px 0 0 0; z-index: -2;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; inset: -120px -10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 20%, var(--glow-a), transparent 70%), radial-gradient(30% 40% at 78% 10%, var(--glow-b), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  color: var(--text-2); font-size: .83rem; font-weight: 500;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.hero h1 {
  margin: 18px 0 12px; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.7rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 700;
  max-width: 17ch;
}
.hero h1 .grad { background: linear-gradient(100deg, var(--brand) 10%, #22a2ff 55%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 0; max-width: 64ch; color: var(--text-2); font-size: clamp(1rem, .95rem + .3vw, 1.14rem); }
.hero-center { text-align: center; }
.hero-center h1, .hero-center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Command bar ---------- */
.cmd {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 10px; text-align: left;
}
.cmd-row { display: flex; gap: 8px; align-items: stretch; }
.cmd-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 56px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 14px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.cmd-field:focus-within { background: var(--surface); border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-soft); }
.cmd-field svg { width: 20px; height: 20px; color: var(--text-3); flex-shrink: 0; }
.cmd-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.06rem; height: 100%; }
.cmd-field input::placeholder { color: var(--text-3); }
kbd { font-family: var(--mono); font-size: .75rem; color: var(--text-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: var(--surface); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  font-weight: 600; font-size: .95rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px var(--brand); }
:root[data-theme="dark"] .btn-primary { color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-primary[disabled] { opacity: .75; cursor: progress; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-ghost { background: transparent; }
.btn .spin { display: none; width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.loading .spin { display: block; }
.btn.loading .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.cmd-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px 2px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 9px; font-family: var(--mono); font-size: .82rem; font-weight: 500;
  color: var(--text-2); background: transparent; border: 1px solid var(--border); cursor: pointer; transition: all .12s; white-space: nowrap;
}
.chip span:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.chip input:checked + span { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-line); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.link-btn { background: none; border: 0; color: var(--text-2); font-size: .88rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn svg { width: 15px; height: 15px; }
.expected { padding: 8px 4px 2px; }
.expected[hidden] { display: none; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); outline: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { border-color: var(--brand-line); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.hint { color: var(--text-3); font-size: .82rem; margin: 6px 2px 0; }
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; color: var(--text-3); font-size: .85rem; }
.recent button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-size: .8rem; cursor: pointer; font-family: var(--mono);
}
.recent button:hover { color: var(--brand); border-color: var(--brand-line); }
@media (max-width: 720px) {
  .cmd-row { flex-direction: column; }
  .cmd-row .cmd-field { flex: 0 0 auto; width: 100%; }
  .cmd-row .btn-lg { width: 100%; }
  .cmd-field kbd { display: none; }
}

/* ---------- Cards / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 56px 0; }
.section-sm { padding: 28px 0; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head .kicker { color: var(--brand); font-weight: 600; font-size: .85rem; letter-spacing: .02em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.03em; line-height: 1.12; margin: 6px 0 10px; }
.section-head p { margin: 0; color: var(--text-2); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------- Results ---------- */
.results { padding: 12px 0 8px; }
.summary { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 18px 20px; }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: var(--ok); transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1), stroke .3s; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-label b { font-size: 1.35rem; letter-spacing: -.03em; }
.ring-label small { color: var(--text-3); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.sum-main h2 { margin: 0 0 2px; font-size: 1.12rem; letter-spacing: -.01em; word-break: break-all; }
.sum-main h2 .mono { color: var(--brand); }
.sum-main p { margin: 0 0 10px; color: var(--text-3); font-size: .88rem; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); font-size: .86rem; color: var(--text-2); }
.stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex-shrink: 0; }
.dot.ok { background: var(--ok); }
.dot.diff { background: var(--warn); }
.dot.fail { background: var(--bad); }
.sum-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: .85rem; font-weight: 600; color: var(--text-2); height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 28px; height: 16px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--ok); }
.toggle input:checked + .sw::after { transform: translateX(12px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 900px) {
  .summary { grid-template-columns: auto 1fr; }
  .sum-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .summary { grid-template-columns: 1fr; justify-items: start; }
}

.res-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.res-side { position: sticky; top: 84px; display: grid; gap: 16px; }
@media (max-width: 1020px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-side { position: static; order: -1; }
}
.list-card { overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 11px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; color: var(--text-2); padding: 6px 10px; border-radius: 8px; font-size: .84rem; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs .n { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: .78rem; }
.filter { position: relative; flex: 1; min-width: 140px; max-width: 240px; }
.filter svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); }
.filter input { height: 34px; padding-left: 32px; font-size: .86rem; border-radius: 10px; }
.server-list { list-style: none; margin: 0; padding: 0; }
.srv {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.15fr) 64px 22px; gap: 12px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--border); transition: background .15s;
}
.srv:last-child { border-bottom: 0; }
.srv:hover, .srv.hl { background: var(--surface-2); }
.srv .flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); }
.srv .loc { min-width: 0; line-height: 1.3; }
.srv .city { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv .prov { display: block; color: var(--text-3); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv .val { min-width: 0; font-family: var(--mono); font-size: .82rem; line-height: 1.45; color: var(--text); word-break: break-all; }
.srv .val .v { display: block; }
.srv .val .ttl { color: var(--text-3); font-size: .72rem; }
.srv .val .muted { color: var(--text-3); }
.srv .val .err { color: var(--bad); }
.srv .ms { text-align: right; font-size: .78rem; color: var(--text-3); font-variant-numeric: tabular-nums; font-family: var(--mono); }
.st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.st svg { width: 14px; height: 14px; }
.srv[data-state="pending"] .st { background: var(--surface-3); }
.srv[data-state="loading"] .st { border: 2px solid var(--surface-3); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.srv[data-state="ok"] .st { background: var(--ok-soft); color: var(--ok); }
.srv[data-state="diff"] .st { background: var(--warn-soft); color: var(--warn); }
.srv[data-state="fail"] .st { background: var(--bad-soft); color: var(--bad); }
.srv[hidden] { display: none; }
.skeleton { display: block; height: 10px; width: 70%; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { padding: 28px; text-align: center; color: var(--text-3); font-size: .9rem; }
@media (max-width: 640px) {
  .srv { grid-template-columns: 22px minmax(0, 1fr) 22px; grid-template-areas: "f l s" ". v v"; row-gap: 6px; }
  .srv .flag { grid-area: f; }
  .srv .loc { grid-area: l; }
  .srv .st { grid-area: s; }
  .srv .val { grid-area: v; }
  .srv .ms { display: none; }
}

/* Map */
.map-card { padding: 14px; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.card-title h3 { margin: 0; font-size: .95rem; letter-spacing: -.01em; }
.card-title span { color: var(--text-3); font-size: .8rem; }
.map { position: relative; width: 100%; aspect-ratio: 900 / 441; }
.map svg { width: 100%; height: 100%; overflow: visible; }
.map .land { fill: var(--land); stroke: var(--land-line); stroke-width: .4; }
.pin { cursor: pointer; }
.pin .core { fill: var(--idle); stroke: var(--surface); stroke-width: 1.4; transition: fill .3s; }
.pin .halo { fill: var(--idle); opacity: 0; transform-box: fill-box; transform-origin: center; }
.pin[data-state="loading"] .core { fill: var(--brand); }
.pin[data-state="loading"] .halo { fill: var(--brand); animation: halo 1.4s ease-out infinite; }
.pin[data-state="ok"] .core, .pin[data-state="ok"] .halo { fill: var(--ok); }
.pin[data-state="diff"] .core, .pin[data-state="diff"] .halo { fill: var(--warn); }
.pin[data-state="fail"] .core, .pin[data-state="fail"] .halo { fill: var(--bad); }
.pin.pop .halo { animation: halo .9s ease-out 1; }
.pin:hover .core, .pin.hl .core { stroke: var(--text); }
@keyframes halo { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 260px; padding: 8px 10px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-size: .78rem; line-height: 1.35; box-shadow: var(--shadow-lg);
  transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s;
}
.tip.show { opacity: 1; }
.tip b { display: block; font-size: .8rem; }
.tip .mono { display: block; margin-top: 3px; word-break: break-all; opacity: .85; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 2px 0; color: var(--text-3); font-size: .78rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Consensus */
.consensus { padding: 14px; }
.cons-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cons-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 9px 11px; border-radius: 11px; background: var(--surface-2); overflow: hidden; }
.cons-item .bar { position: absolute; inset: 0 auto 0 0; background: var(--brand-soft); z-index: 0; transition: width .4s; }
.cons-item.top .bar { background: var(--ok-soft); }
.cons-item > * { position: relative; z-index: 1; }
.cons-item code { font-family: var(--mono); font-size: .8rem; word-break: break-all; color: var(--text); }
.cons-item .cnt { font-size: .78rem; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cons-item button { grid-column: 1 / -1; justify-self: start; border: 0; background: none; color: var(--brand); font-size: .76rem; padding: 0; cursor: pointer; }
.cons-empty { color: var(--text-3); font-size: .86rem; margin: 4px 2px; }

/* ---------- Content blocks ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 22px; }
.step .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-family: var(--mono); margin-bottom: 12px; }
.step h3 { margin: 0 0 6px; font-size: 1.05rem; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--text-2); font-size: .94rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { padding: 22px; position: relative; overflow: hidden; }
.tile h3 { margin: 10px 0 6px; font-size: 1.04rem; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--text-2); font-size: .93rem; }
.tile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tile .ic.or { background: var(--accent-soft); color: var(--accent); }
.tile .ic.gr { background: var(--ok-soft); color: var(--ok); }
.tile .ic svg { width: 20px; height: 20px; }
.tile .big { font-size: 2.6rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.t-2 { grid-column: span 2; } .t-3 { grid-column: span 3; } .t-4 { grid-column: span 4; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, 1fr); } .t-2, .t-3, .t-4 { grid-column: span 1; } .t-wide { grid-column: 1 / -1; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } }

.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.type-card { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, transform .15s; cursor: pointer; text-align: left; width: 100%; }
.type-card:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.type-card .tag { font-family: var(--mono); font-weight: 600; color: var(--brand); font-size: .9rem; }
.type-card h3 { margin: 4px 0 4px; font-size: .98rem; }
.type-card p { margin: 0; color: var(--text-2); font-size: .88rem; line-height: 1.5; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.code-card { padding: 6px; }
.code-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.code-row:last-child { border-bottom: 0; }
.code-row b { font-size: .86rem; }
.code-row code { font-family: var(--mono); font-size: .8rem; color: var(--text); background: var(--surface-2); padding: 5px 8px; border-radius: 7px; word-break: break-all; }
.copy { border: 1px solid var(--border); background: var(--surface); color: var(--text-3); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.copy:hover { color: var(--brand); border-color: var(--brand-line); }
.copy svg { width: 14px; height: 14px; }
@media (max-width: 520px) { .code-row { grid-template-columns: 1fr auto; } .code-row b { grid-column: 1 / -1; } }

.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; transition: border-color .15s; }
.faq details[open] { border-color: var(--brand-line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--text-3); font-size: 1.2rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--brand); }
.faq .ans { padding: 0 0 16px; color: var(--text-2); }
.faq .ans p { margin: 0 0 8px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tool-link { display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--text); }
.tool-link:hover { color: var(--text); border-color: var(--brand-line); transform: translateY(-2px); }
.tool-link { transition: transform .15s, border-color .15s; }
.tool-link strong { font-size: 1rem; }
.tool-link span { color: var(--text-2); font-size: .88rem; }
.tool-link .go { color: var(--brand); font-size: .85rem; font-weight: 600; margin-top: auto; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tool-grid { grid-template-columns: 1fr; } }

/* Prose (admin & page content) */
.prose { color: var(--text-2); max-width: 820px; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); letter-spacing: -.02em; line-height: 1.2; }
.prose h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); margin: 0 0 14px; letter-spacing: -.035em; }
.prose h2 { font-size: 1.5rem; margin: 34px 0 10px; }
.prose h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); background: var(--surface-2); }
.prose .ql-align-center { text-align: center; }
.prose img { border-radius: 12px; }
.lead-prose p { font-size: 1.08rem; color: var(--text-2); }
.lead-prose h1 { margin-top: 10px; }

/* Tool pages */
.page-hero { padding: 40px 0 8px; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: .85rem; list-style: none; padding: 0; margin: 0 0 6px; flex-wrap: wrap; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.tool-card { padding: 10px; margin-top: 22px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.tool-form { display: flex; gap: 8px; }
.tool-form .cmd-field { height: 54px; }
@media (max-width: 640px) { .tool-form { flex-direction: column; } .tool-form .cmd-field { flex: 0 0 auto !important; width: 100%; } .tool-form .btn { width: 100%; } }
.out { margin-top: 18px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.kv div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.kv span { display: block; color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kv strong { display: block; margin-top: 2px; word-break: break-word; }
.pre { font-family: var(--mono); font-size: .82rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; max-height: 640px; overflow: auto; color: var(--text); }
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.bl-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: .86rem; }
.bl-item code { font-family: var(--mono); font-size: .8rem; word-break: break-all; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.wait { background: var(--surface-2); color: var(--text-3); }
.bl-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table code { font-family: var(--mono); font-size: .82rem; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: .9rem; }
.raw-record { font-family: var(--mono); font-size: .82rem; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; word-break: break-all; color: var(--text); }

/* Ads */
.ad-slot { display: flex; justify-content: center; align-items: center; margin: 16px auto; max-width: 100%; overflow: hidden; }
.ad-slot:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--bg-tint); }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding: 48px 0 28px; }
.foot p { color: var(--text-2); font-size: .92rem; max-width: 36ch; margin: 12px 0 0; }
.foot h4 { margin: 4px 0 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--text-2); font-size: .93rem; }
.foot ul a:hover { color: var(--brand); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 28px; border-top: 1px solid var(--border); color: var(--text-3); font-size: .85rem; flex-wrap: wrap; }
.socials { display: flex; gap: 8px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2); }
.socials a:hover { color: var(--brand); border-color: var(--brand-line); }
.footer-note { color: var(--text-3); font-size: .85rem; }
.footer-note p { margin: 0; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .2s; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin shortcut */
.admin-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-lg); }
.admin-fab:hover { color: var(--bg); opacity: .92; }
.admin-fab svg { width: 16px; height: 16px; }

/* Ad-block notice */
.adblock { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; text-align: center; gap: 10px; background: var(--bg); padding: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
