html, body { overflow-x: hidden; }

.fire-shell {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* ── Sections ── */
.section { margin-bottom: 3rem; }

.page-title {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    font-family: 'Fraunces', Georgia, serif;
}

.page-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.65;
    margin: 0 0 1.5rem;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    font-family: 'Fraunces', Georgia, serif;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

/* ── Card / Inputs ── */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.card-head {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--text-primary);
}

.input-grid {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.field { display: grid; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }

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

.field-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.field-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    background: rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.field-control input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.field-control:focus-within {
    border-color: var(--primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), inset 0 2px 4px rgba(0,0,0,0.1);
}

.field-prefix, .field-suffix { color: var(--text-muted); font-weight: 700; flex: none; }

/* ── Withdrawal Rate Slider ── */
.wr-section {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
    padding-top: 1.25rem;
}

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

.wr-value-display {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary, #667eea);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.wr-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--primary, #667eea) 0%, var(--primary, #667eea) 60%, rgba(148,163,184,0.25) 60%, rgba(148,163,184,0.25) 100%);
    outline: none;
    cursor: pointer;
}

.wr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary, #667eea);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    cursor: pointer;
    border: 3px solid white;
    transition: box-shadow 0.2s;
}

.wr-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.7);
}

.wr-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ── Primary Button ── */
.field-actions { display: grid; }

.primary-btn {
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764BA2 100%);
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.primary-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.primary-btn:active { transform: translateY(0); }

/* ── Hero Result ── */
.fire-hero-result {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 5px solid var(--primary, #667eea);
    border-radius: 16px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hero-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-value {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-content: start;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hero-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ── Progress Bar ── */
.progress-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.progress-pct {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary, #667eea);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

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

.progress-track {
    width: 100%;
    height: 14px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #667eea 0%, #18a683 100%);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 4px;
}

.progress-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Chart ── */
.chart-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
}

.chart-shell {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
}

.chart-canvas { width: 100%; height: 100%; display: block; }

/* ── Withdrawal Rate Comparison Grid ── */
.wr-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.wr-compare-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s;
}

.wr-compare-card.active {
    border-color: var(--primary, #667eea);
    background: rgba(102, 126, 234, 0.06);
}

.wr-compare-rate {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary, #667eea);
    letter-spacing: -0.02em;
}

.wr-compare-number {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.wr-compare-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.wr-compare-years {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

/* ── FAQ ── */
.faq-section { border-top: 1px solid var(--border-color); padding-top: 2.5rem; }

.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-q {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-q::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-muted);
    flex: none;
    transition: transform 0.2s;
}

.faq-item[open] .faq-q::after {
    transform: rotate(45deg);
}

.faq-a {
    padding: 0 1.25rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

/* ── Title Row / Modal ── */
.title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.title-row .page-title { margin-bottom: 0; }

.info-link {
    background: rgba(118, 75, 162, 0.1);
    color: var(--primary, #667eea);
    border: 1px solid rgba(118, 75, 162, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.info-link:hover { background: rgba(118, 75, 162, 0.2); }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 1.5rem; color: var(--text-muted);
    cursor: pointer; padding: 0.5rem; line-height: 1;
    font-family: inherit;
}
.modal-close:hover { color: var(--text-primary); }

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0 1.25rem;
    line-height: 1.6;
}

.prose {
    padding: 1rem 0 0;
    display: grid;
    gap: 0.75rem;
    color: var(--text-secondary);
}
.prose p { margin: 0; line-height: 1.65; }

/* ── Newsletter CTA ── */
.newsletter-cta-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.newsletter-cta-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    font-family: 'Fraunces', Georgia, serif;
}

.newsletter-cta-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.newsletter-cta-form { display: flex; flex-direction: column; gap: 0.5rem; }

.newsletter-cta-input-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.newsletter-cta-input {
    flex: 1;
    min-width: 200px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-cta-input:focus {
    border-color: var(--primary, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

.newsletter-cta-btn {
    flex: none;
    white-space: nowrap;
}

.newsletter-cta-msg {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
}
.newsletter-cta-msg.success { color: #18A683; }
.newsletter-cta-msg.error   { color: #EF4444; }

@media (max-width: 500px) {
    .newsletter-cta-input-row { flex-direction: column; }
    .newsletter-cta-btn { width: 100%; }
}

.fine-print {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0 0 2rem;
    line-height: 1.55;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .page-title { font-size: 1.9rem; }
    .input-grid { grid-template-columns: 1fr; }
    .fire-hero-result { grid-template-columns: 1fr; }
    .hero-value { font-size: 2.2rem; }
    .wr-compare-grid { grid-template-columns: repeat(2, 1fr); }
    .download-cta-card { flex-direction: column; align-items: flex-start; }
    .download-cta-card .primary-btn { width: 100%; }
    .chart-shell { height: 260px; }
    .wr-labels span:nth-child(2) { display: none; }
}
