/* Box Score Design System */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600&display=swap');

:root {
    --color-bg: #050505; /* Deepest black */
    --color-surface: #111111;
    --color-text-primary: #E0E0E0; /* Off-white for blueprint read */
    --color-text-secondary: #888888;
    --color-accent: #FFFFFF;
    --color-border: #333333;
    --color-error: #FF4444;
    --color-success: #10B981;
    
    --font-main: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;
    --spacing-xxl: 96px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --glow-white: 0 0 20px rgba(255, 255, 255, 0.15);
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body.access-locked {
    overflow: hidden;
}

body.access-locked main {
    pointer-events: none;
    user-select: none;
    filter: blur(2px);
}

/* Typography */
h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem); /* Smaller, more controlled */
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    min-height: 3em; /* Reserve space for typing */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

p.lead {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto var(--spacing-xl);
    font-weight: 400;
    letter-spacing: 0.05em;
    border-left: 2px solid var(--color-accent);
    padding-left: var(--spacing-md);
    text-align: left;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

.hidden {
    display: none !important;
}

.hidden-vis {
    display: none !important;
}

.access-gate {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: all;
}

.access-card {
    width: min(420px, 90vw);
    padding: 32px 28px;
    border: 1px solid var(--color-border);
    background: rgba(12, 12, 12, 0.9);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.access-title {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.access-sub {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.access-input {
    margin-bottom: 16px;
}

.status-banner {
    width: 100%;
    max-width: 560px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border: 1px solid rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.08);
    color: #ffd6d6;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-align: center;
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background-color: transparent;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--color-accent);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn:hover {
    background-color: var(--color-accent);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

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

/* Views */
.view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: var(--spacing-xl) 0;
}

/* Header */
header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo {
    font-weight: 600;
    font-size: 1rem; /* Bigger */
    letter-spacing: 0.2em; /* Spaced out */
    text-transform: uppercase;
    color: var(--color-text-primary);
    border: 2px solid var(--color-text-primary); /* Thicker border */
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--color-text-primary);
}

/* Landing Specific */
/* ... (Grid logic to follow) ... */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 80px 80px; /* Larger grid */
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.vs-badge {
    color: var(--color-text-secondary);
    font-size: 0.6em;
    display: block;
    margin: 10px 0;
    position: relative;
    letter-spacing: 0.2em;
    opacity: 0; /* Hidden initially for typing effect */
    animation: fadeIn 0.5s forwards;
    animation-delay: 1.5s; /* Delay appearance */
}

/* Typing cursor */
.typing-cursor::after {
    content: '█';
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    color: var(--color-accent);
}

@keyframes blink { 50% { opacity: 0; } }

/* Global Hero Graphic (Used in Landing & Stage 2) */
#landing-view .hero-graphic {
    width: 180px; 
    height: 180px;
    margin-bottom: var(--spacing-xl);
    perspective: 1000px;
    margin-left: 20px; /* Restore offset */
    transform: translateY(-4vh); /* Lift slightly less (-8vh was too high) */
}

.stage2-cube-wrapper {
    width: 180px; 
    height: 180px;
    margin-bottom: var(--spacing-xl);
    perspective: 1000px;
    margin-left: auto;
    margin-right: auto;
    transform: translateY(-4vh); /* Lift slightly less (-8vh was too high) */
    /* transform: scale(0.85); removed to match Landing size */
}

/* ... Cube Styles ... */
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 12s infinite linear;
}

/* DEPRECATED: .mini-cube-wrapper removed */

.face {
    position: absolute;
    width: 180px; /* Match container */
    height: 180px; /* Match container */
    background: rgba(0, 0, 0, 0.15); /* Much more transparent to let white pop */
    border: 1px solid var(--color-text-primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05); /* Keep outer glow */
    /* Ensure faces don't block pointer events to logo if ever needed, though visually it's fine */
    pointer-events: none; 
}

/* ... Transforms ... */

