/* VYCCODE Investigador — paleta VyDox / Combotool */
:root {
    --inv-bg: #050506;
    --inv-surface: #121214;
    --inv-surface-2: #18181b;
    --inv-border: rgba(255, 255, 255, 0.07);
    --inv-border-strong: rgba(63, 63, 70, 0.65);
    --inv-muted: #a1a1aa;
    --inv-text: #d4d4d8;
    --inv-head: #f4f4f5;
    --inv-silver: #d4d4d8;
    --inv-accent: #3b82f6;
    --inv-accent-soft: rgba(59, 130, 246, 0.12);
    --inv-accent-glow: rgba(59, 130, 246, 0.35);
    --inv-green: #22c55e;
    --inv-green-dim: rgba(34, 197, 94, 0.14);
    --inv-green-glow: rgba(34, 197, 94, 0.35);
    --inv-shell: min(94vw, 1320px);
    --inv-font: "SF Pro Display", -apple-system, sans-serif;
    --inv-serif: "Instrument Serif", serif;
    --inv-mono: "JetBrains Mono", monospace;
}

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

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body.hub-page-investigador {
    min-height: 100dvh;
    font-family: var(--inv-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--hub-status-offset, 28px) + var(--hub-bar-min-h, 84px) + 12px);
}

/* ── Ambient ── */
.inv-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 50% -8%, rgba(156, 163, 175, 0.08), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 50%, rgba(52, 211, 153, 0.04), transparent 50%),
        var(--inv-bg);
}

.inv-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, black 10%, transparent 75%);
}

#investigador-particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Status bar ── */
.global-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-bottom: 1px solid var(--inv-border);
    overflow: hidden;
}

.status-track {
    display: flex;
    align-items: center;
    gap: 28px;
    font-family: var(--inv-mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--inv-muted);
    white-space: nowrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--inv-green);
    box-shadow: 0 0 8px var(--inv-green-glow);
    animation: inv-pulse 1.8s ease-in-out infinite;
}

.status-accent {
    color: var(--inv-silver);
    font-weight: 700;
}

@keyframes inv-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.inv-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--inv-head);
    text-decoration: none;
}

.inv-brand-mark {
    width: 26px;
    height: 26px;
    color: var(--inv-accent);
}

.inv-shell {
    width: 100%;
    max-width: var(--inv-shell);
    margin: 0 auto;
    padding-inline: var(--hub-bar-px, clamp(20px, 4vw, 36px));
}

/* Contenedor de escala para mockups en móvil */
.embed-scale-port {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.embed-scale-port .vydox-scene,
.embed-scale-port .cb-scene {
    width: 100%;
    height: 100%;
}

@media (min-width: 1025px) {
    .embed-scale-port--vydox {
        height: min(800px, 78vh);
    }

    .embed-scale-port--combo {
        height: min(760px, 74vh);
    }
}

.inv-section-label {
    text-align: center;
    font-family: var(--inv-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--inv-muted);
    margin-bottom: 12px;
}

.inv-program {
    position: relative;
}

.inv-program--alt {
    padding-top: clamp(24px, 4vw, 48px);
    border-top: 1px solid var(--inv-border);
    margin-top: clamp(16px, 3vw, 32px);
}

.inv-program-hero {
    text-align: center;
    padding: clamp(20px, 4vw, 40px) 0 clamp(8px, 2vw, 16px);
}

.inv-program-hero .inv-hero__program {
    margin-bottom: 12px;
}

.inv-program-hero__lead {
    max-width: 56ch;
    margin: 16px auto 0;
    font-size: 15px;
    color: var(--inv-muted);
    line-height: 1.65;
}

.inv-programs-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.inv-programs-jump a {
    font-family: var(--inv-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--inv-muted);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--inv-border);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.inv-programs-jump a:hover {
    color: var(--inv-head);
    border-color: var(--inv-accent);
    background: var(--inv-accent-soft);
}

.inv-combo {
    padding-bottom: clamp(40px, 6vw, 64px);
}

.inv-combo__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: clamp(24px, 4vw, 36px);
}

.inv-cta__box--compact h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

