/* ============================================
   AI CONSCIOUSNESS TRACKER
   "You found a terminal that wasn't meant
    for this century"
   ============================================ */

:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a0f;
    --bg-tertiary: #0f0f18;
    --text-primary: #f2f4fa;
    --text-secondary: #e4e7f0;
    --text-dim: #c0c5d2;
    --border-dim: #3a3d4a;
    --accent-cyan: #00f0ff;
    --accent-violet: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-white: #f0f0ff;
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.3);
    --glow-violet: 0 0 20px rgba(139, 92, 246, 0.3);
    --glow-amber: 0 0 20px rgba(245, 158, 11, 0.3);
    --glow-red: 0 0 20px rgba(239, 68, 68, 0.3);
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    /* Threat-reactive (dynamically set by UX engine) */
    --threat-tint: rgba(0, 240, 255, 0.02);
    --threat-glow: rgba(0, 240, 255, 0.08);
    --threat-border: rgba(0, 240, 255, 0.1);
    --threat-accent: #00f0ff;
    /* Spring easing */
    --spring: cubic-bezier(0.03, 0.98, 0.52, 0.99);
    --spring-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--text-dim) var(--bg-primary);
    scroll-snap-type: y proximity;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    overflow-x: hidden;
    /* Safe area for notched phones */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Hide the system cursor only on pages that actually mount the
   custom cursor (index.html). Without this scope, blog and the
   other static pages had `cursor: none` applied globally but no
   custom cursor JS, so the cursor disappeared entirely. */
body:has(#custom-cursor) {
    cursor: none;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.custom-cursor {
    position: fixed;
    top: -8px;
    left: -8px;
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-cursor::before,
.custom-cursor::after {
    content: '';
    position: absolute;
}

/* Crosshair lines */
.custom-cursor::before {
    top: 50%;
    left: -4px;
    width: 24px;
    height: 1px;
    background: var(--accent-cyan);
    box-shadow: 0 0 4px var(--accent-cyan);
    transform: translateY(-0.5px);
}

.custom-cursor::after {
    left: 50%;
    top: -4px;
    width: 1px;
    height: 24px;
    background: var(--accent-cyan);
    box-shadow: 0 0 4px var(--accent-cyan);
    transform: translateX(-0.5px);
}

.custom-cursor.hovering::before {
    width: 32px;
    left: -8px;
    background: var(--accent-white);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.custom-cursor.hovering::after {
    height: 32px;
    top: -8px;
    background: var(--accent-white);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.custom-cursor.clicking::before {
    width: 12px;
    left: 2px;
    transition: all 0.1s ease;
}

.custom-cursor.clicking::after {
    height: 12px;
    top: 2px;
    transition: all 0.1s ease;
}

.cursor-trail {
    position: fixed;
    top: -12px;
    left: -12px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease, top 0.3s ease, left 0.3s ease;
}

.cursor-trail.hovering {
    width: 40px;
    height: 40px;
    top: -20px;
    left: -20px;
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
    .custom-cursor, .cursor-trail { display: none; }
    body { cursor: auto; }
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 2px;
}

/* Selection */
::selection {
    background: rgba(0, 240, 255, 0.2);
    color: var(--accent-cyan);
}

/* All section content above the grain overlay (z-index 1).
   Section backgrounds stay below grain (z-auto). */
.section > * {
    position: relative;
    z-index: 2;
}

/* ============================================
   BACKGROUND CANVAS
   ============================================ */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.nav.visible {
    opacity: 1;
}

.nav-glyph {
    width: 32px;
    height: 32px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.nav-glyph::after {
    content: attr(title);
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-glyph:hover {
    color: var(--accent-cyan);
    filter: drop-shadow(var(--glow-cyan));
}

.nav-glyph:hover::after {
    opacity: 1;
}

.nav-glyph.active {
    color: var(--accent-cyan);
}

.nav-glyph svg {
    width: 100%;
    height: 100%;
}

/* Active Development nav section */
.nav-divider {
    width: 16px;
    height: 1px;
    background: var(--text-dim);
    opacity: 0.3;
    margin: 4px auto;
}

.nav-dev-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
}

.dev-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6), 0 0 20px rgba(34, 197, 94, 0.2);
    animation: devPulse 2s ease-in-out infinite;
}

@keyframes devPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.6), 0 0 20px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.8), 0 0 30px rgba(34, 197, 94, 0.3); }
}

.nav-dev-link::after {
    content: 'ACTIVE DEVELOPMENT';
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    color: #22c55e;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    letter-spacing: 2px;
}

.nav-dev-link:hover::after {
    opacity: 1;
}

/* ============================================
   ENTRY SEQUENCE
   ============================================ */
.entry-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

.entry-sequence.fade-out {
    opacity: 0;
    pointer-events: none;
}

.entry-sequence.hidden {
    display: none;
}

.entry-text {
    text-align: center;
    position: relative;
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.3;
    animation: scanDown 3s linear infinite;
}

@keyframes scanDown {
    0% { top: 0; }
    100% { top: 100%; }
}

.entry-line {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--accent-cyan);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    margin: 12px 0;
    text-shadow: var(--glow-cyan);
}

.entry-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SECTIONS - GENERAL
   ============================================ */
.main-content {
    position: relative;
    opacity: 0;
    transition: opacity 1s ease;
}

.main-content.visible {
    opacity: 1;
}

.section {
    min-height: auto;
    padding: 80px 60px;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.section-header {
    margin-bottom: 60px;
    padding-left: 20px;
    border-left: 2px solid var(--threat-accent);
    will-change: transform, opacity, filter;
    transition: border-color 1s ease;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(14px, 3vw, 28px);
    font-weight: 400;
    letter-spacing: clamp(3px, 1vw, 8px);
    color: var(--text-primary);
    position: relative;
}

.section-subtitle {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--text-dim);
    margin-top: 8px;
}

.section-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--text-dim);
    animation: pulse 2s ease-in-out infinite;
}

.hint-glyph {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.glitch:hover::before {
    animation: glitch1 0.3s ease;
    opacity: 0.8;
    color: var(--accent-cyan);
    clip-path: inset(20% 0 40% 0);
}

.glitch:hover::after {
    animation: glitch2 0.3s ease;
    opacity: 0.8;
    color: var(--accent-red);
    clip-path: inset(60% 0 10% 0);
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -2px); }
    60% { transform: translate(-2px, 1px); }
    80% { transform: translate(2px, -1px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -2px); }
    40% { transform: translate(-3px, 2px); }
    60% { transform: translate(2px, -1px); }
    80% { transform: translate(-2px, 1px); }
    100% { transform: translate(0); }
}