/* 3D Visual Variations */
.center-figure {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centered in hero-graphic */
    /* No rotation applied here, so it stays flat to user */
    z-index: 5; /* Sit inside/above the cube visually */
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Bright White Styling (Shared) */
.wireframe-white {
    border-color: #FFFFFF !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

/* ... Humanoid/Pyramid styles can remain or be removed if unused ... */

/* MODE 4: Floating Logo */
.floating-text {
    /* ... existing styles ... */
    width: 120px;
    height: 60px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8); /* Stronger glow */
}

/* Variation 2: Boxed Logo */
.floating-text-v2 {
    width: 100px;
    height: 100px;
    border: 4px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    background: rgba(0,0,0,0.3); /* Slight contrast against grid */
}

.face.front  { transform: rotateY(0deg) translateZ(90px); } /* Half width */
.face.back   { transform: rotateY(180deg) translateZ(90px); }
.face.right  { transform: rotateY(90deg) translateZ(90px); }
.face.left   { transform: rotateY(-90deg) translateZ(90px); }
.face.top    { transform: rotateX(90deg) translateZ(90px); }
.face.bottom { transform: rotateX(-90deg) translateZ(90px); }

@keyframes rotate {
    from { transform: rotateX(-15deg) rotateY(0deg); }
    to { transform: rotateX(-15deg) rotateY(360deg); }
}

/* Upload Specific */
/* Upload Flair Text */
.flair-text {
    margin: 0 auto var(--spacing-lg);
    color: #FFFFFF;
    font-size: clamp(2rem, 5vw, 3.5rem); /* Massive */
    letter-spacing: 0.1em;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    opacity: 1; /* Typewriter handles content */
    line-height: 1.1;
    max-width: 800px;
    min-height: 2.2em; /* Reserve space */
}

/* Compact Upload Zone */
.upload-zone {
    width: 100%;
    max-width: 500px; /* Narrower */
    height: 200px;    /* Shorter (was 360px) */
    border: 1px dashed rgba(255, 255, 255, 0.3); /* Dashed feels more "drop here" */
    border-radius: 4px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-smooth);
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    margin: 0 auto var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.1); /* Subtle glow */
    transform: scale(1.02);
}