@media (max-width: 960px) {
    .inv-combo__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .inv-combo__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Hero ── */
.inv-hero {
    position: relative;
    text-align: center;
    padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 56px);
}

.inv-radar {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(440px, 88vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.28;
}

.inv-radar__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(156, 163, 175, 0.1);
}

.inv-radar__ring:nth-child(2) { inset: 22%; }
.inv-radar__ring:nth-child(3) { inset: 44%; }

.inv-radar__sweep {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(59, 130, 246, 0.14) 38deg, transparent 76deg);
    animation: inv-spin 7s linear infinite;
}

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

.inv-eyebrow {
    font-family: var(--inv-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--inv-muted);
    margin-bottom: 16px;
}

.inv-hero h1,
.inv-hero__program {
    font-family: var(--inv-serif);
    font-size: clamp(2.6rem, 7vw, 4.2rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--inv-head);
    margin-bottom: 20px;
}

.inv-hero__program {
    font-size: clamp(2.8rem, 8vw, 4.8rem);
    margin-bottom: 14px;
}

.inv-hero h1 em,
.inv-hero__program em {
    font-style: italic;
    color: var(--inv-accent);
    text-shadow: 0 0 40px var(--inv-accent-glow);
}

.inv-hero__tag {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.inv-hero__tag span {
    font-family: var(--inv-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--inv-muted);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--inv-border);
    background: rgba(255, 255, 255, 0.02);
}

.inv-hero__tag span:first-child {
    color: var(--inv-green);
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.06);
}

.inv-hero__lead {
    max-width: 58ch;
    margin: 0 auto 28px;
    font-size: clamp(15px, 1.8vw, 17px);
    color: var(--inv-muted);
    line-height: 1.7;
}

.inv-hero__lead strong {
    color: var(--inv-head);
    font-weight: 600;
}

.inv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.inv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.inv-btn--primary {
    color: #fff;
    background: var(--inv-accent);
    border: 1px solid var(--inv-accent);
    box-shadow: 0 4px 16px var(--inv-accent-glow);
}

.inv-btn--primary:hover {
    transform: translateY(-2px);
    background: #2563eb;
    border-color: #2563eb;
}

.inv-btn--ghost {
    color: var(--inv-head);
    background: transparent;
    border: 1px solid var(--inv-border-strong);
}

.inv-btn--ghost:hover {
    border-color: var(--inv-accent);
    background: var(--inv-accent-soft);
}

.inv-btn--wa {
    color: #fff;
    background: #25d366;
    border: 1px solid #25d366;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}

.inv-btn--wa:hover {
    transform: translateY(-2px);
    background: #1ebe57;
    border-color: #1ebe57;
}

.inv-btn--tg {
    color: var(--inv-head);
    background: transparent;
    border: 1px solid var(--inv-border-strong);
}

.inv-btn--tg:hover {
    border-color: #2aabee;
    background: rgba(42, 171, 238, 0.08);
    transform: translateY(-2px);
}

/* ── App panel ── */
.inv-app {
    padding-bottom: clamp(48px, 7vw, 72px);
}

.inv-app__window {
    border-radius: 16px;
    border: 1px solid var(--inv-border);
    background: var(--inv-surface);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 32px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.inv-app__titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #08080a;
    border-bottom: 1px solid var(--inv-border);
}

.inv-app__dots {
    display: flex;
    gap: 6px;
}

.inv-app__dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3f3f46;
}

.inv-app__dots i:nth-child(1) { background: #52525b; }
.inv-app__dots i:nth-child(2) { background: #71717a; }
.inv-app__dots i:nth-child(3) { background: #a1a1aa; }

.inv-app__title {
    flex: 1;
    font-family: var(--inv-mono);
    font-size: 11px;
    color: var(--inv-muted);
}

.inv-app__badge {
    font-family: var(--inv-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--inv-green);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--inv-green-dim);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.inv-app__body {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: 420px;
}

.inv-app__sidebar {
    padding: 20px 16px;
    background: #08080a;
    border-right: 1px solid var(--inv-border);
}

.inv-app__logo {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--inv-head);
    margin-bottom: 24px;
}

.inv-app__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inv-app__nav span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--inv-muted);
}

