/* IPCat · Neo-soft light (neumorphic) theme */

:root {
    color-scheme: light;
    --bg: #e8ecf3;
    --bg-2: #f3f6fb;
    --surface: #eaeef4;
    --surface-subtle: #e4e9f1;
    --surface-hover: #eef2f8;
    --border: rgba(120, 135, 165, .16);
    --border-strong: rgba(120, 135, 165, .26);
    --text: #333a47;
    --text-secondary: #4f586b;
    --muted: #767f92;
    --accent: #0e8f6f;
    --accent-hover: #0b7a5e;
    --accent-soft: #e3f2ee;
    --success: #12805a;
    --success-soft: #e6f3ee;
    --warning: #96600f;
    --warning-soft: #f7edd9;
    --danger: #bf4340;
    --danger-soft: #f9e5e3;
    --info: #3c68ad;
    --info-soft: #e7edf7;
    --focus: #2b83d6;
    --radius: 22px;
    --radius-small: 13px;
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    /* Neo-soft light shadows */
    --nm-out: 9px 9px 20px rgba(146, 161, 188, .45), -9px -9px 20px rgba(255, 255, 255, .95);
    --nm-out-soft: 5px 5px 12px rgba(146, 161, 188, .32), -5px -5px 12px rgba(255, 255, 255, .85);
    --nm-flat: 3px 3px 7px rgba(146, 161, 188, .26), -3px -3px 7px rgba(255, 255, 255, .8);
    --nm-in: inset 5px 5px 10px rgba(146, 161, 188, .42), inset -5px -5px 10px rgba(255, 255, 255, .92);
    --nm-in-soft: inset 3px 3px 6px rgba(146, 161, 188, .34), inset -3px -3px 6px rgba(255, 255, 255, .88);
    --nm-ring: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #22262e;
    --bg-2: #2b313b;
    --surface: #262b33;
    --surface-subtle: #23272e;
    --surface-hover: #2b313a;
    --border: rgba(255, 255, 255, .06);
    --border-strong: rgba(255, 255, 255, .12);
    --text: #e7ebf2;
    --text-secondary: #b7c0ce;
    --muted: #89929f;
    --accent: #1ea87f;
    --accent-hover: #2cbb90;
    --accent-soft: #1f332d;
    --success: #35b184;
    --success-soft: #1d322a;
    --warning: #d29c42;
    --warning-soft: #372f20;
    --danger: #e56f66;
    --danger-soft: #392624;
    --info: #76a0dd;
    --info-soft: #222b3a;
    --focus: #5fadf2;

    --nm-out: 10px 10px 24px rgba(0, 0, 0, .48), -6px -6px 18px rgba(255, 255, 255, .035);
    --nm-out-soft: 6px 6px 15px rgba(0, 0, 0, .42), -4px -4px 12px rgba(255, 255, 255, .03);
    --nm-flat: 4px 4px 8px rgba(0, 0, 0, .34), -3px -3px 7px rgba(255, 255, 255, .025);
    --nm-in: inset 6px 6px 12px rgba(0, 0, 0, .55), inset -4px -4px 11px rgba(255, 255, 255, .035);
    --nm-in-soft: inset 3px 3px 7px rgba(0, 0, 0, .5), inset -2px -2px 6px rgba(255, 255, 255, .03);
    --nm-ring: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--bg), var(--bg-2)) fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 120;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--nm-out);
    color: var(--text);
    transform: translate(-50%, -160%);
    transition: transform .2s;
}
.skip-link:focus { transform: translate(-50%, 0); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Full-screen loader ---------- */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(232, 236, 243, .74);
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    transition: opacity .35s ease, visibility .35s;
}
[data-theme="dark"] .loader-overlay { background: rgba(24, 27, 33, .74); }
.loader-overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 34px 46px;
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--nm-out);
    text-align: center;
}
.loader-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
.loader-text { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.loader-sub { color: var(--muted); font-size: 12px; }
.loader-dots span { animation: loader-blink 1.2s infinite; }
.loader-dots span:nth-child(2) { animation-delay: .2s; }
.loader-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes loader-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Top bar ---------- */
.topbar { padding: 18px 28px 0; }
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 11px 18px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--nm-out-soft);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--text); }
.brand-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--accent), var(--accent-hover));
    box-shadow: 4px 4px 9px rgba(14, 143, 111, .28), -3px -3px 8px rgba(255, 255, 255, .5);
    color: #fff;
}
.brand-logo .icon { width: 20px; height: 20px; }
.brand strong { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.brand small { display: block; margin-top: -2px; color: var(--muted); font-size: 10px; }

.lookup { flex: 1 1 auto; min-width: 0; margin-left: auto; }
.lookup-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: var(--surface-subtle);
    box-shadow: var(--nm-in);
}
.search-icon { flex: 0 0 auto; color: var(--muted); }
.lookup input {
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    outline: none;
}
.lookup input::placeholder { color: var(--muted); }

