/* =========================================================
   DYNAMIC GLOBAL THEME SYSTEM
   ========================================================= */

/* Default Dark Theme (Obsidian & Electric Cyan) */
:root, [data-theme="dark"] {
    --bg-dark: #0B0C10;
    --panel-bg: rgba(31, 40, 51, 0.6);
    --panel-border: rgba(197, 198, 199, 0.15);
    --nav-bg: rgba(11, 12, 16, 0.9);
    --cyan: #66FCF1;
    --cyan-hover: #45a29e;
    --btn-primary-text: #0B0C10;
    --text-main: #FFFFFF;
    --text-muted: #C5C6C7;
    --danger: #FF4C4C;
    --gold: #FFBD2E;
    --terminal-bg: rgba(0, 0, 0, 0.5);
    --scrollbar-thumb: #2a3240;
    --scrollbar-thumb-hover: #3a4356;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --hero-glow: radial-gradient(circle, rgba(102,252,241,0.05) 0%, rgba(11,12,16,0) 70%);
}

/* Light Theme Overrides (High-Contrast Enterprise Palette) */
[data-theme="light"] {
    --bg-dark: #F4F6F9;
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(0, 0, 0, 0.12);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --cyan: #008B8B; /* Deep Teal Cyan for high readability on light backgrounds */
    --cyan-hover: #006666;
    --btn-primary-text: #FFFFFF; /* White text on dark cyan buttons */
    --text-main: #1A202C; /* Slate Dark */
    --text-muted: #4A5568; /* Mid Slate Gray */
    --danger: #E53E3E;
    --gold: #D69E2E;
    --terminal-bg: #1A202C; /* Keep terminals dark & developer-focused */
    --scrollbar-thumb: #CBD5E0;
    --scrollbar-thumb-hover: #A0AEC0;
    --hero-glow: radial-gradient(circle, rgba(0,139,139,0.08) 0%, rgba(244,246,249,0) 70%);
}
/* =========================================================
   UNIFIED THEME TRANSITION LOCKSTEP
   ========================================================= */
body,
.top-nav,
.glass-panel,
.panel-card-header,
.panel-row-strip,
.terminal-body,
.cyber-accordion,
.accordion-header,
.accordion-body,
.claim-card,
.metric-badge-cyan,
.raw-log-container,
.raw-log-table,
.raw-log-table th,
.raw-log-table tr,
.drift-analysis-table,
.drift-analysis-table th,
.drift-analysis-table tr,
.review-card,
.processing-pipeline,
.workflow-tab-header,
.status-badge {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
}

* {
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden;
    width: 100%;
}

    body, body.theme-body, body.premium-dark {
        background-color: var(--bg-dark);
        color: var(--text-main);
        font-family: var(--font-sans);
        margin: 0;
        line-height: 1.6;
        overflow-x: hidden;
        transition: background-color 0.25s ease, color 0.25s ease;
    }

/* NAVBAR & THEME TOGGLE BUTTON STYLES */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--cyan);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
    .theme-toggle-btn:hover {
        background: var(--panel-bg);
        border-color: var(--cyan);
        transform: scale(1.08);
    }

/* BUTTONS */
.btn-primary {
    background: var(--cyan);
    color: var(--btn-primary-text);
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
}
    .btn-primary:hover {
        background: var(--cyan-hover);
        color: var(--btn-primary-text);
        transform: translateY(-2px);
    }

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    padding: 16px 32px;
    font-size: 1rem;
}

    .btn-ghost:hover {
        background: var(--panel-bg);
        border-color: var(--text-muted);
    }

.text-gradient {
    background: linear-gradient(to right, #FFFFFF, var(--text-muted));
    -webkit-background-clip: text;
    color: transparent;
}

/* TYPOGRAPHY */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.subtitle-constrained {
    max-width: 700px;
    margin: 0 auto 3rem auto;
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cyan-dot {
    color: var(--cyan);
}

/* BUTTONS */
button, .btn-primary, .btn-ghost {
    font-family: var(--font-sans);
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.3);
}


.btn-wide {
    padding: 16px 48px;
}

.cta-spacing-top {
    margin-top: 48px;
}

/* HERO SECTION */
.hero-section {
    padding: 120px 0;
    text-align: center;
    position: relative;
}

    /* HERO SECTION GLOW */
    .hero-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: 50%;
        transform: translateX(-50%);
        width: 800px;
        height: 800px;
        background: var(--hero-glow);
        z-index: -1;
        pointer-events: none;
    }


.kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--panel-border);
    padding: 6px 16px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.25rem;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* GLASSMORPHISM PANELS */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* PARADOX SECTION */
.paradox-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, transparent, rgba(31, 40, 51, 0.2));
    border-top: 1px solid var(--panel-border);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.section-kicker {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 0.875rem;
    letter-spacing: 2px;
}

.executive-quote {
    border-left: 3px solid var(--cyan);
    padding-left: 24px;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-main);
    margin: 32px 0 0 0;
}

/* TERMINAL MOCKUP */
.split-visual {
    padding: 2px;
}

.terminal-header {
    background: rgba(0,0,0,0.4);
    padding: 12px 16px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px 12px 0 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

    .dot.red {
        background: #FF5F56;
    }

    .dot.yellow {
        background: #FFBD2E;
    }

    .dot.green {
        background: #27C93F;
    }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.terminal-body {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-muted);
    transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .terminal-body {
    background: #F8FAFC;
    border-color: rgba(0, 0, 0, 0.08);
}



    .terminal-body span {
        color: var(--cyan);
    }

    .terminal-body .error-text {
        color: var(--danger);
    }

/* 7 PILLARS LIST */
.diagnostic-section {
    padding: 100px 0;
}

.pillar-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.pillar-row {
    display: flex;
    gap: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--panel-border);
    transition: background 0.3s ease;
}

    .pillar-row:hover {
        background: rgba(31, 40, 51, 0.3);
        border-radius: 8px;
        padding: 32px 24px;
        margin: 0 -24px;
    }

.pillar-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--cyan);
    font-weight: 700;
    opacity: 0.8;
}

.pillar-content h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.pillar-content p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.pillar-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* FOOTER */
.site-footer {
    border-top: 1px solid var(--panel-border);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 80px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(102, 252, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(102, 252, 241, 0);
    }
}

/*@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}
*/
/* Responsive */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-cta-group {
        flex-direction: column;
    }

    .pillar-row {
        flex-direction: column;
        gap: 12px;
        padding: 24px 0;
    }

        .pillar-row:hover {
            padding: 24px 0;
            margin: 0;
            border-radius: 0;
        }
}
/* METHODOLOGY PAGE SPECIFICS */
.methodology-hero {
    padding: 80px 0 60px 0;
    border-bottom: 1px solid var(--panel-border);
}

    .methodology-hero .hero-title {
        font-size: 3rem;
    }

.tech-hub-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 64px;
    padding: 64px 24px 120px 24px;
    align-items: start;
}

/* Sticky Sidebar TOC */
.sticky-sidebar {
    position: sticky;
    top: 100px; /* Offset for the top nav */
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 24px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 16px;
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    letter-spacing: 1px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 12px;
}

    .toc-link:hover {
        color: var(--text-main);
        border-left-color: rgba(102, 252, 241, 0.4);
    }

    .toc-link.active {
        color: var(--cyan);
        border-left-color: var(--cyan);
    }

.sidebar-cta {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
}

    .sidebar-cta p {
        font-size: 0.875rem;
        margin-bottom: 16px;
    }

/* Main Content Styles */
.pillar-section {
    margin-bottom: 32px;
    scroll-margin-top: 120px;
}

.pillar-intro {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--panel-border);
    margin: 64px 0;
}

/* Lever Cards */
.lever-card {
    padding: 32px;
    margin-bottom: 24px;
}

    .lever-card h3 {
        font-size: 1.25rem;
        color: var(--text-main);
        margin-bottom: 8px;
    }

.lever-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* =========================================================
   PROOF POINTS / CODE SNIPPET BOX (THEME-AWARE)
   ========================================================= */

/* Default Dark Mode */
.proof-points {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 20px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.pp-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    margin-bottom: 16px;
    font-weight: 700;
}

