/* dns.caliph.dev — dark, monospace-leaning network console aesthetic. */

:root {
  --bg:        #070b10;
  --bg-soft:   #0b1118;
  --panel:     #0d141c;
  --panel-2:   #111a24;
  --line:      #1a2634;
  --line-soft: #141d27;

  --text:  #dbe6f2;
  --dim:   #8ea3b8;
  --faint: #5a6f85;

  --accent:  #35e0a1;   /* healthy / primary */
  --cyan:    #4cc9f0;   /* secondary series */
  --amber:   #f5b544;
  --red:     #ff6b6b;
  --violet:  #a78bfa;
  --rose:    #f472b6;   /* adult content */

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 10px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Faint routing grid, fading out below the fold. */
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1000px 520px at 50% -10%, rgba(53,224,161,.10), transparent 70%),
              linear-gradient(180deg, transparent 0%, var(--bg) 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 22px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #06231a; padding: 10px 16px; border-radius: 6px; z-index: 99;
}
.skip:focus { left: 16px; top: 12px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Top bar ─────────────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 58px; }

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 15px; font-weight: 600;
  color: var(--text); letter-spacing: -.2px;
}
.brand:hover { text-decoration: none; }
.brand-dim { color: var(--faint); }
.brand-mark { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.4; }

.topnav { display: flex; gap: 20px; margin-left: auto; font-size: 13.5px; }
.topnav a { color: var(--dim); }
.topnav a:hover { color: var(--text); text-decoration: none; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 11px;
  white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.status[data-state="live"]    { color: var(--accent); border-color: rgba(53,224,161,.3); }
.status[data-state="live"] .status-dot { background: var(--accent); animation: pulse 2s ease-in-out infinite; }
.status[data-state="down"]    { color: var(--red); border-color: rgba(255,107,107,.35); }
.status[data-state="down"] .status-dot { background: var(--red); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53,224,161,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(53,224,161,0); }
}

/* ── Hero ────────────────────────────────────────────────────────────── */

main { position: relative; z-index: 1; }

.hero { padding: 84px 0 62px; }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 18px;
}
.eyebrow::before { content: "▚ "; color: var(--accent); }

