/* ═══════════════════════════════════════════════════════════════
   WinDebate - Multi-Format Debate Training
   Design System & Styles — Gleec Dark Glassmorphism
   ═══════════════════════════════════════════════════════════════ */

/* Design Tokens — Gleec-Inspired */
:root {
    /* Background Palette — Deep blue-tinted darks */
    --bg-void: #07070f;
    --bg-primary: #0b0b14;
    --bg-secondary: #12121e;
    --bg-tertiary: #1a1a2a;
    --bg-elevated: #1e1e30;
    --bg-hover: #252538;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);

    /* Accent Colors — Indigo brand, Cyan pro, Rose con */
    --accent-primary: #6366f1;       /* Indigo — brand */
    --accent-primary-dim: #818cf8;   /* Lighter indigo */
    --accent-primary-glow: rgba(99, 102, 241, 0.15);

    --accent-blue: #60a5fa;
    --accent-cyan: #22d3ee;          /* Pro / Affirmative — cyan */
    --accent-emerald: #34d399;
    --accent-rose: #f43f5e;          /* Con / Negative — rose */
    --accent-violet: #8b5cf6;
    --accent-gold: #f59e0b;          /* Scores & highlights */

    /* Theme Consolidation */
    --accent-brand: var(--accent-primary);
    --accent-brand-dim: var(--accent-primary-dim);
    --glow-brand: var(--glow-indigo);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;

    /* Status Colors */
    --status-aff: #22d3ee;
    --status-neg: #f43f5e;
    --status-active: #6366f1;

    /* Side Colors */
    --accent-pro: var(--status-aff);
    --accent-con: var(--status-neg);
    --accent-pro-glow: rgba(34, 211, 238, 0.1);
    --accent-con-glow: rgba(244, 63, 94, 0.1);

    /* Extra spacing aliases */
    --space-xs: 0.125rem;
    --space-sm: 0.375rem;

    /* Borders — glass-like translucent */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(99, 102, 241, 0.25);
    --border-medium: rgba(255, 255, 255, 0.12);

    /* Glassmorphism tokens */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 12px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-glow: rgba(99, 102, 241, 0.1);

    /* Glow effects — active */
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);
    --glow-indigo: 0 0 20px rgba(99, 102, 241, 0.3);
    --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.3);
    --glow-rose: 0 0 20px rgba(244, 63, 94, 0.3);
    --glow-gold: 0 0 20px rgba(245, 158, 11, 0.3);
    --glow-aff: 0 0 15px rgba(34, 211, 238, 0.2);
    --glow-neg: 0 0 15px rgba(244, 63, 94, 0.2);

    /* Shadows — layered depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);

    /* Typography — Outfit + JetBrains Mono */
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius — Rounded, Gleec-style */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 100px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-out);
    --transition-normal: 250ms var(--ease-out);
    --transition-slow: 350ms var(--ease-out);
}

/* Gradient Text Utility */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 15px;
    letter-spacing: -0.01em;
}

/* Background — Animated gradient orbs */
.bg-grid {
    display: none;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    filter: blur(120px);
    animation: floatOrb1 20s ease-in-out infinite;
}

.bg-glow::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
    filter: blur(120px);
    animation: floatOrb2 25s ease-in-out infinite;
}

.bg-orb-rose {
    position: fixed;
    top: 40%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.08) 0%, transparent 70%);
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb3 22s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 80px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, -60px) scale(1.05); }
    66% { transform: translate(60px, -20px) scale(0.9); }
}

@keyframes floatOrb3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-40%, -60%) scale(1.15); }
}

/* Glass Card Utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-normal),
                background var(--transition-normal),
                border-color var(--transition-normal),
                box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--glass-shadow), var(--glow-indigo), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* App Container */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    background: rgba(11, 11, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    transition: opacity var(--transition-fast);
    user-select: none;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon::before {
    display: none;
}

.logo:hover .logo-icon {
    color: var(--accent-primary-dim);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    /* flat — no drop-shadow */
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover .logo-title {
    background: linear-gradient(135deg, var(--accent-primary-dim), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.resolution-display {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-width: 500px;
}

.res-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.res-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.round-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.status-icon {
    font-size: 0.9rem;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.api-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.api-btn svg {
    width: 18px;
    height: 18px;
}

.api-btn:hover {
    background: var(--bg-elevated);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
    flex: 1;
    padding: 48px 32px;
}

/* ═══════════════════════════════════════════════════════════════
   SETUP PHASE
   ═══════════════════════════════════════════════════════════════ */

.setup-phase {
    max-width: 1000px;
    margin: 0 auto;
}

.setup-phase, .practice-phase, .browse-phase, .debate-phase {
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes revealSection {
    from { opacity: 0; }
    to { opacity: 1; }
}

.setup-hero {
    text-align: center;
    margin-bottom: var(--space-12);
}

.setup-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-4);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.setup-hero p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 400;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 24px 32px;
    transition: all var(--transition-normal);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.form-section:hover {
    border-color: var(--border-accent);
    box-shadow: var(--glass-shadow);
}

.form-section:hover::before {
    opacity: 1;
}

/* Mode Selection Section */
.mode-selection-section {
    padding: var(--space-12) var(--space-10) !important;
    background: var(--bg-secondary);
}

/* Unified Setup Section */
.unified-setup {
    padding: var(--space-10) !important;
}

.full-round-setup {
    animation: fadeSlideUp 0.4s var(--ease-out);
}

.full-round-setup.hidden {
    display: none !important;
}

.defense-setup {
    animation: fadeSlideUp 0.4s var(--ease-out);
}

.defense-setup.hidden {
    display: none !important;
}

/* Start Button Section for Other Modes */
.start-button-section {
    display: flex;
    justify-content: center;
    margin-top: var(--space-8);
    padding: var(--space-6) 0;
    animation: fadeSlideUp 0.4s var(--ease-out);
}

.start-button-section.hidden {
    display: none !important;
}

.setup-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem) !important;
    font-weight: 800 !important;
    color: var(--text-primary);
    margin-bottom: var(--space-10) !important;
    text-align: center;
    letter-spacing: -0.02em;
}

.setup-group {
    margin-bottom: var(--space-12);
}

.setup-group:last-child {
    margin-bottom: 0;
}

.group-label {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-6) !important;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.01em;
}

.side-position-combined {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* .form-section.full-width - Already full width in flex column */

.form-section h3 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.optional-tag {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Side Selector */
.side-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-6);
    align-items: center;
}

.side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-10) var(--space-8);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.side-btn::before {
    display: none;
}

.side-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow), var(--glow-indigo);
}

.side-btn:hover::before {
    display: none;
}

.side-btn:active {
    background: var(--bg-elevated);
}

.side-btn.active[data-side="PRO"] {
    background: rgba(34, 211, 238, 0.08);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.side-btn.active[data-side="CON"] {
    background: rgba(244, 63, 94, 0.08);
    border-color: var(--accent-rose);
    box-shadow: var(--glow-rose);
}

.side-icon {
    font-size: 4rem;
    transition: var(--transition-normal);
}

.side-btn:hover .side-icon {
    color: var(--text-primary);
}

.side-label {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.side-btn[data-side="PRO"] .side-label { color: var(--accent-pro); }
.side-btn[data-side="CON"] .side-label { color: var(--accent-con); }

.side-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.side-position {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.side-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

/* Position Selector */
.position-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.position-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-10) var(--space-8);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    position: relative;
}

.position-btn::before {
    display: none;
}

.position-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
}

.position-btn:hover::before {
    display: none;
}

.position-btn:active {
    background: var(--bg-hover);
}

.position-btn.active {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--accent-primary);
}

.position-btn.active::before {
    display: none;
}

.pos-num {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.pos-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pos-speeches {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Case Input */
.case-input-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.case-textarea {
    width: 100%;
    min-height: 320px;
    padding: var(--space-6);
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    line-height: 1.8;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.case-textarea::placeholder {
    color: var(--text-muted);
}

.case-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.case-actions {
    display: flex;
    gap: var(--space-3);
}

.case-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.case-action-btn svg {
    width: 18px;
    height: 18px;
}

.case-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* Start Button */
.start-round-btn {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: var(--space-8) auto 0;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dim));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-xl);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
    opacity: 0.5;
    box-shadow: var(--glow-indigo);
}

.start-round-btn:not(:disabled) {
    opacity: 1;
}

.start-round-btn:not(:disabled):hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.start-round-btn:not(:disabled):active {
    opacity: 0.9;
    transform: translateY(0);
}

/* Shimmer effect on primary buttons */
.start-round-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: inherit;
    z-index: 1;
}

.start-round-btn:not(:disabled):hover::after {
    transform: translateX(100%);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    position: relative;
    z-index: 2;
}

.btn-text {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

.btn-arrow {
    font-size: 1.75rem;
    color: white;
    transition: var(--transition-fast);
}

.start-round-btn:hover .btn-arrow {
    opacity: 0.8;
}

.btn-glow {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   DEBATE PHASE
   ═══════════════════════════════════════════════════════════════ */

.debate-phase {
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    animation: fadeSlideUp 0.5s var(--ease-out);
}

.hidden {
    display: none !important;
}

/* Speech Navigation */
.speech-nav {
    flex-shrink: 0;
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.speech-tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    min-width: max-content;
}

.speech-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 90px;
}

.speech-tab:hover {
    background: var(--bg-elevated);
}

.speech-tab.active {
    background: var(--accent-primary);
    color: #ffffff;
}

.speech-tab.completed {
    background: var(--bg-elevated);
}

.speech-tab.completed::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
    color: var(--accent-pro);
}

.tab-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 50%;
}