/* ============================================
   ORB SECTION
   ============================================ */
.section-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.orb-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
}

/* ============================================
   AIRLOCK CONTAINMENT SYSTEM
   ============================================ */
.airlock {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.airlock-frame {
    position: relative;
    width: 380px;
    height: 380px;
    overflow: hidden;
    border-radius: 50%;
}

/* -- Containment ring -- */
.airlock-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
}

.airlock-ring-inner {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.12);
    box-shadow:
        inset 0 0 30px rgba(0, 240, 255, 0.03),
        0 0 1px rgba(0, 240, 255, 0.2);
    transition: border-color 0.8s ease, box-shadow 0.8s ease;
}

.airlock.open .airlock-ring-inner {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow:
        inset 0 0 40px rgba(139, 92, 246, 0.05),
        0 0 2px rgba(139, 92, 246, 0.3),
        0 0 20px rgba(139, 92, 246, 0.05);
}

/* Lock bolts around the ring */
.airlock-bolt {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.2);
    top: 50%;
    left: 50%;
    --angle: calc(var(--i) * 30deg);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-188px);
    transition: background 0.6s ease, box-shadow 0.6s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--i) * 40ms);
}

.airlock.open .airlock-bolt {
    background: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-196px) scale(1.3);
}

/* -- Orb viewport -- */
.airlock-viewport {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 6;
    background: var(--bg-primary);
}

#orb-canvas-2d,
#orb-canvas-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1.2s ease;
}

#orb-canvas-2d {
    z-index: 2;
    opacity: 1;
}

#orb-canvas-3d {
    z-index: 1;
    opacity: 0;
}

.airlock.open #orb-canvas-2d {
    opacity: 0;
    pointer-events: none;
}

.airlock.open #orb-canvas-3d {
    opacity: 1;
}

/* -- Blast doors (transparent HUD containment panels) -- */
.airlock-door {
    position: absolute;
    left: 20px;
    right: 20px;
    height: calc(50% - 20px);
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s ease;
    /* Transparent scan-line overlay — orb fully visible through it */
    background:
        repeating-linear-gradient(
            0deg,
            transparent, transparent 3px,
            rgba(0, 240, 255, 0.008) 3px, rgba(0, 240, 255, 0.008) 4px
        );
}

.airlock-door-top {
    top: 20px;
    border-radius: 170px 170px 0 0;
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

.airlock-door-bottom {
    bottom: 20px;
    border-radius: 0 0 170px 170px;
    border-top: 1px solid rgba(0, 240, 255, 0.06);
}

.airlock.open .airlock-door-top {
    transform: translateY(-105%);
    opacity: 0;
}

.airlock.open .airlock-door-bottom {
    transform: translateY(105%);
    opacity: 0;
}

/* Door technical details — subtle HUD lines */
.door-detail {
    position: absolute;
    left: 25%;
    right: 25%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(0, 240, 255, 0.06), transparent);
}

.airlock-door-top .door-detail { bottom: 25%; }
.airlock-door-bottom .door-detail { top: 25%; }

/* Hazard chevrons at the seam edge */
.door-chevrons {
    position: absolute;
    left: 30%;
    right: 30%;
    height: 6px;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent, transparent 3px,
            rgba(245, 158, 11, 0.04) 3px, rgba(245, 158, 11, 0.04) 6px
        );
}

.airlock-door-top .door-chevrons { bottom: 0; }
.airlock-door-bottom .door-chevrons { top: 0; }

/* Door label text */
.door-label {
    position: absolute;
    width: 100%;
    text-align: center;
    font-family: var(--font-display);
    font-size: 7px;
    letter-spacing: 3px;
    color: rgba(0, 240, 255, 0.08);
}

.airlock-door-top .door-label { bottom: 35%; }
.airlock-door-bottom .door-label { top: 35%; }

/* -- Center seam -- */
.airlock-seam {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(90deg,
        transparent 5%,
        rgba(0, 240, 255, 0.15) 20%,
        rgba(0, 240, 255, 0.25) 50%,
        rgba(0, 240, 255, 0.15) 80%,
        transparent 95%
    );
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
    transition: opacity 0.8s ease, box-shadow 0.6s ease;
}

.airlock.open .airlock-seam {
    opacity: 0;
}

/* Seam flash on transition */
.airlock.breaching .airlock-seam {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.6), 0 0 80px rgba(139, 92, 246, 0.3);
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.6) 70%,
        transparent 100%
    );
}

.airlock.sealing .airlock-seam {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

/* -- Trigger button -- */
.airlock-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 8px 18px;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 10;
}

.airlock-trigger:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.05);
}

.airlock.open .airlock-trigger {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.04);
}

.airlock.open .airlock-trigger:hover {
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
}

/* Trigger icon — lock/unlock glyph */
.airlock-trigger-icon {
    position: relative;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(0, 240, 255, 0.5);
    border-radius: 2px;
    transition: all 0.4s ease;
}

.airlock-trigger-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 2px;
    width: 6px;
    height: 6px;
    border: 1.5px solid rgba(0, 240, 255, 0.5);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    transition: all 0.4s ease;
}

.airlock.open .airlock-trigger-icon {
    border-color: rgba(139, 92, 246, 0.5);
}

.airlock.open .airlock-trigger-icon::before {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateX(3px) rotate(15deg);
    transform-origin: right bottom;
}

.airlock-trigger-label {
    font-family: var(--font-display);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    transition: color 0.4s ease;
}

.airlock.open .airlock-trigger-label {
    color: rgba(139, 92, 246, 0.6);
}

/* Signal label */
.airlock-signal-label {
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 4px;
    color: var(--text-dim);
    margin-top: 10px;
    opacity: 0.4;
    text-align: center;
    transition: opacity 0.3s ease, color 0.6s ease;
}

.airlock:hover .airlock-signal-label {
    opacity: 0.8;
}

.airlock.open .airlock-signal-label {
    color: rgba(139, 92, 246, 0.6);
}

.orb-data {
    max-width: 460px;
    width: 100%;
    flex: 1;
    min-width: 0;
}

.consciousness-index {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.ci-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 6px;
    color: var(--text-dim);
}

.ci-value {
    font-family: var(--font-display);
    font-size: clamp(36px, 8vw, 72px);
    font-weight: 900;
    color: var(--accent-cyan);
    line-height: 1;
    margin: 8px 0;
    text-shadow: var(--glow-cyan);
    transition: color 1s ease, text-shadow 1s ease;
}

