/* ==========================================================================
   INFLATION-ADJUSTED RETURN CALCULATOR PAGE
   ========================================================================== */

   :root {
    --primary-blue: #0052cc;
    --hero-gradient: linear-gradient(135deg, #0061ff 0%, #0033aa 100%);
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning-bg: #fff7ed;
    --warning-text: #c2410c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

img,
canvas,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: underline;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section-padding {
    padding: 64px 0;
}

.section-spacing {
    margin-top: 32px;
}

.bg-light {
    background: var(--bg-light);
}

.hidden {
    display: none !important;
}

/* HERO */

.hero {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 30px 0 74px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    margin-bottom: 28px;
    opacity: 0.95;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.94);
}

.breadcrumb .current {
    color: rgba(255, 255, 255, 0.88);
}

.hero-grid {
    display: grid;
    gap: 28px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 4.1vw, 3.4rem);
    line-height: 1.12;
    margin: 0 0 16px;
    color: var(--white);
}

.hero-lead {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 780px;
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.98rem;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: #f8fbff;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

main .btn-primary:hover {
    background: #003f9e;
}

main .btn-secondary {
    color: var(--text-main);
    border-color: var(--border-color);
    background: var(--white);
}

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

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

/* CARDS */

.intro-strip {
    padding-top: 34px;
    padding-bottom: 0;
}

.section-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 28px;
}

.section-card h2 {
    font-size: 1.72rem;
    line-height: 1.3;
    margin: 0 0 14px;
    color: var(--text-main);
}

.section-card h3 {
    margin-top: 0;
    color: var(--text-main);
}

.section-card p:last-child,
.section-card ul:last-child {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0 0 10px;
    font-size: 1.95rem;
}

.intro-card {
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--hero-gradient);
}

/* CALCULATOR */

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 24px;
    align-items: start;
}

.calculator-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 28px;
    min-width: 0;
}

.card-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.card-heading h2 {
    margin: 0 0 8px;
    font-size: 1.56rem;
}

.card-heading p {
    margin: 0;
    color: var(--text-muted);
}

.card-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-weight: 800;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
}