.speech-tab.active .tab-num {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.tab-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.speech-tab.active .tab-name {
    color: #ffffff;
    font-weight: 600;
}

.tab-time {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.speech-tab.active .tab-time {
    color: rgba(0, 0, 0, 0.7);
}

/* Debate Workspace */
.debate-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: var(--space-4);
    min-height: 0;
}

/* Panels */
.flow-panel, .coach-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.panel-header h3 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.panel-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.panel-action svg {
    width: 16px;
    height: 16px;
}

.panel-action:hover {
    background: var(--bg-elevated);
    color: var(--accent-rose);
}

/* Flow Panel */
.flow-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-subtle);
    overflow: hidden;
}

.flow-column {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow: hidden;
}

.flow-column-header {
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    flex-shrink: 0;
}

.pro-column .flow-column-header {
    background: var(--accent-pro-glow);
    color: var(--accent-pro);
}

.con-column .flow-column-header {
    background: var(--accent-con-glow);
    color: var(--accent-con);
}

.flow-items {
    flex: 1;
    padding: var(--space-2);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.flow-item {
    padding: var(--space-2);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent-primary);
}

.flow-item.response {
    border-left-color: var(--accent-primary);
}

.flow-item.dropped {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Speech Area */
.speech-area {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.speech-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.current-speech-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.speech-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.speech-speaker {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.timer-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    min-width: 70px;
    text-align: center;
}

.timer-controls {
    display: flex;
    gap: var(--space-1);
}

.timer-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.timer-btn:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.speech-content {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
}

.speech-bubble {
    max-width: 85%;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    animation: bubbleIn 0.3s var(--ease-out);
}

@keyframes bubbleIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.speech-bubble.user {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    margin-left: auto;
}

.speech-bubble.ai {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.speech-bubble.opponent {
    background: var(--accent-con-glow);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.speech-bubble p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.speech-bubble .bubble-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

/* Speech Input */
.speech-input-area {
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.speech-input {
    width: 100%;
    min-height: 100px;
    padding: var(--space-3);
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition-fast);
}

.speech-input::placeholder {
    color: var(--text-muted);
}

.speech-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.05);
}

.input-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
    justify-content: flex-end;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.action-btn.secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.action-btn.primary {
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid var(--accent-primary);
}

.action-btn.primary::after {
    display: none;
}

.action-btn.primary:hover {
    background: var(--accent-primary-dim);
}

.action-btn.primary:hover::after {
    display: none;
}

/* Ghost Button Variant */
.action-btn.ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.action-btn.ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--glass-border);
}

/* Coach Panel */
.ai-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ai-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.ai-model {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.coach-content {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.coach-message {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s var(--ease-out);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.message-text strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: var(--space-2);
}

.message-text ul {
    margin: var(--space-2) 0;
    padding-left: var(--space-4);
}

.message-text li {
    margin-bottom: var(--space-1);
}

.coach-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.quick-action {
    padding: var(--space-2);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-action:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal {
    width: 100%;
    max-width: 450px;
    background: rgba(18, 18, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: modalSlide 0.3s var(--ease-out);
    box-shadow: var(--shadow-lg);
}

@keyframes modalSlide {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-rose);
    color: white;
}

.modal-body {
    padding: var(--space-5);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

.form-hint a {
    color: var(--accent-primary);
    text-decoration: none;
}

.form-hint a:hover {
    text-decoration: underline;
}

.modal-save-btn {
    position: relative;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dim));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: var(--space-4);
    box-shadow: var(--glow-indigo);
    overflow: hidden;
}

.modal-save-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: inherit;
}

.modal-save-btn:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.modal-save-btn:hover::after {
    transform: translateX(100%);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.loading-content {
    text-align: center;
    animation: loadingScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes loadingScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.loading-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(255, 255, 255, 0.06);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    margin: 0 auto var(--space-6);
}

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

.loading-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: var(--space-8) var(--space-12);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.footer-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--accent-primary-glow);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .header-center {
        width: 100%;
    }
    
    .resolution-display {
        max-width: 100%;
    }
    
    .side-selector {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .side-divider {
        width: 60px;
        height: 60px;
        font-size: 1rem;
        margin: 0 auto;
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRACTICE MODE STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-8) var(--space-6);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mode-btn::after {
    display: none;
}

.mode-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow), var(--glow-indigo);
}

.mode-btn:hover::before {
    opacity: 1;
}

.mode-btn:hover::after {
    display: none;
}

.mode-btn:active {
    background: var(--bg-elevated);
}

.mode-btn.active {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--accent-primary);
}

.mode-btn.active::before,
.mode-btn.active::after {
    display: none;
}

.mode-icon {
    font-size: 3.5rem;
    transition: color var(--transition-fast);
}

.mode-btn:hover .mode-icon {
    color: var(--accent-primary);
}

.mode-btn.active .mode-icon {
    color: var(--accent-primary);
}

.mode-label {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.mode-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* Practice Phase */
.practice-phase {
    animation: fadeSlideUp 0.5s var(--ease-out);
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.practice-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.practice-info p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.practice-stats {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.back-btn {
    padding: var(--space-3) var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.back-btn::before {
    display: none;
}

.back-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.back-btn:hover::before {
    display: none;
}

/* Practice Workspace */
.practice-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr 350px;
    gap: var(--space-4);
    min-height: calc(100vh - 300px);
}

/* Argument Panel */
.argument-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.argument-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border-left: 4px solid var(--accent-con);
    transition: border-color var(--transition-fast);
}

.argument-card:hover {
    border-color: var(--border-medium);
}

.arg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.arg-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-cyan);
    padding: var(--space-1) var(--space-2);
    background: rgba(6, 182, 212, 0.1);
    border-radius: var(--radius-sm);
}

.arg-difficulty {
    font-size: 0.7rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.arg-difficulty[data-difficulty="easy"] {
    color: var(--accent-pro);
    background: var(--accent-pro-glow);
}

.arg-difficulty[data-difficulty="medium"] {
    color: var(--accent-primary);
    background: rgba(245, 158, 11, 0.1);
}

.arg-difficulty[data-difficulty="hard"] {
    color: var(--accent-con);
    background: var(--accent-con-glow);
}

.arg-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.arg-section {
    margin-bottom: var(--space-3);
}

.arg-section label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-1);
}