.proof-points ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proof-points li {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 16px;
    border-left: 2px solid var(--cyan);
}

    .proof-points li span {
        color: var(--text-main);
        font-weight: 700;
        display: block;
        margin-bottom: 4px;
    }

/* 🚀 Light Mode Override: GitHub / Stripe Style Code Snippet */
[data-theme="light"] .proof-points {
    background: #F8FAFC; /* Soft, light slate code block */
    border: 1px solid rgba(0, 0, 0, 0.08); /* Crisp light border */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02); /* Subtle depth */
}
/* METHODOLOGY INLINE CTA BOX (THEME-AWARE) */
.inline-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    margin-top: 32px;
    background: linear-gradient(90deg, var(--panel-bg) 0%, rgba(102, 252, 241, 0.05) 100%);
    border-left: 4px solid var(--cyan);
    transition: background 0.25s ease;
}
[data-theme="light"] .inline-cta-box {
    background: linear-gradient(90deg, var(--panel-bg) 0%, rgba(0, 139, 139, 0.06) 100%);
}

.inline-cta-text h4 {
    margin: 0 0 4px 0;
    font-size: 1.125rem;
}

.inline-cta-text p {
    margin: 0;
    font-size: 0.875rem;
    max-width: 400px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .tech-hub-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sticky-sidebar {
        position: static;
        margin-bottom: 40px;
    }

    .inline-cta-box {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .inline-cta-text p {
        max-width: 100%;
    }
}

/* UPGRADED ENTERPRISE FOOTER */
.site-footer {
    border-top: 1px solid var(--panel-border);
    padding: 80px 0 32px 0;
    background: var(--bg-dark);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 64px;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 16px;
    max-width: 300px;
}

.footer-links h4, .footer-social h4 {
    color: var(--text-main);
    font-size: 0.875rem;
    margin-bottom: 24px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 16px;
    font-size: 0.875rem;
    transition: color 0.2s;
}

    .footer-links a:hover {
        color: var(--cyan);
    }

/* Social Icons Styling */
.social-icons {
    display: flex;
    gap: 16px;
}

    .social-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--panel-bg);
        color: var(--text-muted);
        border: 1px solid var(--panel-border);
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

        .social-icons a:hover {
            background: var(--cyan);
            color: var(--bg-dark);
            border-color: var(--cyan);
            transform: translateY(-4px); /* Slight lift effect */
        }

/* Bottom Legal Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--panel-border);
    padding-top: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

    .footer-bottom p {
        margin: 0;
        font-size: 0.75rem;
    }

.legal-links {
    display: flex;
    gap: 24px;
}

    .legal-links a {
        color: var(--text-muted);
        text-decoration: none;
        transition: color 0.2s;
    }

        .legal-links a:hover {
            color: var(--cyan);
        }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .footer-brand, .footer-links, .footer-social {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
/* CONTACT PAGE & TERMINAL FORM SPECIFICS */
.contact-section {
    padding: 80px 0 120px 0;
}

.terminal-form-wrapper {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
}

.terminal-form-body {
    padding: 32px;
}

.tech-form {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terminal-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.terminal-textarea-group {
    align-items: flex-start;
}

/* Label styling to look like code prompts */
.terminal-input-group label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--cyan);
    white-space: nowrap;
}

/* The actual input fields */
.terminal-input {
    flex: 1;
    min-width: 250px;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--text-muted);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

    .terminal-input:focus {
        outline: none;
        border-bottom: 1px solid var(--cyan);
        box-shadow: 0 4px 10px -8px var(--cyan);
        background: rgba(102, 252, 241, 0.05);
    }

    /* Style the placeholder text */
    .terminal-input::placeholder {
        color: rgba(197, 198, 199, 0.4);
        font-style: italic;
    }

/* Textarea specific */
textarea.terminal-input {
    resize: vertical;
    border: 1px dashed var(--text-muted);
    border-radius: 4px;
    padding: 12px;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
}

    textarea.terminal-input:focus {
        border: 1px solid var(--cyan);
    }

/* Terminal Submit Button */
.terminal-submit-group {
    margin-top: 24px;
    text-align: right;
}

.btn-terminal-submit {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .btn-terminal-submit:hover {
        background: var(--cyan);
        color: var(--bg-dark);
        box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
    }

/* Blinking cursor effect for the button */
.blink {
    animation: blinker 1s linear infinite;
    font-weight: bold;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .terminal-input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .terminal-input {
        width: 100%;
        box-sizing: border-box;
    }
}
/* LOGIN PAGE SPECIFICS */
.login-section {
    min-height: calc(100vh - 200px); /* Adjusts for header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: radial-gradient(circle at 50% 50%, rgba(102,252,241,0.03) 0%, var(--bg-dark) 100%);
}

.flex-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-top: 2px solid rgba(102, 252, 241, 0.4); /* Cyan accent line */
}

.login-header {
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--cyan);
    margin-bottom: 16px;
    opacity: 0.8;
}

.login-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Secure Inputs */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.label-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-flex label {
    margin-bottom: 0;
}

.forgot-link {
    font-size: 0.75rem;
    color: var(--cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* =========================================================
   SECURE INPUT FIELDS (THEME-AWARE)
   ========================================================= */

/* Dark Mode Defaults */
.secure-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 12px 12px 12px 40px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

    .secure-input:focus {
        outline: none;
        border-color: var(--cyan);
        background: rgba(102, 252, 241, 0.05);
        box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.15);
    }

    .secure-input::placeholder {
        color: var(--text-muted);
        opacity: 0.5;
    }

/* Light Mode Overrides: Crisp white input fields with subtle depth */
[data-theme="light"] .secure-input {
    background: #FFFFFF;
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

    [data-theme="light"] .secure-input:focus {
        background: #FFFFFF;
        border-color: var(--cyan);
        box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.15);
    }

    [data-theme="light"] .secure-input::placeholder {
        color: var(--text-muted);
        opacity: 0.75;
    }

/* Buttons */
.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    margin-top: 8px;
    font-size: 1rem;
    padding: 14px;
}

.sso-btn {
    padding: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sso-btn i {
    font-size: 1rem;
}

.sso-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--panel-border);
}

.auth-divider span {
    padding: 0 16px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Footer Subtext */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
}

    .login-footer p {
        font-family: var(--font-mono);
        font-size: 0.65rem;
        color: var(--text-muted);
        opacity: 0.7; /* Gives the faded look without breaking contrast */
        line-height: 1.6;
        margin: 0;
    }
.login-footer i {
    color: var(--cyan);
    margin-bottom: 4px;
}
.redacted {
    background-color: #1F2833; /* Deep slate color */
    color: transparent;
    user-select: none;
    border-radius: 2px;
    padding: 0 4px;
    letter-spacing: 2px;
}

    .redacted::after {
        content: '[REDACTED]';
        color: var(--danger); /* Warning Red */
        font-size: 0.65rem;
        font-family: var(--font-mono);
        margin-left: 4px;
    }

/* LEGAL PAGES (PRIVACY & TERMS) */
.legal-section {
    padding: 80px 0 120px 0;
}

.legal-container {
    max-width: 800px; /* Constrains line length for easy reading */
    margin: 0 auto;
}

.legal-header {
    text-align: center;
    margin-bottom: 48px;
}

.legal-content {
    padding: 48px;
    background: var(--panel-bg);
}

    .legal-content h2 {
        font-size: 1.25rem;
        color: var(--cyan);
        margin: 32px 0 16px 0;
        border-bottom: 1px solid var(--panel-border);
        padding-bottom: 8px;
    }

        .legal-content h2:first-child {
            margin-top: 0;
        }

    .legal-content p, .legal-content li {
        font-size: 0.95rem;
        color: var(--text-muted);
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .legal-content ul {
        margin-bottom: 24px;
        padding-left: 20px;
    }

    .legal-content strong {
        color: var(--text-main);
    }
/* REGISTRATION SPECIFICS */
.form-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

@media (max-width: 500px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}

/* PREMIUM AUTHENTICATION MODAL STYLING (Global) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-box.premium-locked {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-top: 4px solid var(--cyan);
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.authentication-icon i {
    font-size: 3rem;
    color: var(--cyan);
    margin-bottom: 24px;
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(102, 252, 241, 0.3));
}

.modal-box.premium-locked h3 {
    margin: 0 0 12px 0;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 800;
}

.modal-box.premium-locked p {
    font-size: 0.875rem;
    margin-bottom: 32px;
    color: var(--text-muted);
    line-height: 1.7;
}

.modal-cta-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .modal-cta-group button {
        width: 100%;
        justify-content: center;
        margin: 0;
        padding: 14px;
        font-size: 0.95rem;
    }

/* DASHBOARD PRE-DEPLOYMENT STATE */
.dashboard-section {
    padding: 60px 0;
}

.dashboard-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
}

