/* ==========================================================================
   NEXUS · 网络空间测绘
   Dark cyber / neon green interface
   ========================================================================== */

:root {
    --bg: #03070a;
    --bg-deep: #020507;
    --panel: rgba(7, 17, 22, .82);
    --panel-solid: #050d11;
    --line: rgba(74, 222, 128, .16);
    --line-soft: rgba(255, 255, 255, .06);
    --fg: #e7f2f6;
    --fg-dim: #b9cbd4;
    --muted: #8499a3;
    --green: #4ade80;
    --green-deep: #16a34a;
    --cyan: #22d3ee;
    --violet: #a78bfa;
    --amber: #fbbf24;
    --red: #fb7185;
    --sans: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    --mono: "Cascadia Code", "Cascadia Mono", Consolas, "SFMono-Regular", "Liberation Mono", monospace;
    --radius: 14px;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
    --binary-opacity: 1;
    --binary-brightness: 1.4;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    background: #000;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #000;
    color: var(--fg);
    font-family: var(--sans);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 来自 WWW/login.php 的 bj.gif 二进制平铺背景，降低亮度以适配长页面读数 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("bj.gif");
    background-repeat: repeat;
    background-position: 0 0;
    background-size: 50px 42px;
    opacity: var(--binary-opacity);
    filter: brightness(var(--binary-brightness));
    pointer-events: none;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
}

img,
svg {
    display: block;
}

::selection {
    background: rgba(74, 222, 128, .28);
    color: #eafff2;
}

:focus-visible {
    outline: 2px solid rgba(74, 222, 128, .65);
    outline-offset: 2px;
}

.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;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .02);
}

::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(74, 222, 128, .18);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 222, 128, .32);
}

/* ==========================================================================
   Background layers
   ========================================================================== */

#bg-canvas {
    display: none;
}

.bg-grid {
    display: none;
}

.bg-aurora {
    position: fixed;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    opacity: .24;
    background:
        radial-gradient(620px 440px at 12% 2%, rgba(34, 197, 94, .16), transparent 66%),
        radial-gradient(720px 520px at 88% 6%, rgba(34, 211, 238, .10), transparent 64%),
        radial-gradient(760px 620px at 54% 108%, rgba(167, 139, 250, .07), transparent 70%);
}

.bg-scanlines {
    display: none;
}

.page {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 34px;
}

/* 底部说明文字单独增强，其他区域保持干净无玻璃叠加 */
.source-foot,
.footer-note,
.footer-legal,
.footer-meta,
.footer-brand small,
.footer-links {
    text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 76px;
    margin: 0 -34px;
    padding: 0 34px;
    background: linear-gradient(180deg, rgba(3, 9, 12, .94), rgba(3, 9, 12, .72));
    border-bottom: 1px solid rgba(74, 222, 128, .09);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--green);
    filter: drop-shadow(0 0 12px rgba(74, 222, 128, .45));
}

.brand-mark.small {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px rgba(74, 222, 128, .3));
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .22em;
    color: #f0fff6;
}

.brand-copy small {
    margin-top: 3px;
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .19em;
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
}

.nav a {
    padding: 7px 15px;
    border-radius: 999px;
    color: var(--fg-dim);
    font-size: 13px;
    transition: color .2s, background .2s;
}

.nav a:hover {
    color: #fff;
    background: rgba(74, 222, 128, .08);
}

.nav a.is-active {
    color: #03130a;
    background: var(--green);
    font-weight: 700;
    box-shadow: 0 0 18px rgba(74, 222, 128, .32);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
}

.sys-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #7ee2a3;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .14em;
}

.sys-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s ease-in-out infinite;
}

.clock {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(74, 222, 128, .04);
    color: var(--fg-dim);
    transition: color .2s, border-color .2s, background .2s, transform .3s;
}

.icon-btn:hover {
    color: var(--green);
    border-color: rgba(74, 222, 128, .45);
    background: rgba(74, 222, 128, .08);
    transform: rotate(14deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
    align-items: center;
    gap: 48px;
    padding: 74px 0 34px;
}

.kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.kicker-line {
    display: inline-block;
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, var(--green), transparent);
}

.hero-title {
    display: flex;
    flex-direction: column;
    margin: 0 0 22px;
    font-size: clamp(44px, 5.6vw, 78px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: .01em;
}

.hero-title .grad {
    background: linear-gradient(95deg, #dcffe9 0%, #4ade80 38%, #22d3ee 68%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(74, 222, 128, .16));
    animation: titleGlow 7s ease-in-out infinite;
}

.lede {
    max-width: 680px;
    margin: 0;
    color: var(--fg-dim);
    font-size: 16.5px;
    line-height: 1.95;
}

.lede b {
    color: #b9f6cf;
    font-weight: 600;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
}

.hero-tags span {
    padding: 7px 12px;
    border: 1px solid rgba(74, 222, 128, .18);
    border-radius: 8px;
    background: rgba(4, 11, 15, .72);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
}

.hero-tags b {
    color: var(--green);
    font-size: 13px;
}

/* Radar */

.radar-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 410px;
}

.radar {
    position: relative;
    width: min(380px, 78vw);
    aspect-ratio: 1;
    border: 1px solid rgba(74, 222, 128, .16);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, .07) 0%, rgba(4, 10, 14, .22) 55%, rgba(4, 10, 14, .68) 100%);
    box-shadow: 0 0 90px rgba(34, 197, 94, .12), inset 0 0 70px rgba(34, 197, 94, .05);
}

