/* ==========================================
   RETIREMENT CALCULATOR
========================================== */

.retirement-page{
    max-width:1100px;
    margin:auto;
    padding:60px 20px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:35px;
}

.retirement-card,
.result-card,
.retirement-info{
    background:#ffffff;
    color:#1f2937;
    border-radius:24px;
    box-shadow:0 18px 45px rgba(0,0,0,.12);
    padding:35px;
}

.retirement-card h1{
    color:#10b981;
    text-align:center;
    margin-bottom:10px;
}

.subtitle{
    text-align:center;
    color:#64748b;
    margin-bottom:25px;
    line-height:1.6;
}

.retirement-card label{
    display:block;
    font-weight:700;
    margin-bottom:8px;
}

.retirement-card input{
    width:100%;
    padding:14px 15px;
    font-size:16px;
    border-radius:14px;
    border:1px solid #d1d5db;
    outline:none;
    margin-bottom:18px;
}

.retirement-card input:focus{
    border-color:#10b981;
    box-shadow:0 0 0 4px rgba(16,185,129,.15);
}

.actions{
    display:flex;
    gap:12px;
}

.actions button{
    flex:1;
    border:none;
    border-radius:14px;
    padding:14px;
    cursor:pointer;
    font-size:16px;
    font-weight:700;
    background:#10b981;
    color:#fff;
    transition:.3s;
}

.actions button:hover{
    background:#059669;
    transform:translateY(-2px);
}

.reset-btn{
    background:#334155 !important;
}

.reset-btn:hover{
    background:#475569 !important;
}

.result-card h2,
.retirement-info h2{
    color:#10b981;
    text-align:center;
}

.retirement-result{
    min-height:280px;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    border:2px dashed #d1d5db;
    border-radius:20px;
    padding:25px;
    color:#64748b;
}

.retirement-result.active{
    display:block;
    text-align:left;
}

.result-line{
    display:flex;
    justify-content:space-between;
    padding:12px 0;
    border-bottom:1px solid #e5e7eb;
    font-weight:700;
}

.result-line strong{
    color:#10b981;
}

.growth-bars{
    margin-top:25px;
}

.bar-row{
    margin-bottom:18px;
}

.bar-row span{
    display:block;
    margin-bottom:8px;
    font-weight:700;
}

.bar-bg{
    height:16px;
    background:#e5e7eb;
    border-radius:50px;
    overflow:hidden;
}

.bar{
    height:100%;
    width:0%;
    transition:width .8s ease;
}

.investment-bar{
    background:#10b981;
}

.interest-bar{
    background:#f59e0b;
}

.retirement-info{
    max-width:1100px;
    margin:0 auto 40px;
    line-height:1.7;
}

/* Dark Mode */

body.dark-mode .retirement-card,
body.dark-mode .result-card,
body.dark-mode .retirement-info{
    background:#1f2937;
    color:#e5e7eb;
}

body.dark-mode .subtitle,
body.dark-mode .retirement-result{
    color:#cbd5e1;
}

body.dark-mode .retirement-card input{
    background:#111827;
    color:#e5e7eb;
    border-color:#374151;
}

body.dark-mode .retirement-result{
    border-color:#374151;
}

body.dark-mode .result-line{
    border-bottom-color:#374151;
}

body.dark-mode .bar-bg{
    background:#374151;
}

@media(max-width:768px){

    .retirement-page{
        grid-template-columns:1fr;
        padding:35px 15px;
    }

    .actions{
        flex-direction:column;
    }

}
/* ======================================
   RETIREMENT NUMBER WORDS
   ====================================== */

.retirement-result-item{
    display:grid;
    grid-template-columns:
        minmax(0,1fr)
        auto;

    gap:4px 12px;
    align-items:center;
}

.retirement-result-item strong{
    font-variant-numeric:
        tabular-nums;

    text-align:right;
}

.retirement-number-words{
    grid-column:1 / -1;

    display:block;
    margin-top:4px;
    padding:8px 10px;

    border:
        1px solid
        var(--tool-words-border);

    border-radius:8px;

    background:
        var(--tool-words-bg);

    color:
        var(--tool-words-text);

    font-size:.76rem;
    font-weight:600;
    line-height:1.45;
    text-align:center;

    overflow-wrap:anywhere;
}


/* ======================================
   TOOLXONE INSIGHT
   ====================================== */

.retirement-insight-item{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;

    margin-top:8px;
    padding:12px;

    border:
        1px solid
        var(--tool-words-border);

    border-radius:10px;

    background:
        var(--tool-words-bg);
}

.retirement-insight-item span{
    color:#10b981;
    font-weight:800;
}

.retirement-insight-item strong{
    color:var(--tool-words-text);
    font-size:.8rem;
    font-weight:600;
    line-height:1.5;
    text-align:left;
}

/* =========================================
   RETIREMENT PLANNING GUIDE
   ========================================= */

.retirement-guide {
    max-width: 1100px;
    margin: 40px auto;
    padding: 36px 40px;

    background: var(--card-bg, #ffffff);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(15, 23, 42, 0.04);
}


/* Main Guide Heading */

.retirement-guide > h2 {
    margin: 0 0 18px;

    font-size: clamp(1.65rem, 3vw, 2.15rem);
    line-height: 1.25;
    font-weight: 800;

    color: var(--text-primary, #0f172a);
}


/* Section Headings */

.retirement-guide h3 {
    margin: 32px 0 12px;

    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 700;

    color: var(--text-primary, #0f172a);
}


/* Paragraphs */

.retirement-guide p {
    margin: 0 0 16px;

    font-size: 1rem;
    line-height: 1.8;

    color: var(--text-secondary, #475569);
}


/* Remove extra bottom gap */

.retirement-guide p:last-child {
    margin-bottom: 0;
}


/* Internal Tool Links */

.retirement-guide a {
    color: var(--primary, #2563eb);
    font-weight: 700;
    text-decoration: none;

    border-bottom: 1px solid transparent;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}


.retirement-guide a:hover {
    border-bottom-color: currentColor;
}


.retirement-guide a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
    border-radius: 4px;
}


/* =========================================
   DARK THEME
   ========================================= */

[data-theme="dark"] .retirement-guide {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.16);

    box-shadow:
        0 12px 34px rgba(0, 0, 0, 0.22),
        0 2px 8px rgba(0, 0, 0, 0.14);
}


[data-theme="dark"] .retirement-guide > h2,
[data-theme="dark"] .retirement-guide h3 {
    color: #f8fafc;
}


[data-theme="dark"] .retirement-guide p {
    color: #cbd5e1;
}


[data-theme="dark"] .retirement-guide a {
    color: #60a5fa;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    .retirement-guide {
        margin: 28px 16px;
        padding: 26px 22px;

        border-radius: 18px;
    }

    .retirement-guide > h2 {
        font-size: 1.55rem;
    }

    .retirement-guide h3 {
        margin-top: 26px;
        font-size: 1.1rem;
    }

    .retirement-guide p {
        font-size: 0.97rem;
        line-height: 1.75;
    }

}


/* =========================================
   SMALL MOBILE
   ========================================= */

@media (max-width: 480px) {

    .retirement-guide {
        margin: 24px 12px;
        padding: 22px 18px;

        border-radius: 16px;
    }

}