.deploy-panel {
    padding: 48px;
    text-align: left;
}

.deploy-icon {
    font-size: 3rem;
    color: var(--cyan);
    margin-bottom: 24px;
    opacity: 0.9;
}

.deploy-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.deploy-features {
    list-style: none;
    padding: 0;
    margin: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .deploy-features li {
        color: var(--text-main);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 12px;
    }

.status-panel {
    padding: 32px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

    .status-item span:first-child {
        color: var(--text-muted);
    }

.status-value.green {
    color: #27C93F;
    font-weight: bold;
}

.status-value.yellow {
    color: #FFBD2E;
    font-weight: bold;
}

/* WIZARD SPECIFICS */
.wizard-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   REVIEW CARDS (THEME-AWARE)
   ========================================================= */
.review-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    padding: 16px;
    border-radius: 6px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

/* Light Mode Override: Crisp white card with soft border */
[data-theme="light"] .review-card {
    background: #FFFFFF;
    border-color: var(--panel-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.review-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

/* =========================================================
   CYBER CHECKBOX TOGGLE (PILL/CAPSULE RESTORATION)
   ========================================================= */
.cyber-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 40px !important;
    height: 20px !important;
    min-height: 20px !important; /* Overrides global 44px input height rule */
    max-height: 20px !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    outline: none;
    border: 1px solid var(--panel-border);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

    /* Off State Knob */
    .cyber-checkbox::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 14px;
        height: 14px;
        background: var(--text-muted);
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    /* Checked State Track */
    .cyber-checkbox:checked {
        background: rgba(102, 252, 241, 0.2);
        border-color: var(--cyan);
    }

        /* Checked State Knob Slide */
        .cyber-checkbox:checked::after {
            left: 22px;
            background: var(--cyan);
            box-shadow: 0 0 8px var(--cyan);
        }

/* Light Mode Overrides */
[data-theme="light"] .cyber-checkbox {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

    [data-theme="light"] .cyber-checkbox:checked {
        background: rgba(0, 139, 139, 0.15);
        border-color: var(--cyan);
    }

        [data-theme="light"] .cyber-checkbox:checked::after {
            background: var(--cyan);
            box-shadow: 0 0 8px rgba(0, 139, 139, 0.4);
        }
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* PILLAR PREVIEW MATRIX (DASHBOARD) */
.pillar-matrix-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--panel-border);
}

.matrix-header {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.pillar-matrix-grid {
    display: grid;
    /* Increased minimum width to 300px to spread them out over more rows */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.pillar-module {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: all 0.3s ease;
}

    /* The locked, greyed-out state */
    .pillar-module.locked {
        border: 1px dashed rgba(197, 198, 199, 0.2);
        opacity: 0.5;
    }

        .pillar-module.locked:hover {
            opacity: 0.8;
            border-color: rgba(197, 198, 199, 0.4);
        }

    /* The active/demo state */
    .pillar-module.active-preview {
        border: 1px solid rgba(102, 252, 241, 0.3);
        background: rgba(102, 252, 241, 0.03);
        box-shadow: 0 0 20px rgba(102, 252, 241, 0.05);
    }

        .pillar-module.active-preview .pillar-score {
            color: var(--cyan);
            text-shadow: 0 0 10px rgba(102, 252, 241, 0.4);
        }

.pillar-score {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap; /* Prevents [ -- ] from wrapping to two lines */
}

.pillar-details {
    display: flex;
    flex-direction: column;
}

.p-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.locked .p-num {
    color: var(--text-muted);
}

.p-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.lock-icon {
    position: absolute;
    right: 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
    opacity: 0.5;
}

/* PREMIUM TEASER CARD */
.premium-panel {
    position: relative;
    padding: 44px 32px;
    background: linear-gradient(180deg, var(--panel-bg) 0%, rgba(102, 252, 241, 0.05) 100%);
    border: 1px solid rgba(102, 252, 241, 0.2);
    overflow: hidden;
    transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .premium-panel {
    background: linear-gradient(180deg, var(--panel-bg) 0%, rgba(0, 139, 139, 0.06) 100%);
    border-color: rgba(0, 139, 139, 0.25);
}

.premium-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.premium-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .premium-feature-list li {
        font-size: 0.875rem;
        color: var(--text-main);
        display: flex;
        align-items: center;
    }

        .premium-feature-list li i {
            color: var(--cyan);
            margin-right: 10px;
            font-size: 0.75rem;
        }

.btn-premium-upgrade {
    border-color: var(--cyan);
    color: var(--cyan);
    transition: all 0.3s ease;
}

    .btn-premium-upgrade:hover {
        background: var(--cyan);
        color: var(--bg-dark);
        box-shadow: 0 0 15px rgba(102, 252, 241, 0.3);
    }

/* INTELLIGENCE PIPELINE */
.processing-pipeline {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 24px;
    margin: 32px 0 24px 0;
    transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .processing-pipeline {
    background: rgba(0, 139, 139, 0.04);
    border-color: rgba(0, 139, 139, 0.2);
}

.pipeline-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 1px;
    margin: 0 0 16px 0;
}

.pipeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.p-step {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.step-num {
    color: var(--cyan);
    font-weight: 700;
    margin-right: 8px;
    opacity: 0.7;
}

/* SCAN CONTEXT BOX */
.scan-context-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(102, 252, 241, 0.05) 0%, transparent 100%);
    border-left: 3px solid var(--cyan);
    border-radius: 0 4px 4px 0;
}

.context-icon {
    color: var(--cyan);
    font-size: 1.25rem;
    margin-top: 2px;
}

.scan-context-box p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.scan-context-box strong {
    color: var(--text-main);
}

/* Nice scrollbars (desktop) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--scrollbar-thumb-hover);
    }
/* DOSSIER CARDS */
.dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.dossier-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid rgba(197, 198, 199, 0.2);
}

    .dossier-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-top-color: var(--cyan);
    }

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dossier-name {
    margin: 0 0 4px 0;
    font-size: 1.125rem;
    color: var(--text-main);
}

.dossier-domain {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    /* NEW: Truncation logic */
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
    .dossier-domain:hover {
        color: var(--cyan);
    }

.dossier-score-badge {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--cyan);
}

.dossier-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 12px 0;
    border-top: 1px dashed var(--panel-border);
    border-bottom: 1px dashed var(--panel-border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* METHODOLOGY LEGEND (The Architecture Diagram) */
.extraction-architecture-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--panel-border);
    margin-bottom: 48px;
}

.matrix-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.architecture-flow {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.arch-row {
    display: grid;
    gap: 16px;
    width: 100%;
}

/* LARGE DESKTOP: Enforce a 4-column grid, automatically aligning left */
@media (min-width: 1200px) {
    .row-of-4, .row-of-3 {
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
        margin: 0;
    }
}

/* TABLET: Go to standard 3-column rows */
@media (min-width: 768px) and (max-width: 1199px) {
    .row-of-4, .row-of-3 {
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        margin: 0;
    }
}

/* MOBILE: Stack everything */
@media (max-width: 767px) {
    .row-of-4, .row-of-3 {
        grid-template-columns: 1fr;
        width: 100%;
        margin: 0;
    }
}

.arch-module {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 2px solid var(--cyan);
}

.mod-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
    opacity: 0.8;
}

.mod-details {
    display: flex;
    flex-direction: column;
}

.mod-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mod-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}


/* DOSSIER CARDS (Historical History) */
.dossier-section {
    margin-top: 48px;
}

.dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.dossier-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid rgba(197, 198, 199, 0.2);
}

    .dossier-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-top-color: var(--cyan);
    }

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dossier-name {
    margin: 0 0 4px 0;
    font-size: 1.125rem;
    color: var(--text-main);
}

.dossier-domain {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
}

    .dossier-domain i {
        font-size: 0.7rem;
        margin-left: 4px;
    }

    .dossier-domain:hover {
        color: var(--cyan);
    }

