/* IP-FD.net stylesheet */

:root {
    --bg: #ffffff;
    --bg-subtle: #f8f9fb;
    --bg-muted: #f1f3f6;
    --bg-inset: #f4f5f7;
    --border: #e3e6eb;
    --border-strong: #cfd4dc;
    --text: #0f1729;
    --text-2: #4a5468;
    --text-3: #6b7486;
    --accent: #1f4fff;
    --accent-hover: #1a3fd6;
    --accent-soft: #edf1ff;
    --head-bg: linear-gradient(135deg, #1f4fff, #4a6bff);
    --head-text: #ffffff;
    --accent-text: #ffffff;
    --ok: #0b7a4b;
    --ok-soft: #e9f7f0;
    --warn: #a85c00;
    --warn-soft: #fff6e6;
    --bad: #b42318;
    --bad-soft: #fdeeec;
    --code-bg: #0f1729;
    --code-text: #dfe6f3;
    --shadow-sm: 0 1px 2px rgba(15, 23, 41, .05);
    --shadow: 0 1px 3px rgba(15, 23, 41, .06), 0 4px 12px rgba(15, 23, 41, .04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 41, .12);
    --card: #ffffff;
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --header-h: 60px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #15181e; --bg-subtle: #1a1e25; --bg-muted: #262b35; --bg-inset: #1a1e25;
        --border: #2d3340; --border-strong: #3a4252;
        --text: #e8ebf1; --text-2: #aab2c0; --text-3: #848d9e;
        --accent: #4f74ff; --accent-hover: #6b8bff; --accent-soft: #1f2a48; --accent-text: #ffffff;
        --ok: #4cc38a; --ok-soft: #13291f; --warn: #f0a640; --warn-soft: #2d2311; --bad: #f2766a; --bad-soft: #301817;
        --code-bg: #101318; --code-text: #d6deeb; --card: #20242c;
        --head-bg: linear-gradient(135deg, #1f4fff, #3d5fe8); --head-text: #ffffff;
        --shadow-sm: none; --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #15181e; --bg-subtle: #1a1e25; --bg-muted: #262b35; --bg-inset: #1a1e25;
        --border: #2d3340; --border-strong: #3a4252;
        --text: #e8ebf1; --text-2: #aab2c0; --text-3: #848d9e;
        --accent: #4f74ff; --accent-hover: #6b8bff; --accent-soft: #1f2a48; --accent-text: #ffffff;
        --ok: #4cc38a; --ok-soft: #13291f; --warn: #f0a640; --warn-soft: #2d2311; --bad: #f2766a; --bad-soft: #301817;
        --code-bg: #101318; --code-text: #d6deeb; --card: #20242c;
        --head-bg: linear-gradient(135deg, #1f4fff, #3d5fe8); --head-text: #ffffff;
        --shadow-sm: none; --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--bg-muted); border: 1px solid var(--border); padding: .08em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: 12px; top: -40px; background: var(--accent); color: var(--accent-text); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 10px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.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)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html, body { overflow-x: hidden; }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } h1 { font-size: 1.6rem; } .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-logo { width: 26px; height: 26px; border-radius: 6px; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; color: var(--accent-text); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.brand-tld { color: var(--text-3); font-weight: 500; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { color: var(--text-2); padding: 6px 10px; border-radius: 6px; font-size: .92rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); background: var(--bg-muted); text-decoration: none; }
.main-nav a.active { color: var(--text); background: var(--bg-muted); }
.header-search { flex: 1; max-width: 360px; margin-left: auto; position: relative; }
.header-search input {
    width: 100%; height: 36px; padding: 0 36px 0 34px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--bg-subtle);
    color: var(--text); font: inherit; font-size: .9rem;
}
.header-search input:focus { outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.header-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.header-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: .72rem; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--bg); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--bg-muted); }
.menu-toggle { display: none; }
@media (max-width: 960px) {
    .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px 16px 16px; }
    .main-nav.open { display: flex; }
    .menu-toggle { display: grid; }
    .header-search { max-width: none; }
}
@media (max-width: 640px) { .header-search kbd, .header-actions .btn-label { display: none; } .header-inner { gap: 10px; } }
@media (max-width: 560px) { .header-search { display: none; } .header-actions { margin-left: auto; } .search-bar .btn-lg { padding: 0 14px; } }

