/* planner.css - Version 5.0 (Dynamic Pathway Builder) */

/* --- CORE LAYOUT --- */
body {
    background-color: #F4F7F9;
    color: #333333;
    font-family: 'Poppins', sans-serif;
}

main {
    min-height: 80vh;
}

/* --- PLANNER CARD CONTAINER --- */
.planner-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* --- STEP HEADER (Gradient with Shimmer) --- */
.step-header {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(52, 224, 161, 0.3);
    position: relative;
    overflow: hidden;
}

.step-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 224, 161, 0.08), transparent);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.step-header > * {
    position: relative;
    z-index: 1;
}

.step-header-costs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-header-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
}

.step-cost-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #34E0A1;
    text-shadow: 0 0 20px rgba(52, 224, 161, 0.3);
}

.step-total-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* --- THE "FLIGHT PATH" STEPPER --- */
.flight-path-container {
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    position: relative;
    padding: 2.5rem 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.flight-path-track {
    position: relative;
}

.flight-path-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #e2e8f0, #cbd5e1);
    z-index: 0;
    transform: translateY(-50%);
    border-radius: 10px;
}

.flight-path-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #0078D4, #34E0A1);
    z-index: 1;
    transform: translateY(-50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 16px rgba(52, 224, 161, 0.35);
}

.flight-path-progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to left, rgba(52, 224, 161, 0.5), transparent);
    filter: blur(2px);
}

/* The Nodes */
.step-node {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: white;
    border: 3px solid #cbd5e1;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.step-node.completed {
    background: linear-gradient(135deg, #34E0A1, #2dd491);
    border-color: #34E0A1;
    box-shadow: 0 3px 14px rgba(52, 224, 161, 0.35);
}

.step-node.completed::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.75rem;
}

.step-node.active {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    border-color: white;
    border-width: 3px;
    box-shadow:
        0 0 0 6px rgba(0, 120, 212, 0.15),
        0 6px 20px rgba(0, 120, 212, 0.35);
    animation: pulse-node 2s infinite;
}

.step-node.active::after {
    content: '\f072';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.85rem;
    animation: plane-bob 2s ease-in-out infinite;
}

@keyframes pulse-node {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes plane-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* --- STEP NODE LABELS --- */
.step-node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.step-label {
    position: absolute;
    top: calc(100% + 0.35rem);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    white-space: nowrap;
}

.step-label-active { color: #0078D4; }
.step-label-completed { color: #34E0A1; }

@media (min-width: 768px) {
    .step-label { font-size: 0.65rem; }
}

/* --- PREREQUISITES PANEL --- */
.prereqs-panel {
    margin: 0 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.prereqs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.prereqs-toggle:hover { color: #0078D4; }

.prereqs-toggle .prereqs-chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.65rem;
}

.prereqs-toggle.open .prereqs-chevron { transform: rotate(180deg); }

.prereqs-content {
    display: none;
    padding: 0 0.5rem 1rem;
}

.prereqs-content.open {
    display: block;
    animation: prereqs-slide 0.3s ease;
}

@keyframes prereqs-slide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.prereqs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .prereqs-list { grid-template-columns: 1fr 1fr; }
}

.prereqs-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #475569;
    padding: 0.4rem 0.6rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #f1f5f9;
}

.prereqs-item i {
    color: #0078D4;
    width: 1rem;
    text-align: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.prereqs-ref {
    font-size: 0.65rem;
    color: #94a3b8;
    padding-top: 0.5rem;
    font-style: italic;
}

/* ============================================================
   PATHWAY CONFIGURATOR
   ============================================================ */
.pathway-config {
    padding: 0;
}

.config-question {
    transition: border-color 0.3s;
}

.config-question-error {
    border: 2px solid #f59e0b;
    border-radius: 1rem;
    padding: 1rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.config-question-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-question-title i {
    color: #0078D4;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.config-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.config-card {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.config-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #93C5FD;
}

.config-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.config-card.selected {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #0078D4;
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.12);
    transform: translateY(-2px);
}

.config-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #0078D4, #34E0A1);
    border-radius: 1rem 1rem 0 0;
}

.config-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 120, 212, 0.35);
}

.config-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.config-card-icon {
    font-size: 1.75rem;
    color: #cbd5e1;
    transition: color 0.3s;
}

.config-card.selected .config-card-icon {
    color: #0078D4;
}

.config-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.config-card-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.popularity-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    white-space: nowrap;
}