.radar::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px dashed rgba(74, 222, 128, .14);
    border-radius: 50%;
}

.radar::after {
    content: "";
    position: absolute;
    inset: 50% 50% 50% 50%;
    width: 4px;
    height: 4px;
    margin: -2px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px 4px rgba(74, 222, 128, .55);
}

.radar-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(74, 222, 128, .1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-ring.r1 { width: 22%; height: 22%; }
.radar-ring.r2 { width: 46%; height: 46%; }
.radar-ring.r3 { width: 68%; height: 68%; }
.radar-ring.r4 { width: 90%; height: 90%; border-style: dashed; opacity: .7; }

.radar-axis {
    position: absolute;
    background: rgba(74, 222, 128, .1);
}

.radar-axis.ax {
    left: 5%;
    right: 5%;
    top: 50%;
    height: 1px;
}

.radar-axis.ay {
    top: 5%;
    bottom: 5%;
    left: 50%;
    width: 1px;
}

.radar-sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(74, 222, 128, 0) 0deg,
        rgba(74, 222, 128, 0) 288deg,
        rgba(74, 222, 128, .12) 326deg,
        rgba(74, 222, 128, .4) 358deg,
        rgba(74, 222, 128, .05) 360deg
    );
    -webkit-mask-image: radial-gradient(circle, #000 0 71%, transparent 73%);
    mask-image: radial-gradient(circle, #000 0 71%, transparent 73%);
    animation: spin 5.4s linear infinite;
    pointer-events: none;
}

.radar-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(74, 222, 128, .35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-blip {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px 2px rgba(74, 222, 128, .55);
    animation: blip 3.6s ease-in-out infinite;
}

.radar-blip::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(74, 222, 128, .3);
    border-radius: 50%;
    animation: blipRing 3.6s ease-out infinite;
}

.radar-blip.b1 { left: 67%; top: 29%; animation-delay: .2s; }
.radar-blip.b2 { left: 36%; top: 43%; animation-delay: 1.1s; }
.radar-blip.b3 { left: 73%; top: 62%; animation-delay: 2.2s; }
.radar-blip.b4 { left: 28%; top: 70%; animation-delay: 1.7s; }
.radar-blip.b5 { left: 54%; top: 78%; animation-delay: .7s; }
.radar-blip.b6 { left: 47%; top: 22%; animation-delay: 2.8s; }

.radar-blip.b2,
.radar-blip.b4 {
    background: var(--cyan);
    box-shadow: 0 0 10px 2px rgba(34, 211, 238, .55);
}

.radar-blip.b2::after,
.radar-blip.b4::after {
    border-color: rgba(34, 211, 238, .3);
}

.radar-caption {
    position: absolute;
    bottom: 12px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 7px;
    transform: translateX(-50%);
    color: #6f9a84;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .16em;
    white-space: nowrap;
}

.radar-caption i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 1.8s infinite;
}

.radar-caption b {
    color: var(--green);
    font-weight: 400;
}

.hud {
    position: absolute;
    color: #426058;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .14em;
    white-space: nowrap;
}

.hud-a { top: 18px; left: 0; }
.hud-b { right: 0; bottom: 42px; }

/* ==========================================================================
   Search console
   ========================================================================== */

.search-shell {
    position: relative;
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid rgba(74, 222, 128, .2);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(9, 20, 25, .92), rgba(4, 10, 14, .88));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
    scroll-margin-top: 100px;
}

.search-shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, .8), rgba(34, 211, 238, .5), transparent);
}

.terminal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: rgba(0, 0, 0, .2);
}

.tl-dots {
    display: flex;
    gap: 5px;
}

.tl-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2a3b42;
}

.tl-dots i:nth-child(1) { background: #fb7185; opacity: .75; }
.tl-dots i:nth-child(2) { background: #fbbf24; opacity: .7; }
.tl-dots i:nth-child(3) { background: #4ade80; opacity: .7; }

.tl-path {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .06em;
}

.tl-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    color: var(--green);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .14em;
}

.tl-state i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    transition: background .2s;
}

.search-form:focus-within {
    background: rgba(74, 222, 128, .018);
}

.prompt {
    color: var(--green);
    font-family: var(--mono);
    font-size: 18px;
    text-shadow: 0 0 12px rgba(74, 222, 128, .7);
    user-select: none;
}

#q {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #f2fff7;
    font-family: var(--mono);
    font-size: 16px;
    letter-spacing: .01em;
}

#q::placeholder {
    color: #647a84;
}

.slash-hint {
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 4px;
    color: #4f636d;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.5;
}

.scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #4ade80, #22c55e 55%, #0ea5a4);
    color: #03130a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    white-space: nowrap;
    box-shadow: 0 12px 30px -12px rgba(74, 222, 128, .8);
    transition: transform .2s, filter .2s, box-shadow .2s;
}

.scan-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 16px 36px -12px rgba(74, 222, 128, .9);
}

.scan-btn:active {
    transform: translateY(0);
}

.scan-btn[disabled] {
    opacity: .65;
}

.scan-ico {
    position: relative;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(3, 19, 10, .55);
    border-radius: 50%;
}

.scan-ico i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #03130a;
}