.arg-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.drill-controls {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.difficulty-filter,
.category-filter {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.difficulty-filter label,
.category-filter label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.difficulty-filter select,
.category-filter select {
    padding: var(--space-2);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.next-arg-btn {
    margin-left: auto;
    padding: var(--space-2) var(--space-4);
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.next-arg-btn:hover {
    background: var(--accent-primary-dim);
}

/* Response Panel */
.response-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.response-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.response-type-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.response-type-selector label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.response-type-selector select {
    padding: var(--space-2);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.drill-textarea {
    flex: 1;
    padding: var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: none;
}

.drill-textarea::placeholder {
    color: var(--text-muted);
}

.drill-textarea:focus {
    outline: none;
}

.response-actions {
    display: flex;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
}

.hint-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.hint-btn:hover {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

.submit-drill-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--accent-cyan);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-void);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.submit-drill-btn svg {
    width: 16px;
    height: 16px;
}

.submit-drill-btn:hover {
    opacity: 0.85;
}

/* Feedback Panel */
.feedback-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.feedback-header {
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.feedback-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feedback-content {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
}

.feedback-placeholder {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.grading-criteria-preview {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.grading-criteria-preview h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.grading-criteria-preview ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.grading-criteria-preview li {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.grading-criteria-preview strong {
    color: var(--text-secondary);
}

/* Score Display */
.score-display {
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.overall-score {
    text-align: center;
    margin-bottom: var(--space-4);
}

.score-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
}

.score-value.excellent { color: var(--accent-pro); }
.score-value.good { color: var(--accent-blue); }
.score-value.adequate { color: var(--accent-primary); }
.score-value.poor { color: var(--accent-con); }

.score-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.score-item-name {
    color: var(--text-secondary);
}

.score-item-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

/* Browse Phase */
.browse-phase {
    animation: fadeSlideUp 0.5s var(--ease-out);
}

.browse-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.browse-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.browse-header p {
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
}

.browse-filters {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    justify-content: center;
    flex-wrap: wrap;
}

.search-input {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 300px;
}

.filter-select {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.05);
}

.arguments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-4);
}

.browse-arg-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    border-left: 4px solid var(--accent-con);
}

.browse-arg-card[data-side="PRO"] {
    border-left-color: var(--status-aff);
}

.browse-arg-card:hover {
    border-color: var(--accent-primary);
}

.browse-arg-card.expanded {
    border-color: var(--accent-primary);
}

.browse-arg-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-3);
}

.browse-arg-tag {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.browse-arg-meta {
    display: flex;
    gap: var(--space-2);
}

.browse-arg-claim {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.browse-arg-details {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    display: none;
}

.browse-arg-card.expanded .browse-arg-details {
    display: block;
}

.browse-arg-section {
    margin-bottom: var(--space-3);
}

.browse-arg-section h4 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-1);
}

.browse-arg-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ideal-responses {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.ideal-responses h4 {
    color: var(--accent-primary);
    margin-bottom: var(--space-2);
}

.ideal-responses ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ideal-responses li {
    font-size: 0.8rem;
    color: var(--text-primary);
    padding-left: var(--space-3);
    position: relative;
}

.ideal-responses li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (Consolidated)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .debate-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .practice-workspace {
        grid-template-columns: 1fr;
    }
    
    .flow-panel {
        max-height: 200px;
    }
    
    .coach-panel {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .header-center {
        width: 100%;
        order: 3;
    }
    
    .resolution-display {
        max-width: 100%;
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }
    
    .side-selector {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .side-divider {
        width: 60px;
        height: 60px;
        font-size: 1rem;
        margin: 0 auto;
        order: 0;
    }
    
    .practice-header {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    .arguments-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }
    
    .footer-right {
        flex-direction: column;
        gap: var(--space-4);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(18, 18, 30, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-primary);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    box-shadow: var(--shadow-md);
}

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

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.toast-msg {
    flex: 1;
    line-height: 1.4;
}

.toast-success .toast-icon { background: rgba(22, 163, 74, 0.1); color: var(--status-aff); }
.toast-error .toast-icon { background: rgba(220, 38, 38, 0.1); color: var(--status-neg); }
.toast-warning .toast-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.toast-info .toast-icon { background: rgba(99, 102, 241, 0.1); color: var(--accent-primary); }

.toast-success { border-left: 3px solid var(--status-aff); }
.toast-error { border-left: 3px solid var(--status-neg); }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info { border-left: 3px solid var(--accent-primary); }

/* ═══════════════════════════════════════════════════════════════
   TIMER PROMINENCE
   ═══════════════════════════════════════════════════════════════ */

.timer-value {
    transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.timer-critical {
    animation: timerPulse 1s ease-in-out infinite;
}

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

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY - FOCUS OUTLINES
   ═══════════════════════════════════════════════════════════════ */

*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.mode-btn:focus-visible,
.side-btn:focus-visible,
.position-btn:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 3px;
}

/* Skip-link (for keyboard nav) */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    background: var(--accent-primary);
    color: #fff;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    z-index: 9999;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - 480px (Small Mobile)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .main-content {
        padding: var(--space-4);
    }

    .form-section {
        padding: var(--space-5);
    }

    .mode-selection-section {
        padding: var(--space-6) var(--space-4) !important;
    }

    .mode-btn {
        padding: var(--space-4) var(--space-3);
        gap: var(--space-2);
    }

    .mode-icon {
        font-size: 2rem;
    }

    .mode-label {
        font-size: 1rem;
    }

    .mode-desc {
        font-size: 0.8rem;
    }

    .side-btn {
        padding: var(--space-6) var(--space-4);
    }

    .side-label {
        font-size: 1.4rem;
    }

    .position-btn {
        padding: var(--space-6) var(--space-4);
    }

    .pos-num {
        font-size: 1.8rem;
    }

    .case-textarea {
        min-height: 180px;
        font-size: 0.9rem;
    }

    .btn-text {
        font-size: 1.1rem;
    }

    .start-round-btn {
        padding: var(--space-4) var(--space-6);
    }

    /* Practice workspace stacks fully */
    .practice-workspace {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: var(--space-3);
    }

    .practice-header {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }

    .practice-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-3);
    }

    /* Browse grid stacks */
    .arguments-grid {
        grid-template-columns: 1fr;
    }

    .browse-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: 0;
        width: 100%;
    }

    /* Footer stacks */
    .footer {
        padding: var(--space-4) var(--space-6);
    }

    .footer-links {
        gap: var(--space-4);
    }

    /* Speech tabs scroll hint */
    .speech-nav {
        position: relative;
    }

    .speech-tab {
        min-width: 70px;
        padding: var(--space-2);
    }

    .tab-name {
        font-size: 0.6rem;
    }

    /* Timer sizing on mobile */
    .timer-value {
        font-size: 1.2rem;
    }

    /* Toast positioning on mobile */
    .toast-container {
        left: var(--space-3);
        right: var(--space-3);
        max-width: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOUCH TARGETS (min 44px)
   ═══════════════════════════════════════════════════════════════ */

.timer-btn,
.api-btn,
.modal-close,
.panel-action {
    min-width: 44px;
    min-height: 44px;
}

.back-btn,
.hint-btn,
.submit-drill-btn,
.next-arg-btn,
.action-btn,
.quick-action,
.case-action-btn {
    min-height: 44px;
}

.speech-tab {
    min-height: 44px;
}

/* Disabled button state */
button:disabled,
button[disabled] {
    cursor: not-allowed;
}

.quick-action:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   RESOLUTION INPUT PHASE (Landing Screen)
   ═══════════════════════════════════════════════════════════════ */

.resolution-phase {
    max-width: 720px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.res-input-hero {
    text-align: center;
    margin-bottom: var(--space-10);
}

.res-input-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-3);
    line-height: 1.15;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.res-input-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main input card */
.res-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.res-input-wrapper {
    position: relative;
}

.res-input-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: var(--space-2);
}

.res-input-field {
    width: 100%;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.res-input-field::placeholder {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
}

.res-input-field:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.res-char-count {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Format & Side pill rows */
.res-format-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.res-row-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
    flex-shrink: 0;
}

.res-pill-group {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 3px;
}

.res-pill {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.res-pill:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.res-pill.active {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
}

/* Generate button */
.res-generate-btn {
    position: relative;
    width: 100%;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dim));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0.45;
    box-shadow: var(--glow-indigo);
    overflow: hidden;
}

.res-generate-btn:not(:disabled) {
    opacity: 1;
}

.res-generate-btn:not(:disabled):hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.res-generate-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: inherit;
    z-index: 1;
}

.res-generate-btn:not(:disabled):hover::after {
    transform: translateX(100%);
}

.res-generate-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
}

.res-generate-content svg {
    width: 20px;
    height: 20px;
}

/* Example chips */
.res-examples {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
}

.res-examples-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.res-chip-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.res-chip {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.res-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-dim);
    background: rgba(99, 102, 241, 0.08);
}

/* Recent resolutions */
.res-recent {
    display: none; /* hidden until there are items */
}

.res-recent.has-items {
    display: block;
}

.res-recent-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.res-recent-title svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.res-recent-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.res-recent-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.res-recent-item:hover {
    border-color: var(--accent-primary);
}

.res-recent-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.res-recent-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.res-recent-format {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.res-recent-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.res-recent-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s var(--ease-out);
}

.res-recent-item:hover .res-recent-arrow {
    color: var(--accent-primary);
    transform: translateX(2px);
}

/* Responsive — Resolution phase */
@media (max-width: 768px) {
    .res-input-card {
        padding: var(--space-5);
    }

    .res-format-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .res-pill-group {
        flex-wrap: wrap;
    }

    .res-examples {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .res-input-card {
        padding: var(--space-4);
    }

    .res-input-field {
        font-size: 0.95rem;
    }

    .res-chip {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE FEATURE SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.home-features {
    margin-top: var(--space-10);
}

.home-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin-bottom: var(--space-8);
}

.hub-section-hint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: rgba(245,158,11,0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

/* When no topic is active, dim cards slightly */
.home-feature-card.needs-topic {
    opacity: 0.55;
}
.home-feature-card.needs-topic:hover {
    opacity: 0.8;
}

/* When topic IS active, hide the hints */
.home-features.has-topic .hub-section-hint {
    display: none;
}
.home-features.has-topic .home-feature-card.needs-topic {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   PREP PROGRESS TRACKING
   ═══════════════════════════════════════════════════════════════ */

.progress-dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-4);
}

/* Readiness meter */
.progress-readiness-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    grid-row: 1 / 3;
}

.progress-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.readiness-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-5);
}

.readiness-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.readiness-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 8;
}

.readiness-ring-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1s var(--ease-out);
}

.readiness-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.readiness-pct {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.readiness-sublabel {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.readiness-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.readiness-factor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.readiness-factor-label {
    color: var(--text-secondary);
}

.readiness-factor-status {
    font-size: 0.85rem;
}

.readiness-factor-status.done {
    color: var(--accent-pro);
}

/* Stats grid */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.progress-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
}

.progress-stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-1);
}

.progress-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Score history / sparkline */
.progress-history-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.progress-sparkline {
    height: 80px;
    position: relative;
}

.progress-sparkline svg {
    width: 100%;
    height: 100%;
}

.sparkline-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sparkline-area {
    fill: rgba(99, 102, 241, 0.08);
    stroke: none;
}

.sparkline-dot {
    fill: var(--accent-primary);
    r: 3;
}

/* Skill breakdown */
.progress-skills-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    grid-column: 1 / -1;
}

.progress-skills {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.progress-skill {
    display: grid;
    grid-template-columns: 120px 1fr 40px;
    align-items: center;
    gap: var(--space-3);
}

.progress-skill-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-skill-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-skill-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-out);
}

.progress-skill-pct {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: right;
}

/* Responsive — Progress */
@media (max-width: 768px) {
    .progress-dashboard {
        grid-template-columns: 1fr;
    }

    .progress-readiness-card {
        grid-row: auto;
    }

    .progress-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .progress-skill {
        grid-template-columns: 90px 1fr 35px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   RESOLUTION SWITCHER (Header Dropdown)
   ═══════════════════════════════════════════════════════════════ */

.header-center {
    position: relative;
}

.res-switch-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out);
    flex-shrink: 0;
}

.res-switch-btn svg {
    width: 14px;
    height: 14px;
}

.res-switch-btn:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.res-switcher-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    min-width: 360px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    z-index: 200;
    overflow: hidden;
    animation: modalSlide 0.2s var(--ease-out);
}

.res-switcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.res-switcher-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.res-switcher-new {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: rgba(99, 102, 241, 0.08);
    border: none;
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.res-switcher-new svg {
    width: 12px;
    height: 12px;
}

.res-switcher-new:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

.res-switcher-list {
    max-height: 280px;
    overflow-y: auto;
}

.res-switcher-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background 0.15s var(--ease-out);
    border-bottom: 1px solid var(--border-subtle);
}

.res-switcher-item:last-child {
    border-bottom: none;
}

.res-switcher-item:hover {
    background: var(--bg-hover);
}

.res-switcher-item.active {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--accent-primary);
}

.res-switcher-item-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.res-switcher-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.res-switcher-item-format {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

.res-switcher-item-progress {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.res-switcher-empty {
    padding: var(--space-6);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SETUP RESOLUTION CONTEXT BAR
   ═══════════════════════════════════════════════════════════════ */

.setup-res-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}

.setup-res-context-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    flex: 1;
}

.setup-res-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.setup-res-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setup-res-context-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.setup-res-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.setup-res-link svg {
    width: 12px;
    height: 12px;
}

.setup-res-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   PREP DASHBOARD PHASE
   ═══════════════════════════════════════════════════════════════ */

.prep-phase {
    max-width: 1100px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.prep-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.prep-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex: 1;
    min-width: 0;
}

.prep-res-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.prep-format-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.prep-res-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab navigation */
.prep-tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    overflow-x: auto;
}