.dossier-score-badge {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 6px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--cyan);
}

.dossier-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 12px 0;
    border-top: 1px dashed var(--panel-border);
    border-bottom: 1px dashed var(--panel-border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dossier-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-re-deploy {
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

    .btn-re-deploy:hover {
        background: var(--danger);
        color: #fff;
        border-color: var(--danger);
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    }

/* MACRO STATS ROW (DASHBOARD) */
.macro-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
    border-top: 1px dashed var(--panel-border);
    padding-top: 24px;
}

.macro-stat {
    display: flex;
    flex-direction: column;
}

.m-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1;
}

.m-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.m-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile responsive fallback */
@media (max-width: 600px) {
    .macro-stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* DOSSIER MASTER LAYOUT */
.dossier-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dossier-layout {
        grid-template-columns: 1fr; /* Stacks sidebar on top for tablets/mobile */
    }
}

/* DOSSIER SIDEBAR */
.dossier-sidebar {
    padding: 24px 0;
    position: sticky;
    top: 24px;
}

.pillar-nav {
    display: flex;
    flex-direction: column;
}

.pillar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

    .pillar-link:hover {
        background: rgba(102, 252, 241, 0.05);
    }

    .pillar-link.active {
        background: rgba(102, 252, 241, 0.1);
        border-left-color: var(--cyan);
    }

.p-link-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.p-link-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pillar-link.active .p-link-num {
    color: var(--cyan);
}

.p-link-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.p-link-score {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
}

.pillar-link.locked {
    opacity: 0.5;
    pointer-events: none;
}

/* PILLAR CONTENT TABS */
.pillar-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

    .pillar-content.active {
        display: block;
    }

/* WORKFLOW TABS (Inside Pillar 1) */
.workflow-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 24px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .workflow-tab:hover {
        color: var(--text-main);
    }

    .workflow-tab.active {
        color: var(--cyan);
        border-bottom-color: var(--cyan);
        background: rgba(102, 252, 241, 0.05);
    }

.badge {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

/* =========================================================
   CYBER ACCORDIONS (THEME-AWARE)
   ========================================================= */
.cyber-accordion {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.accordion-header {
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    list-style: none; /* Removes default arrow */
    outline: none;
    transition: background 0.2s ease;
}

    .accordion-header::-webkit-details-marker {
        display: none; /* Safari arrow removal */
    }

    .accordion-header:hover {
        background: rgba(255, 255, 255, 0.05);
    }

.toggle-icon {
    transition: transform 0.3s;
}

.cyber-accordion[open] .toggle-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 16px 20px;
    border-top: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.25s ease;
}

/* =========================================================
   CLAIM CARDS (THEME-AWARE)
   ========================================================= */
.claim-card {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 16px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
    margin-bottom: 12px !important;
    transition: background 0.25s ease, border-color 0.25s ease;
}

    .claim-card:last-child {
        margin-bottom: 0 !important;
    }

.claim-info {
    flex: 1 1 280px !important;
    min-width: 0 !important;
}

.claim-source {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-top: 6px !important;
}

    .claim-source i {
        margin-top: 3px !important;
        flex-shrink: 0 !important;
    }

    .claim-source a {
        color: var(--text-muted) !important;
        text-decoration: none !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

        .claim-source a:hover {
            color: var(--cyan) !important;
        }

.claim-actions {
    display: flex !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
    margin-top: 4px !important;
}

/* =========================================================
   LIGHT MODE OVERRIDES
   ========================================================= */
[data-theme="light"] .cyber-accordion {
    background: #FFFFFF;
    border: 1px solid var(--panel-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .accordion-header {
    background: rgba(0, 0, 0, 0.02);
}

    [data-theme="light"] .accordion-header:hover {
        background: rgba(0, 0, 0, 0.05);
    }

[data-theme="light"] .accordion-body {
    background: #F8FAFC;
    border-top-color: var(--panel-border);
}

[data-theme="light"] .claim-card {
    background: #FFFFFF !important;
    border: 1px solid var(--panel-border) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.btn-triage {
    background: transparent;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-verify:hover {
    background: rgba(39, 201, 63, 0.1);
    border-color: #27C93F;
    color: #27C93F;
}

.btn-flag:hover {
    background: rgba(255, 189, 46, 0.1);
    border-color: #FFBD2E;
    color: #FFBD2E;
}

.btn-dismiss:hover {
    background: rgba(255, 76, 76, 0.1);
    border-color: #FF4C4C;
    color: #FF4C4C;
}

/* =========================================================
   CUSTOM SCROLLBAR (THEME-AWARE)
   ========================================================= */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Dark Mode Defaults */
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Crisp white/gray thumb against dark panels */
    border-radius: 10px;
    transition: background 0.2s ease;
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: var(--cyan);
    }

/* Light Mode Overrides */
[data-theme="light"] .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25); /* Visible slate thumb on light panels */
}

    [data-theme="light"] .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: var(--cyan);
    }

#reader-document-body a {
    color: var(--cyan) !important;
    text-decoration: none !important;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(102, 252, 241, 0.3);
    transition: all 0.2s ease-in-out;
    word-break: break-all;
    padding: 1px 4px;
    border-radius: 2px;
}

    #reader-document-body a:hover {
        color: #ffffff !important;
        border-bottom-color: #ffffff;
        background: rgba(102, 252, 241, 0.08);
    }

/* Scoped Headings Blueprint Typography */
#reader-document-body h2 {
    color: #ffffff !important;
    font-size: 1.35rem;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 8px;
    letter-spacing: -0.5px;
}

    #reader-document-body h2:first-of-type {
        margin-top: 0; /* Prevents awkward gap at the top of the report */
    }

/* Text Block Paragraph & Strong Highlighting */
#reader-document-body p {
    margin-bottom: 20px;
    color: #D1D5DB !important; /* Premium neutral off-white */
    line-height: 1.8;
}

#reader-document-body strong {
    color: #ffffff !important; /* Pops key audit values out cleanly */
    font-weight: 700;
}

/* Bullet Points Padding Tracks */
#reader-document-body ul, #reader-document-body ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

#reader-document-body li {
    margin-bottom: 12px;
    color: #D1D5DB !important;
    line-height: 1.7;
}

/* DESKTOP GRID LAYOUT (> 768px) */
.audit-row {
    display: grid;
    grid-template-columns: 50px minmax(200px, 1fr) 120px 160px 130px 40px;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--panel-border);
    transition: background 0.2s;
}

    .audit-row:hover {
        background: rgba(255, 255, 255, 0.015);
    }

    .audit-row:last-child {
        border-bottom: none;
    }

/* MOBILE CARD TRANSFORMATION (<= 768px) */
@media (max-width: 768px) {

    /* Outer container becomes a spaced card stack */
    #list-tab > div {
        background: transparent !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* Each audit row turns into a sleek standalone card */
    .audit-row {
        display: grid !important;
        grid-template-columns: 50px 1fr auto !important;
        grid-template-areas:
            "score title status"
            "meta  meta  delete"
            "action action action" !important;
        gap: 12px 10px !important;
        padding: 16px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--panel-border) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
        align-items: center !important;
    }

        /* Assign Grid Areas & Force Containment */
        .audit-row > div:nth-child(1) {
            grid-area: score;
        }

        /* 🚀 FIX: Constrain Title & URL Container to prevent overlapping badge */
        .audit-row > div:nth-child(2) {
            grid-area: title;
            min-width: 0 !important; /* Allows grid column 1fr to shrink below content width */
            overflow: hidden !important;
            padding-right: 4px;
        }

            /* Force both Title and Domain Link to truncate with '...' */
            .audit-row > div:nth-child(2) h3,
            .audit-row > div:nth-child(2) a {
                display: block !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
                max-width: 100% !important;
            }

        .audit-row .audit-status {
            grid-area: status;
            justify-self: end;
            flex-shrink: 0 !important;
        }

            .audit-row .audit-status div {
                padding: 4px 10px !important;
                font-size: 0.7rem !important;
                white-space: nowrap !important;
            }

        .audit-row .audit-timestamp {
            grid-area: meta;
            color: var(--text-muted);
            font-size: 0.78rem !important;
            font-family: var(--font-mono);
            border-top: 1px dashed rgba(255, 255, 255, 0.05);
            padding-top: 10px;
            margin-top: 2px;
        }

        .audit-row > div:nth-child(6) {
            grid-area: delete;
            justify-self: end;
            border-top: 1px dashed rgba(255, 255, 255, 0.05);
            padding-top: 10px;
            margin-top: 2px;
        }

        .audit-row .audit-action {
            grid-area: action;
            width: 100% !important;
            text-align: center !important;
            margin-top: 4px;
        }

            /* FULL-WIDTH PROMINENT CTA BUTTON ON MOBILE */
            .audit-row .audit-action a,
            .audit-row .audit-action button {
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                width: 100% !important;
                padding: 12px 16px !important;
                background: rgba(102, 252, 241, 0.08) !important;
                border: 1px solid var(--cyan) !important;
                border-radius: 6px !important;
                color: var(--cyan) !important;
                font-size: 0.88rem !important;
                font-weight: 700 !important;
                box-sizing: border-box !important;
                text-decoration: none !important;
                transition: all 0.2s ease !important;
            }

                .audit-row .audit-action a:active,
                .audit-row .audit-action button:active {
                    background: var(--cyan) !important;
                    color: #000 !important;
                }
}

