/* ============================================================================
   ipconfig.is — design system v5 ("Signal")
   The point is you: calm paper (or night) surfaces, dark terminal windows as the
   product shot, and one green point that marks the visitor - in the logo, on the
   map, in every live status dot. Light by default, dark by system or by choice.

   Brand (logo kit): Terminal Green #3ECF8E · Deep #0F2619 · Night #080B10 ·
   Mist #E8EEF4 · Forest #0B7A4B (green TEXT on light; Terminal Green is 2:1 there).
   Type: Inter (variable, opsz 14-32) for UI, JetBrains Mono for addresses & code.
   Every text token is >= 4.5:1 on the surfaces it is used on (checked by shots.js).
   ========================================================================== */

/* ----- Tokens: light -------------------------------------------------------- */
:root {
    color-scheme: light;

    --bg:         #f6f8f7;
    --bg-band:    #eef2f0;
    --surface:    #ffffff;
    --surface-2:  #f9fbfa;
    --surface-3:  #f1f4f2;
    --surface-4:  #e7ece9;
    --line:       #e3e8e5;
    --line-2:     #d3dbd6;
    --line-3:     #b8c3bc;

    --text:   #0a0f13;
    --text-2: #3e4953;
    --text-3: #5a6571;

    --accent:       #0b7a4b;
    --accent-hover: #086a41;
    --accent-ink:   #0b7a4b;
    --accent-soft:  #e4f4eb;
    --accent-line:  #bde2cd;
    --point:        #3ecf8e;
    --point-soft:   rgba(62, 207, 142, 0.16);
    --point-glow:   rgba(62, 207, 142, 0.40);
    --tile:         #0f2619;

    --btn:       #0a0f13;
    --btn-hover: #1c2a23;
    --btn-text:  #ffffff;

    --good:   #0b7a4b; --good-soft:   #e4f4eb; --good-line:   #bde2cd;
    --warn:   #8a5a00; --warn-soft:   #fff4d9; --warn-line:   #efd391; --warn-point: #e0a521;
    --danger: #b42338; --danger-soft: #fdeaed; --danger-line: #f3bcc6;
    --info:   #2a55c9; --info-soft:   #eaf0fd; --info-line:   #c6d4f6;

    /* Terminal windows are the same night glass in both themes - the signature */
    --term-bg:     #0a0e12;
    --term-bg-2:   #0e1318;
    --term-border: rgba(255, 255, 255, 0.08);
    --term-line:   rgba(255, 255, 255, 0.07);
    --term-text:   #e8eef4;
    --term-dim:    #8f9baa;
    --term-faint:  #7a8693;
    --term-key:    #a6b5c6;
    --term-green:  #3ecf8e;
    --term-amber:  #f5b83d;
    --term-blue:   #86b4ff;
    --term-red:    #fb7185;

    --map-dot:  rgba(10, 15, 19, 0.19);
    --dot-grid: rgba(10, 15, 19, 0.10);

    --shadow-xs:   0 1px 2px rgba(10, 15, 19, 0.05);
    --shadow-sm:   0 1px 2px rgba(10, 15, 19, 0.04), 0 3px 8px -4px rgba(10, 15, 19, 0.07);
    --shadow-md:   0 1px 2px rgba(10, 15, 19, 0.04), 0 10px 28px -12px rgba(10, 15, 19, 0.16);
    --shadow-lg:   0 2px 6px rgba(10, 15, 19, 0.05), 0 30px 64px -30px rgba(10, 15, 19, 0.38);
    --shadow-term: 0 1px 2px rgba(10, 15, 19, 0.10), 0 10px 24px -10px rgba(10, 15, 19, 0.20), 0 36px 72px -32px rgba(10, 15, 19, 0.42);
    --highlight:   inset 0 1px 0 rgba(255, 255, 255, 0.7);

    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

    --r-xs: 6px;
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 20px;

    --maxw: 1200px;
    --nav-h: 64px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ----- Tokens: dark (explicit choice, and the system preference) ------------------- */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070a0c; --bg-band: #0a0e11;
    --surface: #0d1114; --surface-2: #10151a; --surface-3: #151b20; --surface-4: #1c242a;
    --line: rgba(232, 238, 244, 0.075); --line-2: rgba(232, 238, 244, 0.125); --line-3: rgba(232, 238, 244, 0.21);
    --text: #e8eef4; --text-2: #aab5c1; --text-3: #8b97a4;
    --accent: #3ecf8e; --accent-hover: #67dda9; --accent-ink: #3ecf8e;
    --accent-soft: rgba(62, 207, 142, 0.10); --accent-line: rgba(62, 207, 142, 0.28);
    --point-soft: rgba(62, 207, 142, 0.14); --point-glow: rgba(62, 207, 142, 0.45);
    --btn: #3ecf8e; --btn-hover: #67dda9; --btn-text: #04110a;
    --good: #3ecf8e; --good-soft: rgba(62, 207, 142, 0.10); --good-line: rgba(62, 207, 142, 0.28);
    --warn: #f5b83d; --warn-soft: rgba(245, 184, 61, 0.10); --warn-line: rgba(245, 184, 61, 0.30); --warn-point: #f5b83d;
    --danger: #fb7185; --danger-soft: rgba(251, 113, 133, 0.10); --danger-line: rgba(251, 113, 133, 0.32);
    --info: #86b4ff; --info-soft: rgba(134, 180, 255, 0.10); --info-line: rgba(134, 180, 255, 0.30);
    --term-bg: #06090b; --term-bg-2: #0a0e12; --term-border: rgba(232, 238, 244, 0.09);
    --map-dot: rgba(232, 238, 244, 0.21);
    --dot-grid: rgba(232, 238, 244, 0.065);
    --shadow-xs: none;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -18px rgba(0, 0, 0, 0.75);
    --shadow-lg: 0 32px 64px -30px rgba(0, 0, 0, 0.9);
    --shadow-term: 0 0 0 1px rgba(232, 238, 244, 0.04), 0 36px 72px -32px rgba(0, 0, 0, 0.9);
    --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #070a0c; --bg-band: #0a0e11;
        --surface: #0d1114; --surface-2: #10151a; --surface-3: #151b20; --surface-4: #1c242a;
        --line: rgba(232, 238, 244, 0.075); --line-2: rgba(232, 238, 244, 0.125); --line-3: rgba(232, 238, 244, 0.21);
        --text: #e8eef4; --text-2: #aab5c1; --text-3: #8b97a4;
        --accent: #3ecf8e; --accent-hover: #67dda9; --accent-ink: #3ecf8e;
        --accent-soft: rgba(62, 207, 142, 0.10); --accent-line: rgba(62, 207, 142, 0.28);
        --point-soft: rgba(62, 207, 142, 0.14); --point-glow: rgba(62, 207, 142, 0.45);
        --btn: #3ecf8e; --btn-hover: #67dda9; --btn-text: #04110a;
        --good: #3ecf8e; --good-soft: rgba(62, 207, 142, 0.10); --good-line: rgba(62, 207, 142, 0.28);
        --warn: #f5b83d; --warn-soft: rgba(245, 184, 61, 0.10); --warn-line: rgba(245, 184, 61, 0.30); --warn-point: #f5b83d;
        --danger: #fb7185; --danger-soft: rgba(251, 113, 133, 0.10); --danger-line: rgba(251, 113, 133, 0.32);
        --info: #86b4ff; --info-soft: rgba(134, 180, 255, 0.10); --info-line: rgba(134, 180, 255, 0.30);
        --term-bg: #06090b; --term-bg-2: #0a0e12; --term-border: rgba(232, 238, 244, 0.09);
        --map-dot: rgba(232, 238, 244, 0.21);
        --dot-grid: rgba(232, 238, 244, 0.065);
        --shadow-xs: none;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -18px rgba(0, 0, 0, 0.75);
        --shadow-lg: 0 32px 64px -30px rgba(0, 0, 0, 0.9);
        --shadow-term: 0 0 0 1px rgba(232, 238, 244, 0.04), 0 36px 72px -32px rgba(0, 0, 0, 0.9);
        --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    }
}