.prep-tab {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}

.prep-tab svg {
    width: 16px;
    height: 16px;
}

.prep-tab:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.prep-tab.active {
    background: var(--bg-elevated);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.prep-tab-content {
    display: none;
}

.prep-tab-content.active {
    display: block;
    animation: fadeSlideUp 0.3s var(--ease-out);
}

/* Cases grid (pro/con columns) */
.prep-cases-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.prep-case-column {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.prep-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--border-subtle);
}

.prep-col-header.pro {
    border-bottom-color: var(--accent-pro);
    background: var(--accent-pro-glow);
}

.prep-col-header.con {
    border-bottom-color: var(--accent-con);
    background: var(--accent-con-glow);
}

.prep-col-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.prep-col-header.pro .prep-col-badge {
    color: var(--accent-pro);
}

.prep-col-header.con .prep-col-badge {
    color: var(--accent-con);
}

.prep-col-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.prep-col-action svg {
    width: 14px;
    height: 14px;
}

.prep-col-action:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.prep-contentions {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Contention card */
.prep-contention {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s var(--ease-out);
}

.prep-contention:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-sm);
}

.prep-contention-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    user-select: none;
}

.prep-contention-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.prep-contention-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.prep-contention-toggle {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.2s var(--ease-out);
}

.prep-contention.expanded .prep-contention-toggle {
    transform: rotate(180deg);
}

.prep-contention-body {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.prep-contention.expanded .prep-contention-body {
    display: block;
}

.prep-section {
    margin-bottom: var(--space-3);
}

.prep-section:last-child {
    margin-bottom: 0;
}

.prep-section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    margin-top: var(--space-3);
}

.prep-section-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Empty state */
.prep-empty-state {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Rebuttal map */
.prep-rebuttal-map {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.prep-rebuttal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border-left: 3px solid var(--accent-primary);
}

.prep-rebuttal-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.prep-rebuttal-type {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.prep-rebuttal-target {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.prep-rebuttal-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Crossfire */
.prep-crossfire-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.prep-cf-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.prep-cf-column-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--border-subtle);
}

.prep-cf-column-title.pro {
    color: var(--accent-pro);
    border-bottom-color: var(--accent-pro);
}

.prep-cf-column-title.con {
    color: var(--accent-con);
    border-bottom-color: var(--accent-con);
}

.prep-cf-question {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.prep-cf-q {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.prep-cf-purpose {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Weighing */
.prep-weighing-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.prep-weighing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.prep-weighing-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.prep-weighing-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive — Prep */
@media (max-width: 768px) {
    .prep-cases-grid {
        grid-template-columns: 1fr;
    }

    .prep-crossfire-content {
        grid-template-columns: 1fr;
    }

    .prep-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .prep-tabs {
        overflow-x: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   GENERATION LOADING PHASE
   ═══════════════════════════════════════════════════════════════ */

.generation-phase {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gen-container {
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.gen-header {
    margin-bottom: var(--space-10);
}

/* Animated spinner ring */
.gen-spinner-ring {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    margin: 0 auto var(--space-6);
}

.gen-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.gen-resolution {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    max-width: 450px;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Step list */
.gen-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-8);
    text-align: left;
}

.gen-step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out);
    opacity: 0.35;
}

.gen-step.active {
    opacity: 1;
    background: rgba(99, 102, 241, 0.08);
}

.gen-step.completed {
    opacity: 1;
}

.gen-step-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s var(--ease-out);
}

.gen-step-icon svg {
    width: 16px;
    height: 16px;
}

.gen-step.active .gen-step-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    animation: genPulse 1.5s ease-in-out infinite;
}

@keyframes genPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
    50%      { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.08); }
}

.gen-step.completed .gen-step-icon {
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
}

/* Checkmark element */
.gen-step-check {
    margin-left: auto;
    opacity: 0;
    color: var(--accent-cyan);
    transition: all 0.3s var(--ease-out);
    transform: scale(0.5);
}

.gen-step-check svg {
    width: 18px;
    height: 18px;
}

.gen-step.completed .gen-step-check {
    opacity: 1;
    transform: scale(1);
}

.gen-step-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.gen-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gen-step.completed .gen-step-label {
    color: var(--text-secondary);
}

.gen-step-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Tip card */
.gen-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    text-align: left;
    animation: fadeIn 0.5s var(--ease-out);
}

.gen-tip-icon {
    flex-shrink: 0;
    color: #f59e0b;
}

.gen-tip-icon svg {
    width: 18px;
    height: 18px;
}

.gen-tip-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Progress bar */
.gen-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.gen-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width 0.6s var(--ease-out);
}

/* Cancel */
.gen-cancel-btn {
    padding: var(--space-2) var(--space-5);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.gen-cancel-btn:hover {
    border-color: var(--accent-con);
    color: var(--accent-con);
}

/* Responsive */
@media (max-width: 480px) {
    .gen-title {
        font-size: 1.2rem;
    }

    .gen-step {
        padding: var(--space-2) var(--space-3);
    }
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN 3: PRACTICE HUB
   ═══════════════════════════════════════════════════════════════ */

.hub-phase {
    max-width: 900px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-header {
    margin-bottom: var(--space-4);
}

.hub-back-btn,
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.hub-back-btn:hover,
.back-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.hub-back-btn svg,
.back-btn svg {
    width: 16px;
    height: 16px;
}

.hub-resolution {
    text-align: center;
    margin-bottom: var(--space-10);
}

.hub-format-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent-primary-dim);
    background: rgba(99, 102, 241, 0.1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.hub-res-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    line-height: 1.3;
    max-width: 700px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hub Sections */
.hub-sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.hub-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hub-section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hub-section--featured .hub-section-label {
    color: rgba(139,92,246,0.8);
}

.hub-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* Legacy grid (keep for compat) */
.hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-10);
}

/* Coming soon card */
.hub-card--coming-soon {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.hub-card--coming-soon .hub-card-desc::after {
    content: ' — Coming Soon';
    color: var(--accent-gold);
    font-weight: 600;
}

/* Sky color variant for cross-ex */
.hub-card--sky { border-color: rgba(56,189,248,0.2); }
.hub-card--sky:hover { border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.06); box-shadow: var(--glass-shadow), 0 0 20px rgba(56,189,248,0.25); }

.hub-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 24px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
    position: relative;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow), var(--glow-indigo);
}

/* Color variants — glow border + icon color on hover */
.hub-card--cyan  .hub-card-icon { color: rgba(34,211,238,0.7); }
.hub-card--indigo .hub-card-icon { color: rgba(99,102,241,0.7); }
.hub-card--green  .hub-card-icon { color: rgba(16,185,129,0.7); }
.hub-card--rose   .hub-card-icon { color: rgba(244,63,94,0.7); }
.hub-card--amber  .hub-card-icon { color: rgba(245,158,11,0.7); }
.hub-card--emerald .hub-card-icon { color: rgba(16,185,129,0.7); }
.hub-card--violet .hub-card-icon { color: rgba(139,92,246,0.7); }
.hub-card--sky    .hub-card-icon { color: rgba(56,189,248,0.7); }

.hub-card--cyan:hover  { border-color: rgba(34,211,238,0.3); box-shadow: var(--glass-shadow), var(--glow-cyan); }
.hub-card--indigo:hover { border-color: rgba(99,102,241,0.3); box-shadow: var(--glass-shadow), var(--glow-indigo); }
.hub-card--green:hover  { border-color: rgba(16,185,129,0.3); box-shadow: var(--glass-shadow), 0 0 20px rgba(16,185,129,0.3); }
.hub-card--rose:hover   { border-color: rgba(244,63,94,0.3); box-shadow: var(--glass-shadow), var(--glow-rose); }

.hub-card-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    line-height: 1;
    color: var(--text-secondary);
}
.hub-card-icon svg {
    width: 28px;
    height: 28px;
}

.hub-card-info {
    flex: 1;
    min-width: 0;
}

.hub-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.hub-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hub-card-arrow {
    color: var(--text-muted);
    transition: all 0.2s var(--ease-out);
    flex-shrink: 0;
}

.hub-card-arrow svg {
    width: 18px;
    height: 18px;
}

.hub-card:hover .hub-card-arrow {
    color: var(--text-primary);
    transform: translateX(3px);
}

/* Quick Stats Row */
.hub-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
}

.hub-stat {
    text-align: center;
}

.hub-stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.hub-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }
    .hub-section-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SHARED SCREEN HEADER
   ═══════════════════════════════════════════════════════════════ */

.screen-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.screen-title {
    font-size: 1rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.drill-title--green { color: var(--accent-emerald); }
.drill-title--rose  { color: var(--accent-rose); }

/* ═══════════════════════════════════════════════════════════════
   SCREEN 4: STUDY MATERIALS
   ═══════════════════════════════════════════════════════════════ */

.study-phase {
    max-width: 900px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.study-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--space-2);
}

.study-tab {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.study-tab:hover { color: var(--text-primary); }

.study-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

.study-tab svg { width: 14px; height: 14px; }

.study-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.study-tab-dot--pro { background: var(--accent-cyan); }
.study-tab-dot--con { background: var(--accent-rose); }

.study-tab-content {
    display: none;
}

.study-tab-content.active {
    display: block;
}

/* Contention Cards (shared across Study & Case Input) */
.contention-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.contention-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.contention-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    cursor: pointer;
    transition: background 0.2s var(--ease-out);
}

.contention-header:hover {
    background: var(--bg-card-hover);
}