.scan-ico::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid transparent;
    border-top-color: #03130a;
    border-radius: 50%;
    opacity: 0;
    animation: spin 1.1s linear infinite;
}

.scan-btn.is-loading .scan-ico::after {
    opacity: 1;
}

.search-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px 14px;
}

.examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.examples-label {
    color: #4d626c;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .2em;
}

.examples button {
    padding: 4px 9px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 6px;
    background: rgba(255, 255, 255, .02);
    color: #a7bac4;
    font-family: var(--mono);
    font-size: 11.5px;
    transition: color .2s, border-color .2s, background .2s;
}

.examples button:hover {
    color: var(--green);
    border-color: rgba(74, 222, 128, .35);
    background: rgba(74, 222, 128, .06);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: transparent;
    color: #a2b5bf;
    font-size: 12px;
    transition: color .2s, border-color .2s, background .2s;
}

.ghost-btn:hover {
    color: var(--green);
    border-color: rgba(74, 222, 128, .4);
    background: rgba(74, 222, 128, .05);
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid rgba(74, 222, 128, .32);
    border-radius: 8px;
    background: rgba(74, 222, 128, .12);
    color: #d9ffe6;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s, transform .2s, border-color .2s;
}

.primary-btn:hover {
    background: rgba(74, 222, 128, .2);
    border-color: rgba(74, 222, 128, .55);
    transform: translateY(-1px);
}

.syntax-toggle {
    color: #8195a0;
    font-size: 11.5px;
}

.toggle-mark {
    color: var(--green);
    font-family: var(--mono);
    transition: transform .2s;
}

.syntax-toggle[aria-expanded="true"] .toggle-mark {
    transform: rotate(45deg);
}

.syntax-panel {
    border-top: 1px solid rgba(255, 255, 255, .05);
    background: rgba(0, 0, 0, .16);
}

.syntax-panel-inner {
    padding: 18px;
}

.syntax-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.syntax-grid div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    background: rgba(255, 255, 255, .015);
}

.syntax-grid code {
    color: #8ef0b3;
    font-family: var(--mono);
    font-size: 12px;
}

.syntax-grid span {
    color: var(--muted);
    font-size: 11.5px;
}

.syntax-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.8;
}

.syntax-note code {
    color: #9db3bd;
    font-family: var(--mono);
}

.history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px 14px;
}

.history-label {
    color: #4d626c;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .2em;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.history-list button {
    padding: 3px 8px;
    border: 1px dashed rgba(148, 163, 184, .16);
    border-radius: 5px;
    background: transparent;
    color: #8b9fa9;
    font-family: var(--mono);
    font-size: 10.5px;
}

.history-list button:hover {
    color: var(--green);
    border-color: rgba(74, 222, 128, .35);
}

.history-clear {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: #4f636d;
    font-size: 10px;
}

.history-clear:hover {
    color: var(--red);
}

/* ==========================================================================
   Scanning panel
   ========================================================================== */

.scan-panel {
    position: relative;
    margin-top: 20px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: 16px;
    background: rgba(4, 12, 16, .86);
    box-shadow: 0 20px 60px -30px rgba(34, 211, 238, .25);
}

.scan-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .8), transparent);
    animation: scanSweep 2.4s linear infinite;
}

.scan-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-family: var(--mono);
    font-size: 10.5px;
}

.scan-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--cyan);
    letter-spacing: .16em;
}

.scan-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 9px var(--cyan);
    animation: pulse 1s infinite;
}

.scan-target {
    overflow: hidden;
    color: #cfe9f0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-time {
    margin-left: auto;
    color: var(--muted);
}

.scan-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.scan-source {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 9px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 7px;
    color: #617680;
    font-family: var(--mono);
    font-size: 9.5px;
    white-space: nowrap;
}

.scan-source i {
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4b5b66;
}

.scan-source.is-running {
    border-color: rgba(34, 211, 238, .28);
    color: #b7f3fa;
}

.scan-source.is-running i {
    background: var(--cyan);
    animation: pulse .85s infinite;
}

.scan-source.is-ok {
    border-color: rgba(74, 222, 128, .22);
    color: #a9eec1;
}

.scan-source.is-ok i {
    background: var(--green);
    box-shadow: 0 0 7px rgba(74, 222, 128, .7);
}

.scan-source.is-empty {
    border-color: rgba(251, 191, 36, .18);
    color: #e9cf8c;
}

.scan-source.is-empty i {
    background: var(--amber);
}

.scan-source.is-fail {
    border-color: rgba(251, 113, 133, .22);
    color: #efb3bb;
}

.scan-source.is-fail i {
    background: var(--red);
}

.scan-source.is-skip,
.scan-source.is-na,
.scan-source.is-off {
    opacity: .55;
}

.scan-log {
    max-height: 136px;
    margin-top: 12px;
    padding: 11px 12px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .04);
    border-radius: 8px;
    background: rgba(0, 0, 0, .35);
    color: #6f858f;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.95;
}

.scan-log p {
    margin: 0;
}

.scan-log b {
    color: var(--green);
    font-weight: 400;
}

.scan-log .dim {
    color: #485b65;
}

.scan-log .warn {
    color: #e9cf8c;
}

.scan-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
}

.scan-progress i {
    display: block;
    width: 34%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: progress 1.5s linear infinite;
}

/* ==========================================================================
   State / empty
   ========================================================================== */

