:root {
    --bg-color: #f4f7f6;
    --panel-bg: #ffffff;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #4b5563;
    --secondary-hover: #374151;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #16a34a;
    --text-color: #1f2937;
    --border-color: #cbd5e1;
    --accent-gold: #f59e0b;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
}

*:not(mjx-container):not(mjx-container *) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 1.2rem 1rem;
    display: flex;
    justify-content: center;
    user-select: text;
    -webkit-user-select: text;
}

.container {
    max-width: 1180px;
    width: 100%;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-height: 40px;
    touch-action: manipulation;
}

.nav-home-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-dept-tag {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 600px) {
    .nav-dept-tag {
        display: none;
    }
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 2.1rem;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

header p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 940px;
    margin: 0 auto;
}

.series-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.series-card h3 {
    font-size: 1rem;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.series-card p {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.series-card .series-tagline {
    font-weight: 700;
    color: #111827;
    font-style: italic;
}

/* Rigid Grid Layout Track Guards & Option A Mobile Layout */
.sim-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .sim-layout {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Visualizer & Canvas render first on mobile */
    .visualizer-panel {
        order: 1;
    }

    /* Controls follow naturally below without internal scroll traps */
    .controls-panel {
        order: 2;
        max-height: none !important;
        overflow-y: visible !important;
        padding-right: 1.5rem;
        padding-bottom: 1.5rem;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

.panel {
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.controls-panel {
    height: auto;
    max-height: none;
    overflow-y: visible;
    padding-right: 1.25rem;
    padding-bottom: 1.5rem;
    box-sizing: border-box;
}

.control-group {
    margin-bottom: 1.15rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px dashed var(--border-color);
}

.control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-group h3 {
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    color: #334155;
    font-weight: 700;
}

/* Mode Switcher Buttons */
.mode-toggle-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1 1 calc(33.333% - 0.5rem);
    padding: 0.6rem 0.65rem;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 42px;
    touch-action: manipulation;
}

.mode-btn:hover {
    background: #edf2f7;
    color: var(--primary-color);
}

.mode-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

@media (max-width: 680px) {
    .mode-toggle-group {
        flex-direction: column;
        gap: 0.45rem;
    }
    .mode-btn {
        width: 100%;
        min-height: 42px;
        font-size: 0.85rem;
    }
}

/* Composite Slider Rows (AGENTS.md Section 1.2) */
.slider-row {
    margin-bottom: 0.9rem;
}

.slider-label-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.slider-label-bar label,
.slider-label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.stat-badge {
    background: #eff6ff;
    color: var(--primary-color);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #bfdbfe;
    font-family: monospace;
    white-space: nowrap;
}

.stepper-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.step-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.step-btn:active {
    background: #cbd5e1;
    transform: scale(0.96);
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
    accent-color: var(--primary-color);
}

@media (max-width: 680px) {
    .slider-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.85rem;
        align-items: center;
    }
    .slider-label-bar {
        width: 100%;
        margin-bottom: 0;
    }
    .stepper-container {
        flex: 0 0 100%;
        width: 100%;
        gap: 0.5rem;
        margin-top: 0.15rem;
    }
    .step-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        font-size: 1.3rem;
    }
    input[type="range"] {
        height: 8px;
    }
}

/* Action Buttons Grid */
.action-grid {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    touch-action: manipulation;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.action-btn.primary {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.action-btn.active {
    background: #1e293b;
    color: #ffffff;
    border-color: #0f172a;
}

.slider-hint {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
    margin-top: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

/* Concept Insight Card */
.concept-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.95rem;
    margin-top: 1rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #334155;
}

.concept-card h4 {
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Visualizer & 3D Canvas / Phasor Container */
.visualizer-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 440px;
    min-height: 380px;
    border-radius: 10px;
    overflow: hidden;
    background: #060911;
    border: 1px solid #1e293b;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 768px) {
    .canvas-container {
        height: 370px;
        min-height: 340px;
        max-height: 52vh;
    }
}

#sim-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Viewport Legend Card (AGENTS.md Section 2.3) */
.viewport-legend {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    z-index: 10;
    pointer-events: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #e2e8f0;
    font-weight: 600;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .viewport-legend {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 5px 8px;
        gap: 4px 10px;
        justify-content: center;
        background: rgba(8, 12, 20, 0.94);
    }
    .legend-item {
        font-size: 0.65rem;
        gap: 4px;
    }
    .legend-dot {
        width: 7px;
        height: 7px;
    }
}

.gesture-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 1s ease;
}

@media (max-width: 768px) {
    .gesture-hint {
        bottom: 34px;
        right: 8px;
        font-size: 0.65rem;
        padding: 0.2rem 0.45rem;
    }
}

/* Stats Telemetry Strip (PROJECT_STANDARDS.md Section 7.3) */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

.stat-cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0.45rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.stat-title {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.stat-number {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
}

.stat-number.gold { color: #fbbf24; }
.stat-number.green { color: #4ade80; }
.stat-number.cyan { color: #38bdf8; }
.stat-number.purple { color: #c084fc; }
.stat-number.rose { color: #fb7185; }

@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        padding: 0.5rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-cell:last-child {
        grid-column: span 2;
    }
}

/* Oscilloscope & Phasor Waveform Canvas */
.oscilloscope-container {
    background: #04060a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.scope-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.scope-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scope-legend {
    display: flex;
    gap: 0.85rem;
}

.scope-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 600;
}

.legend-line {
    width: 14px;
    height: 3px;
    border-radius: 2px;
}

#scope-canvas {
    width: 100%;
    height: 100px;
    display: block;
    background: #04060a;
    border-radius: 4px;
}

/* Admission Callout Box */
.admission-card { 
    background: linear-gradient(135deg, #1e3a8a, #0f172a); 
    color: #ffffff; 
    padding: 1.5rem; 
    border-radius: 12px; 
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: space-between; 
    gap: 1.5rem; 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
    position: relative; 
    border: 2px solid transparent; 
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) { 
    .admission-card { 
        flex-direction: column; 
        text-align: left; 
        gap: 1.25rem; 
        padding: 1.25rem 1.5rem;
    } 
    .program-grid { 
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 0.75rem;
    } 
    .promo-actions { 
        width: 100%; 
        flex-direction: row;
    } 
    .promo-actions .promo-button {
        flex: 1;
    }
}

@media (max-width: 520px) {
    .program-grid {
        grid-template-columns: 1fr;
    }
    .promo-actions {
        flex-direction: column;
    }
}

.attention-flash { 
    animation: bannerGlowPulse 3s infinite ease-in-out; 
}

@keyframes bannerGlowPulse { 
    0% { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: transparent; } 
    50% { box-shadow: 0 0 20px 4px rgba(251, 191, 36, 0.4); border-color: rgba(251, 191, 36, 0.6); } 
    100% { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: transparent; } 
}

.promo-copy .promo-kicker { 
    color: #60a5fa; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 0.05em; 
    margin-bottom: 0.2rem; 
}

.promo-copy .promo-lead { 
    color: #ffffff; 
    font-weight: 600; 
    font-size: 1.05rem; 
    margin-bottom: 0.25rem; 
}

.promo-copy .promo-headline { 
    color: #fcd34d; 
    font-weight: 800; 
    font-size: 1.45rem; 
    line-height: 1.25; 
}

.program-grid { 
    display: flex; 
    gap: 1.5rem; 
    flex: 1; 
    justify-content: center; 
}

.program-card { 
    background: rgba(255, 255, 255, 0.08); 
    padding: 0.75rem 1rem; 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    font-size: 0.85rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.2rem; 
}

.program-card strong { color: #fcd34d; font-size: 0.95rem; } 
.program-card span { color: #e2e8f0; } 
.program-card small { color: #94a3b8; font-style: italic; }

.promo-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    min-width: 160px; 
}

.promo-button { 
    padding: 0.65rem 1.2rem; 
    border-radius: 6px; 
    font-weight: 700; 
    text-decoration: none; 
    transition: all 0.2s ease; 
    text-align: center; 
    font-size: 0.9rem; 
    min-height: 44px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    touch-action: manipulation;
}

.main-cta { background-color: #fbbf24; color: #0f172a; } 
.main-cta:hover { background-color: #f59e0b; transform: translateY(-1px); }

.sub-cta { background-color: transparent; color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.3); } 
.sub-cta:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }

/* Feedback & Suggestions Card */
.feedback-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 800px) {
    .feedback-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .feedback-btn {
        width: 100%;
        text-align: center;
    }
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feedback-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-text h4 {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.feedback-text p {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

.feedback-btn {
    padding: 0.65rem 1.1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    touch-action: manipulation;
}

.feedback-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--primary-hover);
}

.series-footer { 
    text-align: center; 
    padding: 1.5rem 0 0; 
    border-top: 1px solid #e5e7eb; 
    margin-top: 1.5rem; 
}

.series-footer p { 
    font-size: 0.82rem; 
    color: #64748b; 
    font-weight: 500; 
}


/* ==========================================================================
   Series Modal & Top Navigation Actions (Standard 4.1 & 19)
   ========================================================================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--panel-bg, #ffffff);
    color: var(--text-color, #1f2937);
    border: 1px solid var(--border-color, #cbd5e1);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-pill-btn:hover {
    background: var(--primary-color, #3b82f6);
    border-color: var(--primary-color, #3b82f6);
    color: #ffffff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-window {
    position: relative;
    z-index: 10000;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    flex-shrink: 0;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111827;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    flex: 1 1 auto;
    padding: 1.15rem 1.4rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.modal-body p {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.5;
}

.modal-body .series-tagline {
    font-style: italic;
    color: #93c5fd;
    font-weight: 500;
    font-size: 0.96rem;
}

/* Modal Admission Card (Standard 19: Strict Anti-Squash & Compact) */
.modal-admission {
    flex-shrink: 0 !important;
    min-height: fit-content !important;
    height: auto !important;
    margin: 0.4rem 0 !important;
    padding: 0.85rem 1.15rem !important;
    gap: 0.55rem !important;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35) !important;
}

.modal-admission .promo-kicker {
    font-size: 0.72rem;
}

.modal-admission .promo-lead {
    font-size: 0.9rem;
}

.modal-admission .promo-headline {
    font-size: 1.05rem;
    line-height: 1.2;
}

.modal-admission .program-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
}

.modal-admission .program-card {
    padding: 0.55rem 0.75rem;
    gap: 0.2rem;
    height: auto;
}

.modal-admission .program-card strong {
    font-size: 0.88rem;
}

.modal-admission .program-card span {
    font-size: 0.72rem;
}

.modal-admission .program-card small {
    font-size: 0.68rem;
}

.modal-admission .promo-actions {
    margin-top: 0.25rem;
    gap: 0.6rem;
}

.modal-admission .promo-button {
    padding: 0.45rem 1.15rem;
    font-size: 0.8rem;
}

.modal-footer {
    flex-shrink: 0;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    background: #0f172a;
}

.btn-modal-dismiss {
    background: var(--primary-color, #3b82f6);
    color: #ffffff;
    border: none;
    padding: 0.45rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-modal-dismiss:hover {
    background: var(--primary-hover, #2563eb);
}

/* Standard 19: Modal Option A Mobile Priority */
@media (max-width: 600px) {
    .modal-overlay {
        padding: 0.65rem;
    }

    .modal-window {
        max-height: 90vh;
    }

    .modal-body {
        padding: 0.75rem 0.85rem;
        gap: 0.6rem;
    }

    .modal-admission {
        order: -1 !important;
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
        padding: 0.75rem 0.85rem !important;
        gap: 0.45rem !important;
        height: auto !important;
        min-height: fit-content !important;
    }

    .modal-admission .promo-kicker {
        font-size: 0.65rem !important;
    }

    .modal-admission .promo-lead {
        font-size: 0.82rem !important;
    }

    .modal-admission .promo-headline {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }

    .modal-admission .program-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.35rem !important;
    }

    .modal-admission .program-card {
        padding: 0.38rem 0.5rem !important;
        gap: 0.15rem !important;
    }

    .modal-admission .program-card strong {
        font-size: 0.78rem !important;
    }

    .modal-admission .program-card span,
    .modal-admission .program-card small {
        font-size: 0.62rem !important;
        line-height: 1.25 !important;
    }

    .modal-admission .promo-actions {
        margin-top: 0.25rem !important;
        gap: 0.45rem !important;
    }

    .modal-admission .promo-button {
        padding: 0.38rem 0.85rem !important;
        font-size: 0.76rem !important;
    }
}


/* ==================== 3-MINUTE INVESTIGATION CARD (Standard 26) ==================== */
.c-mission-card {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.c-mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #f59e0b 100%);
}
.c-mission-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.c-mission-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.c-mission-icon { font-size: 1.1rem; }
.c-mission-title-wrap h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b1329;
  margin: 0;
}
.c-mission-step-counter {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 999px;
}
.c-mission-toggle-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.c-mission-toggle-btn:hover { background: #f1f5f9; color: #0b1329; }
.c-mission-card.is-collapsed .c-mission-chevron { transform: rotate(180deg); }
.c-mission-collapsed-summary {
  display: none;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  padding: 0.2rem 0;
}
.c-mission-card.is-collapsed .c-mission-collapsed-summary { display: block; }
.c-mission-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.c-mission-card.is-collapsed .c-mission-body { display: none; }
.c-mission-steps-nav {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}
.c-mission-step-btn {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.c-mission-step-btn.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}
.c-mission-step-btn.done {
  border-color: #10b981;
  color: #059669;
}
.c-step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-mission-step-btn.active .c-step-dot { background: #0284c7; }
.c-mission-step-btn.done .c-step-dot { background: #10b981; }
.c-mission-content-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
}
.c-mission-meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.c-mission-type-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
}
.c-mission-mode-indicator {
  font-size: 0.7rem;
  color: #64748b;
}
.c-mission-instruction {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #1e293b;
  margin-bottom: 0.45rem;
}
.c-mission-observe {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
  background: #ffffff;
  border-left: 3px solid #0284c7;
  padding: 0.45rem 0.65rem;
  border-radius: 0 6px 6px 0;
}
.c-mission-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
}
.c-btn-mission-done {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.c-btn-mission-done:hover { background: #0369a1; }
.c-mission-time-tag {
  font-size: 0.72rem;
  color: #94a3b8;
}
.c-mission-congrats {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.c-mission-congrats h4 {
  margin: 0 0 0.3rem 0;
  color: #065f46;
  font-size: 0.95rem;
}
.c-mission-congrats p {
  margin: 0 0 0.75rem 0;
  color: #047857;
  font-size: 0.82rem;
}
.c-btn-mission-restart {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

/* ==================== PROGRESSIVE DISCLOSURE ACCORDIONS (Standard 27) ==================== */
.is-collapsible {
  background: #ffffff;
  border: 1px solid #E2E6EE;
  border-radius: 16px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.is-collapsible:hover { border-color: #CBD5E1; }
.is-collapsible.is-open { box-shadow: 0 4px 14px rgba(11, 19, 41, 0.04); }
.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  transition: background 0.15s;
}
.accordion-head:hover { background: #F8FAFC; }
.accordion-head-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.accordion-icon { font-size: 1.5rem; line-height: 1; flex: none; }
.accordion-title-wrap { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.accordion-head h2, .accordion-head h3 {
  font-family: var(--font-display, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color, #0B1329);
  margin: 0;
  line-height: 1.25;
}
.accordion-subtext { font-size: 0.82rem; color: #64748B; display: block; }
.accordion-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  pointer-events: none;
}
.accordion-head:hover .accordion-toggle-btn { background: #0B1329; color: #FFFFFF; border-color: #0B1329; }
.accordion-chevron { width: 16px; height: 16px; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.is-collapsible.is-open .accordion-chevron { transform: rotate(180deg); }
.accordion-content { padding: 1.25rem 1.4rem 1.4rem 1.4rem; border-top: 1px solid #F1F5F9; }
.accordion-content[hidden] { display: none !important; }
.poe-box { background: #F0F7FF; border-color: #BAE6FD; }
.poe-box .accordion-head { background: #F0F7FF; }
.poe-box .accordion-head:hover { background: #E0F2FE; }
.poe-box .accordion-head h3 { color: #0369A1; }
.poe-box .accordion-subtext { color: #0284C7; }
.poe-box .accordion-toggle-btn { background: #E0F2FE; color: #0369A1; border-color: #BAE6FD; }
.poe-box .accordion-head:hover .accordion-toggle-btn { background: #0284C7; color: #FFFFFF; border-color: #0284C7; }
