/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3a5f;
    --secondary-blue: #2c5282;
    --accent-blue: #4299e1;
    --light-blue: #e6f2ff;
    --success-green: #38a169;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --background: #f7fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.btn-save {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-save:hover {
    background: var(--light-blue);
    border-color: var(--accent-blue);
    color: var(--primary-blue);
}

.btn-reset {
    padding: 0.5rem 1rem;
    background: transparent;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* Full-width main content for results page and projections page */
.results-page-active .main-content,
.projections-page-active .main-content {
    max-width: 1200px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
    display: none;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 640px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.progress-step.active .progress-dot {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
}

.progress-step.completed .progress-dot {
    border-color: var(--success-green);
    background: var(--success-green);
}

.progress-step.completed .progress-dot::after {
    content: '✓';
    color: var(--white);
    font-weight: bold;
}

.progress-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.progress-step.active .progress-label {
    color: var(--accent-blue);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    margin: 0 -10px;
    margin-bottom: 1.5rem;
}

.progress-step.completed + .progress-line {
    background: var(--success-green);
}

/* Wizard Card */
.wizard-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    max-width: 640px;
    margin: 0 auto;
}

/* Full-width override for results page and projections page */
.results-page-active .wizard-card,
.projections-page-active .wizard-card {
    max-width: 100%;
    padding: 3rem 2rem;
}

.wizard-page {
    display: none;
}

.wizard-page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* Welcome Page */
.welcome-hero {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.welcome-hero img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.welcome-hero-minimal {
    margin-bottom: 2rem;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-logo-container {
    max-width: 700px;
    margin: 0 auto;
}

.hero-logo {
    width: 100%;
    height: auto;
    display: block;
    max-width: 700px;
}

.hero-text-focus {
    max-width: 500px;
    margin: 0 auto;
}

.hero-accent {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

/* Results page title styling */
#page-plan-design .page-title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

#page-plan-design .page-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--text-medium);
}

.helper-text {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.helper-text-small {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Radio Cards */
.radio-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-card-content {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.2s;
}

.radio-card:hover .radio-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.radio-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.radio-card-description {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

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

.currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-medium);
    font-weight: 600;
    pointer-events: none;
}

.currency-input {
    padding-left: 2rem;
}

.age-display {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--light-blue);
    border-radius: 6px;
    color: var(--primary-blue);
    font-weight: 600;
    text-align: center;
    display: none;
}

.age-display.visible {
    display: block;
}

/* Slider */
.slider-container {
    padding: 1rem 0;
}

.form-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 1rem;
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.form-slider::-webkit-slider-thumb:hover {
    background: var(--secondary-blue);
    transform: scale(1.1);
}

.form-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: var(--shadow);
    border: none;
}

.slider-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.timeline-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--light-blue);
    border-radius: 6px;
    color: var(--primary-blue);
    text-align: center;
    font-weight: 500;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.navigation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-back {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-blue);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--secondary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--accent-blue);
}

.btn-secondary:hover {
    background: var(--light-blue);
}

.btn-back {
    background: transparent;
    color: var(--text-medium);
    border: 2px solid var(--border-color);
}

.btn-back:hover {
    background: var(--background);
    border-color: var(--text-medium);
}