.announcement { font-size: .88rem; padding: 9px 0; border-bottom: 1px solid var(--border); background: var(--accent-soft); color: var(--text); }
.announcement.warn { background: var(--warn-soft); }
.announcement.bad { background: var(--bad-soft); }

/* ---------- Buttons and forms ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
    font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer; white-space: nowrap;
    background: var(--accent); color: var(--accent-text);
    transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-text); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-muted); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 85%, black); color: #fff; }
.btn-sm { height: 30px; padding: 0 11px; font-size: .84rem; border-radius: 6px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }

label { display: block; font-size: .87rem; font-weight: 550; margin-bottom: 6px; color: var(--text); }
.field { margin-bottom: 16px; }
.field-hint { font-size: .8rem; color: var(--text-3); margin-top: 5px; }
.input, select.input, textarea.input {
    width: 100%; min-height: 40px; padding: 8px 12px;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--card);
    color: var(--text); font: inherit; font-size: .93rem;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.mono { font-family: var(--mono); font-size: .88rem; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-weight: 450; }
.checkbox input { margin-top: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* Search bar used on home and lookup pages */
.search-bar { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-bar input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; padding: 0 12px; font-family: var(--mono); }
.search-bar input:focus { outline: none; }
.search-examples { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--text-3); align-items: center; }
.search-examples a { font-family: var(--mono); font-size: .8rem; color: var(--text-2); background: var(--bg-muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }
.search-examples a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- Cards, tables, key-value ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--head-bg); color: var(--head-text); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card-header h2, .card-header h3 { color: var(--head-text); }
.card-header .subtle, .card-header .muted, .card-header .small { color: rgba(255,255,255,.82); }
.card-header a:not(.btn) { color: #fff; }
.card-header .btn-ghost, .card-header .copy { color: #fff; background: rgba(255,255,255,.12); }
.card-header .btn-ghost:hover, .card-header .copy:hover { background: rgba(255,255,255,.22); color: #fff; }
.card-header .badge { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; }
.card-header .tabs a, .card-header .tabs button { color: rgba(255,255,255,.8); }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
:not(.grid):not(.stack) > .card + .card { margin-top: 16px; }
.fi { width: 1.2em; line-height: 1em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); vertical-align: -0.1em; }

.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); margin: 0; }
.kv > dt, .kv > dd { padding: 10px 20px; border-bottom: 1px solid var(--border); margin: 0; }
.kv > dt { color: var(--text-2); font-size: .88rem; }
.kv > dd { font-size: .93rem; word-break: break-word; }
.kv > dt:last-of-type, .kv > dd:last-of-type { border-bottom: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } .kv > dt { border-bottom: 0; padding-bottom: 0; } }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 550; color: var(--text-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-subtle); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 550; background: var(--bg-muted); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-subtle); font-size: .92rem; margin-bottom: 16px; }
.alert-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.alert-info { background: var(--accent-soft); border-color: transparent; color: var(--text); }

pre.code { background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: .82rem; line-height: 1.6; margin: 0; }
pre.whois { background: var(--bg-inset); border: 1px solid var(--border); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: .8rem; line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-word; }
.copy { cursor: pointer; border: 0; background: none; color: var(--text-3); padding: 2px 4px; border-radius: 4px; vertical-align: middle; }
.copy:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------- Page sections ---------- */
main { min-height: calc(100vh - var(--header-h) - 300px); }
.page { padding: 36px 0 64px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 6px; }
.page-head .lead { color: var(--text-2); font-size: 1.02rem; max-width: 760px; margin: 0; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; display: block; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .84rem; color: var(--text-3); margin-bottom: 14px; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-2); }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { font-size: 1.6rem; }
.section-head p { color: var(--text-2); }