.inv-app__nav span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3f3f46;
}

.inv-app__nav span.is-on {
    color: var(--inv-head);
    background: var(--inv-accent-soft);
}

.inv-app__nav span.is-on i {
    background: var(--inv-green);
    box-shadow: 0 0 8px var(--inv-green-glow);
}

.inv-app__workspace {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(180deg, var(--inv-surface-2), var(--inv-surface));
}

.inv-app__target {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--inv-border);
    background: rgba(0, 0, 0, 0.35);
}

.inv-app__avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--inv-head);
    background: linear-gradient(135deg, #27272a, #18181b);
    border: 1px solid var(--inv-border-strong);
}

.inv-app__target-info {
    flex: 1;
    min-width: 0;
}

.inv-app__target-info strong {
    display: block;
    font-size: 15px;
    color: var(--inv-head);
}

.inv-app__target-info span {
    font-size: 12px;
    color: var(--inv-muted);
}

.inv-app__extract {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #0a0a0a;
    background: var(--inv-green);
    cursor: default;
    white-space: nowrap;
}

.inv-app__modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.inv-app__mod {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--inv-border);
    background: rgba(0, 0, 0, 0.25);
    font-size: 11px;
    color: var(--inv-muted);
}

.inv-app__mod em {
    font-style: normal;
    font-family: var(--inv-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--inv-green);
}

.inv-app__mod.is-on {
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--inv-text);
}

.inv-app__mod.is-live em {
    color: var(--inv-green);
    animation: inv-pulse 1.5s ease-in-out infinite;
}

.inv-app__result {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--inv-border-strong);
    background: rgba(0, 0, 0, 0.4);
}

.inv-app__result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 11px;
    color: var(--inv-muted);
}

.inv-app__result-head em {
    font-style: normal;
    font-family: var(--inv-mono);
    color: var(--inv-green);
}

.inv-app__result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-bottom: 14px;
}

.inv-app__result-grid div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inv-app__result-grid dt {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--inv-muted);
}

.inv-app__result-grid dd {
    font-size: 13px;
    font-weight: 500;
    color: var(--inv-head);
}

.inv-app__family {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--inv-border);
}

.inv-app__family li {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.inv-app__family span {
    color: var(--inv-muted);
}

.inv-app__family b {
    font-family: var(--inv-mono);
    font-weight: 500;
    color: var(--inv-silver);
}

/* VyDox embed section */
.inv-vydox {
    padding-bottom: clamp(48px, 7vw, 72px);
}

.inv-vydox__title {
    text-align: center;
    font-family: var(--inv-serif);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 400;
    color: var(--inv-head);
    margin-bottom: 8px;
}

.inv-vydox__title em {
    font-style: italic;
    color: var(--inv-accent);
}

.inv-vydox__sub {
    text-align: center;
    color: var(--inv-muted);
    max-width: 52ch;
    margin: 0 auto 24px;
    line-height: 1.65;
}

/* ── Terminal ── */
.inv-motor {
    padding-bottom: clamp(48px, 7vw, 72px);
}

.inv-motor__head {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 36px);
}

.inv-motor__head h2 {
    font-family: var(--inv-serif);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 400;
    color: var(--inv-head);
    margin-bottom: 10px;
}

.inv-motor__head h2 em {
    font-style: italic;
    color: var(--inv-silver);
}

.inv-motor__head p {
    max-width: 50ch;
    margin: 0 auto;
    color: var(--inv-muted);
    line-height: 1.65;
}

.inv-terminal {
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: #040508;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 0 48px rgba(59, 130, 246, 0.06),
        0 24px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.inv-terminal__chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #0a0f0c;
    border-bottom: 1px solid rgba(52, 211, 153, 0.12);
}

.inv-terminal__dots {
    display: flex;
    gap: 6px;
}

.inv-terminal__dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1f2937;
}

.inv-terminal__dots i:nth-child(1) { background: #374151; }
.inv-terminal__dots i:nth-child(2) { background: #4b5563; }

.inv-terminal__path {
    flex: 1;
    font-family: var(--inv-mono);
    font-size: 11px;
    color: #6b7280;
}

.inv-terminal__live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--inv-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--inv-green);
}

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