.form-group small {
    color: var(--text-muted);
    line-height: 1.5;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-main);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.toggle-box {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.check-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.info-callout {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-callout.neutral {
    background: #f8fbff;
}

.form-message {
    display: none;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.form-message.error {
    display: block;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(185, 28, 28, 0.15);
}

.form-message.success {
    display: block;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(4, 120, 87, 0.15);
}

/* RESULTS */

.results-placeholder {
    text-align: center;
    padding: 44px 18px;
}

.placeholder-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    font-size: 1.7rem;
    font-weight: 800;
}

.results-card {
    min-width: 0;
}

.results-content {
    min-width: 0;
}

.results-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.result-primary {
    min-width: 0;
}

.result-primary h3 {
    font-size: clamp(1.95rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin: 8px 0 10px;
    color: var(--primary-blue);
    word-break: break-word;
}

.result-primary p {
    margin: 0;
    color: var(--text-muted);
}

.mini-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blue-label {
    color: var(--primary-blue);
}

.dark-label {
    color: var(--text-main);
}

.growth-badge {
    min-width: 140px;
    text-align: right;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

.growth-badge strong {
    display: block;
    margin-top: 8px;
    font-size: 1.35rem;
    color: var(--text-main);
    word-break: break-word;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.result-tile {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    background: var(--white);
    min-width: 0;
}

.result-tile span {
    display: block;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-tile strong {
    display: block;
    font-size: 1.18rem;
    color: var(--text-main);
    word-break: break-word;
}

.highlight-tile {
    background: #f8fbff;
    border-color: rgba(0, 82, 204, 0.18);
}

.highlight-tile strong {
    color: var(--primary-blue);
}

.comparison-highlight,
.math-card,
.interpretation-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    background: #fbfdff;
    margin-bottom: 18px;
    min-width: 0;
}

.comparison-header h4,
.chart-header h4,
.interpretation-card h4 {
    margin: 0 0 6px;
    font-size: 1.06rem;
}

.comparison-header p,
.chart-header p {
    margin: 0 0 16px;
    color: var(--text-muted);
}

.interpretation-card p {
    margin: 0;
    color: var(--text-main);
}

.small-formula {
    padding: 18px;
}

.small-formula p {
    font-size: 1rem;
}

.math-steps {
    display: grid;
    gap: 10px;
}

.math-step {
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 12px;
    padding: 14px 16px;
}

.math-step strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
}

.math-step span {
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* CONTENT */

.content-stack {
    display: grid;
    gap: 24px;
}

.comparison-grid,
.example-grid,
.related-grid,
.warning-list,
.mini-cards {
    display: grid;
    gap: 16px;
}

.comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.warning-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.mini-cards.three-fixed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.comparison-card,
.example-card,
.warning-item,
.mini-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background: var(--white);
    min-width: 0;
}

.mini-card {
    background: var(--bg-light);
}

.warning-item {
    background: #fffdfa;
}

.comparison-card h3,
.example-card h3,
.warning-item h3,
.mini-card h3 {
    font-size: 1.04rem;
    margin: 0 0 10px;
}

.feature-list {
    margin: 18px 0;
    padding-left: 18px;
}

.feature-list li {
    margin-bottom: 10px;
}

.formula-box {
    margin: 20px 0;
    background: #f8fbff;
    border: 1px solid rgba(0, 82, 204, 0.12);
    padding: 22px;
    border-radius: 12px;
    text-align: center;
    overflow-x: auto;
}

.formula-box p {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.compact-table .info-table {
    min-width: 560px;
}

.info-table th,
.info-table td {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.info-table th {
    background: #f1f5f9;
    font-weight: 700;
}

/* FAQ */

.faq-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

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

.faq-question {
    width: 100%;
    border: none;
    background: var(--white);
    padding: 18px 20px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.faq-question:hover {
    background: #f8fbff;
}

.faq-icon {
    transition: transform 0.25s ease;
    color: var(--text-muted);
    flex: 0 0 auto;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fcfdff;
}

.faq-answer p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--text-muted);
}

/* RELATED */

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

.related-card {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-width: 0;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.related-card h3 {
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 1.08rem;
}

.related-card p {
    margin: 0 0 14px;
    color: var(--text-muted);
}

.related-card span {
    color: var(--primary-blue);
    font-weight: 700;
}

/* CTA */

.cta-section {
    background: var(--hero-gradient);
    color: var(--white);
    border-radius: 18px;
    padding: 42px 28px;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cta-section p {
    max-width: 720px;
    margin: 0 auto 22px;
    color: rgba(255, 255, 255, 0.9);
}

.section-card,
.content-stack,
.comparison-card,
.example-card,
.warning-item,
.mini-card,
.related-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.section-card p,
.section-card li,
.comparison-card p,
.example-card p,
.warning-item p,
.mini-card p,
.related-card p {
    overflow-wrap: anywhere;
    word-break: normal;
}

.example-grid,
.comparison-grid,
.warning-list,
.mini-cards.three-fixed,
.related-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}


/* RESPONSIVE */

@media (max-width: 980px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .comparison-grid,
    .example-grid,
    .warning-list,
    .mini-cards.three-fixed,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .section-padding {
        padding: 48px 0;
    }

    .hero {
        padding: 24px 0 56px;
    }

    .section-card,
    .calculator-card {
        padding: 22px;
    }

    .form-grid.two-col,
    .comparison-grid,
    .example-grid,
    .warning-list,
    .mini-cards.three-fixed,
    .related-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .results-top {
        flex-direction: column;
    }

    .growth-badge {
        width: 100%;
        text-align: left;
    }

    .button-row,
    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .card-heading {
        flex-direction: column;
    }

    .formula-box {
        text-align: left;
    }

    .example-grid,
    .comparison-grid,
    .warning-list,
    .mini-cards.three-fixed,
    .related-grid {
        grid-template-columns: 1fr !important;
    }

    .section-card {
        overflow-x: hidden;
    }
}

@media (max-width: 420px) {
    .container {
        padding: 0 12px;
    }

    .section-card,
    .calculator-card {
        padding: 18px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .result-primary h3 {
        font-size: 2rem;
    }

    .info-table th,
    .info-table td {
        padding: 12px;
    }
}