.config-info {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.config-info i {
    color: #0078D4;
}

/* ============================================================
   OPTION CARDS (Standard)
   ============================================================ */
.option-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .option-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.option-card {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #93C5FD;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.option-card.selected {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #0078D4;
    box-shadow:
        0 8px 24px rgba(0, 120, 212, 0.12),
        0 0 0 1px rgba(0, 120, 212, 0.08);
    transform: translateY(-2px);
}

.option-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #0078D4, #34E0A1);
    border-radius: 1rem 1rem 0 0;
}

.option-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 3px 10px rgba(0, 120, 212, 0.35);
}

.option-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.option-price {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    color: #0078D4;
    font-size: 1.15rem;
}

.recommended-badge {
    background: linear-gradient(135deg, #34E0A1, #2dd491);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(52, 224, 161, 0.25);
}

/* ============================================================
   TOGGLE SWITCHES & EXTRAS
   ============================================================ */
.extras-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.extras-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
    background: linear-gradient(135deg, #34E0A1, #2dd491);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.08),
        0 0 12px rgba(52, 224, 161, 0.25);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.required-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 0.35rem;
    text-transform: uppercase;
}

/* ============================================================
   HOUR BUILDING - Hours Target Panel
   ============================================================ */
.hours-target-panel {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #bae6fd;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.hours-target-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .hours-target-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hours-target-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hours-target-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.hours-target-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.hours-target-value-sm {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

/* ============================================================
   HOUR BUILDING - Hours Slider
   ============================================================ */
.hours-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hours-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #e2e8f0, #cbd5e1);
    outline: none;
}

.hours-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
    transition: transform 0.2s;
}

.hours-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.hours-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.hours-slider-value {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

/* Validation Messages */
.validation-msg {
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-msg.hidden { display: none; }

/* ============================================================
   HOUR BUILDING - Strategy Tabs
   ============================================================ */
.strategy-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.strategy-tab {
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
}

.strategy-tab:hover {
    border-color: #93C5FD;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.strategy-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.strategy-tab.selected {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #0078D4;
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.12);
}

.strategy-tab.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #0078D4, #34E0A1);
    border-radius: 1rem 1rem 0 0;
}

.strategy-tab i {
    font-size: 1.5rem;
    color: #cbd5e1;
    transition: color 0.3s;
}

.strategy-tab.selected i { color: #0078D4; }

.strategy-tab-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}

.strategy-tab-desc {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ============================================================
   HOUR BUILDING - Strategy Detail
   ============================================================ */
.strategy-detail {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.detail-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.detail-select:focus {
    border-color: #0078D4;
}

.detail-input-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.2s;
}

.detail-input-wrap:focus-within {
    border-color: #0078D4;
}

.detail-input-wrap span {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
}

.detail-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    font-family: 'Roboto Mono', monospace;
}

.detail-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-btn:hover {
    background: #f0f9ff;
    border-color: #0078D4;
    color: #0078D4;
}

/* Combination Segments */
.combo-segment {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.combo-segment-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   HOUR BUILDING - Cost Breakdown
   ============================================================ */
.cost-breakdown {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}

.breakdown-line:last-of-type { border-bottom: none; }

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 0;
    margin-top: 0.5rem;
    border-top: 2px solid #cbd5e1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

/* ============================================================
   ME/IR - MEP Decision Cards
   ============================================================ */
.mep-info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: #0369a1;
}