/* GRID OVERRIDES FOR TABLETS & SMALL DESKTOPS */
@media (max-width: 992px) {
    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .arch-row.row-of-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .arch-row.row-of-4 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .modal-box {
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
}

/* =========================================================
   TAB 2 (NEW AUDIT) MOBILE REDESIGN (< 768px)
   ========================================================= */
@media (max-width: 768px) {

    /* 1. DEPLOY PANEL CONTAINER TIGHTENING */
    .deploy-panel {
        padding: 20px 16px !important;
    }

        .deploy-panel h2 {
            font-size: 1.35rem !important;
            line-height: 1.25 !important;
            margin-bottom: 6px !important;
        }

        .deploy-panel > p {
            font-size: 0.85rem !important;
            line-height: 1.4 !important;
            margin-bottom: 16px !important;
        }

    .deploy-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }

    /* 2. PIPELINE: HORIZONTAL TOUCH SCROLL (ELIMINATES VERTICAL LINE BREAKS) */
    .processing-pipeline {
        margin: 16px 0 !important;
        padding: 12px 14px !important;
        border-radius: 8px !important;
    }

    .pipeline-header {
        font-size: 0.68rem !important;
        margin-bottom: 10px !important;
        letter-spacing: 0.8px !important;
    }

    .pipeline-grid {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar for clean UI */
    }

        .pipeline-grid::-webkit-scrollbar {
            display: none;
        }

    .p-step {
        flex: 0 0 auto !important;
        padding: 6px 12px !important;
        font-size: 0.72rem !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid var(--panel-border) !important;
    }

    /* 3. CONTEXT INFO BOX COMPACTING */
    .scan-context-box {
        padding: 12px !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
        align-items: flex-start !important;
    }

        .scan-context-box .context-icon {
            font-size: 1rem !important;
            margin-top: 2px !important;
        }

        .scan-context-box p {
            font-size: 0.78rem !important;
            line-height: 1.45 !important;
        }

    /* 4. STATS ROW: CLEAN 3-COLUMN BADGES (HIDES PARAGRAPH CLUTTER) */
    .macro-stats-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-top: 16px !important;
        margin-bottom: 20px !important;
    }

    .macro-stat {
        padding: 10px 6px !important;
        text-align: center !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 6px !important;
    }

        .macro-stat .m-value {
            font-size: 1.2rem !important;
            line-height: 1 !important;
            margin-bottom: 4px !important;
        }

        .macro-stat .m-title {
            font-size: 0.65rem !important;
            font-weight: 700 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.3px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        /* 🚀 CRITICAL FIX: Hide paragraph descriptions on mobile to eliminate text wall */
        .macro-stat .m-desc {
            display: none !important;
        }

    /* 5. CORE MODULE STATUS LIST COMPACTING */
    .status-panel {
        padding: 20px 16px !important;
    }

    .capability-status-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .status-item {
        font-size: 0.78rem !important;
        padding: 4px 0 !important;
    }

        .status-item .module-icon {
            font-size: 0.75rem !important;
            margin-right: 6px !important;
        }

    .status-value {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
    }

    /* 6. 8-PILLAR FRAMEWORK: 2-COLUMN COMPACT GRID */
    .extraction-architecture-section {
        margin-top: 32px !important;
    }

    .matrix-header {
        font-size: 0.78rem !important;
        margin-bottom: 14px !important;
    }

    .arch-row.row-of-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }

    .arch-module {
        padding: 10px 12px !important;
        gap: 10px !important;
        align-items: center !important;
        border-radius: 6px !important;
    }

        .arch-module .mod-icon {
            font-size: 1rem !important;
        }

        .arch-module .mod-num {
            font-size: 0.6rem !important;
            display: block !important;
            margin-bottom: 1px !important;
        }

        .arch-module .mod-name {
            font-size: 0.78rem !important;
            font-weight: 700 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

    /* 7. WIZARD MODAL FULL-WIDTH MOBILE OPTIMIZATION */
    .wizard-header {
        padding: 20px 16px 16px 16px !important;
    }

    .wizard-body {
        padding: 20px 16px !important;
    }

    .wizard-footer {
        padding: 16px !important;
        gap: 8px !important;
    }

        .wizard-footer .btn-sm {
            padding: 10px 14px !important;
            font-size: 0.8rem !important;
        }
}
button, input, select, .tabs button {
    min-height: 44px;
    touch-action: manipulation;
}

/* =========================================================
   RESPONSIVE TOP NAVIGATION
   ========================================================= */
.top-nav {
    border-bottom: 1px solid var(--panel-border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.25s ease, border-color 0.25s ease;
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.header-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

    .header-link:hover {
        color: var(--cyan);
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: var(--text-main);
    }

.main-site-link {
    display: inline-flex !important;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap !important; /* Prevents text from breaking into 2 lines */
    text-decoration: none;
    color: var(--text-main);
}
.nav-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-link {
    color: var(--cyan) !important;
    font-weight: 600;
}

.request-btn {
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

/* =========================================================
   NAVIGATION BASE & DESKTOP STYLES
   ========================================================= */
.top-nav {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--panel-border);
    position: relative;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 12px 24px;
    gap: 24px;
}

.logo-link {
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
    margin-left: 12px;
}
.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.session-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
    background: rgba(0, 139, 139, 0.08);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyan);
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--cyan);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.nav-logout-btn {
    padding: 8px 16px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
}

/* =========================================================
   MOBILE DROPDOWN TRANSFORMATION (< 900px)
   ========================================================= */
@media (max-width: 900px) {
    .nav-container {
        flex-wrap: wrap;
        padding: 12px 16px;
        justify-content: space-between;
        align-items: center;
    }

    .logo-link {
        order: 1;
    }

    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    /* Hide desktop menus by default on mobile */
    .nav-links,
    .nav-actions {
        display: none !important;
        width: 100%;
    }

    /* OPEN MOBILE DRAWER STATE */
    .nav-container.nav-open .nav-links {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        order: 3;
        width: 100%;
        padding-top: 16px;
        margin-top: 12px;
        border-top: 1px solid var(--panel-border);
    }

        .nav-container.nav-open .nav-links a {
            padding: 10px 14px;
            border-radius: 6px;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
            text-decoration: none;
            display: block;
        }

            .nav-container.nav-open .nav-links a:hover,
            .nav-container.nav-open .nav-links a.dashboard-link {
                background: var(--panel-border);
                color: var(--cyan);
            }

    .nav-container.nav-open .nav-actions {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        order: 4;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--panel-border);
        margin-top: 8px;
    }

    .main-site-link {
        padding: 10px 14px !important;
        border-radius: 6px;
        border: 1px solid var(--panel-border);
        font-size: 0.9rem;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-controls-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 4px 0;
    }

    .logout-form {
        width: 100%;
    }

    .nav-logout-btn {
        width: 100%;
        justify-content: center;
        padding: 10px !important;
        font-size: 0.9rem;
        border: 1px solid var(--panel-border) !important;
        background: var(--panel-border);
        color: var(--text-main) !important;
        border-radius: 6px !important;
        box-sizing: border-box;
    }
}