.upload-zone.dragover {
    border-color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

.upload-zone p {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    margin: 0;
    font-weight: 500;
}

.upload-icons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.upload-icon {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.privacy-notice {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: transparent;
    padding: 8px 16px;
    border: none;
    opacity: 0.7;
}

.privacy-notice svg {
    width: 14px; /* Smaller shield */
    height: 14px;
    fill: currentColor;
}

/* Key Selection Phase */
.key-selection {
    transition: all 0.5s ease;
}

.key-section {
    opacity: 0;
    transform: translateY(12px);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    margin-top: 0;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease,
        transform 0.4s ease,
        margin-top 0.4s ease;
}

.key-section.is-visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
    pointer-events: auto;
    margin-top: 30px;
}

.btn.full-width {
    width: 100%;
    justify-content: center;
}

.divider-text {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
}

.divider-text::before, .divider-text::after {
    content: '';
    display: block;
    width: 100%; /* Fill remaining */
    height: 1px;
    background-color: var(--color-border);
}

.key-expandable {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.key-expandable.open {
    max-height: 100px; /* Enough for input + hint */
}

.key-input-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.key-input-wrapper:focus-within {
    border-color: #FFFFFF;
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.key-icon {
    padding: 0 15px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
}

.key-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    padding: 10px 0;
}

.key-input::placeholder {
    color: #444;
}

.btn-key {
    background: transparent;
    border: 1px solid var(--color-text-secondary);
    color: var(--color-text-secondary);
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.btn-key:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
    background: rgba(255,255,255,0.1);
}

/* Questionnaire Specifics */
/* Processing View (Sequential) */
.processing-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    /* GRID STACKING for smooth transition */
    display: grid; 
    grid-template-areas: "stack";
    justify-items: center;
    align-items: center;
    min-height: 400px;
    position: relative;
    text-align: center;
}

.centered-terminal {
    grid-area: stack; /* Occupy same space */
    width: 100%;
    max-width: 600px;
    height: 350px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: 0 0 50px rgba(0,0,0,0.5); 
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* Only fade opacity */
    text-align: left;
    
    opacity: 1;
    pointer-events: all;
    z-index: 10;
}

/* Hide terminal smoothly */
.centered-terminal.minimized {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.processing-explainer {
    grid-area: stack; /* Occupy same space */
    width: 100%;
    max-width: 600px;
    
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* Only fade opacity */
    pointer-events: none;
    z-index: 0;
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

.processing-explainer.active {
    opacity: 1;
    pointer-events: all;
    z-index: 20; /* Sit on top */
}

.terminal-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    margin-bottom: 20px;
}

.terminal-line {
    opacity: 0;
    animation: typeLine 0.1s forwards;
}

.terminal-line.success { color: var(--color-success); }
.terminal-line.warn { color: #ebbf0c; }
.terminal-line.highlight { color: #FFFFFF; font-weight: bold; }

@keyframes typeLine { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Question Pane (Centered) */
.centered-question {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center; /* Center everything */
}

.question-pane {
    padding: var(--spacing-lg) 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

#question-container {
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.question-meta {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
}

.question-text {
    font-size: 2.5rem; /* Massive */
    font-weight: 300;
    margin-bottom: var(--spacing-xl);
    line-height: 1.2;
    min-height: 3.6em;
}

.options-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.option-card {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 24px 10px;
    color: var(--color-text-secondary);
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.option-card:hover, .option-card.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.key-hint {
    font-size: 0.7rem;
    border: 1px solid var(--color-border);
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
    opacity: 0.5;
}

.option-card:hover .key-hint {
    border-color: #FFFFFF;
    opacity: 1;
}

.option-label {
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 500;
}

/* Brand Button (Main Call to Action) */
.brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 15px 35px;
    background: transparent;
    border: 4px solid #FFFFFF;
    color: #FFFFFF;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.logo-square {
    display: block;
    width: 24px;
    height: 24px;
    background-color: #FFFFFF;
    /* No shadow/glow - just flat white like text */
    box-shadow: none !important; 
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* No persistent pulse */
}

.brand-btn:hover {
    transform: translateY(-2px);
    background: transparent;
    color: #FFFFFF;
    /* Removed button glow entirely to be safe */
    box-shadow: none !important;
}

.brand-btn:hover .logo-square {
    transform: rotate(360deg) scale(1.1);
    /* No shadow on spin either */
    box-shadow: none !important;
}

.brand-btn:active {
    transform: translateY(1px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* --- Reveal / Box Score View --- */

.credential-header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #FFFFFF;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-family: var(--font-main);
}

.cred-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cred-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.verified-badge {
    background: #FFFFFF;
    color: #000;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.cred-meta {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    gap: 20px;
    align-items: flex-end; /* Align bottom with title */
}

/* Insight Summary */
.insight-summary {
    width: 100%;
    max-width: 800px;
    text-align: left;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 4px solid #F59E0B; /* Amber-500 */
}

.insight-label {
    font-size: 0.8rem;
    color: #F59E0B; /* Amber */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 5px;
}

.insight-text {
    font-size: 1.2rem;
    line-height: 1.4;
    color: #FFFFFF;
    max-width: 700px;
}

/* Delta Table */
.score-container {
    width: 100%;
    max-width: 800px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 30px;
}

.delta-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.3);
}

.delta-row {
    display: contents; 
}

.trait-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
}

.trait-row:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.08) 100%);
    transform: translateX(5px); /* Subtle shift right to invite click */
}

/* Chevron */
.chevron {
    display: inline-block;
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--color-text-secondary);
    margin-right: 10px;
    transition: transform 0.3s ease;
    transform: rotate(-90deg); /* Point right initially */
}