/* Home */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); background:
    radial-gradient(1200px 400px at 50% -120px, var(--accent-soft), transparent 70%); }
.hero h1 { font-size: 2.6rem; letter-spacing: -0.03em; max-width: 780px; }
.hero .lead { font-size: 1.1rem; color: var(--text-2); max-width: 680px; margin-bottom: 28px; }
.hero-search { max-width: 720px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: center; }
.hero-art { width: 100%; height: auto; display: block; }
.hero-art .ha-stop-a { stop-color: var(--accent); stop-opacity: .16; }
.hero-art .ha-stop-b { stop-color: var(--accent); stop-opacity: .02; }
.hero-art .ha-sphere { stroke: var(--accent); stroke-opacity: .35; stroke-width: 1.2; }
.hero-art .ha-grid { stroke: var(--accent); stroke-opacity: .16; stroke-width: 1; }
.hero-art .ha-links { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 5 6; stroke-linecap: round; animation: ha-flow 3s linear infinite; }
.hero-art .ha-label rect { fill: var(--card); stroke: var(--border-strong); }
.hero-art .ha-label text { fill: var(--text-2); font-family: var(--mono); font-size: 12px; }
@keyframes ha-flow { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .hero-art .ha-links { animation: none; } }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .hero-grid .hero-art { max-width: 280px; margin: 0 auto 8px; order: -1; } }
@media (max-width: 560px) { .hero-grid .hero-art { max-width: 200px; } }
@media (max-width: 640px) { .hero { padding: 44px 0 36px; } .hero h1 { font-size: 1.9rem; } }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); margin-top: 36px; }
.stat-strip > div { padding: 16px 20px; border-right: 1px solid var(--border); }
.stat-strip > div:last-child { border-right: 0; }
.stat-value { font-size: 1.45rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .82rem; color: var(--text-3); }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat-strip > div:nth-child(2) { border-right: 0; } .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
.feature { padding: 22px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: .93rem; margin: 0; }
.feature-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.you-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.source-list { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.source-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.source-list li::before { counter-increment: s; content: counter(s); font-family: var(--mono); font-size: .8rem; color: var(--text-3); }
.source-list li:last-child { border-bottom: 0; }
.tool-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
.tool-list a { display: block; padding: 18px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); }
.tool-list a:hover { background: var(--bg-subtle); text-decoration: none; }
.tool-list a strong { display: block; font-weight: 600; margin-bottom: 2px; }
.tool-list a span { color: var(--text-2); font-size: .88rem; }
.tool-list a:nth-child(3n) { border-right: 0; }
@media (max-width: 760px) { .tool-list { grid-template-columns: 1fr; } .tool-list a { border-right: 0; } }
.country-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.country-links a { color: var(--text-2); font-size: .9rem; padding: 3px 0; }
.country-links a:hover { color: var(--accent); }

