/* Ver meu IP — design tokens */
:root {
  --bg: oklch(0.18 0.015 250);
  --bg-2: oklch(0.21 0.016 250);
  --surface: oklch(0.235 0.018 250);
  --surface-2: oklch(0.27 0.018 250);
  --border: oklch(0.32 0.018 250);
  --border-strong: oklch(0.42 0.02 250);
  --text: oklch(0.96 0.005 250);
  --text-2: oklch(0.78 0.012 250);
  --text-3: oklch(0.6 0.015 250);
  --accent: oklch(0.74 0.13 165);
  --accent-2: oklch(0.66 0.14 165);
  --accent-soft: oklch(0.32 0.06 165);
  --danger: oklch(0.72 0.14 25);
  --warn: oklch(0.82 0.13 75);
  --info: oklch(0.74 0.12 240);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 1px 2px oklch(0 0 0 / 0.3);
  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Menlo", monospace;
}
:root[data-theme="light"] {
  --bg: oklch(0.94 0.006 250);
  --bg-2: oklch(0.9 0.008 250);
  --surface: oklch(0.985 0.004 250);
  --surface-2: oklch(0.93 0.008 250);
  --border: oklch(0.85 0.012 250);
  --border-strong: oklch(0.74 0.014 250);
  --text: oklch(0.2 0.018 250);
  --text-2: oklch(0.4 0.018 250);
  --text-3: oklch(0.5 0.018 250);
  --accent: oklch(0.52 0.14 165);
  --accent-2: oklch(0.46 0.15 165);
  --accent-soft: oklch(0.88 0.06 165);
  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.05), 0 4px 12px oklch(0 0 0 / 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); font-feature-settings: "zero", "ss01"; }

/* layout */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  color: var(--accent);
}
.brand strong { color: var(--text); font-weight: 600; }
.brand em { font-style: normal; color: var(--accent); font-weight: 600; }

.nav {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  transition: background 120ms, color 120ms;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}
.nav-link[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border);
  transition: all 120ms;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }

/* language selector */
.header-actions { gap: 6px; }
.lang-selector { position: relative; }
.lang-btn {
  width: auto !important;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-btn .lang-globe { display: inline-flex; opacity: 0.85; }
.lang-btn .lang-globe svg { width: 16px; height: 16px; }
.lang-btn .lang-code { letter-spacing: 0.06em; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.35);
  z-index: 100;
  animation: fadein 140ms ease-out;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  font-size: 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 100ms, color 100ms;
}
.lang-option:hover { background: var(--bg-2); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 500; }
.lang-option .lang-flag { font-size: 16px; line-height: 1; }
.lang-option .lang-check { margin-left: auto; color: var(--accent); }
@media (max-width: 720px) {
  .lang-btn .lang-globe { display: none; }
  .lang-btn { padding: 0 8px; min-width: 38px; justify-content: center; }
}

.mobile-toggle { display: none; }
@media (max-width: 880px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px; gap: 4px; align-items: stretch;
  }
  .nav.open .nav-link { padding: 12px; }
  .mobile-toggle { display: inline-grid; }
}

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 20px; }
.card-pad-lg { padding: 28px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all 120ms;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-primary {
  background: var(--accent);
  color: oklch(0.18 0.015 250);
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

/* inputs */
.input, .input-wrap input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: border 120ms, background 120ms;
}
.input:focus, .input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.input-wrap {
  display: flex; align-items: stretch;
  gap: 8px;
}
.input-wrap > .input { flex: 1; }
.input-wrap > .btn { white-space: nowrap; }

/* labels */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-weight: 600;
}
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-2);
}

/* chips / pills */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.chip.green { color: var(--accent); border-color: var(--accent-soft); background: oklch(from var(--accent) l c h / 0.08); }
.chip.amber { color: var(--warn); border-color: oklch(from var(--warn) l c h / 0.3); background: oklch(from var(--warn) l c h / 0.08); }
.chip.red { color: var(--danger); border-color: oklch(from var(--danger) l c h / 0.3); background: oklch(from var(--danger) l c h / 0.08); }

/* dot status */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--accent); box-shadow: 0 0 0 3px oklch(from var(--accent) l c h / 0.18); }
.dot.amber { background: var(--warn); }
.dot.red { background: var(--danger); }

/* hero */
.hero {
  padding: 56px 0 32px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.05;
}
.hero p.lede {
  color: var(--text-2);
  font-size: clamp(15px, 1.4vw, 17px);
  margin: 0 0 28px;
  max-width: 56ch;
}

/* IP card */
.ip-card { padding: 0; overflow: hidden; }
.ip-card-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 360px;
}
@media (max-width: 880px) { .ip-card-grid { grid-template-columns: 1fr; } }

.ip-main { padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.ip-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ip-row .label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.ip-row .value { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--accent); letter-spacing: -0.01em; }
.ip-row .value.muted { color: var(--text-3); font-size: 14px; }