/* ----- Base ------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
    scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px);
    background: var(--bg);
}
body {
    margin: 0; min-height: 100vh; overflow-x: hidden;
    font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
    font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
::selection { background: var(--point-soft); color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
code, pre, kbd, samp, .mono { font-family: var(--mono); font-feature-settings: 'calt' 0, 'zero' 1; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-nav {
    position: absolute; left: 12px; top: -60px; z-index: 1000;
    background: var(--btn); color: var(--btn-text); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600;
    transition: top .15s ease;
}
.skip-nav:focus { top: 12px; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.dim { color: var(--text-3); }

/* Theme switch: colours cross-fade for a moment, then transitions are off again. */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
    transition: background-color .28s ease, border-color .28s ease, color .28s ease, fill .28s ease, stroke .28s ease !important;
}

/* ----- No-JS / crawler fallback ------------------------------------------------------ */
.seo-fallback { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; color: var(--text-2); }
.seo-fallback h1 { font-size: 2.2rem; color: var(--text); margin: 6px 0 18px; letter-spacing: -0.03em; }
.seo-fallback h2 { font-size: 1.3rem; color: var(--text); margin: 34px 0 10px; }
.seo-fallback h3 { font-size: 1.02rem; color: var(--text); margin: 22px 0 6px; }
.seo-fallback pre {
    background: var(--term-bg); color: var(--term-text); border-radius: var(--r);
    padding: 16px 18px; overflow-x: auto; font-size: 0.84rem; line-height: 1.7;
}
.seo-brand { font-family: var(--mono); font-weight: 700; color: var(--accent-ink); margin: 0; }
.seo-ip { font-size: 1.1rem; color: var(--text); }
.seo-ip strong { font-family: var(--mono); }

/* ----- Shared type ------------------------------------------------------------------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent-ink);
}
.eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
    background: var(--point); box-shadow: 0 0 0 3px var(--point-soft);
}
.live-dot {
    width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--point);
    animation: live 2.4s ease-out infinite;
}
@keyframes live {
    0%   { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.5); }
    70%  { box-shadow: 0 0 0 9px rgba(62, 207, 142, 0); }
    100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
kbd {
    display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
    font-size: 0.75rem; font-weight: 600; color: var(--text-3);
    background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px;
    box-shadow: inset 0 -1px 0 var(--line-2);
}

/* ----- Buttons ----------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
    font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
    text-decoration: none; user-select: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary {
    background: var(--btn); color: var(--btn-text);
    box-shadow: 0 1px 2px rgba(10, 15, 19, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-secondary {
    background: var(--surface); color: var(--text); border-color: var(--line-2);
    box-shadow: var(--shadow-xs), var(--highlight);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--line-3); background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--text-2); padding: 0 12px; }
.btn-quiet:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 0.8438rem; border-radius: 8px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn .spin { border-color: currentColor; border-top-color: transparent; opacity: 0.85; }
.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
    border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
    cursor: pointer; transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-3); }
.icon-btn svg { width: 17px; height: 17px; }

.copy-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px;
    border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
    color: var(--text-2); font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { color: var(--text); border-color: var(--line-3); }
.copy-btn.copied { color: var(--good); border-color: var(--good-line); background: var(--good-soft); }
.link-btn {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0;
    color: var(--accent-ink); font-size: 0.8438rem; font-weight: 600; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-line);
}
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn:disabled { opacity: 0.6; cursor: default; }
.link-btn svg { width: 14px; height: 14px; }

/* ----- Inputs ------------------------------------------------------------------------ */
.lookup-input, .tool-select {
    height: 46px; padding: 0 14px; min-width: 0;
    font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.lookup-input::placeholder { color: var(--text-3); opacity: 1; }
.lookup-input:hover, .tool-select:hover { border-color: var(--line-3); }
.lookup-input:focus, .tool-select:focus {
    outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--point-soft);
}
.tool-select {
    padding-right: 36px; cursor: pointer; -webkit-appearance: none; appearance: none;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6571' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
}

/* ----- Pills, chips, badges ----------------------------------------------------------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface-3);
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.pill-good { color: var(--good); background: var(--good-soft); border-color: var(--good-line); }
.pill-lg { height: 34px; padding: 0 14px; font-family: var(--sans); font-size: 0.8438rem; }
.pill-lg svg { width: 16px; height: 16px; }

.chip-status {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
    color: var(--text); font-size: 0.8125rem; font-weight: 550; white-space: nowrap; box-shadow: var(--shadow-xs);
}
.chip-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.chip-status.good i { background: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.chip-status.warn i { background: var(--warn-point); box-shadow: 0 0 0 3px var(--warn-soft); }
.chip-status.info i { background: var(--info); }

.badge-level, .rir-tag {
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid;
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.badge-level.clean      { color: var(--good);   background: var(--good-soft);   border-color: var(--good-line); }
.badge-level.suspicious { color: var(--warn);   background: var(--warn-soft);   border-color: var(--warn-line); }
.badge-level.malicious  { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.badge-level.unknown    { color: var(--text-2); background: var(--surface-3);   border-color: var(--line); }
.rir-tag { color: var(--info); background: var(--info-soft); border-color: var(--info-line); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 9px;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--text-2);
    background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-xs); overflow-wrap: anywhere;
}
.chip-ok, .chip-ok-sm { color: var(--good); background: var(--good-soft); border: 1px solid var(--good-line); }
.chip-ok { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.chip-ok svg { width: 14px; height: 14px; }
.chip-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.chip-miss { color: var(--text-3); background: transparent; border-style: dashed; text-decoration: line-through; text-decoration-color: var(--line-3); }

/* ----- Cards ------------------------------------------------------------------------- */
.card {
    position: relative; min-width: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 24px; box-shadow: var(--shadow-sm), var(--highlight);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head-text { min-width: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 650; letter-spacing: -0.012em; color: var(--text); }
.card-title svg { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.card-sub { margin: 4px 0 0; font-size: 0.875rem; color: var(--text-3); overflow-wrap: anywhere; }
.card-loading { display: flex; align-items: center; gap: 12px; color: var(--text-3); }

.notice {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r);
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 0.875rem;
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.notice.warn svg { color: var(--warn); }
.notice.bad { background: var(--danger-soft); border-color: var(--danger-line); }
.notice.bad svg { color: var(--danger); }
.notice.info { background: var(--info-soft); border-color: var(--info-line); }
.notice.info svg { color: var(--info); }
.notice code { font-size: 0.8125rem; }

/* ----- Navigation -------------------------------------------------------------------- */
.announce {
    position: relative; z-index: 101; background: var(--tile); color: #e8eef4;
    text-align: center; font-size: 0.8438rem; font-weight: 500; padding: 8px 16px;
}
.nav {
    position: sticky; top: 0; z-index: 100; height: var(--nav-h);
    background: color-mix(in srgb, var(--bg) 76%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);   /* no saturate(): it turns content scrolling under the nav into coloured smudges */
    border-bottom: 1px solid transparent; transition: border-color .2s ease, background-color .2s ease;
}
.nav.nav-solid { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav-inner { max-width: var(--maxw); height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; width: 30px; height: 30px; flex: none; border-radius: 9px; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.bm-tile { fill: var(--tile); }
.bm-glyph { fill: var(--point); }
:root[data-theme="dark"] .brand-mark { box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.24); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.24); } }
.brand-name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--text); }
.brand-name .tld { color: var(--text-3); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
.nav-link {
    position: relative; padding: 7px 12px; border-radius: 8px; white-space: nowrap;
    color: var(--text-2); font-size: 0.875rem; font-weight: 550;
    transition: color .15s ease, background-color .15s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
    content: ""; position: absolute; left: 50%; bottom: -1px; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: var(--point);
}
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-ip {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-xs);
    font-size: 0.8125rem; font-weight: 600; color: var(--text); cursor: copy; max-width: 300px;
    opacity: 0; transform: translateY(-4px); pointer-events: none; visibility: hidden;
    transition: opacity .2s ease, transform .2s var(--ease), visibility 0s linear .2s, border-color .15s ease;
}
.nav-ip.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease, transform .2s var(--ease), visibility 0s, border-color .15s ease; }
.nav-ip:hover { border-color: var(--line-3); }
.nav-ip .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav-ip-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.theme-toggle { width: 36px; height: 36px; }

