.fee-page {
    --fee-ink: #10243e;
    --fee-muted: #536579;
    --fee-green: #08664d;
    --fee-green-dark: #064c3b;
    --fee-green-soft: #e8f5ef;
    --fee-blue: #145da0;
    --fee-blue-soft: #edf5fc;
    --fee-gold: #b76b00;
    --fee-gold-soft: #fff6e6;
    --fee-border: #d4dee8;
    --fee-surface: #ffffff;
    --fee-background: #f5f8fb;
    background:
        radial-gradient(circle at 8% 7%, rgba(22, 137, 103, 0.1), transparent 24rem),
        linear-gradient(180deg, #fbfdfc 0, var(--fee-background) 36rem);
    color: var(--fee-ink);
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
}

.fee-page *,
.fee-page *::before,
.fee-page *::after {
    box-sizing: border-box;
}

.fee-shell {
    margin: 0 auto;
    max-width: 1180px;
}

.fee-breadcrumb {
    align-items: center;
    color: var(--fee-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.55rem;
    margin-bottom: 2rem;
}

.fee-page a {
    color: #075d96;
    text-decoration-thickness: 0.09em;
    text-underline-offset: 0.18em;
}

.fee-page a:hover {
    color: #043d64;
}

.fee-hero {
    align-items: stretch;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
    margin-bottom: 2.25rem;
}

.fee-hero-copy {
    align-self: center;
    max-width: 770px;
}

.eyebrow,
.step-label {
    color: var(--fee-green);
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin: 0 0 0.65rem;
    text-transform: uppercase;
}

.fee-hero h1 {
    color: var(--fee-ink);
    font-size: clamp(2.5rem, 7vw, 4.9rem);
    letter-spacing: -0.055em;
    line-height: 0.98;
    margin: 0;
    max-width: 760px;
}

.hero-lead {
    color: var(--fee-muted);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.68;
    margin: 1.4rem 0 1.2rem;
    max-width: 760px;
}

.verification-line {
    align-items: center;
    color: #34495f;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.95rem;
    gap: 0.4rem;
}

.verified-dot {
    background: #0a7d59;
    border: 3px solid #c9eadc;
    border-radius: 50%;
    display: inline-block;
    height: 0.85rem;
    margin-right: 0.1rem;
    width: 0.85rem;
}

.disclosure-card,
.assumption-card,
.calculator-card,
.results-section,
.unavailable-formulas,
.example-section,
.review-callout {
    background: var(--fee-surface);
    border: 1px solid var(--fee-border);
    border-radius: 1.25rem;
    box-shadow: 0 18px 50px rgba(24, 48, 75, 0.07);
}

.disclosure-card {
    background:
        linear-gradient(145deg, rgba(10, 108, 79, 0.96), rgba(13, 74, 85, 0.98)),
        var(--fee-green-dark);
    border: 0;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 270px;
    overflow: hidden;
    padding: 1.75rem;
    position: relative;
}

.disclosure-card::before {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    content: "";
    height: 11rem;
    position: absolute;
    right: -4rem;
    top: -4rem;
    width: 11rem;
}

.disclosure-card h2 {
    color: #ffffff;
    font-size: 1.35rem;
    margin: 0 0 0.75rem;
    position: relative;
}

.disclosure-card p {
    color: #e7f8f1;
    line-height: 1.65;
    margin: 0;
    position: relative;
}

.calculator-section {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    margin-bottom: 1.5rem;
}

.calculator-card,
.assumption-card {
    padding: clamp(1.35rem, 3vw, 2.25rem);
}

.section-heading h2,
.results-header h2,
.assumption-card h2,
.example-section h2,
.review-callout h2 {
    color: var(--fee-ink);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0;
}

.calculator-card form {
    display: grid;
    gap: 1.2rem;
    margin-top: 1.6rem;
}

.field-group label {
    color: var(--fee-ink);
    display: block;
    font-size: 1rem;
    font-weight: 750;
    margin-bottom: 0.5rem;
}

.optional {
    color: var(--fee-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.35rem;
}

.money-input,
.count-input {
    align-items: center;
    background: #ffffff;
    border: 2px solid #b8c7d5;
    border-radius: 0.8rem;
    display: flex;
    min-height: 3.5rem;
    overflow: hidden;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.money-input:focus-within,
.count-input:focus-within {
    border-color: var(--fee-green);
    box-shadow: 0 0 0 4px rgba(8, 102, 77, 0.15);
}

.money-input > span,
.count-input > span {
    color: #34495f;
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: 750;
    padding: 0 1rem;
}

.money-input > span {
    font-size: 1.35rem;
    padding-right: 0.2rem;
}

.money-input input,
.count-input input {
    appearance: textfield;
    background: transparent;
    border: 0;
    color: var(--fee-ink);
    flex: 1 1 auto;
    font: inherit;
    font-size: 1.25rem;
    font-weight: 750;
    min-width: 0;
    outline: 0;
    padding: 0.85rem 1rem;
}

.money-input input {
    padding-left: 0.25rem;
}

.money-input input::-webkit-inner-spin-button,
.money-input input::-webkit-outer-spin-button,
.count-input input::-webkit-inner-spin-button,
.count-input input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.field-help {
    color: var(--fee-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0.45rem 0 0;
}

.calculate-button {
    align-items: center;
    background: var(--fee-green);
    border: 0;
    border-radius: 0.8rem;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 3.3rem;
    padding: 0.85rem 1.4rem;
    transition: background-color 150ms ease, transform 150ms ease;
}

.calculate-button:hover {
    background: var(--fee-green-dark);
    transform: translateY(-1px);
}

.calculate-button:focus-visible {
    outline: 3px solid #f5b842;
    outline-offset: 3px;
}

.form-message {
    color: #9b2c2c;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    min-height: 1.4rem;
}

.assumption-card {
    background: var(--fee-blue-soft);
    border-color: #c7ddee;
}

.assumption-card ul {
    display: grid;
    gap: 0.65rem;
    margin: 1.25rem 0;
    padding-left: 1.3rem;
}

.assumption-card li,
.assumption-card > p:last-child {
    color: #3e566c;
    line-height: 1.55;
}

.assumption-card > p:last-child {
    border-top: 1px solid #c7ddee;
    margin: 1.2rem 0 0;
    padding-top: 1.1rem;
}

.no-script-note {
    background: var(--fee-gold-soft);
    border: 1px solid #e7c57e;
    border-radius: 0.75rem;
    color: #704400;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
}

.results-section {
    margin-bottom: 4rem;
    overflow: hidden;
    padding: clamp(1.2rem, 3vw, 2.25rem);
}

.results-header {
    align-items: end;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.result-summary {
    background: var(--fee-green-soft);
    border-radius: 0.65rem;
    color: #185844;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    max-width: 470px;
    padding: 0.7rem 0.9rem;
}

.table-region {
    border: 1px solid var(--fee-border);
    border-radius: 0.9rem;
    overflow-x: auto;
}

.table-region:focus-visible {
    outline: 3px solid #f5b842;
    outline-offset: 3px;
}

.results-table {
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 940px;
    width: 100%;
}

.results-table caption {
    background: #f1f5f8;
    color: var(--fee-muted);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-align: left;
}

.results-table th,
.results-table td {
    border-bottom: 1px solid var(--fee-border);
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

.results-table thead th {
    background: #18334f;
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0.035em;
    line-height: 1.4;
    text-transform: uppercase;
}

.results-table tbody th {
    min-width: 210px;
}

.results-table tbody tr:last-child th,
.results-table tbody tr:last-child td {
    border-bottom: 0;
}

.results-table tbody tr:nth-child(even) {
    background: #f9fbfc;
}

.results-table .scanraise-row {
    background: #edf8f3;
}

.provider-name,
.model-note,
.results-table tbody th a,
.monthly-value {
    display: block;
}

.provider-name {
    color: var(--fee-ink);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.model-note {
    color: var(--fee-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.results-table tbody th a {
    font-size: 0.78rem;
    font-weight: 650;
}

.result-value {
    color: var(--fee-ink);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.net-value {
    color: var(--fee-green-dark);
    font-size: 1.02rem;
}

.result-text,
.unavailable-row td {
    color: var(--fee-muted);
    line-height: 1.45;
}

.monthly-value {
    border-top: 1px solid #dce5ec;
    color: #3a5268;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    margin-top: 0.6rem;
    padding-top: 0.55rem;
}

.unavailable-row {
    background: #fbf8f3;
}

.results-note {
    color: var(--fee-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 1rem 0 0;
}

.formula-section,
.explainer-section,
.faq-section,
.sources-section {
    margin-bottom: 4rem;
}

.wide-heading {
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.wide-heading > p:last-child {
    color: var(--fee-muted);
    line-height: 1.65;
    margin: 0.9rem 0 0;
}

.formula-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.formula-card {
    background: var(--fee-surface);
    border: 1px solid var(--fee-border);
    border-radius: 1rem;
    padding: 1.45rem;
}

.formula-card h3,
.unavailable-formulas h3,
.explainer-grid h3 {
    color: var(--fee-ink);
    font-size: 1.2rem;
    margin: 0 0 0.85rem;
}

.formula-card p {
    color: #435970;
    line-height: 1.58;
    margin: 0.45rem 0;
}

.featured-formula {
    border-color: #86bba9;
    box-shadow: inset 5px 0 0 var(--fee-green);
}

.worked-line {
    background: var(--fee-green-soft);
    border-radius: 0.5rem;
    color: #174f3e;
    font-size: 0.9rem;
    padding: 0.7rem 0.8rem;
}

.source-line {
    border-top: 1px solid var(--fee-border);
    font-size: 0.8rem;
    margin-top: 0.9rem !important;
    padding-top: 0.75rem;
}

.unavailable-formulas {
    margin-top: 1rem;
    padding: clamp(1.25rem, 3vw, 1.8rem);
}

.unavailable-formulas dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.unavailable-formulas dl > div {
    display: grid;
    gap: 1rem;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 1rem 0;
}

.unavailable-formulas dl > div + div {
    border-top: 1px solid var(--fee-border);
}

.unavailable-formulas dt {
    color: var(--fee-ink);
    font-weight: 800;
}

.unavailable-formulas dd {
    color: var(--fee-muted);
    line-height: 1.6;
    margin: 0;
}

.example-section {
    align-items: center;
    background: #17334e;
    border: 0;
    color: #ffffff;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    margin-bottom: 4rem;
    padding: clamp(1.5rem, 4vw, 2.6rem);
}

.example-section .step-label {
    color: #8dd7bd;
}

.example-section h2 {
    color: #ffffff;
}

.example-section > div > p:last-child {
    color: #d4e3ed;
    line-height: 1.6;
}

.example-math {
    display: grid;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.example-math li {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.example-math li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.example-math span {
    color: #bcd0df;
}

.example-math strong {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.explainer-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.explainer-grid article {
    background: var(--fee-surface);
    border-top: 4px solid var(--fee-blue);
    border-radius: 0.8rem;
    box-shadow: 0 8px 30px rgba(24, 48, 75, 0.06);
    padding: 1.25rem;
}

.explainer-grid p {
    color: var(--fee-muted);
    line-height: 1.6;
    margin: 0;
}

.faq-section details {
    background: var(--fee-surface);
    border: 1px solid var(--fee-border);
    border-radius: 0.8rem;
    margin-bottom: 0.75rem;
    padding: 0;
}

.faq-section summary {
    color: var(--fee-ink);
    cursor: pointer;
    font-weight: 800;
    line-height: 1.4;
    min-height: 3.25rem;
    padding: 1rem 3rem 1rem 1.2rem;
}

.faq-section summary:focus-visible {
    border-radius: 0.7rem;
    outline: 3px solid #f5b842;
    outline-offset: 2px;
}

.faq-section details p {
    color: var(--fee-muted);
    line-height: 1.65;
    margin: 0;
    padding: 0 1.2rem 1.2rem;
}

.source-register {
    background: var(--fee-surface);
    border: 1px solid var(--fee-border);
    border-radius: 1rem;
    columns: 2;
    gap: 2.5rem;
    margin: 0;
    padding: 1.4rem 1.4rem 1.4rem 2.7rem;
}

.source-register li {
    break-inside: avoid;
    color: var(--fee-muted);
    line-height: 1.58;
    margin-bottom: 0.8rem;
    padding-left: 0.25rem;
}

.review-callout {
    align-items: center;
    background: var(--fee-gold-soft);
    border-color: #e7c57e;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
}

.review-callout > div:first-child {
    max-width: 720px;
}

.review-callout > div:first-child > p:last-child {
    color: #654d28;
    line-height: 1.62;
    margin-bottom: 0;
}

.review-links {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.7rem;
}

.primary-link,
.secondary-link {
    border-radius: 0.65rem;
    font-weight: 800;
    min-height: 2.9rem;
    padding: 0.75rem 1rem;
    text-align: center;
    text-decoration: none;
}

.fee-page .primary-link {
    background: var(--fee-green);
    color: #ffffff;
}

.fee-page .primary-link:hover {
    background: var(--fee-green-dark);
    color: #ffffff;
}

.fee-page .secondary-link {
    background: #ffffff;
    border: 1px solid #c69a47;
    color: #684600;
}

.tool-footer {
    align-items: center;
    color: var(--fee-muted);
    display: flex;
    font-size: 0.85rem;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 0;
}

.tool-footer p {
    margin: 0;
}

.tool-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

@media (max-width: 960px) {
    .fee-hero,
    .calculator-section,
    .example-section {
        grid-template-columns: 1fr;
    }

    .disclosure-card {
        min-height: 0;
    }

    .formula-grid {
        grid-template-columns: 1fr;
    }

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

    .results-header,
    .review-callout,
    .tool-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-summary {
        max-width: none;
    }

    .review-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tool-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .fee-page {
        padding: 1.25rem 0.75rem 3rem;
    }

    .fee-breadcrumb {
        margin-bottom: 1.4rem;
    }

    .fee-hero h1 {
        font-size: clamp(2.4rem, 15vw, 3.5rem);
    }

    .calculator-card,
    .assumption-card,
    .results-section {
        border-radius: 1rem;
    }

    .count-input > span {
        padding-left: 0.5rem;
    }

    .explainer-grid {
        grid-template-columns: 1fr;
    }

    .unavailable-formulas dl > div {
        gap: 0.35rem;
        grid-template-columns: 1fr;
    }

    .example-math li {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .example-math strong {
        text-align: left;
    }

    .source-register {
        columns: 1;
    }

    .review-links {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .money-input,
    .count-input,
    .calculate-button {
        transition: none;
    }
}

@media print {
    .fee-page {
        background: #ffffff;
        padding: 0;
    }

    .calculator-card,
    .disclosure-card,
    .review-callout,
    .tool-footer {
        display: none;
    }

    .calculator-section {
        display: block;
    }

    .assumption-card,
    .results-section,
    .formula-card,
    .unavailable-formulas,
    .example-section {
        box-shadow: none;
        break-inside: avoid;
    }

    .table-region {
        overflow: visible;
    }

    .results-table {
        font-size: 8pt;
        min-width: 0;
    }
}