.trait-row.active .chevron {
    transform: rotate(0deg); /* Point down when active */
    border-top-color: #FFFFFF;
}

.col-trait {
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    /* gap handled by chevron margin */
}

.col-score, .col-gap {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
}

.col-score.text-accent {
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.gap-indicator {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 50px;
    font-weight: 700;
}

.gap-huge {
    color: #000000;
    background: #F59E0B; /* Amber/Gold High Contrast */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    /* No border needed for this style */
    /* No pulse, just strong flat color */
}

.gap-ok {
    color: var(--color-text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

/* Evidence Expansion */
.evidence-row {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    padding: 0; 
}

.evidence-row.expanded {
    display: block;
    animation: slideDown 0.3s ease;
}

.evidence-wrapper {
    padding: 20px 30px;
    border-left: 2px solid var(--color-text-secondary);
    margin: 10px 20px;
}

.evidence-block {
    margin-bottom: 20px;
}

.evidence-label {
    font-size: 0.7rem;
    color: var(--color-accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.evidence-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--color-text-primary);
    line-height: 1.5;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 2px;
}

/* Behavioral Grid */
.behavioral-grid {
    width: 100%;
    max-width: 800px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media(max-width: 600px) {
    .behavioral-grid { grid-template-columns: 1fr; }
}

.behavior-card {
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,0.02);
    padding: 20px;
    text-align: left;
}

.b-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.b-value {
    font-size: 1.2rem;
    color: #FFFFFF;
    font-weight: 600;
}

.b-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 5px;
}


/* --- PREMIUM / CLINICAL Chat Hub --- */
.hub-header-block {
    text-align: left;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    max-width: 1000px;
}

.hub-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
}

.hub-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    font-weight: 400;
    text-transform: uppercase;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

.hub-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    height: 380px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
}

.hub-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hub-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}


.hub-icon {
    display: inline-flex;
    margin-bottom: 20px;
    opacity: 0.8;
    color: #fff; /* SVGs will inherit this stroke */
}

/* Chat Back Arrow - Enhanced */
.back-arrow {
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-right: 35px;
    width: 80px; /* Huge touch target */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent; /* Placeholder for hover */
}

.back-arrow svg {
    width: 48px;
    height: 48px;
    display: block;
}

.back-arrow:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(-5px);
}


.hub-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    color: #fff;
    text-transform: uppercase;
}

.hub-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 90%;
}

.hub-enter-cue {
    font-size: 0.75rem;
    color: #F59E0B; /* Amber accent */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: auto;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.hub-card:hover .hub-enter-cue {
    opacity: 1;
}

#chat-view {
    justify-content: flex-start; /* Start from top */
    align-items: stretch; /* Full width */
}

/* --- PREMIUM 2-Column Chat Layout --- */

.chat-layout-cols {
    display: flex;
    width: 100%;
    height: 100%; /* Fill viewport */
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.chat-main-col {
    flex: 7; /* 70% width */
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--color-border);
    background: transparent; /* Let grid show through */
}

.chat-side-col {
    flex: 3; /* 30% width */
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    min-width: 350px;
}

.chat-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.back-arrow {
    /* Legacy class support if needed, but we use btn-text-back now */
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.2s;
    justify-self: start;
}

.btn-text-back {
    /* Ensure it aligns to the start of the first grid column */
    justify-self: start;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    grid-column: 2; /* Center column */
    align-items: center; /* Center the text stack */
}