/* ----- Hero -------------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; padding: 64px 0 0; }
.hero-bg {
    position: absolute; inset: calc(-1 * var(--nav-h)) 0 -120px; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 1px 1px, var(--dot-grid) 1px, transparent 1.5px) 0 0 / 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 50%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-visual { min-width: 0; }
.hero-kicker {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent-ink);
}
.ver-badge {
    margin-left: 2px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
    font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--text-2);
}
.hero-ip {
    margin: 18px 0 0; color: var(--text);
    font-family: var(--mono); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.05; letter-spacing: -0.04em;
    font-feature-settings: 'zero' 1, 'calt' 0;
}
.hero-ip.v6 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.18; letter-spacing: -0.03em; }
.hero-ip-error { color: var(--danger); font-family: var(--sans); font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; }
.hero-ip-val {
    all: unset; cursor: copy; overflow-wrap: anywhere; border-radius: 10px;
    transition: color .2s ease;
}
.hero-ip-val:hover { color: color-mix(in srgb, var(--text) 82%, var(--accent)); }
.hero-ip-val:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.ip-sep { color: inherit; }   /* IPv4 dots read as part of the address, same colour as the octets */
.ip-sep6 { color: var(--text-3); font-weight: 500; }
/* Where you are, then whose network: two deliberate lines, each led by a 22px glyph. */
.hero-where { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; color: var(--text-2); font-size: 1.0625rem; }
.hero-loc, .hero-asn { display: flex; align-items: flex-start; gap: 12px; margin: 0; min-width: 0; }
.hero-loc > :last-child, .hero-asn > :last-child { min-width: 0; }   /* text wraps beside its glyph, never under it */
.hero-loc .flag-img { margin-top: 0.38em; }
.hero-where strong { color: var(--text); font-weight: 600; }
.hero-asn { font-size: 1rem; }
.hero-asn-ico { display: grid; place-items: center; width: 22px; height: 1.6em; flex: none; color: var(--text-3); }
.hero-asn-ico svg { width: 18px; height: 18px; }
.hero-asn .mono { color: var(--text); font-size: 0.94em; font-weight: 600; }
.flag-img { display: inline-block; width: 22px; height: 16px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line-2); vertical-align: -2px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; }
.hero .notice { margin-top: 18px; max-width: 560px; }

