.cfe-body {
    --cfe-ink: #172d3a;
    --cfe-muted: #526976;
    --cfe-line: #c9d5db;
    --cfe-canvas: #eef2f3;
    --cfe-surface: #ffffff;
    --cfe-operating: #277653;
    --cfe-investing: #2c6f98;
    --cfe-financing: #75578b;
    margin: 0;
    background: var(--cfe-canvas);
    color: var(--cfe-ink);
    font-family: var(--font-main, system-ui, sans-serif);
}

.cfe-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 58px;
    padding: 0 max(20px, calc((100vw - 1860px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--cfe-line);
    background: rgba(255, 255, 255, 0.96);
}

.cfe-topbar a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: #294b5c;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.cfe-topbar nav {
    display: flex;
    gap: 22px;
}

.cfe-topbar .cfe-back {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #afc1c8;
    background: #fff;
    color: #294b5c;
    transition: border-color 180ms ease-out, background-color 180ms ease-out, transform 180ms ease-out;
}

.cfe-topbar .cfe-back:hover {
    border-color: #769888;
    background: #edf6f1;
    color: #1f6145;
    transform: translateX(-2px);
}

.cfe-topbar .cfe-back:active {
    transform: translateX(-1px);
}

.cfe-topbar nav a:hover,
.cfe-topbar nav a:focus-visible,
.cfe-back:focus-visible {
    color: #146042;
}

.cfe-topbar a:focus-visible,
.cfe-footer a:focus-visible,
.cfe-inline-detail summary:focus-visible {
    outline: 3px solid rgba(21, 94, 239, 0.32);
    outline-offset: 3px;
}