.state-panel {
    margin-top: 22px;
    padding: 32px;
    border: 1px solid rgba(251, 113, 133, .2);
    border-radius: 14px;
    background: rgba(251, 113, 133, .025);
    text-align: center;
}

.state-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border: 1px solid rgba(251, 113, 133, .35);
    border-radius: 50%;
    color: var(--red);
    font-family: var(--mono);
    font-size: 20px;
    box-shadow: 0 0 22px rgba(251, 113, 133, .15);
}

.state-panel h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.state-panel p {
    max-width: 660px;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ==========================================================================
   Results
   ========================================================================== */

.results {
    margin-top: 64px;
    scroll-margin-top: 96px;
}

.result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.result-title h2 {
    margin: 4px 0 6px;
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: .02em;
}

.result-count {
    color: var(--green);
    font-family: var(--mono);
}

.result-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.result-sub code {
    max-width: 60vw;
    overflow: hidden;
    padding: 2px 7px;
    border: 1px solid rgba(74, 222, 128, .18);
    border-radius: 5px;
    background: rgba(74, 222, 128, .05);
    color: #b7f8cd;
    font-family: var(--mono);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3b4c55;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.cache-badge {
    padding: 4px 9px;
    border: 1px dashed rgba(251, 191, 36, .32);
    border-radius: 99px;
    background: rgba(4, 11, 15, .82);
    color: var(--amber);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .04em;
}

.export-wrap {
    position: relative;
}

.export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #071014;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .6);
}

.export-menu button {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fg-dim);
    font-size: 11.5px;
    text-align: left;
}

.export-menu button:hover {
    background: rgba(74, 222, 128, .08);
    color: var(--green);
}

/* KPI */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 11px;
}

.kpi {
    position: relative;
    padding: 15px 15px 17px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(10, 22, 27, .9), rgba(4, 10, 14, .84));
    --tone: var(--green);
    --tone-bg: rgba(74, 222, 128, .08);
}

.kpi::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--tone), transparent);
    opacity: .55;
}

.kpi.cyan { --tone: var(--cyan); --tone-bg: rgba(34, 211, 238, .08); }
.kpi.violet { --tone: var(--violet); --tone-bg: rgba(167, 139, 250, .08); }
.kpi.amber { --tone: var(--amber); --tone-bg: rgba(251, 191, 36, .08); }
.kpi.red { --tone: var(--red); --tone-bg: rgba(251, 113, 133, .08); }

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 10.5px;
    letter-spacing: .05em;
}

.kpi-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 7px;
    background: var(--tone-bg);
    color: var(--tone);
}

.kpi-value {
    margin-top: 12px;
    color: #f5fffa;
    font-family: var(--mono);
    font-size: 31px;
    line-height: 1;
    letter-spacing: -.02em;
}

.kpi-value small {
    margin-left: 3px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: .02em;
}

.kpi-sub {
    margin-top: 6px;
    overflow: hidden;
    color: #95a9b3;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Insights */

.insight-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr 1fr;
    gap: 11px;
    margin-top: 11px;
}

.panel {
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    background: rgba(5, 13, 17, .82);
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 13px;
}

.panel-head h3 {
    margin: 0;
    color: #dfeef4;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .04em;
}

.panel-head span {
    color: #869aa4;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .14em;
}

.port-bars {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.port-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10.5px;
}

.port-name {
    overflow: hidden;
    color: var(--fg-dim);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.port-name b {
    color: var(--green);
    font-weight: 400;
}

.port-name small {
    margin-left: 4px;
    color: #7e939d;
    font-size: 8px;
}

.bar-track {
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, .04);
}

.bar-fill {
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(74, 222, 128, .3), var(--green));
    box-shadow: 0 0 10px rgba(74, 222, 128, .25);
    transition: width .75s cubic-bezier(.2, .8, .2, 1);
}

.port-count {
    color: var(--muted);
    text-align: right;
}

.risk-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.risk-donut {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: conic-gradient(#1b2a31 0 100%);
}

.risk-donut::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    background: #061015;
}

.risk-donut span,
.risk-donut small {
    position: relative;
    z-index: 1;
}

.risk-donut span {
    color: #f2fff7;
    font-family: var(--mono);
    font-size: 23px;
    line-height: 1;
}

.risk-donut small {
    margin-top: 4px;
    color: #52666f;
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: .14em;
}

.risk-legend {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.risk-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.risk-item i {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--c, var(--green));
}

.risk-item b {
    margin-left: auto;
    color: var(--fg-dim);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
}

.insight-empty {
    padding: 18px 0;
    color: #4f636d;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .04em;
    text-align: center;
}

.list-label {
    margin: 0 0 5px;
    color: #465b65;
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: .16em;
}

.geo-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.geo-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 11px;
}

.geo-code {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 1px 4px;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: 3px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 8.5px;
    text-align: center;
}

.geo-name {
    overflow: hidden;
    color: var(--fg-dim);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.geo-count {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9.5px;
}

.org-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed rgba(255, 255, 255, .06);
}

.org-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #9aadb6;
    font-size: 10px;
}

.org-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-row b {
    color: #7f939d;
    font-family: var(--mono);
    font-weight: 400;
}

.org-row.is-empty {
    color: #445962;
    font-size: 9px;
}

/* Source strip */

.source-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 14px 0 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.source-strip::-webkit-scrollbar {
    display: none;
}