/* hero entrance: a short rise, staggered; off under reduced motion */
.hero-copy > *, .hero-visual { animation: rise .6s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .04s; }
.hero-copy > :nth-child(3) { animation-delay: .08s; }
.hero-copy > :nth-child(4) { animation-delay: .12s; }
.hero-copy > :nth-child(5) { animation-delay: .16s; }
.hero-visual { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ----- Terminal windows ---------------------------------------------------------------- */
.terminal {
    position: relative; display: flex; flex-direction: column; min-width: 0; color: var(--term-text);
    background: linear-gradient(180deg, var(--term-bg-2), var(--term-bg));
    border: 1px solid var(--term-border); border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);   /* card-level; only the hero terminal floats */
}
/* The hero terminal floats like an app window: layered neutral shadow, no coloured halo. */
.terminal-hero { box-shadow: var(--shadow-term), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.terminal-bar {
    display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; flex: none;
    background: rgba(255, 255, 255, 0.025); border-bottom: 1px solid var(--term-line);
}
.term-dots { display: inline-flex; gap: 7px; flex: none; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a323b; }
.term-dots i:last-child { background: var(--term-green); }
.term-title {
    margin-left: 6px; min-width: 0; font-family: var(--mono); font-size: 0.75rem; color: var(--term-dim);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.terminal-body {
    flex: 1; min-width: 0; padding: 20px 22px 22px;
    font-family: var(--mono); font-size: 0.875rem; line-height: 1.75;
    display: flex; flex-direction: column;
}
.cli-line { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.cli-line-2 { margin-top: 16px; }
.cli-line-idle { margin-top: 14px; }
.cli-prompt { color: var(--term-green); font-weight: 700; user-select: none; flex: none; }
.cli-flag { color: var(--term-dim); }
.cli-cursor {
    width: 9px; height: 9px; border-radius: 50%; background: var(--term-green); flex: none;
    animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.cli-resp {
    margin-top: 4px; padding-left: 22px; color: var(--term-text); font-weight: 600; overflow-wrap: anywhere;
    opacity: 0; transform: translateY(2px); transition: opacity .35s ease, transform .35s ease;
}
.cli-resp.show { opacity: 1; transform: none; }
.cli-resp .arrow { color: var(--term-faint); margin-right: 10px; font-weight: 400; }
.cli-resp .ip-sep6 { color: var(--term-faint); }
.cli-json {
    margin-top: 6px; padding-left: 22px; font-size: 0.8125rem; line-height: 1.7;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transition: opacity .45s ease .1s;
}
.cli-json.show { opacity: 1; }
.cli-out { margin: 4px 0 0 22px; white-space: pre-wrap; color: var(--term-text); }
.t-dim { color: var(--term-dim); }
.t-good { color: var(--term-green); }
.t-bad { color: var(--term-red); font-weight: 700; }
.j-key { color: var(--term-key); }
.j-str { color: var(--term-green); }
.j-num { color: var(--term-amber); }
.j-bool, .j-null { color: var(--term-blue); }
.j-p { color: var(--term-faint); }
.term-btn {
    margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
    border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03);
    color: var(--term-dim); font-family: var(--mono); font-size: 0.75rem; font-weight: 600; cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.term-btn svg { width: 13px; height: 13px; }
.term-btn:hover { color: var(--term-text); border-color: rgba(255, 255, 255, 0.26); }
.term-btn.copied { color: var(--term-green); border-color: rgba(62, 207, 142, 0.45); }
.terminal :focus-visible { outline-color: var(--term-green); }
.term-scroll { overflow: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.json { margin: 8px 0 0; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.72; white-space: pre; color: var(--term-text); }

/* ----- Command bar (lookup) + status line ------------------------------------------------ */
.cmd { margin-top: 52px; }
.cmd-bar {
    display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 8px 0 20px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
    box-shadow: var(--shadow-md), var(--highlight);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cmd-bar:hover { border-color: var(--line-3); }
.cmd-bar:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md), 0 0 0 4px var(--point-soft); }
.cmd-prompt { display: grid; place-items: center; color: var(--text-3); flex: none; }
.cmd-prompt svg { width: 20px; height: 20px; }
.cmd-input {
    flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: none;
    font-family: var(--mono); font-size: 1rem; font-weight: 500; color: var(--text);
}
.cmd-input::placeholder { color: var(--text-3); opacity: 1; }
.cmd-input:focus-visible { outline: none; }
.cmd-kbd { flex: none; }
.cmd-bar:focus-within .cmd-kbd { visibility: hidden; }
.cmd-btn { height: 48px; padding: 0 20px; border-radius: 11px; }
.cmd-error { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; color: var(--danger); font-size: 0.875rem; }
.cmd-error svg { width: 16px; height: 16px; flex: none; }
.cmd-active {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding: 7px 7px 7px 16px; border-radius: 12px;
    background: var(--info-soft); border: 1px solid var(--info-line); color: var(--text); font-size: 0.9063rem;
}
.cmd-active > span { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cmd-active strong { overflow-wrap: anywhere; }
.cmd-active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--info); flex: none; }
.statusline {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin: 18px 4px 0;
    font-size: 0.8438rem; color: var(--text-3);
}
.sl-item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.sl-item svg { width: 15px; height: 15px; flex: none; }
.sl-v { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ----- Sections ---------------------------------------------------------------------- */
.section { padding-top: 120px; }
.section-first { padding-top: 104px; }
.section-band {
    margin-top: 120px; padding: 104px 0 112px;
    background: var(--bg-band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head-text { max-width: 720px; min-width: 0; }
.section-title {
    margin-top: 14px; color: var(--text);
    font-size: clamp(1.875rem, 3.2vw, 2.625rem); font-weight: 700; letter-spacing: -0.034em; line-height: 1.1;
    text-wrap: balance;
}
.title-ip { font-weight: 700; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.section-lead { margin: 14px 0 0; font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rep-stack { display: flex; flex-direction: column; gap: 16px; }
.threat-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
/* the lists as a 2 x 3 grid: half the height of a single column, level with the verdict beside it */
.threat-body .bl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.threat-body .bl-row { flex-wrap: wrap; box-shadow: 0 1px 0 var(--line), 1px 0 0 var(--line); }
.threat-body .bl-row + .bl-row { border-top: 0; }
.threat-body .bl-why { order: 4; flex-basis: 100%; }
.threat-body .bl-list, .threat-body .flags { margin-bottom: 0; }
.threat-note { margin: 14px 0 0; font-size: 0.8125rem; color: var(--text-3); }
.card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-3);
}

/* ----- Overview: location across the top, then the network beside its raw record ---------
   Every card is exactly as tall as its content. The one stretched box is the JSON terminal:
   its record scrolls inside, so the row takes the network card's height, not 30 lines of JSON. */
.overview { display: flex; flex-direction: column; gap: 16px; }
.loc-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 36px; align-items: center; }
.loc-body .fact { padding: 11px 12px 11px 0; }
.loc-body .facts { grid-template-columns: repeat(3, auto); }   /* columns as wide as their values; long ones still wrap */
.net-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.card-json { position: relative; min-height: 340px; }
.card-json .terminal-body { position: absolute; inset: 42px 0 0 0; padding-top: 16px; }

.worldmap { position: relative; aspect-ratio: 1600 / 620; }
.worldmap-dots {
    position: absolute; inset: 0; background: var(--map-dot);
    -webkit-mask: url(/images/world-dots.svg?v=1) 0 0 / 100% 100% no-repeat;
    mask: url(/images/world-dots.svg?v=1) 0 0 / 100% 100% no-repeat;
}
.worldmap-acc {
    position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle, var(--point-soft) 0%, transparent 72%);
    border: 1px dashed color-mix(in srgb, var(--point) 55%, transparent);
}
.worldmap-pin {
    position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
    background: var(--point); box-shadow: 0 0 0 4px var(--point-soft);
}
.worldmap-pin::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--point);
    animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.45); opacity: 0.85; } 75%, 100% { transform: scale(2.3); opacity: 0; } }
.worldmap-none {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
    font-size: 0.8125rem; color: var(--text-2); white-space: nowrap;
}