.inv-terminal__screen {
    position: relative;
    min-height: 320px;
    padding: 20px 22px 28px;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(52, 211, 153, 0.015) 2px, rgba(52, 211, 153, 0.015) 4px),
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(52, 211, 153, 0.04), transparent 60%),
        #030403;
}

.inv-terminal__out {
    margin: 0;
    font-family: var(--inv-mono);
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    color: #6ee7b7;
}

.inv-cmd-line { display: block; }

.inv-cmd-line--dim { color: #4b5563; }
.inv-cmd-line--sys { color: #9ca3af; }
.inv-cmd-line--ok { color: #34d399; }
.inv-cmd-line--hit { color: #fbbf24; }
.inv-cmd-line--data { color: #a7f3d0; padding-left: 2ch; }
.inv-cmd-line--tree { color: #6ee7b7; padding-left: 2ch; }
.inv-cmd-line--done { color: #f4f4f5; font-weight: 600; }

.inv-terminal__cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--inv-green);
    animation: inv-blink 1s step-end infinite;
}

@keyframes inv-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Extract section ── */
.inv-extract {
    padding-bottom: clamp(56px, 8vw, 88px);
}

.inv-extract__top {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin-bottom: clamp(32px, 5vw, 48px);
}

.inv-extract__feed {
    border-radius: 12px;
    border: 1px solid var(--inv-border-strong);
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.inv-extract__feed-head {
    padding: 10px 14px;
    font-family: var(--inv-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--inv-muted);
    background: #08080a;
    border-bottom: 1px solid var(--inv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.inv-extract__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--inv-green);
    box-shadow: 0 0 8px var(--inv-green-glow);
    animation: inv-pulse 1.4s ease-in-out infinite;
}

.inv-extract.is-extracting .inv-extract__live-dot {
    background: var(--inv-accent);
    box-shadow: 0 0 10px var(--inv-accent-glow);
}

.inv-extract__feed-list {
    list-style: none;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inv-extract__feed-list .tag {
    flex-shrink: 0;
    min-width: 36px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--inv-accent);
}

.inv-extract__feed-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--inv-mono);
    font-size: 12px;
    color: var(--inv-text);
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.25s;
}

.inv-extract__feed-list .feed-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inv-extract__feed-list .feed-status {
    flex-shrink: 0;
    font-size: 11px;
    margin-left: auto;
}

.inv-extract__feed-list li.is-scanning {
    background: rgba(59, 130, 246, 0.06);
}

.inv-extract__feed-list li.is-scanning .feed-status {
    color: var(--inv-accent);
    animation: inv-pulse 1.2s ease-in-out infinite;
}

.inv-extract__feed-list li.is-done .feed-status {
    color: var(--inv-green);
}

.inv-extract__feed-list li.is-flash {
    background: rgba(34, 197, 94, 0.08);
}

.inv-extract__feed-list .feed-body.is-swapping,
.inv-card__val-text.is-swapping {
    animation: inv-val-swap 0.38s ease-out;
}

@keyframes inv-val-swap {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.inv-card.is-scanning {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.07);
}

.inv-card.is-scanning .inv-card__val {
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--inv-accent);
}

.inv-card.is-scanning .inv-card__ok {
    opacity: 0.35;
}

.inv-card[data-extract-card="geo"].is-scanning .inv-card__val-text,
.inv-card[data-extract-card="address"].is-scanning .inv-card__val-text {
    animation: inv-geo-flicker 0.45s ease-in-out infinite;
}

@keyframes inv-geo-flicker {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.inv-extract.is-extracting .inv-extract__feed {
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.06);
}

.inv-card__chips.is-swapping span {
    animation: inv-chip-in 0.35s ease-out backwards;
}

.inv-card__chips.is-swapping span:nth-child(2) {
    animation-delay: 0.06s;
}

.inv-card__chips.is-swapping span:nth-child(3) {
    animation-delay: 0.12s;
}

@keyframes inv-chip-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.inv-card__ok--live {
    animation: inv-pulse 1.2s ease-in-out infinite;
}

.inv-extract__copy h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--inv-head);
    margin-bottom: 24px;
}

.inv-extract__copy h2 span {
    color: var(--inv-silver);
}

.inv-extract__kpis {
    display: flex;
    gap: clamp(16px, 3vw, 32px);
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--inv-border);
}