/* =========================================================
   DEEPSCAN DOSSIER RESPONSIVE FIXES
   ========================================================= */

/* Tablet & Mobile Layout Adjustment (< 1024px) */
@media (max-width: 1024px) {
    .dossier-wrapper {
        padding: 12px !important;
    }

    .dossier-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .dossier-sidebar {
        position: static !important;
        padding: 12px !important;
        margin-bottom: 16px !important;
    }

    /* Convert vertical Pillar Sidebar into a horizontal scrollable tab bar */
    .pillar-nav {
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 8px !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch;
    }

    .pillar-link {
        padding: 10px 14px !important;
        border-left: none !important;
        border-bottom: 3px solid transparent !important;
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.2);
    }

        .pillar-link.active {
            border-left-color: transparent !important;
            border-bottom-color: var(--cyan) !important;
            background: rgba(102, 252, 241, 0.1) !important;
        }

    .dossier-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Full-screen Reader Modal on Mobile */
    #reader-document-body {
        padding: 24px 16px !important;
    }
}

/* Mobile Small Phone Optimizations (< 600px) */
@media (max-width: 600px) {
    .dossier-top-bar {
        padding: 16px !important;
    }

    .header-actions {
        width: 100% !important;
        justify-content: flex-start !important;
    }

        .header-actions button,
        .header-actions form {
            width: 100% !important;
        }

    /* Force grids to single column */
    .pillar-content div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Make Copilot Chat & Analyst Log stack cleanly */
    #content-p9 > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    #copilot-chat-feed,
    #analyst-notes-feed {
        max-height: 400px !important;
    }
}

/* =========================================================
   MOBILE HORIZONTAL PILLAR TAB BAR FIX
   ========================================================= */
@media (max-width: 1024px) {

    /* 1. Sidebar Container */
    .dossier-sidebar {
        position: static !important;
        padding: 12px 16px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Contain the inner scroll bar */
    }

        /* Optional: Hide header text on mobile to save vertical space */
        .dossier-sidebar h3 {
            display: none !important;
        }

    /* 2. Scrollable Tab Track */
    .pillar-nav {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        width: 100% !important;
        padding: 4px 0 8px 0 !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
        scroll-behavior: smooth;
    }

    /* 3. Tab Pills (Prevents squishing & allows all 9 tabs to fit in a row) */
    .pillar-link {
        flex: 0 0 auto !important; /* 🚀 CRUCIAL: Stops tabs from expanding/squishing */
        width: auto !important; /* Override desktop width: 100% */
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 14px !important;
        border-left: none !important;
        border-bottom: 3px solid transparent !important;
        border-radius: 6px !important;
        background: rgba(0, 0, 0, 0.3) !important;
    }

        .pillar-link.active {
            border-left-color: transparent !important;
            border-bottom-color: var(--cyan) !important;
            background: rgba(102, 252, 241, 0.12) !important;
        }

    .p-link-content {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    /* 4. Visible Cyan Mobile Scrollbar Indicator */
    .pillar-nav::-webkit-scrollbar {
        height: 4px !important;
        display: block !important;
    }

    .pillar-nav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 2px !important;
    }

    .pillar-nav::-webkit-scrollbar-thumb {
        background: var(--cyan) !important;
        border-radius: 2px !important;
        box-shadow: 0 0 6px var(--cyan) !important;
    }
}

/* =========================================================
   FIX: Explicit 1150px Tab Width on Desktop
   ========================================================= */

/* Desktop (Screens wider than 1024px) */
@media (min-width: 1025px) {
    .dossier-main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .pillar-content {
        width: 1150px !important; /* 🚀 Hard-locks all tabs to 1150px, forcing P3 & P8 to match P2 */
        max-width: 1150px !important;
        box-sizing: border-box !important;
    }
}

/* Mobile & Tablet (Screens 1024px and narrower) */
@media (max-width: 1024px) {
    .pillar-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   RESPONSIVE DRIFT ANALYSIS TABLE (THEME-AWARE)
   ========================================================= */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
}

.drift-analysis-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-main);
}

    .drift-analysis-table th,
    .drift-analysis-table td {
        padding: 14px 16px;
    }

    .drift-analysis-table th {
        border-bottom: 1px solid var(--panel-border);
        background: rgba(0, 0, 0, 0.25);
        font-family: var(--font-mono);
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: background 0.25s ease;
    }

    .drift-analysis-table tr {
        border-bottom: 1px solid var(--panel-border);
        transition: background 0.2s ease;
    }

    .drift-analysis-table tbody tr:hover {
        background: rgba(102, 252, 241, 0.04);
    }

/* Light Mode Overrides */
[data-theme="light"] .drift-analysis-table th {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
}

[data-theme="light"] .drift-analysis-table tbody tr:hover {
    background: rgba(0, 139, 139, 0.05);
}

