/* STYLING SYSTEM FOR ZHANE GREY'S SYSTEMS DASHBOARD */

:root {
    --bg-dark: #07090e;
    --card-bg: rgba(13, 20, 35, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.35);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-blue: #3b82f6;
    --color-blue-glow: rgba(59, 130, 246, 0.15);
    --color-purple: #8b5cf6;
    --color-purple-glow: rgba(139, 92, 246, 0.15);
    --color-green: #10b981;
    --color-green-glow: rgba(16, 185, 129, 0.15);
    --color-gold: #f59e0b;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', 'IBM Plex Mono', Consolas, monospace;

    --cursor-x: 50vw;
    --cursor-y: 50vh;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Ambient glow backgrounds */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.blur-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    mix-blend-mode: screen;
}

.blur-blue {
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, var(--color-blue) 0%, transparent 70%);
}

.blur-purple {
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, var(--color-purple) 0%, transparent 70%);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}

.ambient-code-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.16;
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
    isolation: isolate;
}

.ambient-code-lines::before {
    content: "";
    position: absolute;
    left: var(--cursor-x);
    top: var(--cursor-y);
    width: 36rem;
    height: 36rem;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(125, 211, 252, 0.12), transparent 18%),
        radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 46%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: -1;
}

body.ambient-pointer-active .ambient-code-lines::before {
    opacity: 1;
}

.ambient-code-lines span {
    position: absolute;
    left: -42ch;
    color: rgba(125, 211, 252, 0.52);
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 0.45vw + 0.45rem, 0.9rem);
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 0 16px rgba(59, 130, 246, 0.32);
    animation: ambientCodeDrift 24s linear infinite;
}

.ambient-code-lines .ambient-line:nth-child(1) { top: 7%; animation-delay: -2s; }
.ambient-code-lines .ambient-line:nth-child(2) { top: 15%; animation-delay: -12s; animation-duration: 28s; }
.ambient-code-lines .ambient-line:nth-child(3) { top: 23%; animation-delay: -7s; animation-duration: 31s; color: rgba(191, 219, 254, 0.46); }
.ambient-code-lines .ambient-line:nth-child(4) { top: 31%; animation-delay: -16s; animation-duration: 26s; }
.ambient-code-lines .ambient-line:nth-child(5) { top: 40%; animation-delay: -5s; animation-duration: 34s; }
.ambient-code-lines .ambient-line:nth-child(6) { top: 49%; animation-delay: -20s; animation-duration: 30s; color: rgba(251, 191, 36, 0.38); }
.ambient-code-lines .ambient-line:nth-child(7) { top: 58%; animation-delay: -10s; animation-duration: 36s; }
.ambient-code-lines .ambient-line:nth-child(8) { top: 67%; animation-delay: -24s; animation-duration: 32s; }
.ambient-code-lines .ambient-line:nth-child(9) { top: 76%; animation-delay: -18s; animation-duration: 37s; color: rgba(209, 250, 229, 0.4); }
.ambient-code-lines .ambient-line:nth-child(10) { top: 84%; animation-delay: -14s; animation-duration: 33s; }
.ambient-code-lines .ambient-line:nth-child(11) { top: 91%; animation-delay: -26s; animation-duration: 39s; }
.ambient-code-lines .ambient-line:nth-child(12) { top: 96%; animation-delay: -8s; animation-duration: 35s; color: rgba(251, 113, 133, 0.34); }

.ambient-command-ghost {
    top: var(--ambient-top, 50%);
    color: rgba(203, 213, 225, 0.34);
    animation: ambientCommandEcho var(--ambient-duration, 18s) linear forwards !important;
    filter: blur(0.1px);
    opacity: 0;
}

.ambient-command-ghost.ambient-system { color: rgba(96, 165, 250, 0.36); }
.ambient-command-ghost.ambient-success { color: rgba(52, 211, 153, 0.32); }
.ambient-command-ghost.ambient-warning { color: rgba(251, 191, 36, 0.32); }
.ambient-command-ghost.ambient-error { color: rgba(251, 113, 133, 0.36); }

@keyframes ambientCodeDrift {
    0% { transform: translateX(0); opacity: 0; }
    8% { opacity: 0.9; }
    90% { opacity: 0.65; }
    100% { transform: translateX(calc(100vw + 84ch)); opacity: 0; }
}

@keyframes ambientCommandEcho {
    0% { transform: translateX(-18vw) translateY(0); opacity: 0; }
    16% { opacity: 0.58; }
    78% { opacity: 0.28; }
    100% { transform: translateX(calc(112vw + 72ch)) translateY(-6px); opacity: 0; }
}