.ip-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ip-meta-cell {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ip-meta-cell:nth-child(2n) { border-right: 0; }
.ip-meta-cell:nth-last-child(-n+2) { border-bottom: 0; }
.ip-meta-cell .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 4px; }
.ip-meta-cell .v { font-size: 14px; color: var(--text); font-weight: 500; }
.ip-meta-cell .v.mono { font-family: var(--font-mono); }

/* map placeholder */
.map-side { position: relative; min-height: 360px; background: var(--bg-2); border-left: 1px solid var(--border); }
@media (max-width: 880px) { .map-side { border-left: 0; border-top: 1px solid var(--border); min-height: 260px; } }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-overlay {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.map-pin {
  position: absolute; width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px oklch(from var(--accent) l c h / 0.2), 0 0 0 14px oklch(from var(--accent) l c h / 0.08);
  transform: translate(-50%, -50%);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(from var(--accent) l c h / 0.5), 0 0 0 0 oklch(from var(--accent) l c h / 0.3); }
  100% { box-shadow: 0 0 0 18px oklch(from var(--accent) l c h / 0), 0 0 0 30px oklch(from var(--accent) l c h / 0); }
}

/* quick tools row */
.quick-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 880px) { .quick-tools { grid-template-columns: repeat(2, 1fr); } }
.quick-tool {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 140ms;
}
.quick-tool:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.quick-tool .ic { color: var(--accent); }
.quick-tool .t { font-weight: 500; font-size: 14px; }
.quick-tool .s { font-size: 12px; color: var(--text-3); }

/* sections */
section.block { padding: 56px 0; }
.block h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.block .sub { color: var(--text-2); margin: 0 0 24px; max-width: 60ch; }

/* faq */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 10px; }
.faq-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-weight: 500;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-summary { border-bottom: 1px solid var(--border); }
.faq-summary .chev { transition: transform 200ms; color: var(--text-3); }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-body { padding: 16px 20px 20px; color: var(--text-2); font-size: 14px; line-height: 1.65; }

/* terminal */
.terminal {
  background: oklch(0.13 0.015 250);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  color: oklch(0.92 0.005 250);
}
:root[data-theme="light"] .terminal {
  background: oklch(0.16 0.015 250);
  color: oklch(0.94 0.005 250);
  border-color: oklch(0.16 0.015 250);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: oklch(0.16 0.015 250);
  border-bottom: 1px solid oklch(0.22 0.018 250);
  color: oklch(0.7 0.012 250);
  font-size: 12px;
}
.terminal-bar .dots { display: flex; gap: 6px; margin-right: 6px; }
.terminal-bar .dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: oklch(0.32 0.018 250); }
.terminal-body {
  padding: 16px 18px;
  min-height: 280px;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 420px;
}
.terminal-line { padding: 1px 0; }
.t-prompt { color: var(--accent); }
.t-dim { color: oklch(0.55 0.012 250); }
.t-ok { color: var(--accent); }
.t-warn { color: var(--warn); }
.t-err { color: var(--danger); }

/* stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.stat .v { font-family: var(--font-mono); font-size: 22px; font-weight: 500; margin-top: 6px; letter-spacing: -0.01em; }
.stat .u { font-size: 12px; color: var(--text-3); margin-left: 4px; }

/* table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); font-weight: 600;
  background: var(--bg-2);
}
.table td.mono { font-family: var(--font-mono); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }

/* ad slot */
.ad-slot {
  position: relative;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, oklch(from var(--text-3) l c h / 0.04) 14px 15px),
    var(--bg-2);
  color: var(--text-3);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}
.ad-slot::before {
  content: "PUBLICIDADE";
  position: absolute; top: 8px; left: 12px;
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--text-3);
}
.ad-slot.h-banner { min-height: 100px; padding: 28px 16px 16px; }
.ad-slot.h-leader { min-height: 120px; padding: 28px 16px 16px; }
.ad-slot.h-square { min-height: 280px; padding: 28px 16px 16px; }
.ad-slot.h-side { min-height: 600px; padding: 28px 16px 16px; }

/* vpn affiliate card */
.vpn-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(from var(--accent) l c h / 0.12), oklch(from var(--accent) l c h / 0.04));
  border: 1px solid oklch(from var(--accent) l c h / 0.3);
}
.vpn-card .ic {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent);
  color: oklch(0.18 0.015 250);
  flex: none;
}
.vpn-card .t { font-weight: 600; }
.vpn-card .s { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.vpn-card .cta { margin-left: auto; }
.vpn-affiliate-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin-bottom: 4px;
}

/* history */
.history {
  display: flex; flex-direction: column; gap: 8px;
}
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.history-item .mono { color: var(--accent); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .when { color: var(--text-3); font-size: 12px; }
.history-item button { padding: 4px 8px; font-size: 12px; }

/* speed gauge */
.gauge {
  position: relative;
  aspect-ratio: 2/1.05;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.gauge svg { width: 100%; height: 100%; display: block; }
.gauge-readout {
  position: absolute;
  left: 50%; bottom: 8%;
  transform: translateX(-50%);
  text-align: center;
}
.gauge-readout .num { font-family: var(--font-mono); font-size: 44px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.gauge-readout .unit { font-size: 13px; color: var(--text-3); }
.gauge-readout .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin-bottom: 4px; }

/* progress bar */
.progress { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 200ms; }

/* footer */
.site-footer {
  margin-top: 64px;
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 32px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 10px; color: var(--text-2); }
.footer-col a { display: block; padding: 4px 0; color: var(--text-3); }
.footer-col a:hover { color: var(--text); }

/* utilities */
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 880px) { .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } }

/* copy button */
.copy-btn {
  background: transparent; border: 1px solid var(--border);
  width: 30px; height: 30px; border-radius: 6px;
  display: inline-grid; place-items: center;
  color: var(--text-3); flex: none;
  transition: all 120ms;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* skeleton */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 6px;
  height: 1em; min-width: 80px;
  color: transparent;
}

/* animation utils */
.fade-in { animation: fadein 280ms ease-out both; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* page transitions */
.page { animation: fadein 200ms ease-out both; }

/* tweaks panel adjustments (override starter where needed) */
.tweaks-panel { font-family: var(--font-sans); }

/* responsive ad visibility */
.ad-mobile-only  { display: none; }
.ad-desktop-only { display: grid; }
@media (max-width: 880px) {
  .ad-mobile-only  { display: grid; }
  .ad-desktop-only { display: none; }
}

/* cookie consent banner (GDPR / LGPD) */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 20px;
  background: oklch(from var(--surface) l c h / 0.96);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px oklch(0 0 0 / 0.35);
  font-size: 14px; line-height: 1.55;
  animation: slideUp 320ms cubic-bezier(.2,.7,.3,1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner .text { flex: 1; min-width: 0; color: var(--text-2); }
.cookie-banner .text strong { color: var(--text); }
.cookie-banner .text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner .actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 720px) {
  .cookie-banner { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .cookie-banner .actions { justify-content: flex-end; }
}

/* legal pages (privacy / terms) */
.legal-page { padding: 40px 0 60px; }
.legal-page h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.legal-page .updated { color: var(--text-3); font-size: 13px; margin-bottom: 32px; }
.legal-page h2 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; }
.legal-page h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.legal-page p, .legal-page li { color: var(--text-2); line-height: 1.7; }
.legal-page ul { padding-left: 22px; }
.legal-page li + li { margin-top: 6px; }
.legal-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-toc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin-bottom: 28px; }
.legal-toc strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.legal-toc ol { margin: 0; padding-left: 20px; }
.legal-toc li { font-size: 13px; }

/* modal overlay (ad-blocker + rate-limit) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: oklch(0 0 0 / 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-box {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 24px 80px oklch(0 0 0 / 0.5);
  text-align: center;
}

/* ────────────────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE FIXES
   - Prevent horizontal scroll
   - Truncate long mono values (IPv6, hostname, ISP, ASN)
   - Stack VPN/history items so they fit narrow screens
   - Force quick-tools to 2 columns (2×3 grid for 6 items)
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  html, body { overflow-x: hidden; }

  /* Tighter container padding on small screens */
  .container, .container-narrow { padding: 0 16px; }

  /* Critical: allow flex/grid children to shrink below content width */
  .grid-2 > *, .stack-lg, .stack-lg > *, .card { min-width: 0; }

  /* Hero — slightly tighter spacing */
  .hero { padding: 32px 0 20px; }

  /* IP card — let flex/grid children shrink and truncate */
  .ip-main { padding: 18px 14px; gap: 14px; }
  .ip-row  { padding: 12px 14px; gap: 10px; }
  .ip-row > div:first-child { min-width: 0; flex: 1; }
  .ip-row .label { font-size: 11px; }
  .ip-row .value {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ip-row .value.mono { font-size: 13px; }

  /* IP meta cells — allow truncation */
  .ip-meta-cell    { padding: 11px 12px; min-width: 0; }
  .ip-meta-cell .v { font-size: 13px; }

  /* Map slightly shorter on mobile */
  .map-side { min-height: 220px; }

  /* Quick tools — force 2 columns regardless of inline style */
  .quick-tools { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .quick-tool  { padding: 12px 14px; }
  .quick-tool .t { font-size: 13px; }
  .quick-tool .s { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* VPN affiliate card — stack vertically */
  .vpn-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }
  .vpn-card > div:nth-child(2) { flex-basis: calc(100% - 60px); }
  .vpn-card .cta {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  /* History items — wrap when narrow */
  .history-item { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; }
  .history-item .mono { width: 100%; }

  /* Stats grid — 2 columns */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* DNS / WHOIS / etc. tables — allow horizontal scroll INSIDE the card */
  .card { overflow: hidden; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 10px 10px; }

  /* WHOIS field grid — single column on mobile */
  .legal-page h1 { font-size: 26px; }

  /* Footer columns — 2 cols on tablet, 1 on small phones */
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }

  /* Cookie banner closer to edges */
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; }
}

/* Extra-tight phones */
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  /* WHOIS field grid forced to one column */
  .card > div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .card > div[style*="grid-template-columns: 1fr 1fr"] > div { border-right: 0 !important; }
}