.td-url {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 0.8rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-title, .td-h1, .td-schema {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
}

.td-h1, .td-schema {
    color: var(--text-soft);
}

.td-status {
    text-align: center;
    width: 120px;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

    .status-badge.drifting {
        background: rgba(255,76,76,0.08);
        color: #FF4C4C;
        border: 1px solid rgba(255,76,76,0.25);
    }

    .status-badge.aligned {
        background: rgba(39,201,63,0.08);
        color: #27C93F;
        border: 1px solid rgba(39,201,63,0.25);
    }

/* Mobile Card Stack Transformation (< 768px) */
@media (max-width: 768px) {
    .drift-analysis-table,
    .drift-analysis-table thead,
    .drift-analysis-table tbody,
    .drift-analysis-table th,
    .drift-analysis-table td,
    .drift-analysis-table tr {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

        /* Hide table header on mobile */
        .drift-analysis-table thead {
            display: none;
        }

        /* Transform each table row into a card */
        .drift-analysis-table tr {
            background: rgba(255, 255, 255, 0.02) !important;
            border: 1px solid var(--panel-border) !important;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 12px;
        }

        .drift-analysis-table td {
            padding: 6px 0 !important;
            text-align: left !important;
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

            /* Inject column headers as small uppercase labels */
            .drift-analysis-table td::before {
                content: attr(data-label);
                font-family: var(--font-mono);
                font-size: 0.65rem;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                color: var(--text-muted);
                font-weight: 700;
            }

        .drift-analysis-table .td-url {
            font-size: 0.85rem !important;
            word-break: break-all;
            padding-bottom: 10px !important;
            border-bottom: 1px dashed var(--panel-border);
            margin-bottom: 8px;
        }

        .drift-analysis-table .td-status {
            width: 100% !important;
            padding-top: 10px !important;
            border-top: 1px dashed var(--panel-border);
            margin-top: 8px;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }

            .drift-analysis-table .td-status .status-badge {
                margin-top: 0;
            }
}
/* =========================================================
   SALIENCE TAB MOBILE RESPONSIVENESS
   ========================================================= */

/* Header Controls */
.salience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
}

.salience-brand-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* KPIs Grid (Desktop Default 4 Columns) */
.salience-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* =========================================================
   SALIENCE & H2H CHART CONTAINERS (THEME-AWARE)
   ========================================================= */
.salience-chart-container,
.h2h-chart-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    width: 100%;
    min-height: 380px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

    .salience-chart-container canvas,
    .salience-chart-container svg,
    .h2h-chart-container canvas,
    .h2h-chart-container svg {
        width: 100% !important;
        height: 100% !important;
        min-height: 350px;
    }

/* Light Mode Overrides (Matches Spider Chart background) */
[data-theme="light"] .salience-chart-container,
[data-theme="light"] .h2h-chart-container {
    background: rgba(0, 0, 0, 0.03);
}

.h2h-legend {
    display: flex;
    gap: 16px 24px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    justify-content: center;
    flex-wrap: wrap;
}

.h2h-pills-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* Chart Legend */
.salience-legend {
    display: flex;
    gap: 24px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    justify-content: center;
    flex-wrap: wrap;
}

    .salience-legend span {
        display: flex;
        align-items: center;
        gap: 6px;
    }

/* Mobile & Tablet Breaks (< 768px) */
@media (max-width: 768px) {
    /* Stack Header & Selector */
    .salience-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .salience-brand-selector {
        width: 100% !important;
        justify-content: space-between;
    }

        .salience-brand-selector select {
            flex-grow: 1;
        }

    /* KPIs: 2x2 Grid on Mobile */
    .salience-kpis-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Scatter Plot Chart Area */
    .salience-chart-container {
        min-height: 340px !important;
        padding: 8px !important;
    }

    /* Responsive Chart Legend */
    .salience-legend {
        gap: 12px 16px !important;
        justify-content: flex-start !important;
        font-size: 0.75rem !important;
    }

    /* Force Table Container to Scroll Horizontally */
    #nativeExpTable {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

        #nativeExpTable table {
            min-width: 650px !important; /* Prevents columns from squeezing */
            width: 100%;
            border-collapse: collapse;
        }

        #nativeExpTable th,
        #nativeExpTable td {
            padding: 10px 12px !important;
            font-size: 0.8rem !important;
        }
}

/* Small Phones (< 480px) */
@media (max-width: 480px) {
    /* KPIs: Single Column on Small Phones */
    .salience-kpis-grid {
        grid-template-columns: 1fr !important;
    }
}
/* =========================================================
   SALIENCE TAB (PILLAR 8) MOBILE CARD STACK & CHART FIX
   ========================================================= */

@media (max-width: 768px) {

    /* 1. SCATTER PLOT CHART ENHANCEMENTS */
    .salience-chart-container {
        min-height: 460px !important; /* Taller canvas gives points and axis text room to breathe */
        padding: 8px 4px !important;
        margin-bottom: 20px !important;
    }

        .salience-chart-container canvas,
        .salience-chart-container svg {
            min-height: 440px !important;
            width: 100% !important;
        }

    .salience-legend {
        gap: 8px 12px !important;
        justify-content: flex-start !important;
        font-size: 0.72rem !important;
        padding-top: 8px !important;
    }


    /* 2. TABLE TO CARD-STACK TRANSFORMATION (NO HORIZONTAL SCROLLBAR) */
    #nativeExpTable,
    #nativeExpTable table,
    #nativeExpTable thead,
    #nativeExpTable tbody,
    #nativeExpTable th,
    #nativeExpTable td,
    #nativeExpTable tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

        /* Hide traditional table headers on mobile */
        #nativeExpTable thead {
            display: none !important;
        }

        /* Transform each table row into a card */
        #nativeExpTable tr {
            background: rgba(255, 255, 255, 0.02) !important;
            border: 1px solid var(--panel-border) !important;
            border-radius: 8px !important;
            padding: 16px !important;
            margin-bottom: 12px !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        }

        /* Format table cells inside the card */
        #nativeExpTable td {
            padding: 8px 0 !important;
            border: none !important;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
            display: flex !important;
            justify-content: space-between !important;
            align-items: center !important;
            font-size: 0.85rem !important;
            text-align: right !important;
            white-space: normal !important;
            word-break: break-word !important;
        }

            #nativeExpTable td:last-child {
                border-bottom: none !important;
            }

            /* First cell (Category Entry Point / Cue Name) as Card Title */
            #nativeExpTable td:first-child {
                font-size: 0.95rem !important;
                font-weight: 700 !important;
                color: var(--cyan) !important;
                border-bottom: 1px solid var(--panel-border) !important;
                padding-bottom: 10px !important;
                margin-bottom: 8px !important;
                display: block !important;
                text-align: left !important;
            }

            /* Inject labels from data-label attributes */
            #nativeExpTable td[data-label]::before {
                content: attr(data-label);
                font-family: var(--font-mono);
                font-size: 0.68rem;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                color: var(--text-muted);
                font-weight: 700;
                text-align: left;
                padding-right: 12px;
            }
}

/* Mobile & Tablet Redesign (< 768px) */
@media (max-width: 768px) {

    /* 1. EXPAND CHART CANVAS FOR READABLE CAPTIONS */
    .h2h-chart-container {
        min-height: 480px !important; /* Taller canvas prevents cramped/hidden captions */
        padding: 10px 4px !important;
        margin-bottom: 16px !important;
    }

        .h2h-chart-container canvas,
        .h2h-chart-container svg {
            min-height: 460px !important;
            width: 100% !important;
        }

    /* 2. LEGEND BADGES FLOW NATURALLY */
    .h2h-legend {
        justify-content: flex-start !important;
        gap: 8px 12px !important;
        font-size: 0.75rem !important;
        padding-top: 8px !important;
    }

        .h2h-legend span {
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
        }

    /* 3. THREAT SELECTION PILLS WRAPPING */
    .h2h-pills-wrapper button,
    .h2h-pills-wrapper .pill {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
    }

    /* 4. LEADERBOARD TABLE CARD-STACK TRANSFORMATION */
    #nativeH2hTable,
    #nativeH2hTable table,
    #nativeH2hTable thead,
    #nativeH2hTable tbody,
    #nativeH2hTable th,
    #nativeH2hTable td,
    #nativeH2hTable tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

        /* Hide desktop table header */
        #nativeH2hTable thead {
            display: none !important;
        }

        /* Transform each leaderboard row into a card */
        #nativeH2hTable tr {
            background: rgba(255, 255, 255, 0.02) !important;
            border: 1px solid var(--panel-border) !important;
            border-radius: 8px !important;
            padding: 16px !important;
            margin-bottom: 12px !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        }

        /* Format card rows */
        #nativeH2hTable td {
            padding: 8px 0 !important;
            border: none !important;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
            display: flex !important;
            justify-content: space-between !important;
            align-items: center !important;
            font-size: 0.85rem !important;
            text-align: right !important;
            white-space: normal !important;
            word-break: break-word !important;
        }

            #nativeH2hTable td:last-child {
                border-bottom: none !important;
            }

            /* Brand Name as Card Header */
            #nativeH2hTable td:first-child {
                font-size: 0.95rem !important;
                font-weight: 700 !important;
                color: var(--cyan) !important;
                border-bottom: 1px solid var(--panel-border) !important;
                padding-bottom: 10px !important;
                margin-bottom: 8px !important;
                display: block !important;
                text-align: left !important;
            }

            /* Column labels */
            #nativeH2hTable td[data-label]::before {
                content: attr(data-label);
                font-family: var(--font-mono);
                font-size: 0.68rem;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                color: var(--text-muted);
                font-weight: 700;
                text-align: left;
                padding-right: 12px;
            }
}

/* =========================================================
   MOBILE SALIENCE CHART CARD REDESIGN
   ========================================================= */

/* Desktop Default: Hide mobile card stack */
.mobile-salience-cards {
    display: none !important;
}