.status-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
    color: #93a8b2;
    font-family: var(--mono);
    font-size: 9.5px;
    transition: transform .2s, border-color .2s, background .2s;
}

.status-chip i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #64748b;
}

.status-chip:hover {
    transform: translateY(-1px);
}

.status-chip b {
    color: inherit;
    font-weight: 400;
    opacity: .7;
}

.status-chip.is-ok {
    border-color: rgba(74, 222, 128, .24);
    color: #b9f4ce;
}

.status-chip.is-ok i {
    background: var(--green);
    box-shadow: 0 0 7px rgba(74, 222, 128, .7);
}

.status-chip.is-empty {
    border-color: rgba(251, 191, 36, .18);
    color: #e1c685;
}

.status-chip.is-empty i {
    background: var(--amber);
}

.status-chip.is-fail {
    border-color: rgba(251, 113, 133, .22);
    color: #e8aeb7;
}

.status-chip.is-fail i {
    background: var(--red);
}

.status-chip.is-skip,
.status-chip.is-off,
.status-chip.is-na {
    opacity: .52;
}

/* Toolbar */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-main {
    position: relative;
    flex: 1 1 260px;
    min-width: 210px;
}

.filter-main input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    outline: none;
    background: #040c10;
    color: var(--fg);
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s;
}

.filter-main input::placeholder {
    color: #52666f;
}

.filter-main input:focus {
    border-color: rgba(74, 222, 128, .4);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .08);
}

.filter-ico {
    position: absolute;
    top: 50%;
    left: 12px;
    display: flex;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.toolbar select {
    padding: 9px 30px 9px 11px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    outline: none;
    background-color: #040c10;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%236f858f' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: var(--fg-dim);
    font-size: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.toolbar select:focus {
    border-color: rgba(74, 222, 128, .4);
}

.filter-reset {
    padding: 9px 13px;
    font-size: 11px;
}

/* Table */

.table-block {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    background: rgba(4, 11, 15, .88);
}

.table-wrap {
    max-height: 70vh;
    overflow: auto;
}

.asset-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 13px;
}

.asset-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(6, 15, 19, .97);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-align: left;
    white-space: nowrap;
}

.asset-table th:nth-child(1) { width: 23%; }
.asset-table th:nth-child(2) { width: 29%; }
.asset-table th:nth-child(3) { width: 19%; }
.asset-table th:nth-child(4) { width: 10%; }
.asset-table th:nth-child(5) { width: 12%; }
.asset-table th:nth-child(6) { width: 9%; }

.asset-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.asset-table th.sortable:hover {
    color: var(--green);
}

.sort-ind {
    margin-left: 4px;
    color: #41525c;
}

.asset-table th.is-sorted {
    color: var(--green);
}

.asset-table th.is-sorted .sort-ind {
    color: var(--green);
}

.asset-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    cursor: pointer;
    animation: rowIn .45s both;
    animation-delay: calc(var(--i, 0) * 22ms);
    transition: background .15s, box-shadow .15s;
}

.asset-table tbody tr:last-child {
    border-bottom: 0;
}

.asset-table tbody tr:hover {
    background: rgba(74, 222, 128, .05);
    box-shadow: inset 3px 0 0 var(--green);
}

.asset-table tbody tr:focus-visible {
    outline: none;
    background: rgba(74, 222, 128, .06);
    box-shadow: inset 3px 0 0 var(--green);
}

.asset-table td {
    padding: 12px 14px;
    vertical-align: top;
}

.asset-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1px;
    color: #f0fff6;
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.6;
    word-break: break-all;
}

.asset-main .ip {
    color: #baf7cf;
}

.asset-main .port {
    color: var(--cyan);
}

.asset-main .svc {
    margin-left: 7px;
    padding: 1px 5px;
    border: 1px solid rgba(34, 211, 238, .18);
    border-radius: 4px;
    color: #67e8f9;
    font-size: 8.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.asset-sub {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .04);
    color: #8fa3ad;
    font-family: var(--sans);
    font-size: 8.5px;
    letter-spacing: .04em;
}

