/* Default: Warm Ivory / Rice Paper Theme (大米白护眼浅配色) */
:root,
html[data-theme="rice"] {
  --bg: #f6f3ea;
  --bg-elev: #fcfbf6;
  --bg-subtle: #eee9dc;
  --border: #dfd8c7;
  --border-strong: #cbc2ad;
  --text: #221f1a;
  --text-muted: #5b5449;
  --text-dim: #847c6d;
  --accent: #0369a1;
  --accent-bg: rgba(3, 105, 161, 0.1);
  --v6: #6d28d9;
  --v6-bg: rgba(109, 40, 217, 0.09);
  --ok: #047857;
  --ok-bg: rgba(4, 120, 87, 0.1);
  --warn: #b45309;
  --warn-bg: rgba(180, 83, 9, 0.12);
  --err: #be123c;
  --err-bg: rgba(190, 18, 60, 0.1);
  --viz-bg: #f2eee2;
  --viz-grid: #ddd5c3;
  --viz-text: #1f1c17;
  --viz-edge: #8d8474;
  --viz-hint-bg: rgba(252, 251, 246, 0.9);
  --viz-hint-text: #5b5449;
  --map-ocean: #efeade;
  --map-land: #dfd7c4;
  --map-coast: #b8ae97;
  --map-dot: #9e937c;
  --pre-bg: #f2eee2;
  --pre-text: #2c2822;
  --shadow: 0 8px 24px rgba(64, 52, 32, 0.08);
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #070c18;
  --bg-elev: #0d1526;
  --bg-subtle: #111c33;
  --border: #1e2d4a;
  --border-strong: #2d4268;
  --text: #e6edf8;
  --text-muted: #8ea1be;
  --text-dim: #5f7394;
  --accent: #38bdf8;
  --accent-bg: rgba(56, 189, 248, 0.12);
  --v6: #a78bfa;
  --v6-bg: rgba(167, 139, 250, 0.12);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --err: #fb7185;
  --err-bg: rgba(251, 113, 133, 0.12);
  --viz-bg: #060b16;
  --viz-grid: #13203a;
  --viz-text: #e2e8f0;
  --viz-edge: #475569;
  --viz-hint-bg: rgba(15, 23, 42, 0.84);
  --viz-hint-text: #94a3b8;
  --map-ocean: #070e1c;
  --map-land: #13233d;
  --map-coast: #2c466f;
  --map-dot: #3a5987;
  --pre-bg: #060a14;
  --pre-text: #cbd5e1;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"],
html.light {
  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-subtle: #eef2f8;
  --border: #dce4f0;
  --border-strong: #c2cfe3;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #0284c7;
  --accent-bg: rgba(2, 132, 199, 0.1);
  --v6: #7c3aed;
  --v6-bg: rgba(124, 58, 237, 0.1);
  --ok: #059669;
  --ok-bg: rgba(5, 150, 105, 0.1);
  --warn: #d97706;
  --warn-bg: rgba(217, 119, 6, 0.12);
  --err: #e11d48;
  --err-bg: rgba(225, 29, 72, 0.1);
  --viz-bg: #f8fafc;
  --viz-grid: #e2e8f0;
  --viz-text: #0f172a;
  --viz-edge: #94a3b8;
  --viz-hint-bg: rgba(255, 255, 255, 0.9);
  --viz-hint-text: #475569;
  --map-ocean: #f4f7fb;
  --map-land: #e2e8f2;
  --map-coast: #b8c6db;
  --map-dot: #94a7c4;
  --pre-bg: #f1f5f9;
  --pre-text: #1e293b;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-icon {
  display: inline-block;
  width: 1.2em;
  height: 0.88em;
  vertical-align: -0.12em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.24);
  object-fit: cover;
  flex-shrink: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.brand-icon { width: 28px; height: 28px; border-radius: 7px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover, .nav a.active {
  background: var(--accent-bg);
  color: var(--accent);
  text-decoration: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 500px;
  justify-content: flex-end;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.theme-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.theme-opt:hover { color: var(--text); }
.theme-opt.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.45);
  display: inline-block;
}
.theme-dot.dark { background: #0d1526; }
.theme-dot.rice { background: #f3ede0; }
.theme-dot.light { background: #ffffff; }

/* Omnibox */
.omnibox { position: relative; width: 100%; }
.omnibox-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.omnibox-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.omnibox.hero .omnibox-form {
  padding: 10px 14px;
  border-radius: 14px;
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.omnibox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--sans);
}
.omnibox.hero input { font-size: 15.5px; }
.omnibox input::placeholder { color: var(--text-dim); }
.omnibox kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.omnibox-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 60;
  max-height: 390px;
  overflow-y: auto;
  display: none;
}
.omnibox-dropdown.open { display: block; }
.omnibox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.omnibox-item:last-child { border-bottom: 0; }
.omnibox-item:hover, .omnibox-item.selected {
  background: var(--accent-bg);
  text-decoration: none;
}
.omnibox-item-title { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.omnibox-item-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.omnibox-empty { padding: 12px 14px; font-size: 12.5px; color: var(--text-muted); }

/* Main container */
.container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  flex: 1;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumbs span.sep { opacity: 0.45; }

/* Cards & Grids */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card-flush {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; }

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.stat-value {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-value.sky { color: var(--accent); }
.stat-value.v6 { color: var(--v6); }
.stat-value.ok { color: var(--ok); }
.stat-value.warn { color: var(--warn); }
.stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* Hero */
.hero-box {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 55%),
              radial-gradient(circle at bottom left, rgba(167, 139, 250, 0.1), transparent 55%),
              var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
}
.hero-box h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.hero-box p {
  margin: 0 auto 22px;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 15px;
}
.hero-search { max-width: 680px; margin: 0 auto; }
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Badges & Buttons */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
}
.badge.sky { background: var(--accent-bg); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.badge.v6 { background: var(--v6-bg); color: var(--v6); border-color: color-mix(in srgb, var(--v6) 30%, transparent); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge.err { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #04101d; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: #04101d; }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* Alert banner (e.g. MOAS) */
.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.alert-title { font-weight: 700; color: var(--warn); margin-bottom: 4px; }

/* Page Header Banner */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab-link {
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-link:hover { color: var(--text); text-decoration: none; }
.tab-link.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.input, select.input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}
.input:focus { border-color: var(--accent); }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}
.pagination-actions { display: flex; gap: 8px; }

/* Bars */
.bar-track {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bar-fill.v6 { background: var(--v6); }
.bar-fill.ok { background: var(--ok); }

/* WHOIS formatted sections & pre */
.whois-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
}
.whois-dl dt {
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  word-break: break-word;
}
.whois-dl dd {
  margin: 0;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
  white-space: pre-wrap;
}
.whois-dl dd .whois-line + .whois-line {
  margin-top: 3px;
}
.whois-dl dt:last-of-type, .whois-dl dd:last-of-type { border-bottom: 0; }
details.whois-details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
details.whois-details > summary {
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}
details.whois-details > summary::-webkit-details-marker { display: none; }
details.whois-details[open] > summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.whois-pre {
  margin: 0;
  padding: 16px 18px;
  background: var(--pre-bg);
  color: var(--pre-text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  border-radius: 0 0 var(--radius) var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 640px) {
  .whois-dl { grid-template-columns: 1fr; }
  .whois-dl dt { border-bottom: 0; padding-bottom: 2px; }
  .whois-dl dd { padding-top: 2px; }
}

/* Graph & Map SVG canvas */
.viz-box {
  position: relative;
  background: var(--viz-bg);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  min-height: 440px;
}
.viz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}
.viz-controls label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.viz-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: var(--shadow);
  z-index: 20;
  display: none;
  max-width: 280px;
}
.viz-hint {
  position: absolute;
  left: 12px;
  bottom: 10px;
  background: var(--viz-hint-bg);
  color: var(--viz-hint-text);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  pointer-events: none;
}

/* BGP Multi-View Switcher & Hop Flow Matrix */
.viz-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.viz-seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.viz-seg-btn:hover { color: var(--text); }
.viz-seg-btn.active {
  background: var(--accent);
  color: #04101d;
  font-weight: 600;
}
.hop-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  padding: 16px;
  background: var(--viz-bg);
}
.hop-col {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hop-col-head {
  padding: 9px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.hop-col-body {
  max-height: 410px;
  overflow-y: auto;
}
.hop-row {
  display: block;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 0.14s, opacity 0.14s, border-color 0.14s;
}
.hop-row:last-child { border-bottom: 0; }
.hop-row:hover { text-decoration: none; }
.hop-row.dimmed { opacity: 0.24; }
.hop-row.focused {
  border-left-color: var(--accent);
  background: var(--accent-bg);
}
.hop-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}
.hop-row-org {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hop-row-bar {
  margin-top: 6px;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.hop-row-bar > div {
  height: 100%;
  border-radius: 999px;
}
.bgp-node-card { cursor: pointer; transition: opacity 0.14s ease; }
.bgp-edge-path { transition: opacity 0.14s ease, stroke 0.14s ease, stroke-width 0.14s ease; }

/* Borderless World Map (IPv4 Geographic Distribution) */
.geo-map-tools {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.geo-map-btn {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.2;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.geo-map-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.geo-map-svg {
  display: block;
  width: 100%;
  height: 340px;
  background: var(--map-ocean);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.geo-map-svg.dragging { cursor: grabbing; }
.geo-bubble-dot {
  transition: fill-opacity 0.12s ease, stroke-width 0.12s ease;
}

/* ASN Intelligence Profile & Routing Security Hygiene */
.profile-lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
}
.profile-basis {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.profile-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
}
.profile-box-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.profile-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-dl > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.profile-dl dt {
  font-size: 11px;
  color: var(--text-dim);
}
.profile-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.sec-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sec-check-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
}
.sec-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.sec-check-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.sec-check-detail {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.alert.info {
  background: var(--accent-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
}

/* KV definition list */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 20px;
  margin: 0;
}
.kv-item dt { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kv-item dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 500; word-break: break-word; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: auto;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }

/* Responsive */
@media (max-width: 960px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-2, .sec-check-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 600px) {
  .grid-6, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-box h1 { font-size: 23px; }
}