.inv-extract__kpis div {
    flex: 1;
}

.inv-extract__kpis strong {
    display: block;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--inv-head);
    margin-bottom: 4px;
}

.inv-extract__kpis span {
    font-family: var(--inv-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--inv-muted);
}

.inv-extract__copy p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--inv-muted);
    max-width: 48ch;
}

.inv-extract__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 14px;
}

.inv-card {
    padding: 18px 18px 16px;
    border-radius: 10px;
    border: 1px solid var(--inv-border-strong);
    background: var(--inv-surface-2);
    transition: border-color 0.2s, transform 0.2s;
}

.inv-card:hover {
    border-color: rgba(59, 130, 246, 0.28);
    transform: translateY(-2px);
}

.inv-card--highlight {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(165deg, rgba(59, 130, 246, 0.06), var(--inv-surface-2));
}

.inv-card--live {
    border-color: rgba(52, 211, 153, 0.22);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.05);
}

.inv-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.inv-card__icon {
    font-size: 20px;
}

.inv-card__top em {
    font-style: normal;
    font-family: var(--inv-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 999px;
}

.inv-card__top em.on {
    color: var(--inv-green);
    background: var(--inv-green-dim);
}

.inv-card__top em.live {
    color: var(--inv-green);
    background: var(--inv-green-dim);
    animation: inv-pulse 1.5s ease-in-out infinite;
}

.inv-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--inv-head);
    margin-bottom: 6px;
}

.inv-card p {
    font-size: 12px;
    color: var(--inv-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.inv-card__val {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 11px;
    border-radius: 8px;
    font-family: var(--inv-mono);
    font-size: 11px;
    color: var(--inv-silver);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--inv-border);
}

.inv-card__val span {
    color: var(--inv-green);
    font-weight: 700;
}

.inv-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inv-card__chips span {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--inv-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--inv-border);
}

/* ── CTA ── */
.inv-cta {
    padding-bottom: clamp(64px, 10vw, 96px);
}

.inv-cta__box {
    text-align: center;
    padding: clamp(36px, 5vw, 52px);
    border-radius: 20px;
    border: 1px solid var(--inv-border);
    background: linear-gradient(180deg, var(--inv-surface-2), var(--inv-surface));
}

.inv-cta__box h2 {
    font-family: var(--inv-serif);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--inv-head);
    margin-bottom: 12px;
}

.inv-cta__box h2 em {
    font-style: italic;
    color: var(--inv-silver);
}

.inv-cta__box p {
    color: var(--inv-muted);
    margin-bottom: 24px;
}

.inv-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ── Reveal (GSAP fallback) ── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.is-visible,
html:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .inv-app__body {
        grid-template-columns: 1fr;
    }

    .inv-app__sidebar {
        border-right: none;
        border-bottom: 1px solid var(--inv-border);
    }

    .inv-app__nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .inv-extract__top {
        grid-template-columns: 1fr;
    }

    .inv-app__result-grid {
        grid-template-columns: 1fr;
    }

    .inv-extract__copy h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .inv-vydox__title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .inv-program-hero .inv-hero__program {
        font-size: clamp(2rem, 7vw, 3.2rem);
    }
}