.contention-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary-dim);
    background: rgba(99, 102, 241, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.contention-tagline {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contention-star {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-1);
    transition: color 0.2s;
}

.contention-star:hover,
.contention-star.starred { color: var(--accent-gold); }
.contention-star svg { width: 16px; height: 16px; }

.contention-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.contention-chevron svg { width: 16px; height: 16px; }
.contention-card.expanded .contention-chevron { transform: rotate(180deg); }

.contention-body {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
}

.contention-card.expanded .contention-body {
    display: block;
}

.contention-field {
    margin-bottom: var(--space-3);
}

.contention-field-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.contention-field-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contention-field--vulnerabilities .contention-field-value {
    color: var(--accent-rose);
    font-style: italic;
}

/* Annotation input */
.contention-annotate {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--glass-border);
}

.contention-annotate textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    resize: vertical;
    min-height: 40px;
}

.contention-annotate textarea::placeholder {
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   SCREEN 5: CASE INPUT
   ═══════════════════════════════════════════════════════════════ */

.case-input-phase {
    max-width: 800px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-input-side-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.case-input-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.case-input-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.case-input-field {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    resize: vertical;
    margin-bottom: var(--space-4);
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.case-input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.parsed-contentions {
    margin-top: var(--space-6);
}

.parsed-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* Editable contention fields */
.contention-field-edit {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.contention-field-edit:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   SCREENS 6 & 7: DRILL PHASES
   ═══════════════════════════════════════════════════════════════ */

.drill-phase {
    max-width: 1100px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.drill-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 220px;
    gap: var(--space-5);
    align-items: start;
}

/* Attack / Opponent Card */
.drill-attack-card,
.drill-opponent-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.drill-attack-header,
.drill-opponent-header {
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--glass-border);
}

.drill-attack-label,
.drill-opponent-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.drill-attack-target {
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.drill-attack-body,
.drill-opponent-body {
    padding: var(--space-5);
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.drill-field {
    margin-bottom: var(--space-3);
}

.drill-field:last-child { margin-bottom: 0; }

.drill-field-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
}

.drill-field-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Response Area */
.drill-response-area {
    display: flex;
    flex-direction: column;
}

.drill-response-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.drill-response-field {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: var(--space-4);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.drill-response-field:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.drill-response-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

/* Timer config pills */
.drill-timer-config {
    display: flex;
    gap: var(--space-1);
}

.timer-pill {
    padding: var(--space-1) var(--space-3);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-pill:hover { color: var(--text-primary); border-color: var(--border-accent); }
.timer-pill.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }

/* Submit buttons */
.drill-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.drill-submit-btn svg { width: 16px; height: 16px; }

.drill-submit--green {
    background: var(--accent-emerald);
}

.drill-submit--green:hover {
    opacity: 0.85;
}

.drill-submit--rose {
    background: var(--accent-rose);
}

.drill-submit--rose:hover {
    opacity: 0.85;
}

/* Timer display in header */
.drill-timer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    padding: var(--space-2) var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
}

.drill-timer svg { width: 16px; height: 16px; }

.drill-timer-value {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
}

.drill-timer-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Score Sidebar */
.drill-sidebar {
    position: sticky;
    top: 100px;
}

.drill-score-tracker {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    text-align: center;
}

.drill-sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.drill-running-score {
    margin-bottom: var(--space-4);
}

.drill-score-big {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.drill-score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.drill-score-history {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    justify-content: center;
}

.drill-score-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.drill-score-pill.high { color: var(--accent-emerald); background: rgba(16,185,129,0.1); }
.drill-score-pill.mid  { color: var(--accent-gold); background: rgba(245,158,11,0.1); }
.drill-score-pill.low  { color: var(--accent-rose); background: rgba(244,63,94,0.1); }

/* Score Card */
.drill-scorecard {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    margin-top: var(--space-6);
    overflow: hidden;
    animation: revealSection 0.5s var(--ease-out);
}

.scorecard-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-6);
    border-bottom: 1px solid var(--glass-border);
}

.scorecard-score {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.scorecard-label {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.scorecard-body {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.scorecard-section h4 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.scorecard-section h4 svg { width: 16px; height: 16px; }

.scorecard-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.scorecard-good h4   { color: var(--accent-emerald); }
.scorecard-missed h4 { color: var(--accent-gold); }
.scorecard-suggested h4 { color: var(--accent-cyan); }

.drill-scorecard-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--glass-border);
}

.drill-next-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dim));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-lg);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--glow-indigo);
    overflow: hidden;
}

.drill-next-btn:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.drill-next-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: inherit;
}

.drill-next-btn:hover::after {
    transform: translateX(100%);
}

.drill-next-btn svg { width: 16px; height: 16px; }

.drill-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.drill-toggle-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.drill-toggle-btn svg { width: 14px; height: 14px; }

/* Suggested Response (toggle) */
.drill-suggested-response {
    padding: var(--space-5);
    border-top: 1px solid var(--glass-border);
    background: rgba(34, 211, 238, 0.03);
}

.drill-suggested-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-cyan);
    margin-bottom: var(--space-3);
}

.drill-suggested-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Drill responsive */
@media (max-width: 900px) {
    .drill-layout {
        grid-template-columns: 1fr;
    }

    .drill-sidebar {
        position: static;
    }

    .drill-score-tracker {
        display: flex;
        align-items: center;
        gap: var(--space-4);
    }

    .drill-running-score { margin-bottom: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   FORMAT SELECTOR
   ═══════════════════════════════════════════════════════════════ */

.format-selector-phase {
    max-width: 900px;
    margin: 0 auto;
    animation: revealSection 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.format-hero {
    text-align: center;
    margin-bottom: var(--space-10);
}

.format-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-3);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.format-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-6);
}

.format-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: 32px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.format-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow), var(--glow-indigo);
}

.format-card.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-indigo), inset 0 1px 0 rgba(99, 102, 241, 0.1);
}

.format-badge-popular {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.format-card-icon {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.format-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.format-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.format-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.format-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
}

.format-meta-tag svg {
    width: 12px;
    height: 12px;
}

/* ── Header Format Badge ── */

.header-format-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    user-select: none;
}

.header-format-badge:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.header-format-icon {
    font-size: 1.1rem;
}

.header-format-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.header-format-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   DRILL CARDS (format-aware practice menu)
   ═══════════════════════════════════════════════════════════════ */

.drill-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.drill-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow), var(--glow-indigo);
}

.drill-card.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-indigo), inset 0 1px 0 rgba(99, 102, 241, 0.1);
}

.drill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.drill-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drill-card-difficulty {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.drill-card-difficulty[data-level="beginner"] {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.12);
}

.drill-card-difficulty[data-level="intermediate"] {
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.12);
}

.drill-card-difficulty[data-level="advanced"] {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.12);
}