.field-error { margin: 6px 4px 0; color: var(--danger); font-size: 11px; }

/* ---------- Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 15px;
    border: 0;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--nm-out-soft);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow .18s, color .18s, transform .12s;
}
.button:hover { color: var(--text); box-shadow: var(--nm-out); }
.button:active { box-shadow: var(--nm-in); transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: not-allowed; box-shadow: var(--nm-flat); }
.button .icon { width: 16px; height: 16px; }

.button-primary {
    background: linear-gradient(145deg, var(--accent), var(--accent-hover));
    box-shadow: 5px 5px 12px rgba(14, 143, 111, .3), -4px -4px 10px rgba(255, 255, 255, .6);
    color: #fff;
}
.button-primary:hover { color: #fff; box-shadow: 6px 6px 15px rgba(14, 143, 111, .34), -5px -5px 12px rgba(255, 255, 255, .6); }
.button-primary:active { box-shadow: inset 4px 4px 9px rgba(0, 0, 0, .22), inset -3px -3px 8px rgba(255, 255, 255, .18); }
[data-theme="dark"] .button-primary { box-shadow: 5px 5px 13px rgba(0, 0, 0, .45), -3px -3px 9px rgba(255, 255, 255, .03); color: #04231c; }
[data-theme="dark"] .button-primary:hover { color: #04231c; }

.button-secondary { color: var(--accent); }
.button-quiet { min-height: 30px; padding: 4px 12px; font-size: 11px; font-weight: 500; box-shadow: var(--nm-flat); }
.button-quiet:active { box-shadow: var(--nm-in-soft); }
.copy-btn.copied { color: var(--success); }

.icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--nm-out-soft);
    color: var(--text-secondary);
    cursor: pointer;
    transition: box-shadow .18s, color .18s;
}
.icon-btn:hover { color: var(--text); box-shadow: var(--nm-out); }
.icon-btn:active { box-shadow: var(--nm-in); }
.icon-btn .icon { width: 18px; height: 18px; }
.theme-icon-sun, [data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }

/* ---------- Layout ---------- */
.container { width: min(1120px, 100%); margin: 0 auto; padding: 22px 28px 34px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 6px 2px 16px; }
.page-heading h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }

.live-indicator { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--text-secondary); font-size: 11px; }
.live-indicator > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }

/* ---------- Cards ---------- */
.card {
    min-width: 0;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--nm-out);
}
.card-heading { display: flex; align-items: center; gap: 11px; min-height: 28px; margin-bottom: 16px; }
.card-heading h2 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.card-heading > :last-child:not(:first-child):not(.card-icon) { margin-left: auto; }
.card-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: var(--surface-subtle);
    box-shadow: var(--nm-in-soft);
    color: var(--text-secondary);
}
.card-icon .icon { width: 18px; height: 18px; }
.card-note { color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card-wide { grid-column: 1 / -1; }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 30px; border-radius: 28px; }
.hero-main { min-width: 0; flex: 1; }
.hero-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.hero-ip { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -.045em; overflow-wrap: anywhere; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 11px;
    border-radius: 999px;
    background: var(--surface-subtle);
    box-shadow: var(--nm-in-soft);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.badge-neutral { color: var(--text-secondary); }
.badge-success { background: var(--success-soft); box-shadow: var(--nm-in-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); box-shadow: var(--nm-in-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); box-shadow: var(--nm-in-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); box-shadow: var(--nm-in-soft); color: var(--info); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 12px; color: var(--text-secondary); font-size: 12px; }
.location-name { display: inline-flex; align-items: center; gap: 8px; }
.flag-inline { display: inline-flex; width: 22px; }
.flag-img { display: inline-block; width: 28px; height: 20px; flex: 0 0 auto; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px var(--border), 2px 2px 5px rgba(146, 161, 188, .3); }
.flag-inline .flag-img { width: 22px; height: 15px; }
.country-with-flag { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.country-flag { display: inline-flex; min-width: 22px; }
.hero-meta > span + span { position: relative; }
.hero-meta > span + span::before { content: ""; position: absolute; top: 50%; left: -10px; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.scan-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 20px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.scan-status.is-error { color: var(--danger); }
.scan-status.is-complete { color: var(--success); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--surface-hover); }
.scan-status .button { min-height: 28px; margin-left: 4px; }

.hero-score {
    position: relative;
    width: 118px;
    height: 118px;
    flex: 0 0 118px;
    border-radius: 50%;
    background: var(--surface-subtle);
    box-shadow: var(--nm-in);
}
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-bg, .score-fg { fill: none; stroke-width: 8; }
.score-bg { stroke: var(--border-strong); }
.score-fg { stroke-linecap: round; transition: stroke-dashoffset .6s ease, stroke .2s; }
.score-fg.level-low { stroke: var(--success); }
.score-fg.level-medium { stroke: var(--info); }
.score-fg.level-high { stroke: var(--warning); }
.score-fg.level-critical { stroke: var(--danger); }
.score-fg.level-pending { stroke: var(--border-strong); }
.score-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.35; }
.score-num { font-size: 28px; font-weight: 700; letter-spacing: -.04em; }
.score-text > span { color: var(--muted); font-size: 10px; }
.score-text .score-level { margin-top: 2px; font-size: 11px; font-weight: 600; }
.level-text-low { color: var(--success) !important; }
.level-text-medium { color: var(--info) !important; }
.level-text-high { color: var(--warning) !important; }
.level-text-critical { color: var(--danger) !important; }
.level-text-pending { color: var(--muted) !important; }

/* ---------- Source panel ---------- */
.source-panel { margin-top: 14px; padding: 20px 24px; }
.source-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.source-panel-head .card-heading { margin-bottom: 12px; }
.source-counter { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.source-notice { margin: 0 0 14px; }
.source-notice p { margin: 2px 0 0; }

.sources-head,
.source-card {
    display: grid;
    grid-template-columns: 190px minmax(180px, 1.35fr) minmax(160px, 1fr) 64px;
    align-items: center;
    gap: 18px;
}
.sources-head { padding: 0 0 8px; color: var(--muted); font-size: 10px; }
.source-card { min-width: 0; min-height: 54px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.source-card:last-child { border-bottom: 0; }
.source-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.source-flag {
    display: grid;
    place-items: center;
    width: 30px;
    height: 22px;
    flex: 0 0 30px;
    border-radius: 5px;
    background: var(--surface-subtle);
    box-shadow: var(--nm-in-soft);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 1;
}
.source-flag .flag-img { width: 26px; height: 18px; box-shadow: none; }
.source-name { min-width: 0; flex: 1; }
.source-name h3 { margin: 0; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.source-name span { display: block; margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.source-status { justify-self: end; color: var(--muted); font-size: 10px; text-align: right; white-space: nowrap; }
.source-card.is-ready .source-status { color: var(--success); }
.source-card.is-error .source-status { color: var(--danger); }
.source-location { margin: 0; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.source-meta { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.source-card.is-error .source-location { color: var(--text-secondary); font-weight: 400; }
.source-card.is-error { border-radius: 10px; background: linear-gradient(90deg, transparent, var(--danger-soft), transparent); }

.skeleton-line {
    display: inline-block;
    width: 72%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--surface-subtle), var(--border), var(--surface-subtle));
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}
.skeleton-line.short { width: 42%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Core card ---------- */
.core-card { padding-bottom: 18px; }
.core-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.core-group { min-width: 0; }
.core-group + .core-group { padding-left: 40px; border-left: 1px solid var(--border); }
.field-group-title { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Info list ---------- */
.info-list { margin: 0; }
.row { display: grid; grid-template-columns: minmax(92px, .65fr) minmax(0, 1.35fr); align-items: start; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row dt { color: var(--text-secondary); }
.row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Security / privacy ---------- */
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.flag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.flag-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 14px;
    border-radius: var(--radius-small);
    background: var(--surface-subtle);
    box-shadow: var(--nm-in-soft);
    transition: box-shadow .2s, color .2s;
}
.flag-item .flag-name { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.flag-item .flag-state { color: var(--muted); font-size: 11px; }
.flag-item.on {
    background: var(--danger-soft);
    box-shadow: var(--nm-in);
}
.flag-item.on .flag-name { color: var(--danger); }
.flag-item.on .flag-state { color: var(--danger); }

.score-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; padding: 9px 12px; border-radius: var(--radius-small); background: var(--surface-subtle); box-shadow: var(--nm-in-soft); font-size: 11px; }
.score-summary strong { color: var(--text); }
.score-summary b { color: var(--accent); font-family: var(--font-mono); }

.reasons { margin-top: 18px; }
.reasons h3, .leak-item h3 { margin: 0 0 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.reasons ul { margin: 0; padding-left: 18px; }
.reasons li { margin: 6px 0; color: var(--text-secondary); font-size: 12px; }
.weight { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-family: var(--font-mono); font-size: 10px; }
.factor-source { margin-left: 6px; color: var(--muted); font-size: 10px; }

/* ---------- Tables ---------- */
.table-scroll { max-width: 100%; overflow-x: auto; border-radius: var(--radius-small); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { color: var(--muted); font-weight: 500; text-align: left; }
.data-table thead th { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.data-table tr:last-child td { border-bottom: 0; }
.table-empty { display: inline-block; padding: 6px 0; color: var(--muted); }
.dnsbl-zone { font-family: var(--font-mono); overflow-wrap: anywhere; word-break: break-all; }
.dnsbl-hit { color: var(--danger); font-weight: 600; }
.dnsbl-clean { color: var(--success); }
.dnsbl-error { color: var(--warning); }
.abuse-box { margin-top: 14px; padding: 13px 15px; border-radius: var(--radius-small); background: var(--surface-subtle); box-shadow: var(--nm-in-soft); }

/* ---------- Details ---------- */
.details { margin-top: 18px; padding: 0; overflow: hidden; }
.details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary > span:first-child { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.details summary .icon { width: 18px; height: 18px; color: var(--text-secondary); }
.summary-hint { color: var(--muted); font-size: 11px; }
.summary-hint::after { content: "+"; display: inline-block; margin-left: 8px; font-size: 15px; }
.details[open] .summary-hint::after { content: "−"; }
.details[open] summary { border-bottom: 1px solid var(--border); box-shadow: var(--nm-in-soft); }
.details .table-scroll { padding: 10px 24px 18px; }
.header-table th { width: 200px; color: var(--muted); font-family: var(--font-mono); font-weight: 400; white-space: nowrap; }
.header-table td { font-family: var(--font-mono); }

.inline-details { margin-top: 0; }
.inline-details summary { padding: 16px 24px; }
.inline-details .inline-title { font-size: 14px; font-weight: 600; }
.inline-details .card-note { margin-left: 2px; font-weight: 400; }
.inline-details[open] summary { border-bottom: 1px solid var(--border); box-shadow: var(--nm-in-soft); }
.inline-details-body { padding: 6px 24px 18px; }
.inline-details-body .user-agent { margin-top: 12px; }

.user-agent { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; margin-bottom: 8px; color: var(--text-secondary); font-size: 12px; }
.user-agent code { min-width: 0; padding: 7px 11px; border-radius: var(--radius-small); background: var(--surface-subtle); box-shadow: var(--nm-in-soft); color: var(--text); font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }

/* ---------- Leak & fingerprint ---------- */
.leak-item { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.leak-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.leak-value { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.leak-value.safe { color: var(--success); }
.leak-value.warn { color: var(--warning); }
.leak-value.bad { color: var(--danger); }

.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-small); background: var(--accent-soft); color: var(--accent); }
.privacy-note .icon { width: 17px; height: 17px; margin-top: 1px; }
.privacy-note p { margin: 0; font-size: 11px; }

/* ---------- Notice / state / footer ---------- */
.notice { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px 18px; border-radius: var(--radius-small); background: var(--warning-soft); box-shadow: var(--nm-in-soft); color: var(--warning); font-size: 12px; }
.notice .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.notice ul { margin: 5px 0 0; padding-left: 18px; }

.empty-state { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 18px; border-radius: var(--radius-small); background: var(--surface-subtle); box-shadow: var(--nm-in-soft); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text-secondary); font-size: 12px; }
.empty-state span { font-size: 11px; }

.state-card { padding: 48px 24px; text-align: center; }
.state-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 18px; background: var(--danger-soft); box-shadow: var(--nm-in-soft); color: var(--danger); }
.state-icon .icon { width: 26px; height: 26px; }
.state-card h2 { margin: 0 0 8px; font-size: 20px; }
.state-card p { max-width: 480px; margin: 0 auto 20px; color: var(--text-secondary); }

.footer { padding: 28px 10px 0; color: var(--muted); font-size: 11px; text-align: center; }
.footer p { margin: 3px 0; }

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 100;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--nm-out);
    color: var(--text);
    font-size: 13px;
    transform: translateX(-50%);
}
.noscript-note { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 90; padding: 12px; border-radius: var(--radius-small); background: var(--warning-soft); color: var(--warning); text-align: center; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .topbar { padding: 14px 18px 0; }
    .topbar-inner { gap: 14px; padding: 10px 14px; }
    .brand small { display: none; }
    .container { padding: 22px 18px; }
    .hero { padding: 22px 24px; }
    .flag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sources-head, .source-card { grid-template-columns: 160px minmax(150px, 1.3fr) minmax(120px, 1fr) 58px; gap: 12px; }
    .core-columns { gap: 26px; }
    .core-group + .core-group { padding-left: 26px; }
    .detail-grid { gap: 0 26px; }
}

@media (max-width: 680px) {
    .topbar { padding: 12px 12px 0; }
    .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 12px; border-radius: 16px; }
    .brand { margin-right: auto; }
    .brand-logo { width: 32px; height: 32px; border-radius: 10px; }
    .lookup { order: 3; flex: 0 0 100%; width: 100%; margin-left: 0; }
    .lookup-control { min-height: 42px; }
    .lookup-control .button { flex: 0 0 auto; }
    .lookup input { flex: 1 1 auto; }
    .container { padding: 18px 12px 24px; }
    .page-heading { margin-bottom: 12px; }
    .page-heading h1 { font-size: 20px; }
    .card { padding: 18px; border-radius: 18px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
    .card-wide { grid-column: auto; }
    .hero { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 18px; border-radius: 22px; }
    .hero-score { align-self: flex-start; width: 100px; height: 100px; flex-basis: 100px; }
    .score-num { font-size: 25px; }
    .hero-ip { gap: 10px; font-size: clamp(22px, 7vw, 30px); }
    .source-panel { margin-top: 12px; padding: 16px 18px; }
    .source-panel-head { align-items: flex-start; }
    .sources-head { display: none; }
    .source-card {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "source status" "location location" "meta meta";
        gap: 2px 12px;
        min-height: 0;
        padding: 11px 0;
    }
    .source-card-head { grid-area: source; }
    .source-status { grid-area: status; align-self: center; }
    .source-location { grid-area: location; margin-top: 4px; }
    .source-meta { grid-area: meta; }
    .core-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .core-group + .core-group { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-grid .row:nth-last-child(2) { border-bottom: 1px solid var(--border); }
    .user-agent { grid-template-columns: 1fr; gap: 4px; }
    .row { grid-template-columns: minmax(88px, .7fr) minmax(0, 1.3fr); gap: 12px; }
    .details summary { padding: 16px 18px; }
    .details .table-scroll { padding: 8px 18px 16px; }
    .inline-details-body { padding: 4px 18px 16px; }
    .summary-hint { font-size: 0; }
    .summary-hint::after { font-size: 17px; }
}

@media (max-width: 390px) {
    .lookup .button { padding-right: 12px; padding-left: 12px; }
    .lookup input { font-size: 12px; }
    .card { padding: 16px; }
    .hero { padding: 18px 16px; }
    .hero-badges { gap: 5px; }
    .flag-grid { gap: 8px; }
}

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

@media print {
    body { background: #fff; }
    .topbar, .copy-btn, .scan-status, .toast, .noscript-note { display: none !important; }
    .container { width: 100%; padding: 0; }
    .card, .badge, .flag-item, .user-agent code, .source-flag, .card-icon, .hero-score { box-shadow: none !important; }
    .card { break-inside: avoid; }
}