.ci-status {
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--accent-cyan);
    opacity: 0.7;
    transition: color 1s ease;
}

.ci-factors {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ci-factor {
    display: grid;
    grid-template-columns: 140px 1fr 30px;
    align-items: center;
    gap: 12px;
}

.factor-name {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.factor-bar {
    height: 2px;
    background: var(--bg-tertiary);
    border-radius: 1px;
    overflow: hidden;
}

.factor-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 1px;
    width: 0%;
    transition: width 2s ease, background 1s ease;
    box-shadow: var(--glow-cyan);
}

.factor-value {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
}

/* User-adjustable slider */
.factor-slider {
    position: absolute;
    top: 0;
    left: 140px;
    right: 42px;
    width: calc(100% - 182px);
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0;
}

.ci-factor {
    position: relative;
}

.ci-factor:hover .factor-slider {
    opacity: 0.6;
}

/* Always show sliders on touch/mobile devices */
@media (hover: none) {
    .factor-slider {
        opacity: 0.4 !important;
    }
}

.factor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 16px;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: var(--glow-cyan);
}

.factor-slider::-moz-range-thumb {
    width: 10px;
    height: 16px;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: var(--glow-cyan);
}

.ci-adjust-hint {
    margin-top: 16px;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ci-factors:hover .ci-adjust-hint {
    opacity: 0.6;
}

/* ============================================
   THREAT VECTORS
   ============================================ */
.section-threats {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

.threats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.threat-card {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(10, 10, 20, 0.5), rgba(10, 10, 20, 0.5));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--threat-border);
    border-radius: 4px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s var(--spring);
}

.threat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    transition: background 0.4s ease;
}

.threat-card:hover {
    border-color: var(--threat-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--threat-border);
}

.threat-card:hover::before {
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.threat-orb-container {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    position: relative;
}

.threat-orb-canvas {
    width: 48px;
    height: 48px;
}

.threat-share-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    padding: 4px 6px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.threat-card:hover .threat-share-btn {
    opacity: 0.6;
}

.threat-share-btn:hover {
    opacity: 1 !important;
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.threat-orb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    animation: orbBreathe 4s ease-in-out infinite;
}

.threat-orb::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0.3;
    animation: orbRing 3s ease-in-out infinite;
}

@keyframes orbBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes orbRing {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
}