.svc-title {
    display: -webkit-box;
    overflow: hidden;
    color: #d8e8ee;
    font-size: 12.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.svc-title.is-empty {
    color: #4f626c;
}

.svc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.mini-chip {
    padding: 1px 5px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 4px;
    color: #8195a0;
    font-family: var(--mono);
    font-size: 8.5px;
}

.mini-chip.product {
    border-color: rgba(74, 222, 128, .18);
    color: #a5f3c5;
}

.geo-main {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #c4d5dd;
    font-size: 11.5px;
}

.cc {
    padding: 1px 4px;
    border: 1px solid rgba(34, 211, 238, .2);
    border-radius: 3px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 8.5px;
}

.geo-sub {
    max-width: 230px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.risk-badge.high {
    border: 1px solid rgba(251, 113, 133, .3);
    background: rgba(251, 113, 133, .12);
    color: #fecdd3;
}

.risk-badge.medium {
    border: 1px solid rgba(251, 191, 36, .25);
    background: rgba(251, 191, 36, .1);
    color: #fde68a;
}

.risk-badge.low {
    border: 1px solid rgba(74, 222, 128, .2);
    background: rgba(74, 222, 128, .08);
    color: #bbf7d0;
}

.cve-count {
    display: block;
    margin-top: 4px;
    color: #fb7185;
    font-family: var(--mono);
    font-size: 8.5px;
}

.src-chip {
    display: inline-block;
    margin: 0 3px 3px 0;
    padding: 1px 5px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 3px;
    color: #9cb0ba;
    font-family: var(--mono);
    font-size: 9px;
    white-space: nowrap;
}

.src-chip.more {
    border-style: dashed;
    color: #60747e;
}

.seen {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    white-space: nowrap;
}

.table-empty {
    padding: 40px 20px;
    text-align: center;
}

.table-empty span {
    display: block;
    color: #3e515a;
    font-family: var(--mono);
    font-size: 34px;
    line-height: 1;
}

.table-empty p {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.table-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(3, 9, 12, .5);
}

.table-info {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .04em;
}

.pager {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pager button {
    display: grid;
    place-items: center;
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    transition: color .2s, border-color .2s, background .2s;
}

.pager button:hover:not(:disabled) {
    color: var(--green);
    border-color: rgba(74, 222, 128, .35);
}

.pager button.is-current {
    border-color: rgba(74, 222, 128, .4);
    background: rgba(74, 222, 128, .12);
    color: var(--green);
}

.pager button:disabled {
    opacity: .3;
    cursor: default;
}

.empty-result {
    margin-top: 4px;
    padding: 40px 22px;
    border: 1px dashed rgba(74, 222, 128, .2);
    border-radius: 14px;
    background: rgba(74, 222, 128, .018);
    text-align: center;
}

.empty-radar {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border: 1px solid rgba(74, 222, 128, .22);
    border-radius: 50%;
}

.empty-radar i {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(74, 222, 128, .14);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.empty-radar i:nth-child(1) { width: 34px; height: 34px; }
.empty-radar i:nth-child(2) { width: 54px; height: 54px; }
.empty-radar i:nth-child(3) {
    width: 4px;
    height: 4px;
    border: 0;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.empty-result h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.empty-result p {
    max-width: 620px;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.result-notes {
    margin-top: 14px;
}

.result-note {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 11px;
    border: 1px solid rgba(251, 191, 36, .14);
    border-radius: 7px;
    background: rgba(4, 11, 15, .82);
    color: #d5bb80;
    font-size: 10.5px;
    line-height: 1.8;
}

.result-note b {
    color: var(--amber);
    font-family: var(--mono);
    font-weight: 400;
}

/* ==========================================================================
   Sources section
   ========================================================================== */

.sources-section {
    margin-top: 80px;
    scroll-margin-top: 96px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.section-head h2 {
    margin: 4px 0 0;
    font-size: clamp(24px, 2.6vw, 32px);
}

.section-desc {
    max-width: 540px;
    margin: 0;
    color: #b7c9d1;
    font-size: 12.5px;
    line-height: 1.9;
    text-align: right;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.source-card {
    position: relative;
    padding: 14px 14px 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 11px;
    background: rgba(5, 13, 17, .82);
    text-align: left;
    transition: transform .2s, border-color .2s, background .2s;
}

.source-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -34px;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(74, 222, 128, .08);
    border-radius: 50%;
    transition: border-color .2s;
}

.source-card:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 222, 128, .3);
    background: rgba(74, 222, 128, .035);
}

.source-card:hover::after {
    border-color: rgba(74, 222, 128, .2);
}

.src-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.src-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4b5b66;
}

.src-tag {
    color: #92a6b0;
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .12em;
}

.source-card strong {
    display: block;
    margin: 9px 0 2px;
    color: #eaf7fb;
    font-size: 13.5px;
    font-weight: 600;
}

.source-card small {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.6;
}

.src-state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 9px;
    color: #9caeb7;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .04em;
}

.source-card[data-state="ok"] {
    border-color: rgba(74, 222, 128, .18);
}

.source-card[data-state="ok"] .src-dot,
.source-card[data-state="ready"] .src-dot {
    background: var(--green);
    box-shadow: 0 0 8px rgba(74, 222, 128, .55);
}

.source-card[data-state="ok"] .src-state,
.source-card[data-state="ready"] .src-state {
    color: #8fcaa4;
}

.source-card[data-state="empty"] .src-dot {
    background: var(--amber);
}

.source-card[data-state="empty"] .src-state {
    color: #c4a96d;
}

.source-card[data-state="fail"] {
    border-color: rgba(251, 113, 133, .18);
}

.source-card[data-state="fail"] .src-dot {
    background: var(--red);
}

.source-card[data-state="fail"] .src-state {
    color: #c98c95;
}

.source-card[data-state="skip"],
.source-card[data-state="off"],
.source-card[data-state="na"] {
    opacity: .55;
}

.source-card[data-state="skip"] .src-dot,
.source-card[data-state="na"] .src-dot,
.source-card[data-state="off"] .src-dot {
    background: #4b5b66;
}

.source-card.is-locked {
    border-style: dashed;
}

.source-card.is-locked .src-state {
    color: #c4a96d;
}

.source-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 12px 0 0;
    color: #c5d6de;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .03em;
}

.source-foot span:first-child {
    color: #edf7fa;
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
    margin-top: 70px;
    scroll-margin-top: 96px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
}

.about-card {
    padding: 20px 20px 22px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(8, 18, 23, .88), rgba(4, 10, 14, .82));
}

.about-no {
    color: var(--green);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .2em;
}

.about-card h3 {
    margin: 10px 0 7px;
    font-size: 14.5px;
}

.about-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    margin-top: 86px;
    padding: 32px 0 38px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand strong {
    color: #f0fbf6;
    font-size: 13px;
    letter-spacing: .2em;
}

.footer-brand small {
    display: block;
    margin-top: 2px;
    color: #c8d8df;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .1em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #d3e1e7;
    font-size: 12.5px;
}

.footer-links a:hover,
.footer-links button:hover {
    color: var(--green);
}

.footer-links button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.footer-note {
    max-width: 1100px;
    margin: 19px 0 0;
    color: #dce9ee;
    font-size: 12px;
    line-height: 1.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

.footer-legal {
    margin: 7px 0 0;
    color: #c9d8de;
    font-size: 11.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

.footer-meta {
    margin: 16px 0 0;
    color: #c0d1d9;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

/* ==========================================================================
   Drawer
   ========================================================================== */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(1, 4, 6, .72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: fadeIn .2s ease-out;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: min(620px, 96vw);
    border-left: 1px solid rgba(74, 222, 128, .22);
    background: #050d11;
    box-shadow: -30px 0 80px rgba(0, 0, 0, .65);
    transform: translateX(102%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility .32s;
}

.drawer:not(.is-open) {
    visibility: hidden;
    pointer-events: none;
}

.drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: rgba(74, 222, 128, .02);
}

.drawer-head h3 {
    margin: 3px 0 0;
    font-size: 19px;
    word-break: break-all;
}

.drawer-body {
    padding: 20px 22px 44px;
    overflow: auto;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
}

.detail-item {
    padding: 9px 11px;
    background: #050d11;
}

.detail-item span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .08em;
}

.detail-item b {
    display: block;
    margin-top: 3px;
    color: #cfe0e7;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.6;
    word-break: break-all;
}

.detail-section {
    margin-top: 17px;
}

.detail-section h4 {
    margin: 0 0 7px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .16em;
}

.detail-title {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: rgba(255, 255, 255, .015);
    color: #d6e5eb;
    font-size: 12px;
    line-height: 1.8;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    padding: 1px 6px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 4px;
    color: #91a5af;
    font-family: var(--mono);
    font-size: 9px;
}

.tag.green {
    border-color: rgba(74, 222, 128, .2);
    color: #a9eec1;
}

.tag.cyan {
    border-color: rgba(34, 211, 238, .2);
    color: #9cecf7;
}

.banner-pre {
    max-height: 260px;
    margin: 0;
    padding: 11px 12px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: #03090c;
    color: #9fb6c0;
    font-family: var(--mono);
    font-size: 9.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.cve-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cve-item {
    padding: 2px 6px;
    border: 1px solid rgba(251, 113, 133, .25);
    border-radius: 4px;
    color: #fda4af;
    font-family: var(--mono);
    font-size: 9px;
}

.cve-item:hover {
    background: rgba(251, 113, 133, .1);
}

.raw-json {
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: #03090c;
}

.raw-json summary {
    padding: 9px 12px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    cursor: pointer;
}

.raw-json pre {
    max-height: 280px;
    margin: 0;
    padding: 0 12px 12px;
    overflow: auto;
    color: #8499a3;
    font-family: var(--mono);
    font-size: 9px;
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ==========================================================================
   Modal / settings
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(1, 4, 6, .78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(860px, 96vw);
    max-height: 88vh;
    overflow: hidden;
    border: 1px solid rgba(74, 222, 128, .22);
    border-radius: 16px;
    background: #050d11;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .7);
    animation: modalIn .25s ease-out;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.modal-head h3 {
    margin: 3px 0 0;
    font-size: 19px;
}

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.modal-tab {
    padding: 11px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font-size: 11.5px;
}

.modal-tab.is-active {
    border-bottom-color: var(--green);
    color: var(--green);
}

.modal-pane {
    padding: 18px 20px;
    overflow: auto;
}

.modal-note {
    margin: 0 0 15px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.9;
}

.modal-note code,
.modal-hint code {
    color: #9db3bd;
    font-family: var(--mono);
}

.key-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.key-card {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 9px;
    background: rgba(255, 255, 255, .015);
}

.key-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.key-head strong {
    font-size: 11.5px;
}

.key-head a {
    margin-left: auto;
    color: #5f737d;
    font-size: 9px;
}

.key-head a:hover {
    color: var(--green);
}

.key-server {
    display: none;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(74, 222, 128, .1);
    color: var(--green);
    font-size: 8px;
}

.key-server.is-on {
    display: inline-block;
}

.key-card label {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .04em;
}

.key-card input {
    width: 100%;
    margin-top: 4px;
    padding: 8px 9px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 6px;
    outline: none;
    background: #03090c;
    color: var(--fg);
    font-family: var(--mono);
    font-size: 10.5px;
}

.key-card input:focus {
    border-color: rgba(74, 222, 128, .4);
}

.key-card input::placeholder {
    color: #465a64;
}

.modal-hint {
    margin: 13px 0 0;
    color: #586d77;
    font-size: 10px;
    line-height: 1.9;
}

.source-toggle-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.source-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
}

.source-toggle-copy {
    flex: 1;
    min-width: 0;
}

.source-toggle-copy strong {
    display: block;
    color: #d3e2e8;
    font-size: 10.5px;
}

.source-toggle-copy small {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.switch {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 18px;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 99px;
    background: #1b2a31;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #728892;
    transition: left .2s, background .2s;
}

.switch input:checked + span {
    border-color: rgba(74, 222, 128, .4);
    background: rgba(74, 222, 128, .18);
}

.switch input:checked + span::after {
    left: 18px;
    background: var(--green);
    box-shadow: 0 0 8px rgba(74, 222, 128, .6);
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(0, 0, 0, .15);
}

.modal-foot-right {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    z-index: 200;
    max-width: 88vw;
    padding: 10px 15px;
    border: 1px solid rgba(74, 222, 128, .3);
    border-radius: 8px;
    background: #071014;
    color: #d7fbe4;
    font-size: 11.5px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity .25s, transform .25s;
}

.toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.is-error {
    border-color: rgba(251, 113, 133, .4);
    color: #fecdd3;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

@keyframes blip {
    0%, 100% { opacity: .45; transform: scale(.85); }
    38% { opacity: 1; transform: scale(1.15); }
}

@keyframes blipRing {
    0% { opacity: .7; transform: scale(.3); }
    70%, 100% { opacity: 0; transform: scale(1.3); }
}

@keyframes progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(390%); }
}

@keyframes scanSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes rowIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(.99); }
    to { opacity: 1; transform: none; }
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 22px rgba(74, 222, 128, .14)); }
    50% { filter: drop-shadow(0 0 34px rgba(34, 211, 238, .2)); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .insight-grid { grid-template-columns: 1.2fr .8fr; }
    .geo-panel { grid-column: 1 / -1; }
    .geo-list { display: grid; grid-template-columns: repeat(3, 1fr); }
    .source-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1060px) {
    .nav { display: none; }
    .hero { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .radar-stage { display: none; }
    .hero { padding-top: 56px; }
    .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .section-desc { max-width: 100%; text-align: left; }
    .scan-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
    .page { padding: 0 20px; }
    .topbar { margin: 0 -20px; padding: 0 20px; height: 68px; }
    .brand-copy small { display: none; }
    .sys-state, .clock { display: none; }
    .hero-title { font-size: clamp(38px, 8vw, 58px); }
    .lede { font-size: 14px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .insight-grid { grid-template-columns: 1fr; }
    .geo-list { grid-template-columns: repeat(2, 1fr); }
    .source-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .key-grid, .source-toggle-list { grid-template-columns: 1fr; }
    .modal-card { max-height: 92vh; }
    .detail-grid { grid-template-columns: 1fr; }
    .search-form { flex-wrap: wrap; }
    .scan-btn { width: 100%; justify-content: center; }
    .slash-hint { display: none; }
    .search-foot { padding-bottom: 12px; }
    .history-row { flex-wrap: wrap; }
    .history-clear { margin-left: 0; }
    .scan-grid { grid-template-columns: repeat(3, 1fr); }
    .col-seen { display: none; }
    .asset-table { min-width: 780px; }
    .asset-table th:nth-child(5) { width: 14%; }
}

@media (max-width: 640px) {
    .page { padding: 0 14px; }
    .topbar { margin: 0 -14px; padding: 0 14px; gap: 12px; }
    .brand-mark { width: 34px; height: 34px; }
    .brand-mark svg { width: 32px; height: 32px; }
    .brand-copy strong { font-size: 16px; }
    .top-right { gap: 8px; }
    .hero { padding: 40px 0 24px; }
    .hero-title { font-size: 36px; }
    .hero-tags span { font-size: 8.5px; padding: 6px 9px; }
    .kicker { font-size: 8.5px; letter-spacing: .16em; }
    .search-shell { border-radius: 14px; }
    .terminal-head { padding: 9px 13px; }
    .tl-path { font-size: 9px; }
    .search-form { padding: 12px; gap: 9px; }
    #q { font-size: 13px; }
    .examples { gap: 5px; }
    .examples button { font-size: 9.5px; }
    .syntax-grid { grid-template-columns: 1fr; }
    .result-head { align-items: flex-start; flex-direction: column; }
    .result-actions { width: 100%; }
    .result-actions .ghost-btn, .result-actions .primary-btn { flex: 1; }
    .kpi-grid { gap: 8px; }
    .kpi { padding: 12px; }
    .kpi-value { font-size: 24px; }
    .risk-body { align-items: flex-start; flex-direction: column; }
    .risk-donut { width: 96px; height: 96px; }
    .geo-list { grid-template-columns: 1fr; }
    .source-grid { grid-template-columns: 1fr; }
    .scan-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar select { flex: 1 1 40%; }
    .filter-reset { flex: 1 1 100%; }
    .toolbar { gap: 6px; }
    .table-wrap { max-height: 60vh; }
    .drawer-body { padding: 16px 16px 34px; }
    .drawer-head { padding: 15px 16px; }
    .modal { padding: 8px; }
    .modal-card { width: 100%; max-height: 94vh; border-radius: 12px; }
    .modal-pane { padding: 14px; }
    .modal-foot { flex-wrap: wrap; }
    .modal-foot-right { width: 100%; }
    .modal-foot-right .primary-btn { flex: 1; }
    .footer { margin-top: 60px; }
    .footer-links { gap: 12px; }
    .footer-top { align-items: flex-start; flex-direction: column; }
}

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