.mode-title {
    font-size: 1.2rem; /* Increased from 0.9rem */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.job-id-display {
    display: none; /* Hidden per user request */
}

/* Side Panel */
.side-panel-header {
    padding: 20px 25px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.evidence-panel-content {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Messages */
/* Messages */
.chat-messages {
    padding: 40px;
    /* Removed padding-bottom: 120px; since we're using flex now */
    overflow-y: auto;
    flex: 1; /* Grow to fill available space */
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 30px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
}

.message.system {
    align-self: flex-start;
}

.msg-meta {
    font-size: 0.65rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.message.user .msg-meta {
    text-align: right;
}

.bubble {
    padding: 18px 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.message.user .bubble {
    background: rgba(255,255,255,0.08); /* Dark Gray Transparent */
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    box-shadow: none;
}

.message.system .bubble {
    background: transparent;
    border-left: 2px solid #F59E0B; /* Amber vertical accent line */
    color: var(--color-text-primary);
    padding-left: 20px;
    padding-top: 0;
    padding-bottom: 0;
}

/* Input Area */
/* Input Area */
.chat-input-area {
    /* Removed absolute positioning */
    width: 100%;
    padding: 30px 40px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-shrink: 0; /* Prevent shrinking */
    position: relative;
    z-index: 10;
}


input#chat-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.2s;
}

input#chat-input:focus {
    border-bottom-color: #fff;
}

input#chat-input::placeholder {
    color: #444;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

button#btn-chat-send {
    background: transparent;
    border: 1px solid var(--color-border);
    color: #fff;
    padding: 10px 20px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}


button#btn-chat-send:hover {
    background: #fff;
    color: #000;
}


/* Evidence ID Tag */
.evidence-id {
    font-size: 0.55rem;
    font-family: var(--font-main);
    color: var(--color-text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: copy;
    transition: all 0.2s;
    user-select: all; /* Makes selection easier */
}


.evidence-id:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}


/* Hero Button - Explore Chat */
#btn-explore-chat {
    background: #FFFFFF;
    color: #000000;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 20px 40px;
    border: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 10px;
    border-radius: 4px; /* Slight roundness */
}

#btn-explore-chat:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    background: #FFFFFF; /* Ensure it stays white */
}

/* Ensure unit-small is actually small */

/* --- DOCS VIEW --- */
.docs-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.docs-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.docs-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.docs-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    font-family: 'Courier New', monospace;
}

.docs-content {
    flex-grow: 1;
    margin-bottom: 40px;
}

.docs-section {
    margin-bottom: 30px;
}

.docs-section h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.docs-section p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.docs-footer {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.docs-sources {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: center;
}


/* --- CERTIFICATE VIEW --- */
.cert-frame {
    max-width: 900px;
    margin: 40px auto;
    padding: 60px;
    border: 4px double var(--color-border); /* "Official" double border */
    background: rgba(255,255,255,0.02);
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.cert-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.cert-seal {
    display: inline-block;
    border: 2px solid #fff;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.cert-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cert-meta {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.cert-section-title {
    font-size: 0.9rem;
    color: #FFFFFF;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-left: 3px solid #F59E0B;
    padding-left: 10px;
}

/* Certificate Table */
#cert-score-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

#cert-score-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

#cert-score-table td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}

#cert-score-table td.final-score {
    font-weight: 800;
    color: #F59E0B;
}

.cert-bullets {
    display: grid;
    gap: 15px;
}

.cert-bullet-item {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-left: 2px solid rgba(255,255,255,0.2);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cert-actions {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
}




/* --- WHY PAGE --- */
/* --- WHY PAGE --- */
.why-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 40px 60px; /* Increased top padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.why-header {
    text-align: center;
    margin-bottom: 60px;
}

.why-header h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.why-subtitle {
    font-family: 'Courier New', monospace;
    font-size: 1.35rem; /* Increased size */
    color: #E0E0E0; /* White to match title */
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
    width: 100%;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: 1fr 1fr; /* 2 column grid */
    }
}

.why-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    transition: transform 0.2s, border-color 0.2s;
}

.why-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.3);
}

.why-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
    letter-spacing: 0.05em;
}

.why-card p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

.why-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#btn-why-skip {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-decoration: underline;
    opacity: 0.7;
}
#btn-why-skip:hover {
    opacity: 1;
    color: #fff;
}

/* Chat Back Button Text */
.btn-text-back {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-text-back:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}
/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