/* Lookup result layout */
.result-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.result-head h1 { font-family: var(--mono); font-size: 1.85rem; letter-spacing: -0.02em; word-break: break-all; margin-bottom: 8px; }
.result-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .result-layout { grid-template-columns: minmax(0, 1fr); } }
.side-sticky { position: sticky; top: calc(var(--header-h) + 16px); }
.map { height: 260px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--bg-muted); }
.map-lg { height: 340px; }
.loc-big { font-size: 1.15rem; font-weight: 600; }
.confidence { display: inline-flex; gap: 3px; vertical-align: middle; }
.confidence i { width: 14px; height: 6px; border-radius: 2px; background: var(--border-strong); }
.confidence.c-high i { background: var(--ok); }
.confidence.c-medium i:nth-child(-n+2) { background: var(--warn); }
.confidence.c-low i:nth-child(1) { background: var(--bad); }
.confidence.c-country i:nth-child(1) { background: var(--text-3); }
.cand { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.cand:last-child { border-bottom: 0; }
.cand.chosen { background: var(--accent-soft); }
.cand .mark { color: var(--text-3); }
.cand.chosen .mark { color: var(--accent); }
.cand small { display: block; color: var(--text-3); font-size: .8rem; word-break: break-all; }
.toc { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text-2); }
.toc a:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: .8rem; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-subtle); color: var(--text); }
.chip-ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: var(--ok-soft); }
.chip-bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); background: var(--bad-soft); }
a.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.empty { padding: 28px 20px; text-align: center; color: var(--text-3); font-size: .92rem; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--text-2); border: 0; background: none; font: inherit; font-size: .92rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--text); border-bottom-color: var(--accent); }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: minmax(0, 1fr); } .docs-nav { display: none; } }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .9rem; }
.docs-nav h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 18px 0 6px; }
.docs-nav a { display: block; padding: 4px 0; color: var(--text-2); }
.prose h2 { margin-top: 2.2em; padding-top: .4em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 20px; }
.prose pre { margin: 14px 0; }
.endpoint { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: .88rem; padding: 10px 14px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; overflow-x: auto; }
.method { font-weight: 700; font-size: .75rem; padding: 2px 7px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--accent-soft); color: var(--accent); }

/* FAQ */
details.faq { border-bottom: 1px solid var(--border); padding: 4px 0; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 550; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--text-3); font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: '\2212'; }
details.faq .answer { padding: 0 0 16px; color: var(--text-2); }

/* Account */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
@media (max-width: 900px) { .account-layout { grid-template-columns: minmax(0, 1fr); } }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { padding: 8px 12px; border-radius: 6px; color: var(--text-2); font-size: .92rem; font-weight: 500; }
.side-nav a:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) { .side-nav { flex-direction: row; overflow-x: auto; } }
.metric { padding: 18px 20px; }
.metric .stat-value { font-size: 1.6rem; }
.bar { height: 8px; background: var(--bg-muted); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.secret { font-family: var(--mono); font-size: .85rem; background: var(--bg-inset); border: 1px dashed var(--border-strong); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 16px; background: var(--bg-subtle); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card-body { padding: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.oauth-btns { display: grid; gap: 8px; }
.ticket-msg { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ticket-msg.staff { background: var(--accent-soft); }
.ticket-msg .who { font-size: .85rem; color: var(--text-2); margin-bottom: 6px; }
.ticket-msg .body { white-space: pre-wrap; word-break: break-word; }
.spark { display: flex; gap: 2px; align-items: flex-end; height: 48px; }
.spark span { flex: 1; background: var(--accent); opacity: .75; border-radius: 2px 2px 0 0; min-height: 2px; }
.status-up { color: var(--ok); }
.status-down { color: var(--bad); }
.status-unknown { color: var(--text-3); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); padding: 48px 0 32px; margin-top: 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-2); padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-note { color: var(--text-3); font-size: .85rem; max-width: 300px; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: .84rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(10, 14, 22, .55); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 200; }
.modal.open { display: flex; }
.modal-box { width: 100%; max-width: 560px; max-height: 85vh; overflow: auto; background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }

.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.leaflet-container { font: inherit; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); } }
@media print { .site-header, .site-footer, .no-print { display: none !important; } }

.mobile-search { display: none; }
@media (max-width: 960px) { .mobile-search { display: block; margin-top: 8px; } }

/* Analytics consent */
.consent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.08); padding: 12px 0; }
.consent-bar .row-between { gap: 12px; flex-wrap: wrap; }
.consent-bar[hidden] { display: none; }

.abuse-banner { margin: 0 0 16px; }
.abuse-banner a { font-weight: 600; }