/* Calculating Page */
.calculating-container {
    text-align: center;
    padding: 3rem 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.calculating-steps {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.calc-step {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    opacity: 0.3;
    transition: all 0.5s;
}

.calc-step.active {
    opacity: 1;
    background: var(--light-blue);
}

.calc-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    margin-right: 1rem;
    transition: all 0.5s;
}

.calc-step.active .calc-step-icon {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
}

.calc-step.completed .calc-step-icon {
    border-color: var(--success-green);
    background: var(--success-green);
}

.calc-step.completed .calc-step-icon::after {
    content: '✓';
    color: var(--white);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-step-text {
    font-weight: 500;
    color: var(--text-medium);
}

.calc-step.active .calc-step-text {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Results Page */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    text-align: center;
}

.result-card.highlight {
    background: var(--light-blue);
    border-color: var(--accent-blue);
    grid-column: 1 / -1;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.result-value.plan-type {
    font-size: 1.5rem;
}

.result-description {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.disclaimer {
    padding: 1rem;
    background: #fff8e6;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.disclaimer strong {
    color: var(--text-dark);
}

/* Thank You Page */
.thank-you-content {
    text-align: center;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2rem;
}

.next-steps {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
}

.next-steps h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.75rem;
    color: var(--text-medium);
}

/* Form Status Messages */
#formStatus {
    display: none;
    margin-top: 1rem;
}

#formStatus p {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

#formStatus p[style*="green"] {
    background: #d1fae5;
    color: var(--success-green);
}

#formStatus p[style*="red"] {
    background: #fee2e2;
    color: #dc2626;
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Reset Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-message {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-buttons .btn-primary,
.modal-buttons .btn-secondary {
    flex: 1;
    max-width: 200px;
}

/* Census Upload Styles */
.census-upload-container {
    margin-bottom: 2rem;
}

.census-instructions {
    background: var(--light-blue);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.census-instructions h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.census-instructions ul {
    list-style-position: inside;
    color: var(--text-medium);
}

.census-instructions li {
    margin-bottom: 0.5rem;
}

.census-template-section,
.census-upload-section {
    margin-bottom: 2rem;
}

.census-template-section p,
.census-upload-section p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--background);
}

.file-upload-area:hover {
    border-color: var(--accent-blue);
    background: var(--light-blue);
}

.upload-placeholder {
    color: var(--text-light);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.upload-success {
    color: var(--success-green);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success-green);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Census Review Styles */
.census-preview-container {
    margin-bottom: 2rem;
}

.census-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.census-table {
    width: 100%;
    border-collapse: collapse;
}

.census-table th,
.census-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.census-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.census-table tbody tr:hover {
    background: var(--light-blue);
}

.census-table tbody tr:last-child td {
    border-bottom: none;
}

.census-actions {
    text-align: center;
}

/* Checkbox Cards */
.checkbox-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-card {
    position: relative;
    cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-card-content {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.2s;
}

.checkbox-card:hover .checkbox-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
}

.checkbox-card input[type="checkbox"]:checked + .checkbox-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.checkbox-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.checkbox-card-description {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Plan Date Cards */
.plan-date-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.plan-date-card {
    position: relative;
    cursor: pointer;
}

.plan-date-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.plan-date-card-content {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.2s;
}

.plan-date-card:hover .plan-date-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
}

.plan-date-card input[type="radio"]:checked + .plan-date-card-content {
    border-color: var(--accent-blue);
    background: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

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

.plan-date-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.plan-date-info-toggle {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.plan-date-info-toggle:hover {
    background: rgba(66, 153, 225, 0.1);
    transform: scale(1.1);
}

.plan-date-card-primary {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.plan-date-card-secondary {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.plan-date-card-expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.plan-date-card-expandable.expanded {
    max-height: 200px;
    margin-top: 0.75rem;
}

.plan-date-card-expandable-content {
    padding: 1rem;
    background: rgba(66, 153, 225, 0.05);
    border-left: 3px solid var(--accent-blue);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Retirement Age Page Styles */
.retirement-projection {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--light-blue);
    border-radius: 8px;
    color: var(--primary-blue);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
}

.retirement-projection p {
    margin: 0;
}

.retirement-projection strong {
    font-weight: 700;
    color: var(--primary-blue);
}

.retirement-guidance {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.retirement-guidance p {
    margin: 0;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #eff6ff;
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px;
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

.info-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.info-banner-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Reassurance Text */
.reassurance-text {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    text-align: center;
}

.reassurance-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* Tax Rate Info */
.tax-rate-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.tax-rate-info-item {
    margin-bottom: 1rem;
}

.tax-rate-info-item:last-child {
    margin-bottom: 0;
}

.tax-rate-info-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.tax-rate-info-item:before {
    content: "•";
    color: #f59e0b;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    margin-right: 0.5em;
}

/* Plan Comparison Dashboard */
.plan-comparison-table {
    margin-bottom: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    width: 100%;
}

.comparison-header {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.75fr 1.5fr;
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-header-cell {
    padding: 1.5rem 1.5rem;
    text-align: center;
}

.comparison-header-cell.plan-type-col {
    text-align: left;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.75fr 1.5fr;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row:hover {
    background: var(--light-blue);
}

.comparison-row.highlighted-row {
    background: #fffbeb;
    border-top: 2px solid #f59e0b;
    border-bottom: 2px solid #f59e0b;
}

.comparison-row.highlighted-row:hover {
    background: #fef3c7;
}

.comparison-cell {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-cell.plan-type-cell {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.plan-type-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.35rem;
}

.plan-type-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

.plan-type-desc-extended {
    line-height: 1.6;
    max-width: 95%;
}

.plan-type-disclaimer {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    opacity: 0.85;
}

.plan-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--accent-blue);
    cursor: help;
    padding: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: all 0.2s;
    position: relative;
}

.plan-info-icon:hover {
    color: var(--secondary-blue);
    transform: scale(1.1);
}

.plan-info-icon svg {
    width: 16px;
    height: 16px;
}

.value-cell {
    text-align: center;
}

.value-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.comparison-row.highlighted-row .value-amount {
    color: var(--primary-blue);
    font-size: 1.45rem;
}

/* Results Detail Cards */
.results-details-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.results-detail-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.results-detail-card.combined-card {
    background: #fffbeb;
    border-color: #f59e0b;
    border-width: 3px;
}

.results-detail-card.combined-card .detail-card-title {
    color: #92400e;
}

.detail-card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.detail-metrics {
    margin-bottom: 1.5rem;
}

.detail-metric-primary {
    margin-bottom: 1.5rem;
}

.detail-metric-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.detail-metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.detail-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-metric-secondary .detail-metric-label {
    font-size: 0.8rem;
}

.detail-metric-secondary .detail-metric-value {
    font-size: 1.5rem;
}

.detail-metrics-breakdown {
    background: var(--background);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-breakdown-item.detail-breakdown-total {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border-color);
}

.detail-breakdown-label {
    font-size: 0.95rem;
    color: var(--text-medium);
    font-weight: 500;
}

.detail-breakdown-total .detail-breakdown-label {
    font-weight: 700;
    color: var(--text-dark);
}

.detail-breakdown-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.detail-breakdown-total .detail-breakdown-value {
    font-size: 1.25rem;
    color: var(--primary-blue);
}

.detail-helper-text {
    padding: 1rem;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

.detail-helper-text p {
    margin: 0.25rem 0;
}

.results-disclaimer {
    padding: 1.5rem;
    background: #f9fafb;
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.results-disclaimer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Projection Page Styles - Refactored */

/* Page Title & Subtitle for Projections */
#page-projections .page-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

#page-projections .page-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* A. Plan Toggle (Top Section) */
.projection-controls {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.projection-toggle {
    display: inline-flex;
    background: var(--background);
    border-radius: 8px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.toggle-btn {
    padding: 0.875rem 1.75rem;
    border: none;
    background: transparent;
    color: var(--text-medium);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.toggle-btn:hover {
    background: var(--white);
    color: var(--primary-blue);
}

.toggle-btn.active {
    background: var(--accent-blue);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* B. Year-by-Year Table (Middle Section) */
.projection-table-container {
    overflow-x: auto;
    margin-bottom: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
}

.projection-table {
    width: 100%;
    border-collapse: collapse;
}

.projection-table thead {
    background: var(--primary-blue);
    color: var(--white);
}

.projection-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projection-table th:first-child {
    text-align: center;
}

.projection-table th:nth-child(2) {
    text-align: center;
}

.projection-table th:nth-child(3),
.projection-table th:nth-child(4),
.projection-table th:nth-child(5) {
    text-align: right;
}

.projection-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.projection-table tbody tr:first-child {
    background: #f0f9ff;
}

.projection-table tbody tr:first-child:hover {
    background: #e0f2fe;
}

.projection-table tbody tr:hover {
    background: var(--light-blue);
}

.projection-table tbody tr:last-child {
    border-bottom: none;
}

.projection-table tbody tr.final-year {
    background: #fffbeb;
    font-weight: 700;
}

.projection-table tbody tr.final-year:hover {
    background: #fef3c7;
}

.projection-table td {
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.projection-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--primary-blue);
}

.projection-table td:nth-child(2) {
    text-align: center;
    color: var(--text-medium);
}

.projection-table td:nth-child(3),
.projection-table td:nth-child(4),
.projection-table td:nth-child(5) {
    text-align: right;
    font-weight: 600;
}

.projection-table tbody tr.final-year td {
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 700;
}

/* C. Summary Cards Section (Bottom) */
.projection-summary-section {
    margin-bottom: 2.5rem;
}

.projection-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.projection-summary-card {
    background: var(--light-blue);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 2.25rem 2rem;
    text-align: center;
}

.projection-summary-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.projection-summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.projection-disclaimer {
    padding: 1.5rem;
    background: #f9fafb;
    border-left: 4px solid var(--accent-blue);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    text-align: center;
}

.projection-disclaimer p {
    margin: 0;
}

.projection-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

/* Summary Page */
.summary-section {
    margin-bottom: 2.5rem;
}

.summary-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

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

.summary-item {
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.summary-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-card {
        padding: 2rem 1.5rem;
    }
    
    .results-page-active .wizard-card,
    .projections-page-active .wizard-card {
        padding: 2rem 1rem;
    }
    
    .plan-date-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .info-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .page-title {
        font-size: 1.5rem;
    }
    
    #page-plan-design .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }
    
    #page-plan-design .page-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .welcome-hero img {
        height: 200px;
    }
    
    .welcome-hero-minimal {
        padding: 2rem 1rem;
    }
    
    .hero-accent {
        font-size: 1.25rem;
    }

    .progress-bar {
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .progress-label {
        font-size: 0.65rem;
    }

    .progress-dot {
        width: 32px;
        height: 32px;
    }

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

    .result-value {
        font-size: 1.5rem;
    }

    .navigation-buttons {
        flex-direction: column-reverse;
    }

    .btn-primary,
    .btn-secondary,
    .btn-back {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    /* Plan Comparison Table - Mobile */
    .comparison-header {
        display: none;
    }
    
    .comparison-row {
        grid-template-columns: 1fr;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1.25rem;
        padding: 1.5rem;
    }
    
    .comparison-row.highlighted-row {
        border-color: #f59e0b;
        background: #fffbeb;
    }
    
    .comparison-cell {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .comparison-cell:last-child {
        border-bottom: none;
    }
    
    .comparison-cell.plan-type-cell {
        padding-bottom: 1.25rem;
        margin-bottom: 1rem;
        border-bottom: 2px solid var(--border-color);
    }
    
    .comparison-cell.value-cell {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .comparison-cell.value-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-medium);
        font-size: 0.875rem;
    }
    
    .plan-type-desc-extended {
        max-width: 100%;
    }
    
    .plan-info-icon {
        margin-left: 0.35rem;
    }
    
    .value-amount {
        font-size: 1.25rem;
    }
    
    .comparison-row.highlighted-row .value-amount {
        font-size: 1.35rem;
    }
    
    /* Results Detail Cards - Mobile */
    .results-detail-card {
        padding: 1.5rem;
    }
    
    .detail-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .detail-metric-value {
        font-size: 1.75rem;
    }
    
    .detail-metric-secondary .detail-metric-value {
        font-size: 1.35rem;
    }
    
    .detail-card-title {
        font-size: 1.25rem;
    }
    
    .detail-metrics-breakdown {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .header-buttons {
        gap: 0.5rem;
    }

    .btn-save,
    .btn-reset {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-message {
        font-size: 0.95rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-buttons .btn-primary,
    .modal-buttons .btn-secondary {
        max-width: 100%;
        width: 100%;
    }

    .wizard-card {
        padding: 1.5rem 1rem;
    }
    
    .results-page-active .wizard-card,
    .projections-page-active .wizard-card {
        padding: 1.5rem 0.75rem;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .results-detail-card {
        padding: 1.25rem;
    }
    
    .detail-metric-value {
        font-size: 1.5rem;
    }
    
    .detail-metric-secondary .detail-metric-value {
        font-size: 1.125rem;
    }
    
    .comparison-row {
        padding: 1.25rem;
    }
    
    /* Projection Page - Mobile */
    #page-projections .page-title {
        font-size: 1.5rem;
    }
    
    #page-projections .page-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .projection-controls {
        margin-bottom: 2rem;
    }
    
    .projection-toggle {
        flex-direction: column;
        width: 100%;
    }
    
    .toggle-btn {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .projection-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 2rem;
    }
    
    .projection-table {
        min-width: 600px;
    }
    
    .projection-table th,
    .projection-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .projection-summary {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .projection-summary-card {
        padding: 1.5rem;
    }
    
    .projection-summary-value {
        font-size: 2rem;
    }
    
    .projection-actions {
        flex-direction: column;
    }
    
    .projection-actions .btn-secondary {
        width: 100%;
    }
}