/* Mobile View (< 768px) */
@media (max-width: 768px) {
    /* Hide the squished desktop SVG chart on mobile */
    #nativeH2hChart svg,
    #nativeExpChart svg {
        display: none !important;
    }

    /* Show the mobile card stack */
    .mobile-salience-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        margin-top: 8px !important;
    }

    .salience-card-item {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--panel-border) !important;
        border-radius: 8px !important;
        padding: 16px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }

    /* Full, unclipped Cue Title (No '...' truncation, no hover needed) */
    .salience-card-title {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: var(--text-main) !important;
        margin-bottom: 12px !important;
        line-height: 1.4 !important;
    }

    .salience-card-bars {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .salience-card-bar-row {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .salience-card-track {
        flex-grow: 1 !important;
        height: 8px !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 4px !important;
        overflow: hidden !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .salience-card-fill {
        height: 100% !important;
        border-radius: 4px !important;
        transition: width 0.6s ease !important;
    }

    .salience-card-val {
        font-family: var(--font-mono) !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        width: 38px !important;
        text-align: right !important;
        flex-shrink: 0 !important;
    }
}

/* =========================================================
   MOBILE STICKY VECTOR BAR & DRAWER (< 1024px)
   ========================================================= */

/* Desktop Default: Hide mobile control bar */
.mobile-vector-control {
    display: none !important;
}

@media (max-width: 1024px) {
    /* Hide desktop vertical sidebar on mobile */
    .desktop-only-sidebar {
        display: none !important;
    }

    /* Show mobile sticky control bar */
    .mobile-vector-control {
        display: block !important;
        position: sticky !important;
        top: 60px !important; /* Right below the top navigation header */
        z-index: 900 !important;
        margin-bottom: 20px !important;
        border-top: 2px solid var(--cyan) !important;
        border-left: 1px solid var(--panel-border) !important;
        border-right: 1px solid var(--panel-border) !important;
        border-bottom: 1px solid var(--panel-border) !important;
        background: var(--panel-bg) !important;
        backdrop-filter: blur(12px) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
        border-radius: 8px !important;
        padding: 0 !important;
    }

    .mobile-vector-main {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 12px !important;
        gap: 8px !important;
    }

    /* Active Info Display (Clickable) */
    .mobile-active-info {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-grow: 1 !important;
        cursor: pointer !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .mobile-vector-tag {
        font-family: var(--font-mono) !important;
        font-size: 0.68rem !important;
        color: var(--cyan) !important;
        background: rgba(0, 139, 139, 0.12) !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        flex-shrink: 0 !important;
    }

    .mobile-vector-title {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        color: var(--text-main) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .mobile-vector-score {
        font-family: var(--font-mono) !important;
        font-size: 0.85rem !important;
        font-weight: 800 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }

    /* Stepper Buttons (< >) */
    .mobile-step-btn {
        background: var(--panel-border) !important;
        border: 1px solid var(--panel-border) !important;
        color: var(--text-muted) !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        cursor: pointer !important;
    }

        .mobile-step-btn:active {
            background: var(--cyan) !important;
            color: #000 !important;
        }

    /* All Vectors Drawer Trigger Button */
    .mobile-drawer-trigger {
        background: rgba(0, 139, 139, 0.12) !important;
        border: 1px solid var(--cyan) !important;
        color: var(--cyan) !important;
        padding: 6px 10px !important;
        border-radius: 4px !important;
        font-family: var(--font-mono) !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    /* SLIDE-DOWN DRAWER */
    .mobile-pillar-drawer {
        display: none;
        padding: 16px !important;
        border-top: 1px solid var(--panel-border) !important;
        background: var(--panel-bg) !important;
        border-radius: 0 0 8px 8px !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }

        .mobile-pillar-drawer.open {
            display: block !important;
            animation: fadeIn 0.2s ease !important;
        }

    .drawer-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-family: var(--font-mono) !important;
        font-size: 0.72rem !important;
        color: var(--text-muted) !important;
        letter-spacing: 1px !important;
        margin-bottom: 12px !important;
    }

    .drawer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .drawer-card {
        background: var(--panel-border) !important;
        border: 1px solid var(--panel-border) !important;
        border-radius: 6px !important;
        padding: 10px 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        text-align: left !important;
        cursor: pointer !important;
    }

        .drawer-card:active {
            border-color: var(--cyan) !important;
            background: rgba(0, 139, 139, 0.15) !important;
        }

    .d-num {
        font-family: var(--font-mono) !important;
        font-size: 0.7rem !important;
        color: var(--cyan) !important;
    }

    .d-name {
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        color: var(--text-main) !important;
        flex-grow: 1 !important;
    }

    .d-score {
        font-family: var(--font-mono) !important;
        font-size: 0.85rem !important;
        font-weight: bold !important;
    }
}
/* =========================================================
   HOMEPAGE HERO MOBILE PADDING & TYPOGRAPHY FIX
   ========================================================= */
@media (max-width: 768px) {
    .hero-section {
        padding: 24px 0 40px 0 !important;
    }

        .hero-section .hero-content {
            padding-top: 16px !important;
            padding-bottom: 32px !important;
        }

    .kicker-badge {
        margin-bottom: 20px !important;
        font-size: 0.68rem !important;
        padding: 5px 12px !important;
    }

    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 20px !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 32px !important;
    }
}

/* =========================================================
   HOMEPAGE AUDIT PREVIEW PANEL (THEME-AWARE)
   ========================================================= */
.score-preview-panel {
    background: var(--panel-bg) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.score-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 16px;
}

.score-preview-title {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--cyan);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-preview-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.score-preview-total {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-mono);
    line-height: 1;
}

    .score-preview-total span {
        font-size: 1rem;
        color: var(--text-muted);
        font-weight: normal;
    }

.score-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-preview-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

    .score-preview-meta span {
        color: var(--text-muted);
    }

    .score-preview-meta strong {
        font-family: var(--font-mono);
    }

/* Theme-aware Progress Bar Track (Works in Light & Dark Mode) */
.score-preview-track {
    height: 4px;
    background: var(--panel-border);
    border-radius: 2px;
    overflow: hidden;
}

.score-preview-fill {
    height: 100%;
    border-radius: 2px;
}

.score-preview-alert {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--panel-border);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .score-preview-alert i {
        color: var(--danger);
    }

/* =========================================================
   THEME TOGGLE SWITCH (PIXEL-PERFECT ALIGNMENT)
   ========================================================= */
.theme-switch {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    outline: none;
}

.theme-switch-track {
    width: 58px;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    position: relative;
    box-sizing: border-box;
    transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .theme-switch-track {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

/* FIXED 28px ICON CENTERING SLOTS */
.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    top: 0;
    height: 100%;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 1;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.theme-icon-sun {
    left: 0; /* Center sits at 14px */
}

.theme-icon-moon {
    right: 0; /* Center sits at 44px */
}

/* ICON COLOR & OPACITY STATES */
[data-theme="dark"] .theme-icon-sun {
    color: var(--text-muted);
    opacity: 0.4;
}

[data-theme="dark"] .theme-icon-moon {
    color: var(--bg-dark); /* Crisp dark moon on cyan thumb */
    opacity: 1;
}

[data-theme="light"] .theme-icon-sun {
    color: #FFFFFF; /* Crisp white sun on gold thumb */
    opacity: 1;
}

[data-theme="light"] .theme-icon-moon {
    color: var(--text-muted);
    opacity: 0.4;
}

/* SLIDING THUMB (24px x 24px) */
.theme-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, box-shadow 0.25s ease;
    z-index: 0;
}

/* Dark Mode: Thumb slides 30px Right -> Center moves to exactly 44px */
[data-theme="dark"] .theme-switch-thumb {
    transform: translateX(30px);
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

/* Light Mode: Thumb sits at 0px -> Center sits at exactly 14px */
[data-theme="light"] .theme-switch-thumb {
    transform: translateX(0px);
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

/* WORKFLOW TAB STRIP HEADER (THEME-AWARE) */
.workflow-tab-header {
    display: flex;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.25s ease;
}

[data-theme="light"] .workflow-tab-header {
    background: rgba(0, 0, 0, 0.03);
}

/* =========================================================
   METRIC BADGE BOXES (THEME-AWARE)
   ========================================================= */
.metric-badge-cyan {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--cyan);
    padding: 8px 16px;
    border-radius: 6px;
    text-align: right;
    transition: background 0.25s ease, border-color 0.25s ease;
}

/* Light Mode: Soft teal tint instead of black */
[data-theme="light"] .metric-badge-cyan {
    background: rgba(0, 139, 139, 0.05);
    border-color: rgba(0, 139, 139, 0.25);
}
/* =========================================================
   PANEL CARD HEADERS & ROW STRIPS (THEME-AWARE)
   ========================================================= */
.panel-card-header,
.panel-row-strip {
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.25s ease;
}

[data-theme="light"] .panel-card-header,
[data-theme="light"] .panel-row-strip {
    background: rgba(0, 0, 0, 0.03);
}

/* =========================================================
   RAW DEVELOPER LOG TABLE (THEME-AWARE & OPAQUE STICKY HEADER)
   ========================================================= */
.raw-log-container {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.raw-log-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 0.8rem;
    color: var(--text-main);
}

    .raw-log-table thead {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--panel-bg); /* Solid base prevents text bleed-through when scrolling */
    }

    .raw-log-table th {
        padding: 12px 16px;
        color: var(--text-muted);
        font-weight: 600;
        border-bottom: 1px solid var(--panel-border);
        background: rgba(0, 0, 0, 0.15); /* Subtle header tint on top of solid panel background */
    }

[data-theme="light"] .raw-log-table th {
    background: rgba(0, 0, 0, 0.04);
}

.raw-log-table tr {
    border-bottom: 1px solid var(--panel-border);
    transition: background 0.2s ease;
}

.raw-log-table tbody tr:hover {
    background: rgba(102, 252, 241, 0.04);
}

[data-theme="light"] .raw-log-table tbody tr:hover {
    background: rgba(0, 139, 139, 0.05);
}