/* Dashboard Layout */
.dashboard-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100vh;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    right: 1rem;
    bottom: calc(100% + 0.75rem);
    width: min(340px, calc(100vw - 2rem));
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 10px;
    background: rgba(5, 10, 20, 0.94);
    color: var(--text-primary);
    font-size: 0.74rem;
    line-height: 1.45;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    transform: translateY(8px);
}

[data-tooltip]::after {
    content: "?";
    top: 0.75rem;
    right: 0.75rem;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.42);
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.5;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-within::before {
    opacity: 1;
    transform: translateY(0);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-within::after {
    opacity: 1;
}

/* Glassmorphism panel base */
.glassmorphic {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glassmorphic:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* App Header styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-left h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-left .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.system-badge {
    background: rgba(59, 130, 246, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-blue);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.github-badge {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.github-badge:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1.5px);
}

.audit-badge {
    background: rgba(168, 85, 247, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #c084fc;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-proof-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
    max-width: 930px;
}

.proof-links,
.social-links,
.language-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.proof-links {
    padding-right: 0.55rem;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 2.1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: all 0.25s ease;
}

.social-link-button {
    cursor: pointer;
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.34);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.08));
}

.proof-link {
    color: #e0f2fe;
    border-color: rgba(56, 189, 248, 0.34);
    background: rgba(14, 165, 233, 0.11);
}

.social-icon {
    width: 0.88rem;
    height: 0.88rem;
    fill: currentColor;
    flex: 0 0 auto;
}

.brand-icon {
    width: 1.18rem;
    height: 1.18rem;
    border-radius: 999px;
    background: #ffffff;
    object-fit: cover;
    padding: 0.12rem;
    box-shadow: 0 0 0 1px rgba(202, 138, 4, 0.3), 0 0 16px rgba(202, 138, 4, 0.16);
}

.umattr-link {
    color: #fde68a;
    border-color: rgba(202, 138, 4, 0.42);
    background: linear-gradient(135deg, rgba(202, 138, 4, 0.18), rgba(59, 130, 246, 0.08));
}

.role-label {
    padding-left: 0.38rem;
    border-left: 1px solid rgba(253, 230, 138, 0.3);
    color: #f8fafc;
    font-size: 0.66rem;
    font-weight: 800;
}

.social-link:hover {
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.11);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.12);
}

.language-badges {
    flex: 1 1 100%;
    margin-top: 0.1rem;
}

.language-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.24);
    background: rgba(15, 23, 42, 0.76);
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.language-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    margin-right: 0.38rem;
    background: #94a3b8;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.lang-js::before { background: #facc15; }