/* Hairlines between fact rows are 1px shadows clipped by the grid: correct for any column count. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; overflow: hidden; }
.facts.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fact { min-width: 0; padding: 13px 14px 13px 0; box-shadow: 0 1px 0 var(--line); }
.fact dt { font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.fact dd { margin: 4px 0 0; font-size: 0.9375rem; font-weight: 550; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.fact dd.mono { font-size: 0.875rem; }
.fact dd .flag-img { margin-right: 7px; vertical-align: -2px; }
.fact-sub { display: block; margin-top: 2px; font-family: var(--sans); font-size: 0.8125rem; font-weight: 500; color: var(--text-3); }
.fact-sub a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); }
.fact-sub a svg { width: 12px; height: 12px; }

.asn-hero {
    display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; margin-bottom: 6px;
    border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line);
}
.asn-num { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.035em; color: var(--text); line-height: 1.25; }
.asn-org { font-size: 0.9375rem; color: var(--text-2); overflow-wrap: anywhere; }

.kv { margin: 0; }
.kv-row { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 48px; }
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row dt { font-size: 0.875rem; color: var(--text-3); }
.kv-row dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.875rem; color: var(--text); }
.kv-row dd.mono { font-size: 0.8438rem; }
.kv-val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kv-copy {
    flex: none; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 7px; border: 0; background: transparent; color: var(--text-3); cursor: pointer;
    opacity: 0; transition: opacity .15s ease, color .15s ease, background-color .15s ease;
}
.kv-copy svg { width: 14px; height: 14px; }
.kv-row:hover .kv-copy, .kv-copy:focus-visible, .kv-copy.copied { opacity: 1; }
.kv-copy:hover { color: var(--text); background: var(--surface-3); }
.kv-copy.copied { color: var(--good); }
@media (hover: none) { .kv-copy { opacity: 1; } }

/* ----- Privacy -------------------------------------------------------------------------- */
.privacy-card { display: grid; grid-template-columns: 272px minmax(0, 1fr); padding: 0; }
.privacy-summary {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    padding: 26px 24px; text-align: center; border-right: 1px solid var(--line);
}
.privacy-checks { min-width: 0; padding: 20px 26px; }
.browser-card { margin-top: 16px; }
.browser-card .card-head { margin-bottom: 6px; flex-wrap: wrap; row-gap: 8px; }   /* the nowrap pill drops below the title on the narrowest phones */
.score-ring-wrap { position: relative; width: 160px; height: 160px; }
.ring { display: block; width: 100%; height: 100%; }
.ring-seg { fill: none; stroke: var(--surface-4); stroke-width: 10; stroke-linecap: round; transition: stroke .4s ease; }
.ring-seg.on { stroke: var(--point); }
.score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-family: var(--mono); font-size: 2.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: var(--text); }
.score-num span { font-size: 1.0625rem; letter-spacing: 0; color: var(--text-3); margin-left: 2px; }
.score-verdict { margin-top: 8px; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.score-note { margin: 0; max-width: 290px; font-size: 0.875rem; color: var(--text-3); }

.checks { list-style: none; margin: 0; padding: 0; }
.check { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check:first-child { padding-top: 2px; }
.check:last-child { border-bottom: 0; padding-bottom: 2px; }
.check-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--text-3); }
.check-ico svg { width: 16px; height: 16px; }
.check.is-ok .check-ico      { background: var(--good-soft);   color: var(--good); }
.check.is-warn .check-ico    { background: var(--warn-soft);   color: var(--warn); }
.check.is-bad .check-ico     { background: var(--danger-soft); color: var(--danger); }
.check.is-pending .check-ico { background: var(--info-soft);   color: var(--info); }
.check-text { display: flex; flex-direction: column; min-width: 0; }
.check-title { font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.check-desc { font-size: 0.8438rem; color: var(--text-3); overflow-wrap: anywhere; }
.check-val {
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600;
    color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line);
}
.check.is-ok .check-val   { color: var(--good);   background: var(--good-soft);   border-color: var(--good-line); }
.check.is-warn .check-val { color: var(--warn);   background: var(--warn-soft);   border-color: var(--warn-line); }
.check.is-bad .check-val  { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

.alerts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid; }
.alert.danger { background: var(--danger-soft); border-color: var(--danger-line); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.alert-icon { flex: none; }
.alert-icon svg { width: 18px; height: 18px; margin-top: 2px; }
.alert.danger .alert-icon { color: var(--danger); }
.alert.warn .alert-icon { color: var(--warn); }
.alert-title { font-weight: 650; font-size: 0.9375rem; color: var(--text); }
.alert-desc { font-size: 0.875rem; color: var(--text-2); margin-top: 2px; }
.leak-ips { margin-top: 6px; font-family: var(--mono); font-size: 0.8125rem; color: var(--text); overflow-wrap: anywhere; }

.ports-card { margin-top: 16px; }
.ports-card .card-head { align-items: flex-start; flex-wrap: wrap; }
.ports-card .card-head-text { flex: 1 1 360px; }   /* a long subtitle wraps in its column; the button drops below only on narrow cards */
.ports-custom { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.ports-custom label { font-size: 0.875rem; color: var(--text-2); }
.ports-custom .lookup-input { width: 150px; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 18px; }
.port-item {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 0.8438rem;
}
.port-num { font-weight: 700; color: var(--text); min-width: 42px; }
.port-svc { flex: 1; min-width: 0; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.port-state { font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.port-item.open { background: var(--good-soft); border-color: var(--good-line); }
.port-item.open .port-state { color: var(--good); }
.port-item.open.risky { background: var(--danger-soft); border-color: var(--danger-line); }
.port-item.open.risky .port-state { color: var(--danger); }
.portscan-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-top: 14px; font-size: 0.8125rem; color: var(--text-3); }
.portscan-warn { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-weight: 600; }
.portscan-warn svg { width: 15px; height: 15px; }
.ports-card .notice { margin-top: 14px; }

/* ----- Reputation ---------------------------------------------------------------------- */
.threat-verdict { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.verdict-ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; background: var(--surface-3); color: var(--text-3); }
.verdict-ico svg { width: 22px; height: 22px; }
.verdict-ico.clean { background: var(--good-soft); color: var(--good); }
.verdict-ico.suspicious { background: var(--warn-soft); color: var(--warn); }
.verdict-ico.malicious { background: var(--danger-soft); color: var(--danger); }
.verdict-text { flex: 1; min-width: 0; }
.verdict-title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.012em; color: var(--text); }
.verdict-sub { font-size: 0.8438rem; color: var(--text-3); }
.verdict-score { flex: none; white-space: nowrap; font-family: var(--mono); color: var(--text-3); font-size: 0.875rem; }
.verdict-score b { font-size: 1.5rem; color: var(--text); letter-spacing: -0.03em; margin-right: 1px; }

/* segmented meter: twenty blocks, like octets */
.meter { margin-bottom: 16px; }
.meter-track {
    position: relative; height: 8px; background: var(--surface-4);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(5% - 3px), transparent calc(5% - 3px), transparent 5%);
    mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(5% - 3px), transparent calc(5% - 3px), transparent 5%);
}
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--point); }
.meter-fill.suspicious { background: var(--warn-point); }
.meter-fill.malicious { background: var(--danger); }