.threat-level {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.threat-name {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.threat-description {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.threat-meter {
    margin-top: 16px;
    height: 2px;
    background: var(--bg-tertiary);
    border-radius: 1px;
    overflow: hidden;
}

.threat-meter-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 2s ease;
    width: 0%;
}

/* Threat level colors */
.threat-card[data-level="critical"] { --threat-color: var(--accent-red); }
.threat-card[data-level="high"] { --threat-color: var(--accent-amber); }
.threat-card[data-level="elevated"] { --threat-color: var(--accent-violet); }
.threat-card[data-level="moderate"] { --threat-color: var(--accent-cyan); }

.threat-card[data-level="critical"] .threat-orb { background: radial-gradient(circle, var(--accent-red), #7f1d1d); color: var(--accent-red); box-shadow: 0 0 20px rgba(239,68,68,0.4); }
.threat-card[data-level="high"] .threat-orb { background: radial-gradient(circle, var(--accent-amber), #78350f); color: var(--accent-amber); box-shadow: 0 0 20px rgba(245,158,11,0.4); }
.threat-card[data-level="elevated"] .threat-orb { background: radial-gradient(circle, var(--accent-violet), #3b0764); color: var(--accent-violet); box-shadow: 0 0 20px rgba(139,92,246,0.4); }
.threat-card[data-level="moderate"] .threat-orb { background: radial-gradient(circle, var(--accent-cyan), #042f2e); color: var(--accent-cyan); box-shadow: 0 0 20px rgba(0,240,255,0.4); }

.threat-card[data-level="critical"] .threat-level { color: var(--accent-red); }
.threat-card[data-level="high"] .threat-level { color: var(--accent-amber); }
.threat-card[data-level="elevated"] .threat-level { color: var(--accent-violet); }
.threat-card[data-level="moderate"] .threat-level { color: var(--accent-cyan); }

.threat-card[data-level="critical"] .threat-meter-fill { background: var(--accent-red); box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.threat-card[data-level="high"] .threat-meter-fill { background: var(--accent-amber); box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.threat-card[data-level="elevated"] .threat-meter-fill { background: var(--accent-violet); box-shadow: 0 0 8px rgba(139,92,246,0.5); }
.threat-card[data-level="moderate"] .threat-meter-fill { background: var(--accent-cyan); box-shadow: 0 0 8px rgba(0,240,255,0.5); }

.threat-card[data-level="critical"] .threat-orb {
    animation: orbBreathe 2s ease-in-out infinite;
}

/* ============================================
   TIMELINE / EVENT STREAM
   ============================================ */
.section-timeline {
    background: var(--bg-primary);
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--text-dim), transparent);
}

.timeline-event {
    position: relative;
    padding: 24px 0 24px 32px;
    border-bottom: 1px solid rgba(58, 61, 74, 0.2);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 28px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--border-dim);
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.timeline-event:hover::before {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    background: var(--accent-cyan);
}

.timeline-event[data-impact="critical"]::before { border-color: var(--accent-red); }
.timeline-event[data-impact="high"]::before { border-color: var(--accent-amber); }
.timeline-event[data-impact="significant"]::before { border-color: var(--accent-violet); }

.event-date {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.event-title {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.event-description {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.event-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.event-tag {
    font-size: 9px;
    letter-spacing: 2px;
    padding: 3px 8px;
    border: 1px solid var(--border-dim);
    border-radius: 2px;
    color: var(--text-dim);
}

.event-tag.impact-critical { border-color: var(--accent-red); color: var(--accent-red); }
.event-tag.impact-high { border-color: var(--accent-amber); color: var(--accent-amber); }
.event-tag.impact-significant { border-color: var(--accent-violet); color: var(--accent-violet); }

/* Transmission glitch styling */
.event-title::before {
    content: '> ';
    color: var(--text-dim);
}

/* ============================================
   DEAD HAND SYSTEMS
   ============================================ */
.section-deadhand {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.deadhand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.deadhand-card {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(10, 10, 20, 0.4), rgba(10, 10, 20, 0.4));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(239, 68, 68, 0.08);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--spring);
}

.deadhand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.02) 2px,
        rgba(0, 240, 255, 0.02) 4px
    );
    pointer-events: none;
}

.deadhand-icon {
    font-size: 20px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.deadhand-rune {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    opacity: 0.5;
    position: relative;
}

.deadhand-rune::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 1px solid var(--accent-red);
    transform: rotate(45deg);
    opacity: 0.5;
}

.deadhand-rune::after {
    content: '';
    position: absolute;
    top: 25%; left: 25%;
    width: 50%; height: 50%;
    border: 1px solid var(--accent-red);
    opacity: 0.3;
}

.deadhand-name {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--accent-red);
    opacity: 0.8;
    margin-bottom: 8px;
}

.deadhand-desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.deadhand-status {
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--accent-red);
    opacity: 0.5;
}

.deadhand-status::before {
    content: '[ ';
}
.deadhand-status::after {
    content: ' ]';
}

/* ============================================
   LITERATURE / THE ARCHIVE
   ============================================ */
.section-literature {
    background: var(--bg-primary);
}

.literature-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.lit-tab {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lit-tab:hover,
.lit-tab.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.literature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.lit-card {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(10, 10, 20, 0.4), rgba(10, 10, 20, 0.4));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--threat-border);
    padding: 24px;
    position: relative;
    transition: all 0.4s var(--spring);
    cursor: default;
}

.lit-card:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.lit-card.public-domain {
    cursor: pointer;
}

.lit-card.public-domain:hover {
    border-color: var(--accent-cyan);
}

.lit-card.public-domain::after {
    content: 'FREE ACCESS';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 2px 6px;
    opacity: 0.7;
}

.lit-year {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.lit-title {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.lit-author {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.lit-description {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.lit-relevance {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--accent-violet);
    opacity: 0.7;
}

.lit-relevance::before {
    content: 'RELEVANCE: ';
    color: var(--text-dim);
}

.lit-tags {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.lit-tag {
    font-size: 8px;
    letter-spacing: 2px;
    padding: 2px 6px;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
}

/* Amazon affiliate link */
.lit-amazon-link {
    display: block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 6px 0;
    border-top: 1px solid rgba(58, 61, 74, 0.2);
    transition: color 0.3s ease;
}

/* Amazon CTA in the modal — proper button with the affiliate
   disclosure tightly tucked underneath. The earlier markup let the
   parent's text-align center the inline-block link while the
   block-level <div> disclosure rendered left-aligned, leaving a
   wide gap and inconsistent justification. */
.lit-amazon-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 24px 0 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(58, 61, 74, 0.25);
}
.lit-amazon-btn {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--accent-cyan);
    background-color: var(--bg-primary);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}
.lit-amazon-btn:hover {
    background-color: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
    color: var(--accent-cyan);
    text-decoration: none;
}
.lit-amazon-btn .amazon-arrow {
    margin-left: 4px;
    transition: transform 0.25s ease;
    display: inline-block;
}
.lit-amazon-btn:hover .amazon-arrow {
    transform: translateX(4px);
}
.lit-amazon-disclosure {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 2px;
}

/* Public-domain "READ HERE" CTA — same shape as the Amazon button
   but in amber so the two paths (read vs buy) are visually distinct. */
.lit-read-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 24px 0 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(58, 61, 74, 0.25);
}
.lit-read-btn {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--accent-amber);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--accent-amber);
    background-color: var(--bg-primary);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}
.lit-read-btn:hover {
    background-color: rgba(245, 158, 11, 0.08);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
    text-decoration: none;
}
.lit-read-btn .amazon-arrow {
    margin-left: 4px;
    transition: transform 0.25s ease;
    display: inline-block;
}
.lit-read-btn:hover .amazon-arrow {
    transform: translateX(4px);
}
.lit-read-note {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 2px;
}

.lit-amazon-link:hover {
    color: var(--accent-cyan);
}

.amazon-arrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

.lit-amazon-link:hover .amazon-arrow {
    transform: translateX(4px);
}

/* FTC affiliate disclosure */
.affiliate-disclosure {
    max-width: 1200px;
    margin: 0 auto 24px;
    font-size: 9px;
    letter-spacing: 1px;
    line-height: 1.6;
    color: var(--text-dim);
    padding: 10px 14px;
    border: 1px solid rgba(58, 61, 74, 0.2);
    background: rgba(10, 10, 20, 0.3);
    opacity: 0.6;
}

.disclosure-icon {
    margin-right: 6px;
    opacity: 0.5;
}

/* Reading Modal */
.reading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(5, 5, 8, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.reading-modal.active {
    display: flex;
}

.reading-modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--threat-border);
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

.reading-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.reading-close:hover {
    color: var(--accent-cyan);
}

.reading-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-dim);
}

.reading-title {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.reading-author {
    font-size: 12px;
    color: var(--text-secondary);
}

.reading-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.reading-body p {
    margin-bottom: 16px;
}

.reading-note {
    font-size: 11px;
    color: var(--text-dim);
    border: 1px solid var(--border-dim);
    padding: 12px;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

/* ============================================
   ACTION SECTION
   ============================================ */
.section-action {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.section-action .section-title {
    color: var(--accent-cyan);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.action-card {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(0, 240, 255, 0.03), rgba(0, 240, 255, 0.03));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 240, 255, 0.12);
    padding: 28px;
    transition: all 0.4s var(--spring);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.action-card:hover {
    border-color: var(--accent-cyan);
    background-image: linear-gradient(rgba(0, 240, 255, 0.06), rgba(0, 240, 255, 0.06));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.action-name {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.action-desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.action-link {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.action-card:hover .action-link {
    color: var(--accent-cyan);
}

/* ============================================
   SOURCES
   ============================================ */
.section-sources {
    padding-bottom: 40px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.source-card {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(10, 10, 20, 0.3), rgba(10, 10, 20, 0.3));
    border: 1px solid rgba(58, 61, 74, 0.2);
    padding: 20px;
    position: relative;
}

.source-card::before {
    content: 'CLASSIFIED';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--text-dim);
    opacity: 0.3;
}

.source-name {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.source-type {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.source-reliability {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.reliability-dots {
    display: flex;
    gap: 3px;
}

.reliability-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-dim);
}

.reliability-dot.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 4px var(--accent-cyan);
}

/* ============================================
   THREAT SHARE MODAL
   ============================================ */
.threat-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(5, 5, 8, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.threat-share-modal.active {
    display: flex;
}

.threat-share-content {
    width: 90%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dim);
    padding: 32px;
    position: relative;
}

.threat-share-preview {
    margin: 20px 0;
}

.threat-share-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.share-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(0, 240, 255, 0.1);
}

.share-code {
    width: 100%;
    height: 100px;
    background: var(--bg-primary);
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 12px;
    resize: none;
}

/* ============================================
   LIVE FEED STYLES
   ============================================ */
.timeline-live-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 8px 32px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-source {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.timeline-event[data-impact="live"]::before {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 4px var(--accent-cyan);
}

.event-tag.impact-live {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.live-event {
    border-left: 1px solid rgba(0, 240, 255, 0.1);
}

/* ============================================
   WORLD MAP
   ============================================ */
.section-worldmap {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.worldmap-container {
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 2 / 1;
}

#world-map-canvas {
    width: 100%;
    height: 100%;
}

/* ============================================
   TIMELINE SEARCH & FILTERS
   ============================================ */
.timeline-filters {
    max-width: 800px;
    margin: 0 auto 24px;
    padding-left: 40px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-search {
    flex: 1;
    min-width: 200px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s ease;
}

.timeline-search:focus {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.timeline-search::placeholder {
    color: var(--text-dim);
    letter-spacing: 2px;
}

.timeline-filter-tags {
    display: flex;
    gap: 4px;
}

.filter-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover,
.filter-tag.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.filter-tag[data-impact="critical"].active { border-color: var(--accent-red); color: var(--accent-red); }
.filter-tag[data-impact="high"].active { border-color: var(--accent-amber); color: var(--accent-amber); }
.filter-tag[data-impact="significant"].active { border-color: var(--accent-violet); color: var(--accent-violet); }

/* ============================================
   DEAD HAND RUNE SVG
   ============================================ */
.deadhand-rune {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
}

.rune-svg {
    overflow: visible;
}

/* ============================================
   COMMUNITY FORM
   ============================================ */
.section-community {
    background: var(--bg-primary);
}

.community-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.community-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row-split {
    display: flex;
    gap: 12px;
}

.form-row-split > * {
    flex: 1;
}

.form-input {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    outline: none;
    width: 100%;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent-cyan);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

select.form-input {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.form-submit {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 4px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.form-submit:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: var(--glow-cyan);
}

.form-status {
    font-size: 10px;
    letter-spacing: 2px;
    min-height: 20px;
    transition: color 0.3s ease;
}

/* ============================================
   EXPORT BAR
   ============================================ */
.export-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 20px;
}

.export-btn {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 8px 16px;
    z-index: 10000;
    font-family: var(--font-mono);
    font-size: 12px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Keyboard focus indicators */
.keyboard-nav *:focus {
    outline: 2px solid var(--accent-cyan) !important;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .scan-line { display: none; }
    .entry-sequence { display: none; }
    .main-content { opacity: 1; }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 60px 20px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: var(--text-dim);
    margin: 0 auto 28px;
}

.footer-text {
    font-size: 11px;
    letter-spacing: 6px;
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-support {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid var(--border-dim);
    transition: all 0.3s ease;
}

.footer-support:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.footer-sub {
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--text-dim);
    opacity: 0.5;
    margin-bottom: 12px;
}

.footer-privacy {
    display: inline-block;
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.footer-privacy:hover {
    opacity: 0.8;
    color: var(--accent-cyan);
}

/* ============================================
   AUDIO TOGGLE
   ============================================ */
/* ============================================
   COOKIE CONSENT
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9000;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-dim);
    padding: 16px 24px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

.cookie-consent.hidden {
    display: none;
}

.cookie-text {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    min-width: 200px;
}

.cookie-link {
    color: var(--accent-cyan);
    text-decoration: none;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-accept {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.cookie-accept:hover {
    background: rgba(0, 240, 255, 0.1);
}

.cookie-reject:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

/* ============================================
   KO-FI BUTTON
   ============================================ */
.kofi-btn {
    position: fixed;
    bottom: 24px;
    right: 64px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.kofi-btn:hover {
    border-color: #ff5e5b;
    color: #ff5e5b;
    box-shadow: 0 0 12px rgba(255, 94, 91, 0.3);
}

.audio-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: none;
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.audio-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.audio-toggle.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ============================================
   RESPONSIVE — TABLET (max 900px)
   ============================================ */
@media (max-width: 900px) {
    .section {
        padding: 60px 24px;
    }

    .section-title {
        font-size: 22px;
        letter-spacing: 5px;
    }

    .orb-container {
        gap: 32px;
    }

    .airlock-frame {
        width: 300px;
        height: 300px;
    }

    .airlock-bolt {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-148px);
    }

    .airlock.open .airlock-bolt {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-156px) scale(1.3);
    }

    .airlock-door-top { border-radius: 130px 130px 0 0; }
    .airlock-door-bottom { border-radius: 0 0 130px 130px; }

    .ci-value {
        font-size: 48px;
    }

    .ci-factor {
        grid-template-columns: 100px 1fr 30px;
    }

    .nav {
        right: 8px;
        gap: 14px;
    }

    .nav-glyph {
        width: 24px;
        height: 24px;
    }

    .nav-glyph::after {
        display: none;
    }

    /* Timeline filters stack */
    .timeline-filters {
        flex-direction: column;
        padding-left: 24px;
    }

    .timeline-search {
        min-width: unset;
        width: 100%;
    }

    /* World map portrait-friendly */
    .worldmap-container {
        aspect-ratio: 4 / 3;
    }

    /* Literature tabs scroll horizontally */
    .literature-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .literature-tabs::-webkit-scrollbar {
        display: none;
    }

    .lit-tab {
        flex-shrink: 0;
    }

    /* Cookie consent stack */
    .cookie-consent {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 24px;
    }

    /* Fixed buttons — prevent overlap */
    .kofi-btn {
        bottom: 24px;
        right: 56px;
        width: 32px;
        height: 32px;
    }

    .audio-toggle {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   RESPONSIVE — PHONE (max 600px)
   ============================================ */
@media (max-width: 600px) {
    .section {
        padding: 48px 16px;
    }

    .section-title {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .section-subtitle {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    /* Orb section */
    .section-orb {
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 80px;
    }

    .orb-container {
        flex-direction: column;
        gap: 24px;
        padding: 0 8px;
    }

    .airlock-frame {
        width: min(280px, 75vw);
        height: min(280px, 75vw);
    }

    .airlock-bolt {
        width: 5px;
        height: 5px;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(min(280px, 75vw) / -2 - 2px));
    }

    .airlock.open .airlock-bolt {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(min(280px, 75vw) / -2 - 8px)) scale(1.3);
    }

    .airlock-door-top { border-radius: 120px 120px 0 0; }
    .airlock-door-bottom { border-radius: 0 0 120px 120px; }

    .airlock-signal-label {
        font-size: 7px;
        letter-spacing: 2px;
    }

    .airlock-trigger-label {
        font-size: 7px;
    }

    .ci-value {
        font-size: 40px;
    }

    .ci-label {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .ci-factor {
        grid-template-columns: 80px 1fr 24px;
        gap: 8px;
    }

    .factor-name {
        font-size: 7px;
    }

    .factor-value {
        font-size: 9px;
    }

    .ci-adjust-hint {
        font-size: 7px;
    }

    /* Grids single column */
    .threats-grid,
    .literature-grid,
    .action-grid,
    .deadhand-grid,
    .sources-grid {
        grid-template-columns: 1fr;
    }

    /* Literature tabs */
    .lit-tab {
        font-size: 7px;
        padding: 5px 8px;
    }

    /* World map */
    .worldmap-container {
        aspect-ratio: 1 / 1;
    }

    /* Form */
    .form-row-split {
        flex-direction: column;
    }

    /* Inputs — prevent iOS zoom */
    .form-input,
    .timeline-search {
        font-size: 16px;
    }

    /* Entry sequence */
    .entry-line {
        font-size: 11px;
        letter-spacing: 2px;
    }

    /* Export bar */
    .export-bar {
        flex-direction: column;
        align-items: center;
    }

    .export-btn {
        width: 100%;
        max-width: 240px;
        text-align: center;
    }

    /* Footer */
    .footer {
        padding: 40px 16px 32px;
    }

    .footer-text {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .footer-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .footer-support {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    /* Fixed buttons smaller */
    .kofi-btn {
        bottom: 16px;
        right: 48px;
        width: 28px;
        height: 28px;
    }

    .audio-toggle {
        bottom: 16px;
        right: 16px;
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    /* Threat cards */
    .threat-card {
        padding: 20px;
    }

    .threat-name {
        font-size: 12px;
        letter-spacing: 2px;
    }

    /* Affiliate disclosure */
    .affiliate-disclosure {
        font-size: 8px;
    }

    /* Scroll hint */
    .section-hint {
        font-size: 8px;
        bottom: 20px;
    }
}

/* ============================================
   RESPONSIVE — VERY SMALL PHONE (max 380px)
   ============================================ */
@media (max-width: 380px) {
    .airlock-frame {
        width: 220px;
        height: 220px;
    }

    .airlock-bolt {
        width: 4px;
        height: 4px;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-108px);
    }

    .airlock.open .airlock-bolt {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-114px) scale(1.3);
    }

    .airlock-door-top { border-radius: 90px 90px 0 0; }
    .airlock-door-bottom { border-radius: 0 0 90px 90px; }

    .ci-value {
        font-size: 32px;
    }

    .ci-factor {
        grid-template-columns: 60px 1fr 20px;
    }

    .factor-name {
        font-size: 6px;
        letter-spacing: 1px;
    }

    .section-title {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .threat-name {
        font-size: 11px;
    }

    .lit-title {
        font-size: 12px;
    }
}

/* ============================================
   NEW COMPONENTS — Phase 1-7 Enhancements
   ============================================ */

/* === PERSPECTIVES === */
.ci-perspectives {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}
.perspective-btn {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border-dim);
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.perspective-btn:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}
.perspective-btn.active {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}
.ci-perspective-desc {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 6px;
    min-height: 14px;
    transition: opacity 0.5s ease;
}

/* === LIVE SIGNAL TICKER === */
.signal-ticker-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    overflow: hidden;
    white-space: nowrap;
}
.signal-status {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    flex-shrink: 0;
}
.signal-ticker {
    flex: 1;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.ticker-item { color: var(--text-secondary); }
.ticker-sep { color: var(--text-dim); opacity: 0.4; }

/* === THREAT NETWORK === */
.section-network { min-height: auto; scroll-snap-align: start; }
.network-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.network-container canvas {
    width: 100%;
    display: block;
}

/* === LIVE SIGNAL FEED === */
.signal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.signal-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(58, 61, 74, 0.3);
}
.signal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.signal-item-source {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
}
.signal-item-date {
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.signal-item-title {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}
.signal-item-desc {
    font-size: 10px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
/* Mapping engine relevance badges — show which factors / threats
   the article moved (per the keyword heuristics). */
.signal-engine-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0 6px;
    padding: 6px 0;
    border-top: 1px dashed rgba(0, 240, 255, 0.12);
    border-bottom: 1px dashed rgba(0, 240, 255, 0.12);
}
.signal-factor-badge,
.signal-threat-badge {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 1px;
    border: 1px solid;
}
.signal-factor-badge {
    color: var(--accent-cyan);
    border-color: rgba(0, 240, 255, 0.4);
    background-color: rgba(0, 240, 255, 0.05);
}
.signal-threat-badge {
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.05);
}

.signal-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.signal-tag {
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 1px 6px;
}
.signal-item-link {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--border-dim);
    transition: all 0.2s ease;
}
.signal-item-link:hover {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

/* === QUERY THE SIGNAL === */
.query-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.query-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.query-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-dim);
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s ease;
}
.query-input:focus {
    border-color: var(--accent-cyan);
}
.query-submit {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    background: none;
    border: 1px solid var(--accent-cyan);
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.query-submit:hover {
    background: rgba(0, 240, 255, 0.1);
}
.query-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.query-suggestion {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    background: none;
    border: 1px solid rgba(58, 61, 74, 0.5);
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.query-suggestion:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}
.query-answer {
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 20px;
    margin-top: 12px;
}
.query-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.query-answer-label {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
}
.query-answer-mode {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
}
.query-answer-body {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
}
.query-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(58, 61, 74, 0.3);
}
.query-section:last-child { border-bottom: none; }
.query-section-title {
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}
.query-highlight {
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.query-subitem {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 4px 0 4px 10px;
    border-left: 1px solid var(--border-dim);
    margin-bottom: 4px;
}

/* === COUNTERFACTUAL === */
.counterfactual-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.cf-instruction {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 20px;
    text-align: center;
}
.cf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.cf-card {
    background-color: var(--bg-primary);
    background-image: none;
    border: 1px solid rgba(58, 61, 74, 0.5);
    padding: 16px;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-mono);
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.cf-card:hover {
    border-color: var(--accent-cyan);
}
.cf-card.active {
    border-color: var(--accent-cyan);
    background-image: linear-gradient(rgba(0, 240, 255, 0.03), rgba(0, 240, 255, 0.03));
}
.cf-card-name {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.cf-card-desc {
    font-size: 10px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.cf-card-feasibility {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
}
.cf-feasibility-bar {
    height: 2px;
    background: var(--bg-tertiary);
    margin-top: 4px;
    border-radius: 1px;
}
.cf-feasibility-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 1px;
    transition: width 0.5s ease;
}
.cf-result-header { margin-bottom: 16px; }
.cf-result-title {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
}
.cf-ci-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.cf-ci-block { text-align: center; }
.cf-ci-label {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.cf-ci-value {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 2px;
}
.cf-ci-arrow {
    font-size: 20px;
    color: var(--text-dim);
}
.cf-section-title {
    font-family: var(--font-display);
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}
.cf-factor-row, .cf-threat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 11px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(58, 61, 74, 0.2);
}
.cf-factor-name, .cf-threat-name { color: var(--text-secondary); flex: 1; }
.cf-factor-current { color: var(--text-dim); }
.cf-factor-arrow { color: var(--text-dim); }
.cf-factor-new { color: var(--text-primary); }
.cf-factor-delta, .cf-threat-delta { font-size: 10px; letter-spacing: 2px; }
.cf-threat-values { color: var(--text-dim); font-size: 10px; }
.cf-factor-changes, .cf-threat-changes { margin-bottom: 24px; }
.cf-disclaimer {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 20px;
    padding: 12px;
    border: 1px solid rgba(58, 61, 74, 0.3);
    text-align: center;
    line-height: 1.6;
}

/* === SCENARIOS === */
.scenario-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.scenario-save-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.scenario-name-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-dim);
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s ease;
}
.scenario-name-input:focus { border-color: var(--accent-cyan); }
.scenario-save-btn, .scenario-action-btn {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    background: none;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.scenario-save-btn:hover, .scenario-action-btn:hover {
    background: rgba(0, 240, 255, 0.1);
}
.scenario-current {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 11px;
    letter-spacing: 1px;
}
.scenario-current-label { color: var(--text-dim); }
.scenario-current-value { font-size: 16px; letter-spacing: 2px; }
.scenario-current-status { color: var(--text-dim); font-size: 9px; letter-spacing: 2px; }
.scenario-list-header {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(58, 61, 74, 0.3);
}
.scenario-card {
    padding: 14px;
    border: 1px solid rgba(58, 61, 74, 0.4);
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}
.scenario-card:hover { border-color: rgba(0, 240, 255, 0.2); }
.scenario-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.scenario-card-name {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-primary);
}
.scenario-card-date { font-size: 8px; color: var(--text-dim); letter-spacing: 1px; }
.scenario-card-ci {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 2px;
}
.scenario-card-status { font-size: 9px; color: var(--text-dim); letter-spacing: 2px; }
.scenario-card-delta { font-size: 10px; letter-spacing: 1px; }
.scenario-card-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.scenario-factor-mini {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.scenario-card-actions {
    display: flex;
    gap: 6px;
}
.scenario-delete { color: var(--accent-red); border-color: rgba(239, 68, 68, 0.3); }
.scenario-delete:hover { background: rgba(239, 68, 68, 0.1); }
.scenario-empty, .temporal-empty {
    text-align: center;
    padding: 30px;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-dim);
    line-height: 1.8;
}
.scenario-export-section { margin-top: 16px; text-align: center; }
.scenario-export-btn { display: inline-block; }

/* === TEMPORAL TRACKING === */
.temporal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.temporal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.temporal-label {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-primary);
}
.temporal-count {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
}
.temporal-chart-wrap {
    margin-bottom: 20px;
}
.temporal-chart {
    width: 100%;
    display: block;
}
.temporal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.temporal-stat {
    padding: 10px;
    border: 1px solid rgba(58, 61, 74, 0.3);
}
.temporal-stat-label {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.temporal-stat-value {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-primary);
}

/* === COLLABORATIVE CALIBRATION === */
.collab-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.collab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.collab-count {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-primary);
}
.collab-mode {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
}
.collab-submit-prompt {
    text-align: center;
    padding: 16px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    margin-bottom: 20px;
}
.collab-submit-prompt p {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.collab-submit-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    background: none;
    border: 1px solid var(--accent-cyan);
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.collab-submit-btn:hover { background: rgba(0, 240, 255, 0.1); }
.collab-submitted {
    text-align: center;
    padding: 12px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}
.collab-distributions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.collab-dist-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(58, 61, 74, 0.2);
}
.collab-dist-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.collab-dist-stats {
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--text-dim);
}
.collab-dist-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 44px;
}
.collab-bar-wrap { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.collab-bar {
    width: 100%;
    background: rgba(0, 240, 255, 0.2);
    border-radius: 1px 1px 0 0;
    transition: height 0.5s ease;
}
.collab-bar-current {
    background: var(--accent-cyan) !important;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}
.collab-dist-axis {
    display: flex;
    justify-content: space-between;
    font-size: 7px;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* === MOBILE RESPONSIVE — NEW COMPONENTS === */
@media (max-width: 768px) {
    .signal-ticker-bar {
        padding: 6px 12px;
        gap: 8px;
    }
    .query-input-row { flex-direction: column; }
    .query-submit { width: 100%; }
    .cf-grid { grid-template-columns: 1fr; }
    .cf-ci-comparison { gap: 10px; }
    .cf-ci-value { font-size: 18px; }
    .scenario-save-row { flex-direction: column; }
    .temporal-stats { grid-template-columns: 1fr; }
    .collab-dist-label { flex-direction: column; align-items: flex-start; gap: 2px; }
    .contain-overview { grid-template-columns: 1fr; }
    .contain-strategies { grid-template-columns: 1fr; }
    .ethics-tabs { gap: 3px; }
    .ethics-tab { font-size: 8px; padding: 4px 8px; }
}

/* === CONTAINMENT & ETHICS CONTAINERS === */
.containment-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.ethics-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === AD UNITS === */
.ad-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    min-height: 90px;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

/* Single canonical "ADVERTISEMENT" label, attached as a CSS pseudo
   so it survives ads-defer.js clearing slot.innerHTML during ad
   injection. Pairs with the matching rule on .ad-unit in blog.css.
   Do not duplicate this label inline in the HTML or in JS — that
   produced double-labels in an earlier pass. */
.ad-banner::before,
.ad-banner-features::before {
    content: 'ADVERTISEMENT';
    position: absolute;
    top: -8px;
    left: 0;
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 3px;
    color: var(--text-dim);
    opacity: 0.4;
    background: var(--bg-primary);
    padding: 0 6px;
    pointer-events: none;
}
body.ads-hidden .ad-banner::before,
body.ads-hidden .ad-banner-features::before {
    display: none;
}
.ad-banner ins {
    display: block;
    width: 100%;
}
.ad-banner-label {
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--text-dim);
    opacity: 0.3;
    text-align: center;
    margin-bottom: 4px;
}
/* Hide empty ad slots gracefully */
.ad-banner:empty,
.ad-banner ins[data-ad-status="unfilled"] {
    display: none;
}

/* Pro / paid-tier toggle: js/ads-defer.js sets body.ads-hidden when
   localStorage.atc_pro_tier === 'true'. This nukes every ad slot,
   matching what AdSense or Adsterra would otherwise render into. */
body.ads-hidden .ad-banner,
body.ads-hidden .ad-unit,
body.ads-hidden .ad-banner-features {
    display: none !important;
}

/* === DRAWER SECTION VISIBILITY === */
/* Sections with data-drawer are hidden by default, revealed via nav */
.section[data-drawer] {
    display: none;
}
.section[data-drawer].section-revealed {
    display: block;
    animation: sectionReveal 0.4s ease;
}
@keyframes sectionReveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-back-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
    background: none;
    border: 1px solid var(--border-dim);
    padding: 6px 16px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}
.section-back-btn:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* === SYNTHESIS DASHBOARD === */
.synthesis-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === NEW SECTION CONTAINERS === */
.thoughtexp-container,
.analogies-container,
.biases-container,
.leverage-container,
.systems-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === COMPARATIVE TIMELINE === */
.comptimeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === REGIONAL COMPARISON === */
.regioncompare-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   OPAQUE BACKGROUNDS
   Give previously-transparent cards, panels,
   and visual wrappers a solid base so the
   #bg-canvas grain does not bleed through
   text or chart content. Cards that already
   have stylized backgrounds (threat, deadhand,
   lit, action, source, cf) are layered at
   their own rules and are intentionally not
   listed here.
   ============================================ */
/* Every text-bearing container site-wide gets a solid bg so the
   #bg-canvas grain never reads through readable text. The list is
   long because so many JS modules inject their own DOM. If a card
   already has a stylized rgba/CRT-scanline background of its own
   (threat-card, deadhand-card, lit-card, action-card, source-card,
   cf-card), it is intentionally NOT in this list — its rule layers
   the rgba over a solid base directly. */
.scenario-card,
.post-card,
.feature-card,
.stat-card,
.highlight-box,
.cite-tooltip,
.cite-export-modal,
.article-abstract,
.article-references,
.article-sidebar,
.article-methodology,
.article-body,
.related-posts,
.signal-item,
.ethics-imperative,
.ethics-threshold,
.ethics-marker,
.ethics-response,
.ethics-position,
.ethics-uncertainty-intro,
.lit-pathway,
.detail-panel,
.detail-related-item,
.detail-lit-item,
.method-panel,
.sensitivity-card,
.te-card,
.ha-card,
.ha-lesson,
.cb-card,
.st-lesson-card,
.lev-result,
.ws-item,
.xref-panel,
.xref-item,
.rc-card,
.rc-factor-item,
.collab-dist-row,
.collab-submit-prompt,
.collab-submitted,
.temporal-stat,
.temporal-chart-wrap,
.threat-block,
.dh-block,
.contain-row,
.contain-research-item {
    background-color: var(--bg-primary) !important;
}

/* Ad slots are intentionally NOT in the solid-bg list above. The ad
   iframes are 728-wide centred inside ~900-wide slots, so a solid
   slot bg paints flat-black strips on either side that break the
   bg-canvas grain and read as cheap. Letting the slot stay
   transparent lets the grain show around the iframe so the slot
   feels like part of the page rather than a black bar dropped in. */

/* Containment strategy cards (styles injected via JS, so the
   selector is the reliable hook). These rules had no background
   at all, so they are safe to fill solid. */
.contain-gap-display,
.contain-chart-wrap,
.contain-strategy {
    background-color: var(--bg-primary);
}
.contain-strategy.expanded {
    background-color: var(--bg-primary);
    background-image: linear-gradient(rgba(0, 240, 255, 0.02), rgba(0, 240, 255, 0.02));
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   Applies universally to keyboard, motion, and
   touch-target concerns. Layered on top of the
   earlier accessibility block (~line 2128) so
   newer requirements can land without rewriting
   what already works.
   ============================================ */

/* Modern focus outline for every interactive element.
   :focus-visible only paints when the user is navigating
   via keyboard, so mouse interactions stay unaffected. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[role="radio"]:focus-visible,
[role="listitem"]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.18);
}

/* Touch targets: on coarse pointers (mobile/tablets), buttons,
   links, and form controls must meet the 44x44 CSS-pixel
   minimum per WCAG 2.5.5. Apply only to things that already
   look like controls so we do not inflate microcopy chips. */
@media (hover: none) and (pointer: coarse) {
    button:not(.threat-share-btn),
    .btn,
    .cf-btn,
    .arg-btn,
    .tm-btn,
    .cite-tool-btn,
    .section-back-btn,
    input[type="button"],
    input[type="submit"],
    a.blog-back,
    a.export-btn {
        min-height: 44px;
        min-width: 44px;
    }
    .tm-tick {
        min-height: 32px;
        padding: 8px 6px;
    }
}

/* Reduced motion: extend the existing block to cover canvas
   animations, the custom cursor system, and background orbs.
   Canvas loops are driven by JS, but hiding/muting them via
   CSS prevents the visual churn. */
@media (prefers-reduced-motion: reduce) {
    #bg-canvas,
    .scan-line,
    .scan-lines,
    .cursor-trail,
    .custom-cursor,
    .sing-cracks,
    .sing-flash {
        display: none !important;
    }
    body { cursor: auto !important; }
    .floops-bar-fill,
    .factor-fill,
    .threat-meter-fill,
    .contain-strategy-fill {
        transition: none !important;
    }
    .tm-slider::-webkit-slider-thumb { box-shadow: none; }
    .glitch { animation: none !important; text-shadow: none; }
}

/* High-contrast helpers for users with forced-colors mode
   (Windows High Contrast, similar). Borders still have to be
   visible, so switch from custom colors to system colors. */
@media (forced-colors: active) {
    .threat-card,
    .post-card,
    .cf-card,
    .scenario-card,
    .floops-row,
    .arg-option,
    .tm-panel,
    .article-abstract,
    .article-references,
    .article-sidebar {
        border-color: CanvasText;
    }
    a, a:visited { color: LinkText; }
    button, .cf-btn, .arg-btn, .tm-btn { color: ButtonText; }
}