@media (max-width: 1024px) {
    .inv-vydox,
    .inv-combo {
        overflow-x: hidden;
    }

    .vydox-stage,
    .cb-stage {
        --embed-scale: calc((100vw - 48px) / 1280);
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        padding: 6px 0 10px !important;
        overflow: hidden !important;
        perspective: none !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        box-sizing: border-box;
    }

    .vydox-stage {
        --embed-h: 800px;
        min-height: calc((100vw - 48px) * 800 / 1280 + 8px) !important;
    }

    .cb-stage {
        --embed-h: 760px;
        min-height: calc((100vw - 48px) * 760 / 1280 + 8px) !important;
    }

    .embed-scale-port.embed-scale-port--vydox,
    .embed-scale-port.embed-scale-port--combo {
        --embed-scale: calc((100vw - 48px) / 1280);
        width: calc(100vw - 48px) !important;
        max-width: 100% !important;
        margin-inline: auto;
        overflow: hidden;
        position: relative;
        flex-shrink: 0;
    }

    .embed-scale-port.embed-scale-port--vydox {
        --embed-h: 800px;
        height: calc((100vw - 48px) * 800 / 1280) !important;
    }

    .embed-scale-port.embed-scale-port--combo {
        --embed-h: 760px;
        height: calc((100vw - 48px) * 760 / 1280) !important;
    }

    .embed-scale-port .vydox-scene,
    .embed-scale-port .cb-scene {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 1280px !important;
        max-width: none !important;
        transform: scale(var(--embed-scale)) !important;
        transform-origin: top left !important;
    }

    .embed-scale-port.embed-scale-port--vydox .vydox-scene {
        height: 800px !important;
    }

    .embed-scale-port.embed-scale-port--combo .cb-scene {
        height: 760px !important;
    }

    .vydox-window,
    .cb-window {
        transform: none !important;
        transition: none !important;
        width: 100% !important;
        height: 100% !important;
    }

    .cb-embed .cb-stats {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .cb-embed .cb-layout {
        grid-template-columns: 1fr 280px !important;
    }

    .cb-embed .cb-sidebar {
        display: flex !important;
        width: 220px !important;
    }
}

@media (max-width: 768px) {
    .vydox-stage,
    .cb-stage {
        display: none !important;
    }

    .inv-vydox__sub,
    .inv-combo .inv-vydox__sub {
        margin-bottom: 0;
    }

    body.hub-page-investigador {
        overflow-x: hidden;
    }

    .inv-shell {
        padding-inline: 12px;
    }

    .global-status {
        height: 24px;
    }

    .status-track {
        gap: 16px;
        font-size: 8px;
    }

    .status-item:nth-child(n + 3) {
        display: none;
    }

    .inv-hero {
        padding: clamp(32px, 6vw, 56px) 0 clamp(24px, 4vw, 40px);
    }

    .inv-radar {
        width: min(280px, 70vw);
        opacity: 0.45;
    }

    .inv-hero__program {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .inv-hero__tag span {
        font-size: 9px;
        padding: 5px 10px;
    }

    .inv-hero__lead {
        font-size: 14px;
        padding-inline: 4px;
    }

    .inv-programs-jump {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
        margin-inline: auto;
    }

    .inv-programs-jump a {
        text-align: center;
    }

    .inv-program--alt {
        margin-top: 8px;
        padding-top: 16px;
    }

    .inv-program-hero {
        padding: 16px 0 8px;
    }

    .inv-program-hero__lead {
        font-size: 14px;
        padding-inline: 4px;
    }

    .inv-vydox,
    .inv-combo {
        padding-bottom: 32px;
    }

    .inv-extract__feed {
        max-height: 220px;
    }

    .inv-extract__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .inv-combo__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .inv-card {
        padding: 14px;
    }

    .inv-cta__box {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .inv-cta__box h2 {
        font-size: clamp(1.45rem, 5vw, 1.85rem);
    }

    .inv-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .inv-cta__actions .inv-btn {
        width: 100%;
        font-size: 13px;
        padding: 11px 16px;
    }
}

@media (max-width: 640px) {
    .inv-hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;
        margin-inline: auto;
    }

    .inv-app__target {
        flex-wrap: wrap;
    }

    .inv-app__extract {
        width: 100%;
    }

    .inv-extract__kpis {
        flex-direction: column;
        gap: 12px;
    }

    .inv-terminal__out {
        font-size: 11px;
    }

    .inv-terminal__screen {
        min-height: 260px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inv-radar__sweep,
    .status-dot,
    .inv-terminal__live i,
    .inv-terminal__cursor,
    .inv-card__top em.live,
    .inv-app__mod.is-live em {
        animation: none;
    }
}