.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.flag {
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3);
}
.flag.on { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.flag.on-bad { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }

.reasons { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.reasons li { position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--text-2); }
.reasons li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.reasons.recs li::before { background: var(--info); }
.audit-list .reasons:not(.recs) li::before { background: var(--danger); }

.bl-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.bl-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; font-size: 0.875rem; background: var(--surface); min-width: 0; }
.bl-row + .bl-row { border-top: 1px solid var(--line); }
/* name, then why it is listed, then the status at the row's right edge */
.bl-name { order: 1; flex: 0 0 124px; font-weight: 600; color: var(--text); }
.bl-status { order: 3; flex: 0 0 auto; margin-left: auto; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
.bl-status.listed { color: var(--danger); }
.bl-status.clean { color: var(--good); }
.bl-status.unavailable { color: var(--warn); }
.bl-why { order: 2; flex: 1; min-width: 0; color: var(--text-2); font-size: 0.8125rem; overflow-wrap: anywhere; }
.bl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.footnote { font-size: 0.8125rem; color: var(--text-3); padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.footnote + .footnote { border-top: 0; padding-top: 6px; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row-key { color: var(--text-3); font-size: 0.875rem; white-space: nowrap; flex: none; }
.row-val { font-family: var(--mono); font-size: 0.8438rem; color: var(--text); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.intel-loading { display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; font-size: 0.875rem; color: var(--text-3); }
.spin {
    display: inline-block; width: 15px; height: 15px; flex: none; border-radius: 50%;
    border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Toolbox console ------------------------------------------------------------------ */
.console {
    display: grid; grid-template-columns: 276px minmax(0, 1fr);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
    box-shadow: var(--shadow-md), var(--highlight);
}
.console-rail {
    display: flex; flex-direction: column; gap: 3px; padding: 12px;
    background: var(--surface-2); border-right: 1px solid var(--line);
    border-radius: calc(var(--r-xl) - 1px) 0 0 calc(var(--r-xl) - 1px);
}
.rail-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px; text-align: left;
    border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-2); cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.rail-item:hover { background: var(--surface-3); color: var(--text); }
.rail-item.active { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-sm); }
.rail-item:focus-visible { outline-offset: -2px; }
.rail-ico {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text-3);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.rail-ico svg { width: 16px; height: 16px; }
.rail-item.active .rail-ico { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.rail-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rail-name { font-size: 0.9063rem; font-weight: 600; line-height: 1.3; }
.rail-desc { font-size: 0.75rem; color: var(--text-3); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-spin { width: 13px; height: 13px; }
.console-panel { min-width: 0; padding: 30px 32px 32px; }
.tool-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.tool-head-ico {
    display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px;
    background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink);
}
.tool-head-ico svg { width: 20px; height: 20px; }
.tool-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.022em; color: var(--text); margin-top: 1px; }
.tool-intro { margin: 5px 0 0; max-width: 680px; font-size: 0.9063rem; color: var(--text-2); }
.tool-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tool-form .lookup-input { flex: 1 1 260px; }
.tool-form .lookup-input.tool-small { flex: 0 1 220px; }
.tool-result { border-top: 1px solid var(--line); padding-top: 20px; animation: fadein .25s ease; }
.tool-empty-state { display: flex; flex-direction: column; gap: 18px; }
.tool-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tool-preview { padding: 18px 20px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.check-list li { position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--text-2); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 0.58em; width: 6px; height: 6px; border-radius: 50%; background: var(--point); }
.tool-curl-preview { margin-top: 16px; }
.tool-examples-label { margin-right: 2px; font-size: 0.8125rem; color: var(--text-3); }
.chip-btn {
    display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 0.8125rem;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.chip-btn:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.ref-foot { margin: 12px 2px 0; font-size: 0.8125rem; color: var(--text-3); line-height: 1.7; }
.ref-foot code { font-size: 0.75rem; padding: 0 5px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text-2); }
@keyframes fadein { from { opacity: 0; } }
.tool-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tool-meta-name { font-weight: 700; color: var(--text); font-size: 0.9375rem; overflow-wrap: anywhere; }
.tool-meta-note { font-size: 0.8125rem; }
.tool-empty { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text-2); font-size: 0.9063rem; }
.tool-err-inline { padding: 12px 14px; border-radius: var(--r); background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger); font-size: 0.875rem; overflow-wrap: anywhere; }
.tool-sub { margin-top: 18px; }
.tool-sub-label {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px;
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3);
}
.tool-curl {
    display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 8px 8px 16px;
    background: linear-gradient(180deg, var(--term-bg-2), var(--term-bg)); border: 1px solid var(--term-border); border-radius: var(--r);
}
.tool-curl::before { content: "$"; font-family: var(--mono); font-weight: 700; color: var(--term-green); }
.tool-curl-cmd { flex: 1; min-width: 0; color: var(--term-text); font-size: 0.8125rem; white-space: nowrap; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.tool-curl .copy-btn { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.14); color: var(--term-dim); }
.tool-curl .copy-btn:hover { color: var(--term-text); border-color: rgba(255, 255, 255, 0.3); }
.tool-curl .copy-btn.copied { color: var(--term-green); border-color: rgba(62, 207, 142, 0.45); background: transparent; }
.tool-curl :focus-visible { outline-color: var(--term-green); }

/* dns + propagation + trace rows */
.dns-records, .prop-list, .trace-hops { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dns-rec, .prop-row, .trace-hop { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; min-width: 0; background: var(--surface); }
.dns-rec + .dns-rec, .prop-row + .prop-row, .trace-hop + .trace-hop { border-top: 1px solid var(--line); }
.dns-rtype {
    flex: none; min-width: 54px; padding: 2px 7px; text-align: center; border-radius: var(--r-xs);
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft);
}
.dns-rval { flex: 1; min-width: 0; color: var(--text); font-size: 0.8438rem; overflow-wrap: anywhere; }
.dns-rttl { flex: none; font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); }
.dns-chain { margin-bottom: 8px; }
.prop-name { display: flex; flex-direction: column; gap: 1px; flex: 0 0 150px; min-width: 0; font-weight: 600; font-size: 0.875rem; }
.prop-note { font-size: 0.75rem; font-weight: 500; overflow-wrap: anywhere; }
.prop-status { flex: 0 0 auto; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--text-3); }
.prop-status.ok { color: var(--good); }
.prop-status.bad { color: var(--danger); }
.prop-vals { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.8438rem; color: var(--text); overflow-wrap: anywhere; }
.prop-val { display: block; }
.prop-ttl { flex: 0 0 auto; font-size: 0.75rem; text-align: right; }
.prop-row.differs { background: var(--warn-soft); }