h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 6.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 650;
}
.accent {
  background: linear-gradient(96deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { max-width: 60ch; color: var(--dim); font-size: 16.5px; margin: 0 0 34px; }
.lede strong { color: var(--text); font-family: var(--mono); font-weight: 500; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 46px; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-value {
  font-family: var(--mono); font-size: 25px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}

/* ── Sections ────────────────────────────────────────────────────────── */

.section { padding: 56px 0; border-top: 1px solid var(--line-soft); }

.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 0 0 6px; font-size: 13px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  font-family: var(--mono);
}
.section-head p { margin: 0; color: var(--dim); font-size: 15px; }

/* ── Endpoint cards ──────────────────────────────────────────────────── */

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: #24384a; transform: translateY(-2px); }
.card.recommended { border-color: rgba(53,224,161,.32); background: linear-gradient(180deg, rgba(53,224,161,.05), var(--panel) 60%); }

.card-head { display: flex; align-items: center; gap: 8px; }
.proto {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); background: rgba(53,224,161,.1);
  border: 1px solid rgba(53,224,161,.25); border-radius: 5px; padding: 2px 7px;
}
.tag {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-left: auto;
}
.tag.muted { color: var(--faint); }

.card h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.card-note { margin: 0 0 4px; color: var(--faint); font-size: 13px; line-height: 1.5; }

.copy {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 7px;
  padding: 9px 11px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.copy:hover { border-color: rgba(53,224,161,.4); background: #0e1620; }
.copy code {
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.copy-icon {
  flex: none; width: 13px; height: 13px; border-radius: 2px;
  border: 1.5px solid var(--faint);
  box-shadow: 3px -3px 0 -1.5px var(--bg-soft), 4px -4px 0 -1.5px var(--faint);
  margin-right: 3px;
}
.copy:hover .copy-icon { border-color: var(--accent); box-shadow: 3px -3px 0 -1.5px var(--bg-soft), 4px -4px 0 -1.5px var(--accent); }
.copy.copied { border-color: var(--accent); }
.copy.copied .copy-icon {
  border-radius: 0; border-width: 0 0 2px 2px; border-color: var(--accent);
  width: 12px; height: 6px; box-shadow: none; transform: rotate(-45deg) translate(1px, -2px);
}

/* ── Metric tiles ────────────────────────────────────────────────────── */

.tiles {
  display: grid; gap: 1px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.tile { background: var(--panel); padding: 17px 18px; display: flex; flex-direction: column; gap: 3px; }
.tile-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.tile-value {
  font-family: var(--mono); font-size: 24px; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.25;
}
.tile-sub { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ── Panels ──────────────────────────────────────────────────────────── */

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px;
}
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h3 {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dim); font-family: var(--mono);
}
.panel-note { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

.legend { display: flex; align-items: center; gap: 15px; margin-left: auto; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.swatch { width: 9px; height: 9px; border-radius: 2px; }
.swatch-qps { background: var(--accent); }
.swatch-blocked { background: var(--violet); }
.legend-window { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.chart-holder { position: relative; height: 230px; }
#chart { width: 100%; height: 100%; display: block; }
.chart-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  margin: 0; color: var(--faint); font-family: var(--mono); font-size: 12.5px;
}
.chart-empty[hidden] { display: none; }

/* ── Transport bars ──────────────────────────────────────────────────── */

.split { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.split .panel { margin-bottom: 0; }

.bars, .nodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.bars-empty { color: var(--faint); font-family: var(--mono); font-size: 12.5px; }

.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-top { display: flex; align-items: baseline; gap: 10px; font-size: 13px; }
.bar-name { color: var(--text); }
.bar-count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar-pct { font-family: var(--mono); font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.bar-track { height: 5px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s cubic-bezier(.4,0,.2,1); }
.bar-row[data-key="dot"]      .bar-fill { background: var(--cyan); }
.bar-row[data-key="doq"]      .bar-fill { background: var(--violet); }
.bar-row[data-key="do53-udp"] .bar-fill { background: var(--amber); }
.bar-row[data-key="do53-tcp"] .bar-fill { background: #7d8fa3; }

/* ── Upstream nodes ──────────────────────────────────────────────────── */

.node { display: flex; align-items: center; gap: 11px; font-size: 13.5px; }
.node-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--accent); }
.node-dot.down { background: var(--red); }
.node-dot.unknown { background: var(--faint); }
.node-name { font-family: var(--mono); font-size: 13px; }
.node-pool {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
}
.node-metrics {
  margin-left: auto; display: flex; gap: 16px;
  font-family: var(--mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.node-metrics b { color: var(--dim); font-weight: 500; }

/* ── Response codes ──────────────────────────────────────────────────── */

.rcode-panel { margin-top: 18px; }
.rcodes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rcode { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.rcode-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rcode-dot.ok { background: var(--accent); }
.rcode-dot.warn { background: var(--amber); }
.rcode-dot.bad { background: var(--red); }
.rcode-dot.mute { background: var(--faint); }
.rcode-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--faint); }
.rcode-value { margin-left: auto; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── Setup tabs ──────────────────────────────────────────────────────── */

.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tabs button {
  font: inherit; font-size: 13px;
  background: transparent; color: var(--dim);
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 14px; cursor: pointer;
  transition: all .15s ease;
}
.tabs button:hover { color: var(--text); border-color: #24384a; }
.tabs button[aria-selected="true"] {
  color: var(--accent); border-color: rgba(53,224,161,.4); background: rgba(53,224,161,.07);
}

.tabpanels {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.tabpanels ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; color: var(--dim); }
.tabpanels ol b { color: var(--text); font-weight: 600; }
.tabpanels ol::marker { color: var(--faint); }
.hint { color: var(--faint); font-size: 13px; margin: 14px 0 0; }
.tabpanels > div > .hint:first-child { margin-top: 0; }

code.inline {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 4px; padding: 1.5px 6px; color: var(--accent);
}

pre {
  margin: 14px 0 0; padding: 14px 16px; overflow-x: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
}
pre code { font-family: var(--mono); font-size: 12.5px; color: var(--dim); line-height: 1.65; }

.verify { margin-top: 26px; }
.verify h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-family: var(--mono); }

/* ── Policy ──────────────────────────────────────────────────────────── */

.policy-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.policy {
  border-left: 2px solid var(--line); padding-left: 16px;
}
.policy h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.policy p { margin: 0; color: var(--faint); font-size: 13.5px; line-height: 1.6; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); padding: 34px 0; margin-top: 20px; position: relative; z-index: 1; }
.footer-inner { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { margin: 0 0 4px; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.footer-note { margin: 0; color: var(--faint); font-size: 12.5px; }
.footer-links { margin-left: auto; display: flex; gap: 18px; font-size: 13px; }
.footer-links a { color: var(--dim); }

/* ── Toast ───────────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: var(--panel-2); border: 1px solid rgba(53,224,161,.35); color: var(--text);
  font-family: var(--mono); font-size: 12.5px;
  padding: 9px 16px; border-radius: 7px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 40; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .hero { padding: 58px 0 46px; }
  .section { padding: 44px 0; }
  .node-metrics { gap: 11px; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 14px 26px; }
  .hero-stat-value { font-size: 21px; }
  .tile-value { font-size: 21px; }
  .chart-holder { height: 190px; }
  .node { flex-wrap: wrap; }
  .node-metrics { margin-left: 19px; width: 100%; }
}

/* ── Blocklist lookup ────────────────────────────────────────────────── */

.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;
}

.lookup {
  display: flex; align-items: stretch; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.lookup-field {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0; padding-left: 8px;
}
.lookup:focus-within {
  border-color: rgba(53,224,161,.45);
  box-shadow: 0 0 0 3px rgba(53,224,161,.08);
}
.lookup-prompt { font-family: var(--mono); color: var(--accent); font-size: 14px; user-select: none; }

.lookup input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none; color: var(--text);
  font-family: var(--mono); font-size: 14.5px; padding: 10px 0;
}
.lookup input::placeholder { color: #47596c; }

.lookup-submit {
  flex: none; font: inherit; font-size: 13.5px; font-weight: 500;
  background: var(--accent); color: #05231a;
  border: 0; border-radius: 7px; padding: 10px 20px; cursor: pointer;
  transition: filter .15s ease;
  white-space: nowrap;
}
.lookup-submit:hover { filter: brightness(1.08); }
.lookup-submit:disabled { opacity: .55; cursor: progress; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.chips-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-right: 2px;
}
.chips button {
  font-family: var(--mono); font-size: 12px;
  background: transparent; color: var(--dim);
  border: 1px solid var(--line); border-radius: 100px; padding: 4px 12px; cursor: pointer;
  transition: all .15s ease;
}
.chips button:hover { color: var(--text); border-color: #24384a; }

.lookup-result:empty { display: none; }
.lookup-result { margin-top: 16px; }

.verdict {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 2px solid var(--edge, var(--line));
  border-radius: var(--radius); padding: 18px 20px;
  animation: verdict-in .22s ease;
}
@keyframes verdict-in { from { opacity: 0; transform: translateY(-4px); } }

.verdict[data-status="blocked"] { --edge: var(--violet); }
.verdict[data-status="allowed"] { --edge: var(--cyan); }
.verdict[data-status="clean"]   { --edge: var(--accent); }
.verdict[data-status="error"]   { --edge: var(--amber); }

.verdict-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.verdict-badge {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: 5px; padding: 3px 9px;
  color: var(--edge); background: color-mix(in srgb, var(--edge) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--edge) 32%, transparent);
}
.verdict-domain {
  font-family: var(--mono); font-size: 15px; font-weight: 600;
  word-break: break-all; letter-spacing: -.01em;
}

.verdict-line { margin: 12px 0 0; color: var(--dim); font-size: 14px; line-height: 1.6; }
.verdict-line b { color: var(--text); font-weight: 600; }
.verdict-line code {
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 6px;
}

.verdict-answer {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
}
.verdict-answer b { color: var(--dim); font-weight: 500; }

.walk { margin-top: 16px; }
.walk-title {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 9px;
}
.walk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.walk-step {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; color: var(--dim);
}
.walk-step .step-mark {
  flex: none; width: 15px; text-align: center; color: var(--faint); font-size: 11px;
}
.walk-step .step-name { word-break: break-all; }
.walk-step .step-note { margin-left: auto; color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.walk-step[data-result="block"]   { color: var(--violet); }
.walk-step[data-result="block"]   .step-mark, .walk-step[data-result="block"] .step-note { color: var(--violet); }
.walk-step[data-result="allow"]   { color: var(--cyan); }
.walk-step[data-result="allow"]   .step-mark, .walk-step[data-result="allow"] .step-note { color: var(--cyan); }
.walk-step[data-result="skipped"] { opacity: .45; }

.lookup-foot { margin: 14px 0 0; color: var(--faint); font-size: 12.5px; }

@media (max-width: 560px) {
  /* The field keeps its own row and the submit button takes the next one --
     only that button stretches, never the little clear icon. */
  .lookup { flex-wrap: wrap; padding: 8px; }
  .lookup-field { flex-basis: 100%; padding-left: 6px; }
  .lookup-kbd { display: none; }
  .lookup-submit { width: 100%; padding: 11px 20px; }
  .walk-step .step-note { margin-left: 0; width: 100%; padding-left: 25px; }
  .walk-step { flex-wrap: wrap; }
}

/* ── Anchors clear the sticky header ─────────────────────────────────── */

.section, .hero { scroll-margin-top: 72px; }

/* ── Active section in the nav ───────────────────────────────────────── */

.topnav a { position: relative; padding-block: 4px; }
.topnav a[data-active]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); border-radius: 2px;
}
.topnav a[data-active] { color: var(--text); }

/* ── Hamburger ───────────────────────────────────────────────────────── */

.menu-toggle {
  display: none;
  /* The nav and the status pill are both hidden at this width, so the button
     needs its own push to the right edge. */
  margin-left: auto;
  width: 38px; height: 34px; flex: none;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; padding: 0;
  transition: border-color .15s ease;
}
.menu-toggle:hover { border-color: #24384a; }

/* Three bars drawn from one element: the middle is the box, the outer two
   are its pseudo-elements, so the whole thing can morph into a cross. */
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 16px; height: 1.5px; border-radius: 2px;
  background: var(--text);
  transition: transform .22s ease, opacity .16s ease, width .22s ease;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -5px; width: 16px; }
.menu-bars::after  { top: 5px; width: 11px; }

.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after  { top: 0; width: 16px; transform: rotate(-45deg); }

/* ── Drawer ──────────────────────────────────────────────────────────── */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(3, 6, 10, .68);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .24s ease;
}
.drawer-backdrop.open { opacity: 1; }
.drawer-backdrop[hidden] { display: none; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 46;
  width: min(340px, 86vw);
  display: flex; flex-direction: column;
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  box-shadow: -22px 0 48px rgba(0, 0, 0, .42);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32, .72, .26, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-soft); z-index: 1;
}
.drawer-title { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.drawer-close {
  margin-left: auto; width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: transparent; color: var(--dim);
  border: 1px solid var(--line); border-radius: 7px;
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.drawer-close:hover { color: var(--text); border-color: #24384a; }

.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav a {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 18px; color: var(--text);
  border-left: 2px solid transparent;
  transition: background .14s ease, border-color .14s ease;
}
.drawer-nav a:hover { background: rgba(255, 255, 255, .03); text-decoration: none; }
.drawer-nav a[data-active] { border-left-color: var(--accent); background: rgba(53, 224, 161, .06); }
.drawer-nav a[data-active] b { color: var(--accent); }
.drawer-num {
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  letter-spacing: .06em; flex: none;
}
.drawer-nav b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.drawer-nav small { display: block; font-size: 11.5px; color: var(--faint); }

.drawer-block { padding: 16px 18px; border-top: 1px solid var(--line-soft); }
.drawer-label {
  margin: 0 0 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--faint);
}
.drawer-block .copy { margin-bottom: 7px; padding: 8px 10px; }
.drawer-block .copy:last-child { margin-bottom: 0; }
.drawer-block .copy code { font-size: 11.5px; }
.copy-proto {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); flex: none;
  border: 1px solid rgba(53, 224, 161, .25); border-radius: 4px; padding: 1px 5px;
}

.drawer-live { display: flex; gap: 16px; margin-bottom: 12px; }
.drawer-live > div { display: flex; flex-direction: column; gap: 1px; }
.drawer-live-value {
  font-family: var(--mono); font-size: 16px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.drawer-live-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }

.drawer-foot {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 16px;
  padding: 16px 18px; border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.drawer-foot a { color: var(--dim); }

body.drawer-open { overflow: hidden; }

/* ── Back to top ─────────────────────────────────────────────────────── */

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--panel-2); color: var(--dim);
  border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, color .15s ease, border-color .15s ease;
}
.to-top { pointer-events: none; }
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: rgba(53, 224, 161, .4); }
.to-top[hidden] { display: none; }
.to-top svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Lookup affordances ──────────────────────────────────────────────── */

.lookup-clear {
  flex: 0 0 auto; width: 24px; height: 24px; padding: 0;
  display: grid; place-items: center;
  background: transparent; color: var(--faint);
  border: 0; border-radius: 50%; cursor: pointer;
  transition: color .14s ease, background .14s ease;
}
.lookup-clear svg {
  width: 11px; height: 11px; fill: none;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.lookup-clear:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.lookup-clear[hidden] { display: none; }

.lookup-kbd {
  flex: none;
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 7px; background: var(--bg-soft);
}
.lookup:focus-within .lookup-kbd { opacity: 0; }

/* ── Chart hover readout ─────────────────────────────────────────────── */

.chart-holder { touch-action: pan-y; }

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 10px; min-width: 108px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  opacity: 0; transition: opacity .12s ease;
}
.chart-tip.show { opacity: 1; }
.chart-tip-time { color: var(--faint); font-size: 10.5px; letter-spacing: .05em; }
.chart-tip-row { display: flex; align-items: center; gap: 7px; color: var(--dim); }
.chart-tip-row b { margin-left: auto; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Responsive: the drawer takes over below the nav breakpoint ──────── */

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .topbar-inner .status { display: none; }
  .section, .hero { scroll-margin-top: 64px; }
}

@media (min-width: 861px) {
  /* Desktop keeps the inline nav; the drawer is never reachable. */
  .drawer, .drawer-backdrop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
  .drawer-backdrop { transition: none; }
}

/* ── Block page ──────────────────────────────────────────────────────── */

/* The page people land on when the resolver refuses a name. Violet is the
   blocked colour everywhere else on the site, so it leads here too. */
.page-blocked::before {
  background: radial-gradient(900px 460px at 50% -10%, rgba(167, 139, 250, .13), transparent 70%),
              linear-gradient(180deg, transparent 0%, var(--bg) 70%);
}

.blocked-main { position: relative; z-index: 1; }
.blocked-wrap { padding-block: 56px 40px; max-width: 820px; }

.blocked-hero { margin-bottom: 40px; }

.blocked-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 20px;
  border: 1px solid rgba(167, 139, 250, .3);
  background: rgba(167, 139, 250, .08);
  border-radius: 12px;
}
.blocked-mark svg {
  width: 23px; height: 23px; fill: none;
  stroke: var(--violet); stroke-width: 1.6; stroke-linecap: round;
}

.eyebrow-blocked { color: var(--violet); }
.eyebrow-blocked::before { content: "▚ "; color: var(--violet); }

.blocked-hero h1 {
  font-size: clamp(27px, 4.6vw, 38px);
  margin-bottom: 14px;
}

.blocked-domain {
  margin: 0 0 18px;
  font-family: var(--mono); font-size: clamp(15px, 3.4vw, 19px); font-weight: 600;
  color: var(--text); word-break: break-all; letter-spacing: -.01em;
  border-left: 2px solid var(--violet); padding: 5px 0 5px 14px;
}
.blocked-domain[hidden] { display: none; }

.blocked-lede { margin-bottom: 0; font-size: 15.5px; }

.blocked-section-title {
  margin: 0 0 16px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}

.blocked-reason, .blocked-actions, .blocked-lookup {
  padding-top: 30px; margin-top: 30px; border-top: 1px solid var(--line-soft);
}
.blocked-reason { padding-top: 0; margin-top: 0; border-top: 0; }

.reason-loading {
  margin: 0; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
}

.blocked-lookup .lookup-result:not(:empty) { margin-top: 16px; }

.blocked-foot {
  margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line-soft);
  color: var(--faint); font-size: 13px; line-height: 1.7;
}
.blocked-foot a { margin-left: 6px; }

@media (max-width: 560px) {
  .blocked-wrap { padding-block: 38px 32px; }
  .blocked-reason, .blocked-actions, .blocked-lookup { padding-top: 24px; margin-top: 24px; }
}

/* ── Filtering / family safe ─────────────────────────────────────────── */

.family {
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(53, 224, 161, .06), var(--panel) 70%);
  border: 1px solid rgba(53, 224, 161, .28);
  border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px;
}
.family-mark {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(53, 224, 161, .1);
  border: 1px solid rgba(53, 224, 161, .28);
}
.family-mark svg {
  width: 21px; height: 21px; fill: none;
  stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.family-copy h3 { margin: 0 0 7px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.family-copy p { margin: 0; color: var(--dim); font-size: 14.5px; line-height: 1.65; max-width: 68ch; }

.categories {
  list-style: none; margin: 0 0 12px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 14px;
}
.categories .bar-row[data-key="adult"]    .bar-fill { background: var(--rose); }
.categories .bar-row[data-key="gambling"] .bar-fill { background: var(--amber); }
.categories .bar-row[data-key="malware"]  .bar-fill { background: var(--red); }
.categories .bar-row[data-key="misinfo"]  .bar-fill { background: var(--cyan); }
.categories .bar-row[data-key="ads"]      .bar-fill { background: var(--accent); }

/* The two that carry the family claim get named as such. */
.cat-tag {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  border-radius: 4px; padding: 1px 6px;
  color: var(--rose); border: 1px solid rgba(244, 114, 182, .3);
  background: rgba(244, 114, 182, .09);
}
.bar-row[data-key="gambling"] .cat-tag {
  color: var(--amber); border-color: rgba(245, 181, 68, .3); background: rgba(245, 181, 68, .09);
}

.categories-foot { margin: 0 0 26px; color: var(--faint); font-size: 12.5px; }

.caveat { margin-bottom: 0; }
.caveat-lede { margin: 0 0 14px; color: var(--dim); font-size: 14px; }
.caveat-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 11px; }
.caveat-list li { color: var(--faint); font-size: 13.5px; line-height: 1.65; }
.caveat-list li::marker { color: var(--line); }
.caveat-list b { color: var(--text); font-weight: 600; }
.caveat-foot {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--faint); font-size: 13px;
}

@media (max-width: 560px) {
  .family { flex-direction: column; gap: 14px; padding: 18px; }
  .categories { padding: 16px; }
}

.verdict-category {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 0; font-size: 13px; color: var(--dim);
}
.verdict-category b { color: var(--text); font-weight: 600; }
.verdict-category-dot {
  width: 7px; height: 7px; border-radius: 2px; flex: none; background: var(--edge, var(--violet));
}