.drill-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.drill-card-trains {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   SPEECH TIMER BAR (standalone component)
   ═══════════════════════════════════════════════════════════════ */

.speech-timer-bar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.speech-timer-select {
    flex: 0 0 auto;
}

.speech-timer-select select {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.speech-timer-display {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.speech-timer-clock {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 100px;
    text-align: center;
}

.speech-timer-clock.warning {
    color: var(--accent-gold);
}

.speech-timer-clock.danger {
    color: var(--accent-rose);
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.speech-timer-controls {
    display: flex;
    gap: var(--space-2);
}

.speech-timer-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.speech-timer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.speech-timer-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.speech-timer-progress {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.speech-timer-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: width 1s linear;
}

/* ═══════════════════════════════════════════════════════════════
   MULTI-DIMENSIONAL GRADING FEEDBACK
   ═══════════════════════════════════════════════════════════════ */

/* A. Overall Score */
.grade-overall {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    text-align: center;
    justify-content: center;
}

.grade-number {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.grade-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.grade-scale {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* B. Dimension Bar Chart */
.grade-dimensions {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
}

.grade-dimension {
    display: grid;
    grid-template-columns: 140px 1fr 45px;
    gap: var(--space-3);
    align-items: center;
}

.grade-dim-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grade-dim-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.grade-dim-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s var(--ease-out);
}

.grade-dim-fill.grade-score-red {
    background: var(--accent-rose);
}

.grade-dim-fill.grade-score-yellow {
    background: var(--accent-gold);
}

.grade-dim-fill.grade-score-green {
    background: var(--accent-emerald);
}

.grade-dim-fill.grade-score-blue {
    background: var(--accent-blue);
}

.grade-dim-score {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.grade-dim-justification {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    padding-left: 143px;
    margin-bottom: var(--space-2);
    line-height: 1.4;
    font-style: italic;
}

/* C. Response Type Analysis */
.grade-response-type {
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.grade-response-type strong {
    color: var(--accent-primary);
}

/* D. Strengths & Gaps — Two Columns */
.grade-feedback-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.grade-strengths,
.grade-gaps {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.grade-strengths {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.grade-gaps {
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.15);
}

.grade-strengths h4 {
    color: var(--accent-emerald);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.grade-gaps h4 {
    color: var(--accent-rose);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.grade-strengths ul,
.grade-gaps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grade-strengths li,
.grade-gaps li {
    padding: var(--space-1) 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.grade-strengths li::before {
    content: '\2713 ';
    color: var(--accent-emerald);
    font-weight: 700;
    margin-right: var(--space-1);
}

.grade-gaps li::before {
    content: '\2717 ';
    color: var(--accent-rose);
    font-weight: 700;
    margin-right: var(--space-1);
}

/* E. Improvement Tip */
.grade-tip {
    padding: var(--space-4);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.grade-tip strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* F. Model Answer */
.grade-model {
    margin-bottom: var(--space-4);
}

.grade-model-toggle {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.grade-model-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.grade-model-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}

.grade-model-content.expanded {
    max-height: 500px;
    padding: var(--space-4);
}

/* G. Pattern Tracking */
.grade-patterns {
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.grade-pattern-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.grade-pattern-item strong {
    color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grade-feedback-columns {
        grid-template-columns: 1fr;
    }

    .grade-dimension {
        grid-template-columns: 100px 1fr 40px;
    }

    .grade-dim-justification {
        padding-left: 0;
    }

    .grade-overall {
        flex-direction: column;
        align-items: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DEEP RESEARCH PIPELINE
   ═══════════════════════════════════════════════════════════════ */

/* Depth Selector */
.depth-selector { margin: 20px 0; }
.depth-selector-title { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 12px; }
.depth-cards { display: flex; gap: 12px; }
.depth-card {
    flex: 1; padding: 16px; border: 2px solid var(--glass-border); border-radius: var(--radius-lg);
    background: var(--glass-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    cursor: pointer; transition: all 0.3s ease;
    position: relative;
}
.depth-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--glow-indigo); }
.depth-selected { border-color: var(--accent-primary); background: rgba(99, 102, 241, 0.08); }
.depth-recommended { border-color: var(--accent-blue); }
.depth-badge {
    position: absolute; top: -10px; right: 12px;
    background: var(--accent-blue); color: white; font-size: 0.7rem;
    padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 600;
}
.depth-icon { font-size: 2rem; margin-bottom: 8px; }
.depth-name { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.depth-time { font-size: 0.8rem; color: var(--text-tertiary); margin: 4px 0; }
.depth-desc { font-size: 0.85rem; color: var(--text-secondary); margin: 8px 0; }
.depth-features { list-style: none; padding: 0; margin: 8px 0 0; font-size: 0.8rem; }
.depth-features li { padding: 2px 0; color: var(--accent-emerald); }
.depth-disabled { color: var(--text-tertiary) !important; }

/* Research Progress */
.research-progress { padding: 24px; background: var(--glass-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); margin: 16px 0; }
.research-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--text-primary); font-weight: 600; }
.research-progress-time { font-size: 0.85rem; color: var(--text-tertiary); font-weight: 400; }
.research-progress-bar { height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.research-progress-fill { height: 100%; background: var(--accent-blue); transition: width 0.5s ease; border-radius: 3px; width: 0%; }
.research-progress-steps { display: flex; flex-direction: column; gap: 4px; }
.research-step { display: flex; gap: 10px; padding: 8px 0; color: var(--text-tertiary); transition: color 0.3s; align-items: center; }
.research-step-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.research-step-label { flex: 1; font-size: 0.9rem; }
.research-step-status { font-size: 0.9rem; }
.research-step-active { color: var(--text-primary); }
.research-step-active .research-step-icon { animation: researchPulse 1.5s infinite; }
.research-step-done { color: var(--accent-emerald); }
.research-abort-btn { background: var(--accent-rose); border: none; color: white; padding: 6px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: opacity 0.2s; }
.research-abort-btn:hover { opacity: 0.85; }
@keyframes researchPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Results Tabs */
.results-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border-primary); padding-bottom: 0; margin: 16px 0 0; overflow-x: auto; }
.results-tab {
    padding: 10px 16px; background: none; border: none; color: var(--text-tertiary);
    cursor: pointer; font-size: 0.85rem; border-bottom: 2px solid transparent;
    white-space: nowrap; transition: all 0.2s; font-weight: 500;
}
.results-tab:hover { color: var(--text-secondary); }
.results-tab-active { color: var(--text-primary); border-bottom-color: var(--accent-primary); }

/* Deep Results Layout */
.deep-overview { padding: 16px 0; }
.deep-section { margin-bottom: 16px; }
.deep-section-title { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; font-weight: 600; }
.deep-text { color: var(--text-primary); font-size: 0.9rem; line-height: 1.6; margin: 4px 0; }
.deep-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Contention Cards (deep) */
.contention-deep {
    background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 16px; margin: 12px 0;
}
.contention-deep-title { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); margin-bottom: 8px; }
.contention-deep-section { margin: 10px 0; }
.contention-deep-label { font-size: 0.7rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 2px; }
.contention-deep-text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* Impact Badges */
.impact-badges { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.impact-badge {
    font-size: 0.7rem; padding: 2px 8px; border-radius: var(--radius-sm);
    font-weight: 600; text-transform: uppercase;
}
.badge-high { background: rgba(220,38,38,0.13); color: #f87171; border: 1px solid rgba(220,38,38,0.25); }
.badge-medium { background: rgba(234,179,8,0.13); color: #f59e0b; border: 1px solid rgba(234,179,8,0.25); }
.badge-low { background: rgba(34,197,94,0.13); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.badge-common { background: rgba(239,68,68,0.13); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.badge-moderate { background: rgba(245,158,11,0.13); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.badge-rare { background: rgba(16,185,129,0.13); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }

/* Response Type Tags */
.response-tag {
    display: inline-block; font-size: 0.7rem; padding: 2px 6px;
    border-radius: 4px; font-weight: 700; margin-right: 4px;
}
.tag-delink { background: rgba(59,130,246,0.13); color: #60a5fa; }
.tag-non_unique { background: rgba(234,179,8,0.13); color: #f59e0b; }
.tag-link_turn { background: rgba(220,38,38,0.13); color: #f87171; }
.tag-impact_turn { background: rgba(168,85,247,0.13); color: #c084fc; }
.tag-top_shelf { background: rgba(6,182,212,0.13); color: #22d3ee; }
.tag-analytic { background: rgba(100,116,139,0.13); color: #94a3b8; }
.tag-outweigh { background: rgba(34,197,94,0.13); color: #4ade80; }

/* Evidence Cards */
.evidence-card {
    background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 12px; margin: 8px 0;
}
.evidence-tier {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px; display: inline-block;
}
.tier-government { background: rgba(220,38,38,0.13); color: #f87171; }
.tier-academic { background: rgba(168,85,247,0.13); color: #c084fc; }
.tier-thinkTanks { background: rgba(59,130,246,0.13); color: #60a5fa; }
.tier-thinkTank { background: rgba(59,130,246,0.13); color: #60a5fa; }
.tier-news { background: rgba(34,197,94,0.13); color: #4ade80; }
.tier-debate { background: rgba(234,179,8,0.13); color: #f59e0b; }
.tier-other { background: rgba(100,116,139,0.13); color: #94a3b8; }

/* Block File Export */
.block-export { background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px; margin: 12px 0; }
.block-export-text { white-space: pre-wrap; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); max-height: 500px; overflow-y: auto; line-height: 1.5; }
.block-copy-btn {
    background: var(--accent-blue); border: none; color: white; padding: 8px 16px;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem; font-weight: 600;
    transition: opacity 0.2s;
}
.block-copy-btn:hover { opacity: 0.85; }

/* AI Disclaimer */
.ai-disclaimer {
    font-size: 0.75rem; color: var(--accent-gold); background: rgba(245,158,11,0.07);
    border: 1px solid rgba(245,158,11,0.2); border-radius: 6px; padding: 8px 12px;
    margin-top: 16px; line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   LIVE REBUTTAL SPARRING
   ═══════════════════════════════════════════════════════════════ */

/* Hub card featured variant */
.hub-card--violet { border-color: rgba(139,92,246,0.3); }
.hub-card--violet:hover { border-color: rgba(139,92,246,0.6); background: rgba(139,92,246,0.08); }
.hub-card--featured { grid-column: 1 / -1; }

/* Top bar */
.lr-topbar {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border-primary); margin-bottom: 16px;
}
.lr-back-btn { flex-shrink: 0; }
.lr-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lr-format-badge {
    background: var(--accent-blue); color: white; padding: 2px 8px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; flex-shrink: 0;
}
.lr-res-text {
    font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.lr-exchange-counter {
    font-size: 0.8rem; font-weight: 600; color: var(--accent-violet);
    background: rgba(139,92,246,0.1); padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}

/* Setup screen */
.lr-setup { max-width: 540px; margin: 0 auto; padding: 20px 0; }
.lr-setup h2 { font-size: 1.4rem; margin-bottom: 4px; }
.lr-setup-desc { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.9rem; }
.lr-setup-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.lr-setup-row { display: flex; align-items: center; gap: 12px; }
.lr-setup-row > label { width: 100px; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }

.lr-side-picker, .lr-diff-picker, .lr-case-source {
    display: flex; gap: 6px;
}
.lr-side-btn, .lr-diff-btn, .lr-case-btn {
    padding: 6px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
    background: var(--bg-tertiary); border: 1px solid var(--border-primary); color: var(--text-primary);
    cursor: pointer; transition: all 0.15s;
}
.lr-side-btn:hover, .lr-diff-btn:hover, .lr-case-btn:hover { border-color: var(--accent-blue); }
.lr-side-active { background: rgba(59,130,246,0.15); border-color: var(--accent-blue); color: var(--accent-blue); }
.lr-diff-active { background: rgba(139,92,246,0.15); border-color: var(--accent-violet); color: var(--accent-violet); }
.lr-case-active { background: rgba(16,185,129,0.15); border-color: var(--accent-emerald); color: var(--accent-emerald); }
.lr-case-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.lr-select {
    padding: 6px 10px; border-radius: 6px; background: var(--bg-tertiary);
    border: 1px solid var(--border-primary); color: var(--text-primary); font-size: 0.85rem;
}
.lr-manual-case { width: 100%; }
.lr-case-textarea {
    width: 100%; padding: 10px; border-radius: 8px; background: var(--bg-tertiary);
    border: 1px solid var(--border-primary); color: var(--text-primary); font-size: 0.85rem;
    resize: vertical; font-family: inherit;
}

.lr-start-btn { width: 100%; padding: 12px; font-size: 1rem; }

/* Workspace layout */
.lr-workspace { display: flex; flex-direction: column; height: calc(100vh - 140px); }
.lr-columns { display: grid; grid-template-columns: 2fr 3fr; gap: 16px; flex: 1; min-height: 0; overflow: hidden; }

/* Flow panel */
.lr-flow-panel {
    background: var(--bg-secondary); border: 1px solid var(--border-primary); border-radius: 10px;
    padding: 12px; overflow-y: auto;
}
.lr-panel-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }

/* Speech panel */
.lr-speech-panel {
    display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding-right: 4px;
}

.lr-phase-indicator {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: var(--bg-tertiary); border-radius: 8px; font-size: 0.82rem;
}
.lr-phase-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent-emerald);
    animation: lr-pulse 1.5s ease-in-out infinite;
}
@keyframes lr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.lr-speech-label { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }

/* Opponent speech */
.lr-opponent-speech { background: var(--bg-secondary); border-radius: 10px; padding: 14px; border: 1px solid var(--border-primary); }
.lr-contention {
    margin-bottom: 12px; padding: 10px; background: var(--bg-tertiary); border-radius: 8px;
    border-left: 3px solid var(--accent-rose);
}
.lr-contention-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--accent-rose); }
.lr-contention-field { font-size: 0.82rem; margin: 3px 0; color: var(--text-primary); line-height: 1.4; }

.lr-opponent-response { }
.lr-speech-text { font-size: 0.88rem; line-height: 1.5; color: var(--text-primary); }
.lr-analysis-note {
    margin-top: 8px; padding: 6px 10px; border-radius: 6px; font-size: 0.8rem;
}
.lr-analysis-danger { background: rgba(239,68,68,0.1); color: var(--accent-rose); }
.lr-analysis-warning { background: rgba(245,158,11,0.1); color: var(--accent-gold); }

/* Student input */
.lr-student-input { background: var(--bg-secondary); border-radius: 10px; padding: 14px; border: 1px solid var(--border-primary); }
.lr-response-area {
    width: 100%; padding: 12px; border-radius: 8px; background: var(--bg-primary);
    border: 1px solid var(--border-primary); color: var(--text-primary); font-size: 0.88rem;
    font-family: inherit; resize: vertical; line-height: 1.5;
}
.lr-response-area:focus { border-color: var(--accent-blue); outline: none; }
.lr-input-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.lr-word-count { font-size: 0.78rem; color: var(--text-tertiary); }
.lr-submit-btn { padding: 8px 20px; }

/* Thinking animation */
.lr-thinking {
    display: flex; align-items: center; gap: 10px; padding: 20px;
    justify-content: center; color: var(--text-secondary); font-size: 0.9rem;
}
.lr-thinking-anim {
    width: 20px; height: 20px; border: 2px solid var(--border-primary);
    border-top-color: var(--accent-violet); border-radius: 50%;
    animation: lr-spin 0.8s linear infinite;
}
@keyframes lr-spin { to { transform: rotate(360deg); } }

/* Action bar */
.lr-action-bar {
    display: flex; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border-primary); margin-top: 12px;
}
.lr-action-btn {
    padding: 6px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
    background: var(--bg-tertiary); border: 1px solid var(--border-primary); color: var(--text-primary);
    cursor: pointer; transition: all 0.15s;
}
.lr-action-btn:hover { border-color: var(--accent-blue); }
.lr-action-danger { color: var(--accent-rose); }
.lr-action-danger:hover { border-color: var(--accent-rose); background: rgba(239,68,68,0.1); }

/* Flow sheet table */
.flow-sheet { overflow-x: auto; }
.flow-table { border-collapse: collapse; width: 100%; font-size: 0.75rem; }
.flow-th {
    padding: 6px 8px; font-weight: 600; text-align: left; font-size: 0.72rem;
    border-bottom: 2px solid var(--border-primary); white-space: nowrap;
}
.flow-col-pro { color: var(--accent-pro, var(--accent-emerald)); }
.flow-col-con { color: var(--accent-con, var(--accent-rose)); }
.flow-td { padding: 4px 6px; vertical-align: top; border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.05)); min-width: 100px; }
.flow-td-empty { }
.flow-tag { font-weight: 600; display: block; font-size: 0.72rem; text-transform: uppercase; margin-bottom: 2px; }
.flow-text { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.3; }
.flow-arrow { color: var(--accent-blue); margin-right: 4px; font-size: 0.8rem; }
.flow-empty { color: var(--text-tertiary); font-size: 0.82rem; font-style: italic; }

/* Flow status colors */
.flow-status-live { border-left: 3px solid var(--accent-emerald); }
.flow-status-attacked { border-left: 3px solid var(--accent-gold); }
.flow-status-defended { border-left: 3px solid var(--accent-blue); }
.flow-status-dropped { border-left: 3px solid var(--accent-rose); background: rgba(239,68,68,0.05); }
.flow-status-turned { border-left: 3px solid var(--accent-violet); background: rgba(139,92,246,0.05); }
.flow-status-extended { border-left: 3px solid var(--accent-emerald); background: rgba(16,185,129,0.05); }
.flow-status-conceded { border-left: 3px solid var(--text-tertiary); opacity: 0.6; }

/* Full flow modal */
.lr-flow-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lr-flow-modal-content {
    background: var(--bg-primary); border-radius: 12px; padding: 24px;
    max-width: 900px; width: 100%; max-height: 80vh; overflow-y: auto;
    border: 1px solid var(--border-primary);
}
.lr-flow-modal-close {
    float: right; font-size: 1.5rem; background: none; border: none;
    color: var(--text-secondary); cursor: pointer;
}

/* Scoring screen */
.lr-scoring { max-width: 700px; margin: 0 auto; padding: 20px 0; }
.lr-score-title { font-size: 1.3rem; margin-bottom: 16px; text-align: center; }

.lr-verdict {
    padding: 16px; border-radius: 10px; margin-bottom: 20px; text-align: center;
}
.lr-verdict-win { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); }
.lr-verdict-loss { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); }
.lr-verdict-winner { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.lr-verdict-win .lr-verdict-winner { color: var(--accent-emerald); }
.lr-verdict-loss .lr-verdict-winner { color: var(--accent-rose); }
.lr-verdict-reason { font-size: 0.88rem; color: var(--text-secondary); }

.lr-scores-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.lr-score-item { display: grid; grid-template-columns: 120px 1fr 50px; align-items: center; gap: 8px; }
.lr-score-label { font-size: 0.82rem; font-weight: 500; }
.lr-score-bar { height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.lr-score-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.lr-score-value { font-size: 0.82rem; font-weight: 600; text-align: right; }

.lr-score-section { margin-bottom: 16px; padding: 12px; background: var(--bg-secondary); border-radius: 8px; }
.lr-score-section h3 { font-size: 0.9rem; margin-bottom: 8px; }
.lr-score-danger { border-left: 3px solid var(--accent-rose); }
.lr-score-success { border-left: 3px solid var(--accent-emerald); }
.lr-analysis-list, .lr-coaching-list { padding-left: 18px; font-size: 0.85rem; line-height: 1.6; }
.lr-drill-rec {
    padding: 6px 10px; background: var(--bg-tertiary); border-radius: 6px; margin: 4px 0;
    font-size: 0.82rem;
}

.lr-score-actions { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }

/* Responsive */
@media (max-width: 768px) {
    .depth-cards { flex-direction: column; }
    .depth-card { padding: 12px; }
    .deep-two-col { grid-template-columns: 1fr; }
    .results-tabs { gap: 0; }
    .results-tab { padding: 8px 10px; font-size: 0.78rem; }
    .lr-columns { grid-template-columns: 1fr; }
    .lr-flow-panel { max-height: 200px; }
    .lr-setup-row { flex-direction: column; align-items: stretch; }
    .lr-setup-row > label { width: auto; }
}

/* ═══════════════════════════════════════════════════════════════
   CROSS-EXAMINATION / CROSSFIRE PRACTICE
   ═══════════════════════════════════════════════════════════════ */

/* Top Bar */
.cx-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.cx-top-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cx-format-badge {
    background: var(--accent-primary);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cx-mode-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cx-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cx-timer.warning .cx-timer-value { color: var(--accent-gold); }
.cx-timer.danger .cx-timer-value { color: var(--accent-rose); }

/* Setup Screen */
.cx-setup {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 20px;
}

.cx-setup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cx-setup-subtitle {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.cx-setup-form { display: flex; flex-direction: column; gap: 24px; }

.cx-setup-group { display: flex; flex-direction: column; gap: 8px; }

.cx-setup-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mode Selector */
.cx-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cx-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.cx-mode-btn:hover { background: var(--bg-elevated); }
.cx-mode-btn.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary-glow);
}

.cx-mode-icon { font-size: 1.5rem; }
.cx-mode-title { font-weight: 700; font-size: 0.95rem; }
.cx-mode-desc { font-size: 0.75rem; color: var(--text-tertiary); text-align: center; }

/* Difficulty Selector */
.cx-difficulty-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cx-diff-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.cx-diff-btn:hover { background: var(--bg-elevated); }
.cx-diff-btn.active {
    border-color: var(--accent-violet);
    background: rgba(139, 92, 246, 0.1);
}

.cx-diff-name { font-weight: 700; font-size: 0.85rem; }
.cx-diff-desc { font-size: 0.7rem; color: var(--text-tertiary); text-align: center; }

/* Case Preview */
.cx-case-preview {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 16px;
    min-height: 60px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cx-case-placeholder { color: var(--text-tertiary); font-style: italic; }

/* Start Button */
.cx-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.cx-start-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.cx-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Chat Layout ── */
.cx-chat-layout {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Side Panel */
.cx-side-panel {
    width: 280px;
    min-width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    transition: width 0.3s, min-width 0.3s;
}

.cx-side-panel.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

.cx-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cx-side-toggle {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

.cx-side-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Chat Area */
.cx-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cx-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Bubbles */
.cx-bubble {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: cxBubbleIn 0.3s ease;
}

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

.cx-bubble.student {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.cx-bubble.opponent {
    align-self: flex-start;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.cx-bubble .cx-bubble-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 2px;
}

/* Typing Indicator */
.cx-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px 8px;
}

.cx-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-tertiary);
    border-radius: 50%;
    animation: cxTypingPulse 1.2s infinite;
}

.cx-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.cx-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes cxTypingPulse {
    0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
    30% { opacity: 1; transform: scale(1.2); }
}

.cx-typing-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Input Area */
.cx-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.cx-input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.cx-input:focus { border-color: var(--accent-primary); }
.cx-input::placeholder { color: var(--text-tertiary); }

.cx-send-btn {
    padding: 10px 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.cx-send-btn:hover { opacity: 0.9; }
.cx-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Analysis Screen ── */
.cx-analysis {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
}

.cx-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cx-analysis-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cx-analysis-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.cx-score-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.cx-score-label {
    font-size: 1rem;
    color: var(--text-tertiary);
}

/* Analysis Tabs */
.cx-analysis-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.cx-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cx-tab:hover { color: var(--text-primary); }
.cx-tab.active { background: var(--bg-tertiary); color: var(--text-primary); }

.cx-analysis-content {
    min-height: 300px;
}

/* Exchange Log with annotations */
.cx-log-entry {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
}

.cx-log-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 24px;
}

.cx-log-body { flex: 1; }

.cx-log-role {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cx-log-role.student-role { color: var(--accent-blue); }
.cx-log-role.opponent-role { color: var(--accent-rose); }

.cx-log-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.cx-log-annotation {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cx-annotation-effective { background: rgba(52, 211, 153, 0.15); color: var(--accent-emerald); }
.cx-annotation-wasted { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.cx-annotation-concession { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.cx-annotation-trap { background: rgba(139, 92, 246, 0.15); color: var(--accent-violet); }
.cx-annotation-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px dashed var(--accent-rose); }
.cx-annotation-redirect { background: rgba(96, 165, 250, 0.15); color: var(--accent-blue); }

/* Concession Cards */
.cx-concession-card {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-gold);
}

.cx-concession-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cx-concession-use {
    font-size: 0.8rem;
    color: var(--accent-emerald);
    font-style: italic;
}

.cx-concession-severity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cx-severity-high { background: rgba(244,63,94,0.2); color: var(--accent-rose); }
.cx-severity-medium { background: rgba(245,158,11,0.2); color: var(--accent-gold); }
.cx-severity-low { background: rgba(52,211,153,0.2); color: var(--accent-emerald); }

/* Grade Dimensions */
.cx-grade-dim {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 8px;
}

.cx-grade-dim-score {
    font-size: 1.2rem;
    font-weight: 800;
    min-width: 36px;
    text-align: center;
}

.cx-grade-dim-info { flex: 1; }

.cx-grade-dim-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cx-grade-dim-just {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Model CX */
.cx-model-exchange {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.cx-model-q { background: rgba(99,102,241,0.1); }
.cx-model-a { background: var(--bg-secondary); }

.cx-model-role {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    min-width: 30px;
}

/* Analysis Actions */
.cx-analysis-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.cx-retry-btn, .cx-done-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cx-retry-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.cx-done-btn {
    background: var(--accent-primary);
    color: white;
}

.cx-retry-btn:hover, .cx-done-btn:hover { opacity: 0.9; }

/* Responsive */
@media (max-width: 768px) {
    .cx-mode-selector { grid-template-columns: 1fr; }
    .cx-difficulty-selector { grid-template-columns: 1fr; }
    .cx-side-panel { display: none; }
    .cx-bubble { max-width: 85%; }
}

/* ═══════════════════════════════════════════════════════════════
   SUMMARY & FINAL FOCUS PRACTICE
   ═══════════════════════════════════════════════════════════════ */

/* Hub card color variants */
.hub-card--amber { border-color: rgba(245,158,11,0.3); }
.hub-card--amber:hover { border-color: rgba(245,158,11,0.6); background: rgba(245,158,11,0.08); }
.hub-card--emerald { border-color: rgba(16,185,129,0.3); }
.hub-card--emerald:hover { border-color: rgba(16,185,129,0.6); background: rgba(16,185,129,0.08); }

/* Side picker */
.summary-side-picker {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; padding: 8px 0;
}
.side-picker-label {
    font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
}
.side-pill {
    padding: 6px 16px; border-radius: var(--radius-full, 100px);
    font-size: 0.82rem; font-weight: 600;
    background: var(--glass-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s ease;
}
.side-pill:hover { background: rgba(255,255,255,0.08); }
.side-pill.active { color: white; }
.side-pill--pro.active { background: var(--accent-pro, #22d3ee); border-color: var(--accent-pro, #22d3ee); }
.side-pill--con.active { background: var(--accent-con, #f43f5e); border-color: var(--accent-con, #f43f5e); }

/* Round State Display */
.round-state-display {
    margin-bottom: 20px;
    background: var(--glass-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    border-radius: var(--radius-lg, 16px);
    padding: 20px;
    backdrop-filter: blur(var(--glass-blur, 12px));
}
.round-state-loading {
    text-align: center; padding: 32px;
    color: var(--text-secondary);
}
.round-state-loading .loading-spinner {
    margin: 0 auto 12px;
}
.round-state-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
}
.round-state-column {
    display: flex; flex-direction: column; gap: 8px;
}
.round-col-header {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 4px; padding-bottom: 6px;
    border-bottom: 2px solid;
}
.round-col-header--pro { color: var(--accent-pro, #22d3ee); border-color: var(--accent-pro, #22d3ee); }
.round-col-header--con { color: var(--accent-con, #f43f5e); border-color: var(--accent-con, #f43f5e); }

/* Argument cards in round state */
.round-arg-card {
    padding: 10px 12px; border-radius: var(--radius-md, 12px);
    background: var(--bg-secondary, #1a1a2e);
    border-left: 3px solid var(--text-muted);
    position: relative;
}
.round-arg-card.round-arg--live { border-left-color: var(--accent-emerald, #10b981); }
.round-arg-card.round-arg--attacked { border-left-color: var(--accent-gold, #f59e0b); }
.round-arg-card.round-arg--turned { border-left-color: var(--accent-rose, #f43f5e); }
.round-arg-card.round-arg--dropped { border-left-color: var(--text-muted); opacity: 0.6; }
.round-arg-card.round-arg--extended { border-left-color: var(--accent-blue, #3b82f6); }
.round-arg-card.round-arg--conceded { border-left-color: var(--text-muted); opacity: 0.5; text-decoration: line-through; }

.round-arg-status {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 2px 6px; border-radius: 4px;
    margin-bottom: 4px;
}
.round-arg--live .round-arg-status { background: rgba(16,185,129,0.15); color: var(--accent-emerald, #10b981); }
.round-arg--attacked .round-arg-status { background: rgba(245,158,11,0.15); color: var(--accent-gold, #f59e0b); }
.round-arg--turned .round-arg-status { background: rgba(244,63,94,0.15); color: var(--accent-rose, #f43f5e); }
.round-arg--dropped .round-arg-status { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.round-arg--extended .round-arg-status { background: rgba(59,130,246,0.15); color: var(--accent-blue, #3b82f6); }
.round-arg--conceded .round-arg-status { background: rgba(148,163,184,0.1); color: var(--text-muted); }

.round-arg-title {
    font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 2px;
}
.round-arg-claim {
    font-size: 0.78rem; color: var(--text-secondary);
    line-height: 1.4;
}
.round-arg-attacks {
    margin-top: 6px; padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.round-arg-attack {
    font-size: 0.72rem; color: var(--accent-gold, #f59e0b);
    padding: 3px 0; line-height: 1.4;
}

/* Clash display (center column) */
.round-state-clashes {
    display: flex; flex-direction: column;
    justify-content: center; gap: 12px;
    padding: 0 4px;
}
.round-clash {
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    font-size: 0.7rem; text-align: center;
}
.clash-pro { color: var(--accent-pro, #22d3ee); font-weight: 600; }
.clash-con { color: var(--accent-con, #f43f5e); font-weight: 600; }
.clash-arrow {
    font-size: 1.1rem; color: var(--text-muted);
    line-height: 1;
}
.clash-arrow--pro { color: var(--accent-pro, #22d3ee); }
.clash-arrow--con { color: var(--accent-con, #f43f5e); }
.clash-arrow--tossup { color: var(--accent-gold, #f59e0b); }

/* Context info */
.summary-context {
    display: flex; gap: 16px; margin-bottom: 16px;
    flex-wrap: wrap;
}
.summary-context-item {
    font-size: 0.8rem; color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-secondary, #1a1a2e);
    border-radius: var(--radius-sm, 8px);
}
.summary-context-item:empty { display: none; }

/* FF collapse context */
.ff-collapse-context {
    padding: 12px 16px; margin-bottom: 16px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-md, 12px);
}
.ff-collapse-context h4 {
    font-size: 0.82rem; font-weight: 600;
    color: var(--accent-primary, #6366f1);
    margin-bottom: 4px;
}
.ff-collapse-context p {
    font-size: 0.8rem; color: var(--text-secondary);
    line-height: 1.5;
}

/* Drill time hint */
.drill-time-hint {
    font-size: 0.78rem; font-weight: 400;
    color: var(--text-muted);
}

/* Drill grade score colors */
.drill-grade-score.score-high { color: var(--accent-emerald, #10b981); }
.drill-grade-score.score-mid { color: var(--accent-gold, #f59e0b); }
.drill-grade-score.score-low { color: var(--accent-rose, #f43f5e); }

/* Dimension justification text */
.grade-dim-justification {
    font-size: 0.72rem; color: var(--text-muted);
    padding: 2px 0 6px 0; line-height: 1.4;
    margin-left: 0;
}

/* Retry button */
.drill-retry-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-md, 12px);
    font-size: 0.85rem; font-weight: 600;
    background: var(--glass-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s ease;
}
.drill-retry-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .round-state-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .round-state-clashes {
        flex-direction: row;
        justify-content: center;
        padding: 8px 0;
        border-top: 1px solid rgba(255,255,255,0.06);
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .round-clash { flex-direction: row; gap: 6px; }
    .summary-context { flex-direction: column; }
}

/* Utilities — .hidden is defined above, no duplicate needed */