.cfe-shell {
    width: min(1860px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0 72px;
}

.cfe-page-intro {
    padding: 0 0 28px;
    display: grid;
    grid-template-columns: minmax(720px, 1.12fr) minmax(580px, 0.88fr);
    gap: 28px;
    align-items: start;
    border-bottom: 1px solid #aebfc6;
}

.cfe-page-intro h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.cfe-intro-copy p {
    max-width: 72ch;
    margin: 14px 0 0;
    color: var(--cfe-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.cfe-page-guide {
    padding-top: 4px;
}

.cfe-page-guide h2,
.cfe-source-intro h2,
.cfe-control h2 {
    margin: 0;
    font-size: 1.35rem;
}

.cfe-source-intro p,
.cfe-control p {
    max-width: 68ch;
    margin: 9px 0 0;
    color: var(--cfe-muted);
    line-height: 1.6;
}

.cfe-page-guide h2 {
    font-size: 1rem;
}

.cfe-page-guide ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.cfe-page-guide li {
    padding: 7px 0;
    border-bottom: 1px solid var(--cfe-line);
    color: var(--cfe-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.cfe-page-guide li:last-child {
    border-bottom: 0;
}

.cfe-page-guide li strong {
    color: var(--cfe-ink);
}

.cfe-reading-key {
    margin: 4px 28px 0;
    padding: 22px 0 4px;
    display: grid;
    gap: 18px;
    border-top: 2px solid var(--cfe-ink);
}

.cfe-reading-key h3 {
    margin: 0;
    font-size: 1.08rem;
}

.cfe-reading-key p {
    max-width: 72ch;
    margin: 7px 0 0;
    color: var(--cfe-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.cfe-sign-rule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #c8d6d1;
}

.cfe-sign-rule p {
    max-width: none;
    margin: 0;
    padding: 11px 13px;
    background: #f4f8f6;
    color: #3e5d50;
    font-size: 0.82rem;
}

.cfe-sign-rule strong {
    color: #193d2d;
}

.cfe-layout {
    margin-top: 32px;
    display: grid;
    grid-template-columns: minmax(720px, 1.12fr) minmax(580px, 0.88fr);
    gap: 28px;
    align-items: start;
}

.cfe-lesson {
    display: grid;
    gap: 56px;
}

.cfe-source-column {
    position: sticky;
    top: 72px;
    display: grid;
    gap: 18px;
    min-width: 0;
    max-height: calc(100vh - 88px);
    padding-right: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.cfe-flow-section {
    --cfe-accent: var(--cfe-operating);
    overflow: hidden;
    background: var(--cfe-surface);
    box-shadow: 0 3px 0 rgba(23, 45, 58, 0.12);
}

.cfe-flow-investing {
    --cfe-accent: var(--cfe-investing);
}

.cfe-flow-financing {
    --cfe-accent: var(--cfe-financing);
}

.cfe-section-head {
    padding: 25px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
    gap: 30px;
    align-items: center;
    background: var(--cfe-accent);
    color: #fff;
}

.cfe-section-head > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cfe-section-number {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    font-weight: 850;
}

.cfe-section-head h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1.2;
    text-wrap: balance;
}

.cfe-section-head p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1.55;
}

.cfe-formula-block {
    padding: 20px 28px 24px;
    background: #f8fafb;
}

.cfe-formula-row,
.cfe-formula-total,
.cfe-formula-grand {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid #dce4e7;
    font-size: 0.93rem;
}

.cfe-formula-row[data-source],
.cfe-wc-row[data-source],
.cfe-control[data-source] {
    cursor: pointer;
    transition: background-color 180ms ease-out, box-shadow 180ms ease-out;
}

.cfe-formula-row[data-source]:hover,
.cfe-formula-row[data-source]:focus-visible,
.cfe-formula-row[data-source].is-source-pinned,
.cfe-wc-row[data-source]:hover,
.cfe-wc-row[data-source]:focus-visible,
.cfe-wc-row[data-source].is-source-pinned {
    background: #edf7f1;
    box-shadow: 0 0 0 5px #edf7f1;
}

.cfe-formula-row[data-source]:focus-visible,
.cfe-wc-row[data-source]:focus-visible {
    outline: 3px solid rgba(39, 118, 83, 0.32);
    outline-offset: 5px;
}

.cfe-formula-row strong,
.cfe-formula-total strong,
.cfe-formula-grand strong {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cfe-formula-row > span:nth-child(2) small {
    display: block;
    margin-top: 3px;
    color: #607581;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.45;
}

.cfe-sign {
    font-weight: 900;
}

.cfe-plus {
    color: #176744;
}

.cfe-minus {
    color: #9a423e;
}

.cfe-formula-total {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 3px;
    border-bottom: 2px solid var(--cfe-accent);
    font-weight: 850;
}

.cfe-formula-grand {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 16px;
    border-bottom: 0;
    color: var(--cfe-accent);
    font-size: 1.05rem;
    font-weight: 850;
}

.cfe-compact-formula {
    padding-top: 10px;
}

.cfe-inline-detail {
    grid-column: 2 / -1;
    width: fit-content;
    max-width: 100%;
    margin-top: -3px;
    color: #526976;
    font-size: 0.76rem;
}

.cfe-inline-detail summary {
    width: fit-content;
    padding: 3px 0;
    color: #587268;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #afc6bc;
    text-underline-offset: 3px;
}

.cfe-inline-detail summary:hover {
    color: #205f45;
}

.cfe-inline-detail summary:focus-visible {
    outline: 2px solid rgba(39, 118, 83, 0.38);
    outline-offset: 3px;
}

.cfe-inline-detail div {
    max-width: 68ch;
    padding: 5px 0 4px;
    line-height: 1.5;
}

.cfe-inline-detail p {
    margin: 3px 0;
}

.cfe-inline-detail b {
    color: var(--cfe-ink);
}

.cfe-subheading {
    margin: 4px 28px 0;
    padding-top: 24px;
    border-top: 2px solid var(--cfe-ink);
    font-size: 1.15rem;
}

.cfe-wc-block {
    margin: 12px 28px 28px;
    border-top: 1px solid #bdcdd3;
    border-bottom: 1px solid #bdcdd3;
}

.cfe-wc-summary {
    margin-bottom: 4px;
}

.cfe-wc-head,
.cfe-wc-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px 112px;
    gap: 14px;
    align-items: center;
}

.cfe-wc-head {
    padding: 8px 12px;
    background: #e9eff1;
    color: #526a75;
    font-size: 0.72rem;
    font-weight: 800;
}

.cfe-wc-head span:not(:first-child) {
    text-align: right;
}

.cfe-wc-row {
    padding: 12px;
    border-bottom: 1px solid #dce4e7;
    background: #fff;
    cursor: pointer;
    transition: background-color 180ms ease-out, box-shadow 180ms ease-out;
}

.cfe-wc-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.cfe-wc-name {
    color: var(--cfe-ink);
    font-size: 0.9rem;
    line-height: 1.35;
}

.cfe-wc-main > small {
    color: #607581;
    font-size: 0.75rem;
    line-height: 1.45;
}

.cfe-wc-main .cfe-inline-detail {
    grid-column: auto;
    margin-top: 0;
}

.cfe-wc-change,
.cfe-wc-impact {
    display: grid;
    justify-items: end;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}

.cfe-wc-change span,
.cfe-wc-impact span {
    color: #607581;
    font-size: 0.68rem;
}

.cfe-wc-change strong {
    color: #334e5a;
    font-size: 0.88rem;
}

.cfe-wc-impact {
    padding: 7px 9px;
    background: #f1f5f6;
}

.cfe-wc-impact strong {
    font-size: 0.96rem;
}

.cfe-wc-impact.is-plus strong {
    color: #176744;
}

.cfe-wc-impact.is-minus strong {
    color: #9a423e;
}

.cfe-wc-block > .cfe-formula-total,
.cfe-wc-block > .cfe-formula-grand {
    padding: 11px 12px;
}

.cfe-note {
    margin: 0 28px 28px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--cfe-accent) 40%, #d7e1e4);
    background: color-mix(in srgb, var(--cfe-accent) 7%, #fff);
}

.cfe-note p {
    margin: 6px 0 0;
    color: var(--cfe-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cfe-sources {
    display: grid;
    gap: 18px;
    overflow-x: hidden;
}

.cfe-source-intro {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px 12px;
    border-bottom: 1px solid #b7c7cd;
    background: #eef2f3;
}

.cfe-source-intro p {
    margin-right: 130px;
    font-size: 0.82rem;
}

.cfe-source-intro button {
    position: absolute;
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #9cb5a9;
    background: #fff;
    color: #245e45;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.cfe-source-intro button:hover {
    background: #e2f0e8;
}

.cfe-source-intro button[hidden] {
    display: none;
}

.cfe-source-intro button:focus-visible {
    outline: 3px solid rgba(39, 118, 83, 0.32);
    outline-offset: 3px;
}

.cfe-source-table {
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 0 rgba(23, 45, 58, 0.12);
}

.cfe-source-table.cfe-asset-schedule { overflow: hidden; min-width: 0; }
.cfe-asset-schedule-scroll { overflow-x: auto; }
.cfe-asset-schedule table { min-width: 1400px; font-size: 0.68rem; }
.cfe-asset-schedule th, .cfe-asset-schedule td { white-space: nowrap; }
.cfe-asset-schedule th:first-child, .cfe-asset-schedule td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 200px;
    background: #fff;
}

.cfe-source-table h3 {
    margin: 0;
    padding: 11px 13px;
    background: #253b46;
    color: #fff;
    font-size: 0.95rem;
}

.cfe-source-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

.cfe-source-table th,
.cfe-source-table td {
    padding: 7px 9px;
    border-bottom: 1px solid #dce4e7;
    text-align: right;
    transition: background-color 180ms ease-out, color 180ms ease-out;
}

.cfe-source-table th:first-child,
.cfe-source-table td:first-child {
    text-align: left;
}

.cfe-source-table th {
    background: #eef3f4;
    color: #405965;
    font-weight: 850;
}

.cfe-source-table tbody tr.is-source-highlighted td {
    background: #dcefe4;
    color: #153d2b;
}

.cfe-source-table tbody tr.is-source-highlighted td:first-child {
    font-weight: 850;
}

.cfe-table-section td {
    border-top: 2px solid #253b46;
    background: #e9eff1;
    color: #233d49;
    font-weight: 900;
}

.cfe-table-subsection td {
    background: #f4f7f8;
    color: #36515d;
    font-weight: 850;
}

.cfe-table-subtotal td {
    border-top: 1px solid #9fb1b9;
    background: #f8fafb;
    font-weight: 800;
}

.cfe-table-total td {
    border-top: 2px solid #253b46;
    font-weight: 850;
}

.cfe-table-grand td {
    border-top: 3px double #172d3a;
    border-bottom: 3px double #172d3a;
    background: #e6ecee;
    font-weight: 900;
}

.cfe-indent {
    padding-left: 20px !important;
}

.cfe-deep-indent {
    padding-left: 34px !important;
    color: #607580;
    font-size: 0.71rem;
    font-style: italic;
}

.cfe-source-table p {
    margin: 0;
    padding: 10px 12px 12px;
    color: var(--cfe-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.cfe-control {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 32px;
    align-items: center;
    border: 2px solid #253b46;
    background: #fff;
}

.cfe-control[data-source]:hover,
.cfe-control[data-source]:focus-visible,
.cfe-control[data-source].is-source-pinned {
    background: #edf7f1;
    outline: 3px solid rgba(39, 118, 83, 0.22);
    outline-offset: 3px;
}

.cfe-control-math {
    display: grid;
    gap: 7px;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.cfe-control-math strong {
    padding-top: 7px;
    border-top: 1px solid #aebfc6;
    color: #277653;
}

.cfe-footer {
    margin-top: 64px;
    padding: 26px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 2px solid var(--cfe-ink);
}

.cfe-footer p {
    margin: 0;
    color: var(--cfe-muted);
}

.cfe-footer a {
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    background: #277653;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.cfe-footer a:hover {
    background: #1e6243;
}

@media (max-width: 1400px) {
    .cfe-page-intro,
    .cfe-layout {
        grid-template-columns: 1fr;
    }

    .cfe-page-intro {
        gap: 20px;
    }

    .cfe-source-column {
        position: static;
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }

    .cfe-sources {
        grid-template-columns: 1fr 1fr;
        overflow: visible;
    }

    .cfe-source-intro {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 800px) {
    .cfe-topbar {
        position: static;
        padding: 8px 16px;
    }

    .cfe-topbar .cfe-back {
        min-height: 44px;
    }

    .cfe-topbar nav {
        display: none;
    }

    .cfe-shell {
        width: min(100% - 24px, 1860px);
        padding-top: 32px;
    }

    .cfe-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .cfe-page-intro,
    .cfe-section-head,
    .cfe-control {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cfe-sign-rule,
    .cfe-sources {
        grid-template-columns: 1fr;
    }

    .cfe-formula-block {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cfe-section-head,
    .cfe-control {
        padding: 21px 18px;
    }

    .cfe-subheading {
        margin-left: 16px;
        margin-right: 16px;
    }

    .cfe-reading-key {
        margin-left: 16px;
        margin-right: 16px;
    }

    .cfe-note {
        margin-left: 16px;
        margin-right: 16px;
    }

    .cfe-wc-block {
        margin-left: 16px;
        margin-right: 16px;
    }

    .cfe-wc-head {
        display: none;
    }

    .cfe-wc-row {
        grid-template-columns: 1fr auto;
        gap: 8px 12px;
    }

    .cfe-wc-main {
        grid-column: 1 / -1;
    }

    .cfe-wc-change,
    .cfe-wc-impact {
        justify-items: start;
    }
}

@media (max-width: 520px) {
    .cfe-page-intro h1 {
        font-size: 1.85rem;
    }

    .cfe-formula-row {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .cfe-formula-row strong {
        grid-column: 2;
    }

    .cfe-formula-total,
    .cfe-formula-grand {
        grid-template-columns: 1fr;
    }

    .cfe-inline-detail {
        grid-column: 1 / -1;
    }

    .cfe-wc-row {
        grid-template-columns: 1fr;
    }

    .cfe-wc-main,
    .cfe-wc-change,
    .cfe-wc-impact {
        grid-column: 1;
    }

    .cfe-wc-change,
    .cfe-wc-impact {
        justify-items: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cfe-formula-row[data-source],
    .cfe-wc-row[data-source],
    .cfe-control[data-source],
    .cfe-source-table th,
    .cfe-source-table td {
        transition: none;
    }
}