.lang-css::before { background: #38bdf8; }
.lang-html::before { background: #fb923c; }
.lang-python::before { background: linear-gradient(135deg, #60a5fa 0 50%, #facc15 50%); }
.lang-ts::before { background: #60a5fa; }
.lang-solidity::before { background: #cbd5e1; }
.lang-shell::before { background: #34d399; }
.lang-md::before { background: #a78bfa; }

@media (forced-colors: active) {
    .header-left h1 {
        background: none;
        -webkit-text-fill-color: CanvasText;
    }
}

.social-link:focus-visible,
.github-badge:focus-visible,
.selector-card:focus-visible,
.hotspot:focus-visible,
.btn-dock:focus-visible,
.drawer-tab:focus-visible,
.btn-copy-code:focus-visible,
.btn-close-drawer:focus-visible,
.tour-skip:focus-visible,
.tour-next:focus-visible,
.tour-dot:focus-visible,
.btn-secondary:focus-visible,
.btn-primary:focus-visible,
.btn-inspect-proof:focus-visible,
.btn-compile-resume:focus-visible,
.suggestion-chip:focus-visible,
.side-suggestion-chip:focus-visible {
    outline: 3px solid #f8fafc;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.35);
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.stats-strip {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.drawer-source-tabs {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 0.5rem;
}

.drawer-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.stat-box .label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-box .value {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.highlight-blue {
    color: var(--color-blue);
}

.highlight-green {
    color: var(--color-green);
}

/* Pulsing Online Indicator */
.pulse-dot {
    position: relative;
    padding-left: 1rem;
    color: var(--text-primary);
}

.pulse-dot::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--color-green);
    border-radius: 50%;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    left: -2px;
    top: calc(50% - 6px);
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-green);
    border-radius: 50%;
    animation: ripple 1.8s infinite ease-out;
    opacity: 0;
}

@keyframes ripple {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Main Grid Architecture */
.dashboard-grid {
    display: grid;
    grid-template-columns: 340px 1fr 340px;
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: 300px 1fr;
    }
    .control-panel {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .nav-panel, .stage-panel, .control-panel {
        grid-column: span 1;
    }
}

/* Panel Structure */
.panel {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

.panel-header {
    margin-bottom: 1.25rem;
}

.panel-header .kicker {
    font-size: 0.75rem;
    color: #9cc8ff;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.25rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.panel-note {
    margin: -0.5rem 0 1rem;
    font-size: 0.95rem;
    line-height: 1.62;
    color: #d5e1f5;
    max-width: 26rem;
}

/* Selector Card button stack styling */
.selector-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: auto;
}

.selector-card {
    background: rgba(8, 15, 30, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.22);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
}

.selector-card:hover {
    background: rgba(13, 26, 48, 0.9);
    border-color: rgba(147, 197, 253, 0.38);
}

.selector-card.active {
    background: linear-gradient(135deg, rgba(22, 48, 89, 0.92), rgba(8, 18, 36, 0.92));
    border-color: var(--color-blue);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.16), inset 4px 0 0 rgba(59, 130, 246, 0.65);
}

.selector-card.active::after {
    content: "ACTIVE";
    position: absolute;
    top: 0.65rem;
    right: 0.7rem;
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(191, 219, 254, 0.38);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: #dbeafe;
    font-family: var(--font-mono);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.selector-card .card-num {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: #9cc8ff;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(147, 197, 253, 0.22);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.selector-card.active .card-num {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.24);
    border-color: rgba(147, 197, 253, 0.48);
}

.selector-card .card-content h3 {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.28;
}

.selector-card .card-content p {
    font-size: 1rem;
    color: #eef6ff;
    line-height: 1.65;
}

.selector-card .active-indicator {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.selector-card.active .active-indicator {
    opacity: 1;
}

/* Utility Card styling */
.utility-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.utility-card .kicker {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.directory-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dir-item {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #d5e1f5;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.65rem;
    min-height: 0;
    padding: 0.55rem;
    border: 1px solid rgba(147, 197, 253, 0.12);
    border-radius: 9px;
    background: rgba(8, 15, 30, 0.42);
}

.dir-item > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.dir-icon {
    display: inline-grid;
    place-items: center;
    min-width: 2.25rem;
    height: 1.25rem;
    border: 1px solid rgba(147, 197, 253, 0.32);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 1.45rem;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.26);
    background: rgba(15, 23, 42, 0.86);
    color: #f1f5f9;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: normal;
    line-height: 1.25;
}

.tech-badge::before {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    margin-right: 0.3rem;
    border-radius: 2px;
    background: #94a3b8;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.tech-docs::before { background: #facc15; }
.tech-react::before { background: #38bdf8; }
.tech-api::before { background: #34d399; }
.tech-foundry::before { background: #cbd5e1; }

.pill-sm {
    font-size: 0.6rem;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(203, 213, 225, 0.28);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    color: #cbd5e1;
}

/* MIDDLE STAGE AREA (The diagram viewer) */
.stage-panel {
    display: flex;
    flex-direction: column;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge-row {
    display: flex;
    gap: 0.5rem;
}

.pill-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

/* Image frame and viewer stage */
.viewer-frame {
    position: relative;
    background: #ffffff; /* Fallback light background */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    min-height: 480px;
    max-height: 520px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.stage-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(11, 24, 45, 0.88), rgba(8, 14, 27, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stage-summary-copy .kicker {
    font-size: 0.72rem;
    color: var(--color-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.3rem;
}

.stage-summary-copy p {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #dce8f8;
    max-width: 34rem;
}

.map-read-steps {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.map-read-steps li {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(147, 197, 253, 0.26);
    background: rgba(9, 18, 34, 0.92);
    color: #f8fafc;
    white-space: nowrap;
}

.map-read-steps li:first-child {
    border-radius: 999px 0 0 999px;
}

.map-read-steps li:last-child {
    border-radius: 0 999px 999px 0;
}

.map-read-steps li + li {
    margin-left: -1px;
}

.map-read-steps li + li::before {
    content: ">";
    position: absolute;
    left: -0.35rem;
    color: #93c5fd;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 900;
}

.map-read-steps span {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.22);
    color: #dbeafe;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 900;
}

.map-read-steps strong {
    font-size: 0.8rem;
    font-weight: 850;
}

/* Diagram viewer intentionally stays in white mode for maximum contrast. */

.image-wrapper {
    position: relative;
    display: inline-flex; /* Shrink strictly to bounding box of activeDiagram */
    max-width: 100%;
    max-height: 450px;
    align-items: center;
    justify-content: center;
}

#activeDiagram {
    display: block;
    max-width: 100%;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.3s ease, filter 0.4s ease;
}

/* Interactive hotspots styling */
.hotspot-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass to wrapper if needed, or overlay captures them */
}

.hotspot-connectors {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 18;
}

.hotspot-connector {
    stroke: rgba(147, 197, 253, 0.28);
    stroke-width: 1.4;
    stroke-dasharray: 5 7;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.16));
    transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.25s ease;
}

.hotspot-connector.active {
    stroke: rgba(45, 212, 191, 0.78);
    stroke-width: 2.2;
    stroke-dasharray: 0;
}

.hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(7, 9, 14, 0.9);
    border: 2px solid var(--color-blue);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    user-select: none;
    z-index: 22;
}

.hotspot::marker {
    display: none;
}

.hotspot::before {
    display: none; /* Hide the old center dot since we now display numbers! */
}

.hotspot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-blue);
    animation: pulseGlow 2s infinite ease-out;
    pointer-events: none;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.hotspot:hover {
    background: var(--color-blue);
    border-color: #ffffff;
    color: #07090e;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 15px var(--color-blue), 0 0 5px rgba(255,255,255,0.5);
}

.hotspot.active {
    background: var(--color-green);
    border-color: #ffffff;
    border-width: 3px;
    color: #07090e;
    box-shadow: 0 0 15px var(--color-green), 0 0 5px rgba(255,255,255,0.5);
}

.hotspot.active .hotspot-num::after {
    content: "";
    margin-left: 0;
    font-size: 0;
    line-height: 1;
}

.hotspot.active::after {
    border-color: var(--color-green);
}

.hotspot .hotspot-label {
    position: absolute;
    left: calc(100% + 0.55rem);
    top: 50%;
    transform: translateY(-50%);
    width: max-content;
    max-width: 132px;
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 999px;
    background: rgba(7, 9, 14, 0.72);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.58rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
    border-color: rgba(45, 212, 191, 0.35);
    color: var(--text-primary);
}

.hotspot.inline-node {
    width: 24px;
    height: 24px;
    background: rgba(7, 9, 14, 0.82);
    border-width: 2px;
}

.hotspot.inline-node .hotspot-label {
    display: none;
}

/* Stage details explanation footer */
.stage-footer {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.focus-details {
    flex: 1;
}

.focus-details .kicker {
    font-size: 0.7rem;
    color: var(--color-blue);
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.15rem;
}

.focus-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.focus-details p {
    font-size: 0.94rem;
    color: #d5e1f5;
    line-height: 1.58;
}

.focus-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 0.25rem;
}

.focus-metrics .metric-item {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.focus-metrics .metric-item strong {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* RIGHT PANEL: Execution console & Logs */
.action-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.action-card .card-desc {
    font-size: 0.94rem;
    color: #d5e1f5;
    line-height: 1.58;
    margin-bottom: 1rem;
}

.btn-refresh {
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-refresh:active {
    transform: translateY(0);
}

/* Log Terminal component */
.terminal-container {
    background: #020408;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 450px;
    margin-bottom: 1.5rem;
    min-width: 0;
}

.stage-terminal {
    height: clamp(340px, 38vh, 480px);
    margin-top: 1rem;
    margin-bottom: 0;
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(147, 197, 253, 0.08);
}

.side-terminal {
    height: min(470px, 54vh);
    min-height: 360px;
    margin-bottom: 1rem;
    border-color: rgba(125, 211, 252, 0.18);
}

.side-terminal .drag-handle {
    display: none;
}

.side-terminal-mark {
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(147, 197, 253, 0.3);
    color: #bfdbfe;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 900;
}

.side-chat-badge {
    border: 1px solid rgba(16, 185, 129, 0.34);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    background: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-header .term-title {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: #cbd5e1;
}

.term-dots {
    display: flex;
    gap: 0.3rem;
}

.term-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.terminal-body {
    padding: 0.8rem;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: var(--font-mono);
    font-size: 0.94rem;
    line-height: 1.68;
    flex-grow: 1;
    min-width: 0;
}

.log-line {
    margin-bottom: 0.4rem;
    padding-left: 0.55rem;
    border-left: 2px solid rgba(148, 163, 184, 0.18);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.log-line.system { color: #93c5fd; border-left-color: rgba(147, 197, 253, 0.5); }
.log-line.info { color: #cbd5e1; }
.log-line.success { color: #a7f3d0; border-left-color: rgba(167, 243, 208, 0.52); }
.log-line.warning { color: #fde68a; border-left-color: rgba(253, 230, 138, 0.58); }
.log-line.error { color: #fecaca; border-left-color: rgba(254, 202, 202, 0.65); background: rgba(248, 113, 113, 0.06); }

.terminal-empty-state {
    min-height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    padding: 1.5rem;
    border: 1px dashed rgba(147, 197, 253, 0.28);
    border-radius: 12px;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.14), transparent 48%), rgba(9, 18, 34, 0.58);
    color: #d1d9e8;
    text-align: center;
}

.terminal-empty-state .empty-kicker {
    color: #93c5fd;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.terminal-empty-state strong {
    color: #f8fafc;
    font-size: 1rem;
}

.terminal-empty-state p {
    max-width: 34rem;
    color: #cbd5e1;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    line-height: 1.5;
}

.terminal-empty-state code {
    color: #bfdbfe;
    font-family: var(--font-mono);
}

/* Drift Monitor card */
.drift-monitor {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 20%, rgba(59, 130, 246, 0.2), transparent 34%),
        radial-gradient(circle at 88% 38%, rgba(16, 185, 129, 0.16), transparent 30%),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 12px;
    padding: 1rem;
    margin-top: auto;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32), inset 0 0 32px rgba(59, 130, 246, 0.04);
    isolation: isolate;
}

.drift-monitor::before {
    content: "";
    position: absolute;
    inset: -45%;
    background: conic-gradient(from 120deg, transparent, rgba(59, 130, 246, 0.16), transparent 26%, rgba(16, 185, 129, 0.12), transparent 52%);
    animation: monitorSweep 8s linear infinite;
    z-index: -2;
}

.drift-monitor::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 42%, rgba(16, 185, 129, 0.04));
    z-index: -1;
}

.monitor-orbit {
    position: absolute;
    inset: 0.5rem;
    border-radius: 10px;
    border: 1px dashed rgba(125, 211, 252, 0.13);
    animation: orbitPulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

.drift-monitor .monitor-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.62rem;
}

.drift-monitor .monitor-header strong {
    color: var(--color-green);
    text-shadow: 0 0 18px rgba(16, 185, 129, 0.42);
    animation: strictPulse 2.5s ease-in-out infinite;
}

.progress-track {
    position: relative;
    background: rgba(4, 9, 18, 0.76);
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.7rem;
    border: 1px solid rgba(147, 197, 253, 0.12);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55);
}

.progress-track::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, transparent 0 12px, rgba(255, 255, 255, 0.07) 12px 13px);
    opacity: 0.45;
}

.progress-scan {
    position: absolute;
    top: -80%;
    bottom: -80%;
    width: 34%;
    left: -36%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-24deg);
    animation: progressScan 2.2s ease-in-out infinite;
    z-index: 3;
}

.progress-bar {
    position: relative;
    background: linear-gradient(90deg, var(--color-blue) 0%, #22d3ee 42%, var(--color-green) 100%);
    background-size: 180% 100%;
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
    animation: verificationFlow 3s linear infinite;
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.34), 0 0 28px rgba(16, 185, 129, 0.2);
}

.drift-monitor .monitor-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.monitor-pulse-row {
    display: inline-flex;
    gap: 0.24rem;
    align-items: center;
}

.monitor-pulse-row i {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--color-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.52);
    animation: monitorDot 1.2s ease-in-out infinite;
}

.monitor-pulse-row i:nth-child(2) { animation-delay: 0.18s; }
.monitor-pulse-row i:nth-child(3) { animation-delay: 0.36s; }

.text-green {
    color: var(--color-green);
}

@keyframes monitorSweep {
    0% { transform: rotate(0deg); opacity: 0.5; }
    50% { opacity: 0.85; }
    100% { transform: rotate(360deg); opacity: 0.5; }
}

@keyframes orbitPulse {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.015); }
}

@keyframes strictPulse {
    0%, 100% { opacity: 0.86; }
    50% { opacity: 1; }
}

@keyframes progressScan {
    0% { left: -36%; opacity: 0; }
    20% { opacity: 0.85; }
    80% { opacity: 0.65; }
    100% { left: 104%; opacity: 0; }
}

@keyframes verificationFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 180% 50%; }
}

@keyframes monitorDot {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(-2px); opacity: 1; }
}

/* APP LEGEND GRID FOOTER */
.app-legend {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.legend-intro h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.legend-intro p {
    font-size: 1rem;
    color: #d5e1f5;
    max-width: 1200px;
    line-height: 1.65;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.legend-cell {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    gap: 0.8rem;
}

.swatch {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.swatch-blue { background-color: var(--color-blue); }
.swatch-green { background-color: var(--color-green); }
.swatch-purple { background-color: var(--color-purple); }
.swatch-gold { background-color: var(--color-gold); }

.cell-content strong {
    font-size: 0.98rem;
    font-weight: 750;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.2rem;
}

.cell-content p {
    font-size: 0.9rem;
    color: #d5e1f5;
    line-height: 1.55;
}

.tour-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 50% 24%, rgba(59, 130, 246, 0.18), transparent 34%),
        rgba(3, 7, 15, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

.tour-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tour-card {
    width: min(640px, 100%);
    padding: 1.6rem;
    border-color: rgba(59, 130, 246, 0.26);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58), 0 0 80px rgba(59, 130, 246, 0.1);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
}

.tour-overlay.active .tour-card {
    transform: translateY(0) scale(1);
}

.tour-progress {
    float: right;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: rgba(59, 130, 246, 0.09);
    color: #bfdbfe;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.tour-card h2 {
    clear: both;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    letter-spacing: -0.04em;
}

.tour-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.tour-callout {
    margin: 1.25rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-left: 4px solid var(--color-green);
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.07);
    color: #d1fae5;
    font-size: 0.86rem;
    font-weight: 650;
}

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tour-skip,
.tour-next {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.62rem 1rem;
    font-family: var(--font-sans);
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tour-skip {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.tour-next {
    color: #04111f;
    background: linear-gradient(135deg, #60a5fa, #2dd4bf);
    box-shadow: 0 12px 30px rgba(45, 212, 191, 0.16);
}

.tour-skip:hover,
.tour-next:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.35);
}

.tour-step-dots {
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
}

.tour-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    cursor: pointer;
}

.tour-dot.active {
    width: 24px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-green));
}

/* Frame Scanline animation effect */
.frame-scanline {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(59, 130, 246, 0.02) 10%,
        rgba(59, 130, 246, 0.04) 50%,
        rgba(59, 130, 246, 0.02) 90%,
        rgba(255, 255, 255, 0) 100%
    );
    height: 40px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.7;
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    0% { transform: translateY(-40px); }
    100% { transform: translateY(520px); }
}

/* --- CONSOLE TABS & RECRUITER REPORT STYLING --- */
.console-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1.25rem;
}

.console-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.console-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.console-tab.active {
    color: var(--color-blue);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: flex;
    opacity: 1;
}

.report-container.tab-content:not(.active) {
    display: none;
    opacity: 0;
}

/* Recruiter Report Paper styling */
.report-container {
    display: block;
    height: 450px;
    margin-bottom: 1.5rem;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(2, 4, 8, 0.75);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.report-container.active {
    display: block !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.report-container::-webkit-scrollbar {
    width: 6px;
}

.report-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.report-paper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
}

.report-paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.5rem;
    margin-bottom: 0.2rem;
}

.report-paper-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.report-date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.report-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    transition: background-color 0.25s ease;
}

.report-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.report-card.highlighted {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--color-blue);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.08);
}