.mep-info-box i {
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.mep-decision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mep-card {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mep-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mep-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Recommended (green) variant */
.mep-recommended {
    background: white;
    border-color: #e2e8f0;
}

.mep-recommended.selected {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #22c55e;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.12);
}

.mep-recommended.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #22c55e, #34E0A1);
    border-radius: 1rem 1rem 0 0;
}

/* Warning (amber) variant */
.mep-warning {
    background: white;
    border-color: #e2e8f0;
}

.mep-warning.selected {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.mep-warning.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #f59e0b, #eab308);
    border-radius: 1rem 1rem 0 0;
}

.mep-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.mep-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mep-recommended .mep-card-title i { color: #22c55e; }
.mep-warning .mep-card-title i { color: #f59e0b; }

.mep-card-price {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mep-recommended .mep-card-price { color: #0078D4; }
.mep-warning .mep-card-price { color: #65a30d; }

.mep-privileges, .mep-limitations {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.mep-privileges li, .mep-limitations li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.2rem 0;
}

.mep-privileges li i {
    color: #22c55e;
    font-size: 0.7rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.mep-limitations li i {
    color: #ef4444;
    font-size: 0.7rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.mep-limitations li {
    color: #64748b;
}

.mep-reasoning {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
    font-style: italic;
    margin-top: auto;
}

.mep-warning-text {
    font-size: 0.75rem;
    color: #d97706;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
}

/* ============================================================
   SUMMARY - Pathway Info
   ============================================================ */
.pathway-summary {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.pathway-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #334155;
}

.pathway-summary-item i {
    color: #0078D4;
    width: 1.25rem;
    text-align: center;
}

/* ============================================================
   FOOTER & NAV BUTTONS
   ============================================================ */
.sticky-footer {
    background: linear-gradient(to top, rgba(248, 250, 252, 1), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(10px);
    border-top: 2px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    z-index: 40;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

.nav-btn-back {
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.nav-btn-next {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 120, 212, 0.25);
}

.nav-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.35);
}

/* Animation for numbers counting up */
@keyframes countUp {
    from { opacity: 0.5; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-value {
    animation: countUp 0.3s ease-out;
}

/* ============================================================
   SUMMARY SCREEN
   ============================================================ */
.summary-phase {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.summary-phase:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.summary-phase-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078D4, #0066b8);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.summary-details {
    border-top: 1px solid #F3F4F6;
    padding-top: 0.75rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.summary-line + .summary-line {
    border-top: 1px dashed #F3F4F6;
}

.summary-total {
    background: linear-gradient(135deg, #333333, #1a1a2e);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================================
   CONFIG MODAL
   ============================================================ */
@keyframes modal-appear {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay {
    backdrop-filter: blur(8px);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .step-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.25rem 1.5rem;
    }

    .step-header-costs {
        width: 100%;
        justify-content: flex-start;
        gap: 1.25rem;
    }

    .step-cost-value,
    .step-total-value {
        font-size: 1.25rem;
    }

    .step-node {
        width: 1.75rem;
        height: 1.75rem;
    }

    .step-node.completed::after { font-size: 0.55rem; }

    .step-node.active {
        width: 2.5rem;
        height: 2.5rem;
    }

    .step-node.active::after { font-size: 0.7rem; }

    .flight-path-container {
        padding: 2rem 1rem 1.5rem;
    }

    .prereqs-panel { margin: 0 1rem; }
    .prereqs-list { grid-template-columns: 1fr; }

    /* Config cards stack on mobile */
    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-grid-3 {
        grid-template-columns: 1fr;
    }

    /* Strategy tabs stack */
    .strategy-tabs {
        grid-template-columns: 1fr;
    }

    /* MEP decision cards stack */
    .mep-decision-grid {
        grid-template-columns: 1fr;
    }

    /* Pathway summary wraps */
    .pathway-summary {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================================
   v5.0 — GUIDED SETUP, REALITY CHECKS & EXPLAINERS
   ============================================================ */

/* --- Intro screen --- */
.planner-intro { animation: fadeInUp .4s ease; }
.intro-lead {
    font-size: 1.05rem; line-height: 1.75; color: #374151;
    border-left: 4px solid var(--brand-azure, #0078D4);
    padding-left: 1.1rem; margin-bottom: 2rem;
}
.intro-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem; margin-bottom: 1.75rem;
}
.intro-point {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 1.25rem;
}
.intro-icon { font-size: 1.5rem; color: var(--brand-azure, #0078D4); margin-bottom: .6rem; display: block; }
.intro-point h4 { font-weight: 700; color: #0a1f33; margin-bottom: .4rem; font-size: .95rem; }
.intro-point p { font-size: .82rem; color: #6b7280; line-height: 1.6; }

.intro-note {
    display: flex; gap: .75rem; align-items: flex-start;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: .9rem 1.1rem; font-size: .82rem; color: #64748b; margin-bottom: 1.5rem;
}
.intro-note i { color: #94a3b8; margin-top: .15rem; }

.intro-cta {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #0a1f33, #123); color: #fff;
    border-radius: 16px; padding: 1.4rem 1.6rem;
}
.intro-cta h4 { font-weight: 700; margin-bottom: .25rem; }
.intro-cta p { font-size: .85rem; color: #cbd5e1; }
.intro-cta-btn {
    background: var(--brand-green, #34E0A1); color: #0a1f33; font-weight: 700;
    padding: .7rem 1.3rem; border-radius: 10px; white-space: nowrap;
    transition: transform .15s ease, filter .15s ease;
}
.intro-cta-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* --- Setup progress --- */
.setup-progress { display: flex; align-items: center; gap: .8rem; justify-content: center; padding: .5rem 0; }
.setup-progress-label { font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #9ca3af; }
.setup-dots { display: flex; gap: .4rem; }
.setup-dot { width: 8px; height: 8px; border-radius: 999px; background: #e5e7eb; transition: all .25s ease; }
.setup-dot.done { background: var(--brand-green, #34E0A1); }
.setup-dot.active { background: var(--brand-azure, #0078D4); transform: scale(1.35); }

/* --- "Why we're asking" panel --- */
.setup-why {
    display: flex; gap: .9rem; align-items: flex-start;
    background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid var(--brand-azure, #0078D4);
    border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.75rem;
}
.setup-why-icon { color: var(--brand-azure, #0078D4); font-size: 1.1rem; margin-top: .15rem; }
.setup-why-title {
    font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: var(--brand-azure, #0078D4); margin-bottom: .35rem;
}
.setup-why-body { font-size: .88rem; line-height: 1.65; color: #1e3a5f; }
.setup-why-body strong { font-weight: 700; }

/* --- Auto-selected / pathway notes --- */
.auto-select-note {
    display: flex; gap: .7rem; align-items: flex-start;
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
    padding: .8rem 1rem; margin-top: .9rem; font-size: .82rem; color: #166534; line-height: 1.6;
}
.auto-select-note i { color: #22c55e; margin-top: .15rem; }

/* --- Buffer / toggle panels --- */
.buffer-panel {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
    padding: 1rem 1.15rem; margin-top: 1.25rem;
}
.buffer-panel .text-xs { max-width: 46ch; }

/* --- Night rating badge --- */
.night-badge {
    background: #ede9fe; color: #6d28d9; font-size: .6rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em; padding: .15rem .5rem;
    border-radius: 999px; border: 1px solid #ddd6fe;
}

/* --- USA travel --- */
.usa-travel-block { border-top: 1px dashed #e5e7eb; padding-top: 1rem; }
.detail-prefix { font-family: monospace; font-weight: 700; color: #6b7280; }
.detail-input {
    flex: 1; padding: .55rem .75rem; border: 2px solid #e5e7eb; border-radius: 8px;
    font-family: monospace; font-weight: 700; background: #f9fafb; outline: none;
    transition: border-color .15s ease;
}
.detail-input:focus { border-color: var(--brand-azure, #0078D4); background: #fff; }
.detail-hint { font-size: .72rem; color: #9ca3af; margin-top: .4rem; line-height: 1.5; }

/* --- Away trips --- */
.away-trips-panel {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 1.2rem 1.35rem; margin-top: 1rem;
}
.away-trips-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .9rem; }
.away-trips-icon { color: var(--brand-azure, #0078D4); font-size: 1.25rem; margin-top: .1rem; }
.away-trips-title { font-weight: 700; color: #0a1f33; margin-bottom: .3rem; font-size: .95rem; }
.away-trips-body { font-size: .84rem; color: #4b5563; line-height: 1.65; }
.away-trips-excludes {
    display: flex; gap: .6rem; align-items: flex-start;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 9px;
    padding: .7rem .9rem; font-size: .78rem; color: #991b1b; line-height: 1.55; margin-bottom: 1rem;
}
.away-trips-excludes i { margin-top: .15rem; }
.away-trips-control {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border-top: 1px solid #f3f4f6; padding-top: .9rem;
}

/* --- Explainer link + modal --- */
.explain-link {
    font-size: .72rem; font-weight: 700; color: var(--brand-azure, #0078D4);
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .7rem; border-radius: 8px; transition: background .15s ease;
}
.explain-link:hover { background: #eff6ff; }

.explain-modal {
    background: #fff; border-radius: 18px; width: 100%; max-width: 720px;
    max-height: 88vh; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
.explain-modal-body { padding: 1.5rem; overflow-y: auto; }
.explain-intro { font-size: .9rem; color: #4b5563; line-height: 1.7; margin-bottom: 1.4rem; }
.explain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.explain-col { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.1rem; }
.explain-col-title { font-weight: 800; color: #0a1f33; margin-bottom: .75rem; font-size: .92rem; }
.explain-list { display: flex; flex-direction: column; gap: .55rem; }
.explain-list li { display: flex; gap: .55rem; align-items: flex-start; font-size: .8rem; color: #4b5563; line-height: 1.55; }
.explain-list i { color: var(--brand-green, #34E0A1); margin-top: .2rem; font-size: .7rem; }
.explain-verdict {
    display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.3rem;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px;
    padding: 1rem 1.15rem; font-size: .85rem; color: #1e3a5f; line-height: 1.65;
}
.explain-verdict i { color: #f59e0b; margin-top: .15rem; }

@media (max-width: 640px) {
    .intro-cta { flex-direction: column; align-items: flex-start; }
    .away-trips-control { flex-direction: column; align-items: flex-start; }
    .buffer-panel { flex-direction: column; align-items: flex-start; }
    .extras-item { flex-direction: column; align-items: flex-start; }
    .extras-item > div:last-child { margin-top: 0.5rem; margin-left: calc(52px + 0.75rem); }
}

/* A prerequisite that is a hard gate, not a nice-to-have */
.prereqs-item-key {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: .5rem .7rem;
    font-weight: 600;
    color: #92400e;
}
.prereqs-item-key i { color: #f59e0b !important; }

/* --- Hours target explainer (the 200-hour arithmetic) --- */
.hours-explainer { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1rem; padding-top: .75rem; }
.hours-explainer-toggle {
    display: flex; align-items: center; gap: .5rem; width: 100%;
    font-size: .78rem; font-weight: 700; color: inherit; opacity: .85;
    background: none; border: none; cursor: pointer; padding: .25rem 0;
}
.hours-explainer-toggle:hover { opacity: 1; }
.hours-explainer-chevron { margin-left: auto; transition: transform .25s ease; font-size: .7rem; }
.hours-explainer.open .hours-explainer-chevron { transform: rotate(180deg); }
.hours-explainer-body { display: none; padding-top: .8rem; }
.hours-explainer.open .hours-explainer-body { display: block; animation: fadeInUp .25s ease; }

.hours-sum-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.hours-sum-list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    font-size: .8rem; opacity: .9;
}
.hours-sum-list li strong { font-family: monospace; white-space: nowrap; }
.hours-sum-list li.hours-sum {
    border-top: 1px solid rgba(255,255,255,.2); padding-top: .45rem; margin-top: .25rem;
    opacity: 1; font-weight: 700;
}
.hours-caveat {
    display: flex; gap: .55rem; align-items: flex-start;
    font-size: .76rem; line-height: 1.6; opacity: .9;
    background: rgba(255,255,255,.08); border-radius: 8px; padding: .7rem .85rem;
}

/* --- ME/IR simulator credit line --- */
.credit-line {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
    font-size: .82rem; color: #4b5563; padding: .4rem 0;
}
.credit-line strong { font-family: monospace; white-space: nowrap; }
.credit-line-saving { color: #15803d; border-top: 1px dashed #e5e7eb; }

/* --- Running hours readout in the header ---
   The step header is a dark gradient, so these must be light. The first
   version used dark navy and was invisible against it. */
.step-hours-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.1;
    white-space: nowrap;
}
.hours-target-suffix { font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.5); }
.hours-mini-bar {
    width: 100%; height: 4px; background: rgba(255,255,255,.18); border-radius: 999px;
    overflow: hidden; margin-top: .4rem;
}
.hours-mini-fill {
    height: 100%; width: 0%; border-radius: 999px;
    background: linear-gradient(90deg, #0078D4, #34E0A1);
    transition: width .5s cubic-bezier(.4,0,.2,1);
}
.hours-mini-fill.is-met { background: #34E0A1; box-shadow: 0 0 12px rgba(52,224,161,.6); }
.hours-readout.hours-met .step-hours-value {
    color: #34E0A1; text-shadow: 0 0 20px rgba(52, 224, 161, .35);
}
.hours-readout { cursor: help; min-width: 96px; }

@media (max-width: 640px) {
    .step-hours-value { font-size: 1.1rem; }
    .hours-readout { min-width: 76px; }
}

/* --- Existing hours input on the starting-point question --- */
.existing-hours-block {
    margin-top: 1.5rem;
    padding: 1.15rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    animation: fadeInUp .25s ease;
}
.existing-hours-block .detail-label { color: #1e3a5f; font-weight: 700; }
.existing-hours-block .detail-hint { color: #3b5f85; max-width: 52ch; }