/* BGP alerts */
.bgp-event { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.ris-credit img { display: block; margin-bottom: 10px; height: 21px; width: auto; }
:root[data-theme="dark"] .ris-credit img { filter: brightness(0) invert(1); opacity: .85; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ris-credit img { filter: brightness(0) invert(1); opacity: .85; } }

/* Small loading spinner */
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; vertical-align: -1px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------- Blue theme (setting theme_blue, class on <body>) ----------
   Blue navigation bar and table headers, and a blue tint on boxes that only show information. */
body.theme-blue { --info-bg: linear-gradient(135deg, #eef2ff, #e3e9ff); --info-border: #c7d3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.theme-blue { --info-bg: linear-gradient(135deg, #1c2a57, #182246); --info-border: #2c3d78; } }
:root[data-theme="dark"] body.theme-blue { --info-bg: linear-gradient(135deg, #1c2a57, #182246); --info-border: #2c3d78; }
.theme-blue .site-header { background: var(--head-bg); border-bottom-color: transparent; backdrop-filter: none; }
.theme-blue .site-header .brand, .theme-blue .site-header .brand:hover { color: #fff; }
.theme-blue .site-header .brand-tld { color: rgba(255,255,255,.75); }
.theme-blue .main-nav a { color: rgba(255,255,255,.88); }
.theme-blue .main-nav a:hover, .theme-blue .main-nav a.active { color: #fff; background: rgba(255,255,255,.16); }
@media (max-width: 960px) { .theme-blue .main-nav { background: #2449f0; border-bottom-color: transparent; } }
.theme-blue .header-search input { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; }
.theme-blue .header-search input::placeholder { color: rgba(255,255,255,.75); }
.theme-blue .header-search input:focus { background: rgba(255,255,255,.22); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.theme-blue .header-search .icon, .theme-blue .header-search kbd { color: rgba(255,255,255,.8); }
.theme-blue .header-search kbd { background: transparent; border-color: rgba(255,255,255,.35); }
.theme-blue .site-header .icon-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.theme-blue .site-header .icon-btn:hover { background: rgba(255,255,255,.22); }
.theme-blue .site-header .btn { background: #fff; color: #1f4fff; border-color: #fff; }
.theme-blue .site-header .btn-secondary, .theme-blue .site-header .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.theme-blue .table th { background: var(--head-bg); color: var(--head-text, #fff); border-bottom-color: transparent; }
.theme-blue .stat-strip, .theme-blue .tool-list, .theme-blue .feature, .theme-blue .metric, .theme-blue .side-sticky > .card, .theme-blue .kpi { background: var(--info-bg); border-color: var(--info-border); }
.theme-blue .stat-strip > div, .theme-blue .tool-list a { border-color: var(--info-border); }
.theme-blue .tool-list a:hover { background: rgba(31, 79, 255, .12); }
.theme-blue .feature-icon { background: var(--head-bg); color: #fff; }

.health-grade { font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: #fff; color: #1f4fff; }
.health-grade.badge-ok { background: #e7f8ee; color: #067647; }
.health-grade.badge-warn { background: #fff4e5; color: #b54708; }
.health-grade.badge-bad { background: #fdecea; color: #b42318; }

/* AS upstream graph */
.asgraph-wrap { overflow-x: auto; padding: 4px 0; }
.asgraph { display: block; margin: 0 auto; width: 100%; height: auto; }
.asgraph-edges path { stroke: var(--accent); stroke-opacity: .45; stroke-width: 1.4; }
.asgraph-node rect { fill: var(--card); stroke: var(--border-strong); }
.asgraph-node.level-0 rect { fill: var(--accent); stroke: var(--accent); }
.asgraph-node.level-1 rect { stroke: var(--accent); }
.asgraph-node text { font-size: 11px; fill: var(--text-2); font-family: var(--font); }
.asgraph-node text.asn { font-family: var(--mono); font-weight: 600; fill: var(--text); }
.asgraph-node.level-0 text { fill: #fff; }
.asgraph a:hover rect { stroke-width: 2; }

/* Public status pages */
.status-days { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.status-days span { height: 28px; border-radius: 3px; background: var(--bg-muted); }
.status-days .ok { background: #12b76a; }
.status-days .warn { background: #f79009; }
.status-days .bad { background: #d92d20; }