.report-card.highlighted::before {
    background-color: var(--color-blue);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.report-card-header h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.report-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.report-status.pass {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.report-status.warn {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-gold);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.report-status.fail {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.report-card-body p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.report-hashes {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Redaction Split-Pane */
.redaction-split {
    display: flex;
    flex-direction: column; /* Stacked vertically to prevent cramping in the 300px sidebar */
    gap: 0.5rem;
    width: 100%;
}

.redaction-pane {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.redaction-pane.raw {
    border-left: 2px solid rgba(245, 158, 11, 0.5);
}

.redaction-pane.sanitized {
    border-left: 2px solid rgba(16, 185, 129, 0.5);
}

.pane-title {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.redaction-pane pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.redaction-pane code {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.redaction-pane.sanitized code {
    color: var(--color-green);
}

/* Redaction Scanner Laser animation */
.redaction-split-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.scanner-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-green), transparent);
    opacity: 0;
    box-shadow: 0 0 10px var(--color-green);
    pointer-events: none;
}

.scanner-bar.scanning {
    animation: scanVertical 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scanVertical {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.redact-select:focus {
    border-color: var(--color-blue) !important;
}

.btn-redact-scan:hover {
    background: var(--color-purple) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Terminal Suggestions Quick-Bar */
.terminal-suggestions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.suggestions-label {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.2rem;
    user-select: none;
}

.suggestion-chip,
.side-suggestion-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #dbeafe;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    min-height: 28px;
    padding: 0.22rem 0.52rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.suggestion-chip:hover,
.side-suggestion-chip:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.suggestion-chip:active,
.side-suggestion-chip:active {
    transform: translateY(0);
}

/* --- TERMINAL INPUT STYLING --- */
.terminal-input-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
}

.terminal-prompt {
    color: var(--color-green);
    font-weight: bold;
    user-select: none;
}

#terminalPromptInput,
#sideTerminalPromptInput {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    caret-color: var(--color-green);
}

#terminalPromptInput::placeholder,
#sideTerminalPromptInput::placeholder {
    color: #94a3b8;
    opacity: 0.88;
}

/* --- INTERACTIVE CHECKBOXES STYLING --- */
.gap-checkbox-label input[type="checkbox"] {
    position: relative;
    width: 14px;
    height: 14px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.3);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-checkbox-label input[type="checkbox"]:hover {
    border-color: var(--color-blue);
    background: rgba(59, 130, 246, 0.05);
}

.gap-checkbox-label input[type="checkbox"]:checked {
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.gap-checkbox-label input[type="checkbox"]::after {
    content: "";
    font-size: 9px;
    color: #fff;
    font-weight: 900;
    display: none;
}

.gap-checkbox-label input[type="checkbox"]:checked::after {
    display: block;
}

/* Specific gap colors */
#chkGap2:checked {
    background: var(--color-purple);
    border-color: var(--color-purple);
}

/* Smooth transitions when checking gaps */
.gaps-checklist label {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gaps-checklist label:hover {
    transform: translateX(2px);
    color: var(--text-primary);
}

.gap-value {
    font-size: 0.65rem;
    margin-left: 0.25rem;
    opacity: 0.85;
}

/* --- PREMIUM RECRUITER MODULES STYLING --- */

/* 1. Dynamic Code Drawer */
.code-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 10, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.code-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 580px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.96);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.code-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.drawer-tag {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--color-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#drawerFileName {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-close-drawer {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    padding: 0;
}

.btn-close-drawer:hover {
    color: #ff4b4b;
}

.drawer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.file-path-indicator {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #cbd5e1;
}

.btn-copy-code {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #dbeafe;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-code:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.drawer-pre {
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.drawer-pre code {
    font-family: var(--font-mono) !important;
    font-size: 0.84rem !important;
    line-height: 1.58;
    color: #d1d5db;
    white-space: pre;
    display: block;
}

/* 2. Interactive SVG Graph */
.svg-graph-container {
    margin-top: 0.5rem;
}

.graph-node {
    cursor: pointer;
    transition: all 0.2s ease;
}

.graph-node:hover {
    r: 6.5;
    fill: #ffffff !important;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

.graph-tooltip strong {
    color: var(--color-blue);
    display: block;
    margin-bottom: 0.15rem;
}

.graph-tooltip .highlight {
    color: var(--color-green);
    font-weight: 700;
}

/* 3. Resume Compiler Modal */
.compiler-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 10, 0.75);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compiler-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.compiler-modal {
    width: 440px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.compiler-modal-overlay.active .compiler-modal {
    transform: scale(1);
}

.compiler-modal-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.compiler-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--text-primary);
    margin: 0;
}

.pulse-ring {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.pulse-ring.green {
    background-color: var(--color-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseRing 1.6s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.compiler-console {
    background: #04060a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.6rem;
    height: 120px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.console-line {
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.console-line.system { color: #f59e0b; }
.console-line.info { color: #60a5fa; }
.console-line.success { color: #34d399; }
.console-line.active { color: #3b82f6; }

/* Glowing Conic Border & Focus Animation */
.glassmorphic {
    position: relative;
    background: var(--card-bg);
    z-index: 1;
}

.report-card.highlighted {
    border-color: transparent !important;
    background: rgba(10, 15, 30, 0.8) !important;
}

.report-card.highlighted::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple), var(--color-green));
    z-index: -1;
    opacity: 0.85;
    animation: borderPulse 3s ease-in-out infinite alternate;
}

@keyframes borderPulse {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
    }
    100% {
        opacity: 0.95;
        box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
    }
}

.report-card.highlighted::before {
    background-color: var(--color-green) !important;
    box-shadow: 0 0 10px var(--color-green);
    width: 4px !important;
}

/* Responsive adjustments & coordinate lock for diagram hotspots */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 1rem !important;
        gap: 1rem !important;
    }
    
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding-bottom: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.6rem !important;
    }
    
    .header-left .subtitle {
        font-size: 0.85rem !important;
    }
    
    .header-meta {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }
    
    .stats-strip {
        width: 100%;
        gap: 0.75rem;
        flex-wrap: wrap !important;
    }
    
    .stat-box {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 120px;
        padding: 0.5rem 0.8rem;
    }
    
    .badge-row {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
    }
    
    .code-drawer {
        width: 100vw;
        max-width: 100vw !important;
    }
    
    .drawer-source-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 0.4rem !important;
        scrollbar-width: thin;
    }
    
    .drawer-source-tabs::-webkit-scrollbar {
        height: 3px;
    }
    
    .drawer-source-tabs::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 1.5px;
    }
    
    .drawer-tab {
        flex-shrink: 0 !important;
        display: inline-block !important;
    }
    
    #drawerFilePath {
        word-break: break-all !important;
        white-space: normal !important;
    }
    
    .viewer-frame {
        min-height: 280px !important;
        max-height: 380px !important;
        padding: 0.5rem !important;
    }
    
    .image-wrapper {
        max-height: 340px !important;
        width: 100%;
        position: relative;
    }
    
    #activeDiagram {
        max-height: 340px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
    
    /* Make hotspot coordinates adjust gracefully in smaller grid proportions */
    .hotspot {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.55rem !important;
    }

    .hotspot .hotspot-label {
        display: none;
    }
    
    .stage-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.8rem !important;
    }
    
    .focus-actions {
        width: 100%;
        align-items: flex-start !important;
    }
    
    .focus-metrics {
        align-items: flex-start !important;
        width: 100%;
    }
    
    .btn-inspect-proof {
        width: 100%;
        justify-content: center;
    }
    
    .terminal-container.undocked {
        width: calc(100vw - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
    }
    
    .app-legend {
        padding: 1rem !important;
        gap: 1rem !important;
    }

    [data-tooltip]::before {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }

    .tour-card {
        padding: 1.15rem;
    }

    .tour-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .header-left h1 {
        font-size: 1.35rem !important;
    }
    
    .stats-strip {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .stat-box {
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .ambient-code-lines {
        display: none;
    }
}

/* --- DRAG & DROP TERMINAL --- */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    user-select: none;
    transition: color 0.2s;
}
.drag-handle:hover {
    color: var(--text-primary);
}
.drag-handle:active {
    cursor: grabbing;
}
.btn-dock {
    background: transparent;
    color: var(--color-blue);
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.4rem;
    font-size: 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
}
.btn-dock:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-float {
    color: #dbeafe;
    border-color: rgba(147, 197, 253, 0.24);
    background: rgba(59, 130, 246, 0.08);
}

.terminal-container.undocked {
    position: fixed;
    z-index: 900;
    display: flex !important;
    opacity: 0.95 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.2s;
    width: min(680px, calc(100vw - 2rem));
    height: min(430px, calc(100vh - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
}
.terminal-container.dragging {
    opacity: 0.82 !important;
    pointer-events: none; /* Allows dropzone to detect mouse */
    transform: scale(1.02);
}

/* Snap to Hero Area */
.terminal-container.hero-snapped {
    position: relative;
    display: flex !important;
    opacity: 1 !important;
    order: 20;
    top: auto;
    bottom: auto;
    left: auto;
    width: 100% !important;
    height: clamp(260px, 36vh, 390px) !important;
    margin-top: 1rem;
    margin-bottom: 0;
    z-index: 50;
    box-shadow: 0 18px 48px rgba(0,0,0,0.58), 0 0 28px rgba(59, 130, 246, 0.18);
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.32);
    border-top: 2px solid var(--color-blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.terminal-container.hero-snapped .terminal-body {
    min-height: 0;
    font-size: 0.86rem;
}
.terminal-container.hero-snapped .terminal-input-row {
    font-size: 0.95rem;
}
.terminal-container.hero-snapped #terminalPromptInput,
.terminal-container.hero-snapped #sideTerminalPromptInput {
    font-size: 0.95rem;
}

.stage-panel {
    position: relative;
    overflow: hidden;
}

.stage-panel.drag-over::after {
    content: 'Drop Terminal Into Inline Tray';
    position: absolute;
    inset: auto 1.25rem 1.25rem 1.25rem;
    min-height: 110px;
    background: rgba(59, 130, 246, 0.2);
    border: 2px dashed var(--color-blue);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-blue);
    z-index: 40;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .stage-summary {
        grid-template-columns: 1fr;
    }

    .map-read-steps {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .header-proof-bar,
    .proof-links,
    .social-links,
    .language-badges {
        gap: 0.45rem;
    }

    .social-link {
        font-size: 0.68rem;
        padding: 0.22rem 0.65rem;
    }

    .panel-note {
        max-width: none;
    }

    .stage-summary {
        padding: 0.9rem;
    }

    .map-read-steps {
        align-items: center;
        flex-direction: row;
        gap: 0.35rem;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .map-read-steps li,
    .map-read-steps li:first-child,
    .map-read-steps li:last-child {
        flex: 0 0 auto;
        border-radius: 10px;
    }

    .map-read-steps li + li {
        margin-left: 0;
    }

    .map-read-steps li + li::before {
        display: none;
    }
}