/* audit + mail scorecards */
.audit-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.audit-grade, .badge-grade {
    display: inline-grid; place-items: center; font-family: var(--mono); font-weight: 800; color: #ffffff; background: var(--text-3);
}
.audit-grade {
    width: 64px; height: 64px; flex: none; border-radius: 16px; font-size: 2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 20px -10px rgba(10, 15, 19, 0.5);
}
.badge-grade { min-width: 28px; height: 24px; padding: 0 7px; border-radius: var(--r-xs); font-size: 0.8125rem; }
/* each grade holds >= 4.5:1 against its white letter (the 13px badge is small text) */
.grade-A { background: #0b7a4b; } .grade-B { background: #37802b; } .grade-C { background: #9a6a00; }
.grade-D { background: #b84f19; } .grade-E, .grade-F { background: #b42338; }
.audit-head-meta { min-width: 0; }
.audit-domain { font-weight: 700; font-size: 1.0625rem; color: var(--text); overflow-wrap: anywhere; }
.audit-score { color: var(--text-2); font-size: 0.875rem; }
.audit-score b { color: var(--text); font-family: var(--mono); }
.audit-cats { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.audit-cat { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); min-width: 0; }
.audit-cat + .audit-cat { border-top: 1px solid var(--line); }
.audit-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-3); }
.audit-dot.pass { background: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.audit-dot.warn { background: var(--warn-point); }
.audit-dot.fail { background: var(--danger); }
.audit-dot.info { background: var(--line-3); }
.audit-cat-name { flex: 0 0 140px; font-weight: 600; font-size: 0.9063rem; color: var(--text); }
.audit-cat-detail { flex: 1; min-width: 0; font-size: 0.8125rem; color: var(--text-2); overflow-wrap: anywhere; }
.audit-list { margin-top: 14px; }
.audit-list-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.audit-list-label svg { width: 14px; height: 14px; }
.audit-list-label.issues { color: var(--danger); }
.audit-list-label.recs { color: var(--info); }

/* trace */
.trace-hop { align-items: flex-start; }
.trace-status { flex: none; min-width: 44px; padding: 2px 6px; text-align: center; border-radius: var(--r-xs); font-family: var(--mono); font-size: 0.75rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.trace-status.s2 { color: var(--good); background: var(--good-soft); }
.trace-status.s3 { color: var(--info); background: var(--info-soft); }
.trace-status.s4, .trace-status.s5, .trace-status.s0 { color: var(--danger); background: var(--danger-soft); }
.trace-hop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trace-url { font-size: 0.8438rem; color: var(--text); overflow-wrap: anywhere; }
.trace-loc { font-size: 0.8125rem; color: var(--text-3); overflow-wrap: anywhere; }
.trace-server { flex: none; max-width: 160px; font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.warn-text { color: var(--warn); }
code.record { display: block; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8125rem; color: var(--text); overflow-wrap: anywhere; }
.spf-tree { list-style: none; margin: 6px 0 8px; padding: 0; font-size: 0.8125rem; color: var(--text-2); }
.spf-tree.nested { margin: 3px 0 3px 4px; padding-left: 16px; border-left: 1px dashed var(--line-3); }
.spf-tree li { padding: 2px 0; overflow-wrap: anywhere; }
.tls-versions { margin: -4px 0 16px; }
.break { overflow-wrap: anywhere; word-break: break-all; }
.headers-rows .row-val { white-space: pre-wrap; }

/* ----- API ---------------------------------------------------------------------------- */
.ep-table { display: flex; flex-direction: column; gap: 26px; }
.ep-group-title { margin: 0 0 10px 2px; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.ep-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm), var(--highlight); overflow: hidden; }
.ep { display: grid; grid-template-columns: auto minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: 4px 18px; padding: 11px 16px; transition: background-color .15s ease; }
.ep + .ep { border-top: 1px solid var(--line); }
.ep:hover { background: var(--surface-2); }
.ep-verb {
    padding: 2px 7px; border-radius: 6px;
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; color: var(--accent-ink);
    background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.ep-path { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.ep-path .var { color: var(--warn); }
.ep-desc { font-size: 0.8438rem; color: var(--text-3); }
.api-examples { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; margin-top: 40px; }
.code-window {
    display: flex; flex-direction: column; min-width: 0; color: var(--term-text);
    background: linear-gradient(180deg, var(--term-bg-2), var(--term-bg));
    border: 1px solid var(--term-border); border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.code-tabs { display: flex; align-items: center; gap: 2px; padding: 7px; background: rgba(255, 255, 255, 0.025); border-bottom: 1px solid var(--term-line); overflow-x: auto; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tab {
    flex: none; height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; cursor: pointer;
    font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--term-dim);
    transition: color .15s ease, background-color .15s ease;
}
.code-tab:hover { color: var(--term-text); }
.code-tab.active { color: var(--term-text); background: rgba(255, 255, 255, 0.08); }
.code-tab:focus-visible { outline-color: var(--term-green); outline-offset: -2px; }
.code-tabs .term-btn { margin-left: auto; }
.code-body { padding: 18px 20px 20px; max-height: 560px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.code-body:focus-visible { outline: 2px solid var(--term-green); outline-offset: -2px; }
.code-body .json { margin: 0; }
.code { margin: 0; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.78; white-space: pre; color: var(--term-text); }
.c-comment { color: var(--term-faint); }
.c-str { color: var(--term-green); }
.c-flag { color: var(--term-blue); }
.c-op { color: var(--term-amber); }
.api-notes { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.api-notes h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.012em; color: var(--text); }
.api-note { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }
.api-note b { color: var(--text); font-weight: 650; }
.api-note code, .ref-desc code, .rate-note code {
    font-size: 0.7813rem; padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere;
    background: var(--surface-3); border: 1px solid var(--line); color: var(--text);
}

.api-ref { margin-top: 56px; display: flex; flex-direction: column; gap: 32px; }
.ref-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ref-head h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.015em; color: var(--text); }
.ref-head span { font-size: 0.8438rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ref-table th {
    text-align: left; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line);
    font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3);
}
.ref-table td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-name { font-family: var(--mono); font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.ref-type { font-family: var(--mono); color: var(--info); white-space: nowrap; }
.ref-desc { color: var(--text-2); min-width: 220px; }
.ref-code { font-family: var(--mono); font-weight: 700; color: var(--warn); white-space: nowrap; }
.ref-field { font-family: var(--mono); color: var(--text); min-width: 160px; }
.ref-more { margin-top: 14px; }
.ref-more svg { transition: transform .2s ease; }
.ref-more.open svg { transform: rotate(180deg); }
.rate-note {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-lg);
    background: var(--warn-soft); border: 1px solid var(--warn-line);
}
.rate-note > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.rate-note-title { color: var(--text); font-size: 0.9375rem; }
.rate-note-title strong { font-family: var(--mono); }
.rate-note-desc { margin-top: 3px; color: var(--text-2); font-size: 0.875rem; }

/* ----- Footer: a night band in both themes --------------------------------------------- */
.footer { position: relative; margin-top: 136px; background: #080b0e; color: #aab5c1; overflow: hidden; }
.footer::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(62, 207, 142, 0.55) 50%, transparent 100%);
}
:root[data-theme="dark"] .footer { background: #040607; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer { background: #040607; } }
.footer .container { position: relative; z-index: 1; }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 72px 0 56px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-cta-title { font-size: clamp(1.75rem, 3vw, 2.375rem); font-weight: 700; letter-spacing: -0.032em; color: #f3f6f9; }
.footer-cta p { margin: 10px 0 0; color: #95a2af; font-size: 1rem; }
.cli-pill {
    display: inline-flex; align-items: center; gap: 14px; height: 58px; padding: 0 10px 0 22px; cursor: copy;
    border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.035);
    font-family: var(--mono); font-size: 1.0625rem; font-weight: 600; color: #eef3f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color .15s ease, background-color .15s ease;
}
.cli-pill:hover { border-color: rgba(62, 207, 142, 0.5); background: rgba(255, 255, 255, 0.05); }
.cli-pill:focus-visible { outline-color: #3ecf8e; }
.cli-pill-prompt { color: #3ecf8e; }
.cli-pill-copy { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); color: #aab5c1; }
.cli-pill.copied .cli-pill-copy { color: #3ecf8e; }
.cli-pill-copy svg { width: 16px; height: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 44px; }
.footer .brand-name { color: #eef3f7; }
.footer .brand-name .tld { color: #8a96a3; }
.footer .brand-mark { box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.24); }
.footer-tag { margin: 16px 0 0; max-width: 330px; font-size: 0.9063rem; line-height: 1.65; color: #95a2af; }
.footer-col h3 { margin-bottom: 14px; font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a96a3; }
.footer-col a { display: block; width: fit-content; padding: 4px 0; font-size: 0.9063rem; color: #cfd8e1; }
.footer-col a:hover { color: #3ecf8e; text-decoration: none; }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
    padding: 22px 0 30px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.8125rem; color: #8a96a3;
}
.footer-made { display: inline-flex; align-items: center; gap: 8px; }
.footer-dot { width: 6px; height: 6px; border-radius: 50%; background: #3ecf8e; }
.footer :focus-visible { outline-color: #3ecf8e; }

/* ----- 404 ---------------------------------------------------------------------------- */
.nf { padding-bottom: 24px; }
.nf .hero-grid { min-height: 420px; }
.nf-title { margin-top: 18px; font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 750; letter-spacing: -0.045em; line-height: 1.04; color: var(--text); text-wrap: balance; }
.nf-lead { margin: 18px 0 0; max-width: 520px; font-size: 1.0625rem; color: var(--text-2); }
.nf-lead code { padding: 1px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); font-size: 0.9em; overflow-wrap: anywhere; }

/* ----- Loading -------------------------------------------------------------------------- */
.hero-loading { min-height: 560px; }
.octets { display: inline-grid; grid-template-columns: repeat(2, 7px); gap: 3px; }
.octets i, .octets b { width: 7px; height: 7px; border-radius: 2px; background: var(--line-3); animation: octet 1.6s ease-in-out infinite; }
.octets b { border-radius: 50%; background: var(--point); }
.octets i:nth-child(2) { animation-delay: .2s; } .octets i:nth-child(3) { animation-delay: .4s; } .octets b { animation-delay: .6s; }
@keyframes octet { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 40% { opacity: 1; transform: none; } }
.skel { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.skel::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
    animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-ip { height: 72px; width: min(520px, 92%); margin-top: 22px; border-radius: 14px; }
.skel-line { height: 18px; width: min(420px, 80%); margin-top: 22px; }
.skel-line.short { width: min(260px, 56%); margin-top: 12px; }
.skel-row { display: flex; gap: 8px; margin-top: 26px; }
.skel-chip { height: 30px; width: 120px; border-radius: 999px; }
.skel-term { min-height: 340px; }

/* ----- Toast + modal ------------------------------------------------------------------- */
.toast-region { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translateX(-50%); pointer-events: none; }
.toast {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 13px; border-radius: 12px; white-space: nowrap;
    background: #0d1216; color: #eef3f7; font-size: 0.875rem; font-weight: 550;
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
    animation: toast-in .24s var(--ease);
}
.toast svg { width: 17px; height: 17px; color: #3ecf8e; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

body.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
    background: rgba(5, 8, 10, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    animation: fadein .18s ease;
}
.modal {
    display: flex; flex-direction: column; width: 100%; max-width: 860px; max-height: calc(100vh - 40px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
    box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.65); animation: pop .22s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--line); }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 650; letter-spacing: -0.012em; }
.modal-title svg { width: 18px; height: 18px; color: var(--accent-ink); }
.modal-body { flex: 1; min-height: 0; background: var(--surface-2); }
.modal-body iframe { display: block; width: 100%; height: 560px; max-height: calc(100vh - 180px); border: 0; }
.modal-foot { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--text-3); }

/* ----- Responsive ----------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .hero-grid { gap: 40px; }
    .console { grid-template-columns: 236px minmax(0, 1fr); }
    .rail-desc { display: none; }
}
@media (max-width: 960px) {
    .hero { padding-top: 44px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .hero-visual { max-width: 640px; }
    .cmd { margin-top: 40px; }
    .loc-body, .net-row, .threat-body, .grid-2, .api-examples { grid-template-columns: minmax(0, 1fr); }
    .card-json { min-height: 420px; }
    .privacy-card { grid-template-columns: minmax(0, 1fr); }
    .privacy-summary { flex-direction: row; justify-content: flex-start; gap: 24px; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); }
    .facts.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ep { grid-template-columns: auto minmax(0, 1fr); }
    .ep-desc { grid-column: 2; }
    .console { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .console-rail {
        flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px;
        border-right: 0; border-bottom: 1px solid var(--line); border-radius: calc(var(--r-xl) - 1px) calc(var(--r-xl) - 1px) 0 0;
    }
    .console-rail::-webkit-scrollbar { display: none; }
    .rail-item { width: auto; flex: none; padding: 7px 12px 7px 8px; gap: 9px; }
    .rail-ico { width: 28px; height: 28px; border-radius: 8px; }
    .rail-ico svg { width: 14px; height: 14px; }
    .rail-name { font-size: 0.875rem; white-space: nowrap; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    :root { --nav-h: 58px; }
    .container, .nav-inner { padding: 0 16px; }
    .nav-links { margin-left: 4px; }
    .nav-link { padding: 7px 8px; font-size: 0.8438rem; }
    .nav-overview, .nav-privacy, .nav-ip { display: none; }
    .section { padding-top: 84px; }
    .section-first { padding-top: 76px; }
    .section-band { margin-top: 84px; padding: 72px 0 80px; }
    .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 26px; }
    .section-lead { font-size: 1rem; }
    .card { padding: 18px; }
    .hero-where { font-size: 1rem; }
    .hero-actions .btn-quiet { display: none; }
    .cmd-bar { height: 58px; padding: 0 6px 0 14px; gap: 10px; border-radius: 14px; }
    .cmd-kbd { display: none; }
    .cmd-btn { height: 44px; padding: 0 14px; }
    .statusline { gap: 8px 18px; }
    .facts, .facts.cols-5, .loc-body .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kv-row { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
    .privacy-summary { flex-direction: column; justify-content: center; text-align: center; }
    .privacy-checks { padding: 16px 18px; }
    .check { grid-template-columns: 32px minmax(0, 1fr); }
    .check-val { grid-column: 2; justify-self: start; }
    .console-panel { padding: 20px 18px 22px; }
    .tool-head-ico { display: none; }
    .audit-cat { flex-wrap: wrap; }
    .audit-cat-name { flex-basis: auto; }
    .audit-cat-detail { flex-basis: 100%; padding-left: 21px; }
    .prop-row { flex-wrap: wrap; }
    .prop-name { flex-basis: auto; flex-direction: row; align-items: baseline; gap: 6px; }
    .prop-status { order: 1; }
    .prop-ttl { order: 2; margin-left: auto; }
    .prop-vals { order: 3; flex-basis: 100%; }
    .bl-row { flex-wrap: wrap; }
    .bl-why { order: 4; flex-basis: 100%; }
    .trace-server { display: none; }
    .tool-form .lookup-input.tool-small { flex-basis: 100%; }
    .check-list { grid-template-columns: minmax(0, 1fr); }
    .footer { margin-top: 96px; }
    .footer-cta { padding: 56px 0 44px; }
    .cli-pill { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
    .brand { gap: 8px; }
    .brand-name { font-size: 1rem; }
    .nav-links { gap: 0; }
    .nav-link { padding: 7px 6px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .cmd-btn { width: 44px; padding: 0; }
    .cmd-btn-label { display: none; }
    .kv-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; }
    .row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .row-val { text-align: left; }
    .tool-form .btn, .ports-custom .btn { flex: 1 1 100%; }
    .tool-form .tool-select { flex: 1 1 auto; }
    .threat-body .bl-list { grid-template-columns: minmax(0, 1fr); }
    .ports-custom .lookup-input { flex: 1 1 auto; width: auto; }
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .terminal-body { padding: 16px 16px 18px; font-size: 0.8125rem; }
    .cli-json { font-size: 0.75rem; }
}
@media (max-width: 360px) {
    .facts, .facts.cols-2, .facts.cols-5, .loc-body .facts { grid-template-columns: minmax(0, 1fr); }
    .nav-inner { gap: 6px; }
    .nav-link { padding: 7px 4px; font-size: 0.8125rem; }
    .brand-mark { width: 26px; height: 26px; }
    .theme-toggle { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .cli-cursor, .live-dot, .worldmap-pin::after { animation: none; }
}
