/* Episode 8 only: the established reading shell with three authored diagrams. */
.episode-08-article .article-header h1 { letter-spacing: 0; text-wrap: balance; }
.episode-08-article .article-header h1 em, .e8-figure em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.episode-08-article .article-header h1 em { color: var(--blue); }
.episode-08-article .article-summary { font-size: 1.35rem; }
.episode-08-article .article-byline a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.episode-08-article .article-copy > p { font-size: 1.075rem; }
.episode-08-article .article-copy > p:first-child { font-size: 1.2rem; }
.episode-08-article .article-copy h2 { font-size: 2rem; letter-spacing: 0; text-wrap: balance; }
.episode-08-article .article-next h2 { font-size: 2.5rem; letter-spacing: 0; }
.episode-08-article .article-next-links { flex-basis: 290px; }
.episode-08-article .article-next-links a { letter-spacing: 0; text-transform: none; font-size: .95rem; text-align: right; }
.episode-08-article .article-related { font-size: .95rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.e8-figure { margin: 2.5rem 0 3rem; padding: 2rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.e8-figure *, .e8-figure { letter-spacing: 0; box-sizing: border-box; }
.e8-figure .e8-kicker { display: block; font: 500 .75rem/1.5 var(--font-mono); text-transform: uppercase; margin-bottom: .9rem; color: var(--splash); }
.e8-figure > figcaption { font-size: 1.85rem; line-height: 1.22; font-weight: 600; }
.e8-figure > figcaption em { display: inline-block; font-size: 2.65rem; line-height: 1.18; color: var(--splash); }
.e8-figure strong { color: inherit; }
.e8-figure .e8-note { font-size: .86rem; line-height: 1.65; color: var(--graph); margin: 1.25rem 0 0; }
.e8-figure .e8-note a { color: inherit; text-decoration: underline; text-underline-offset: .17em; }
.e8-figure span, .e8-figure small { line-height: 1.4; }
.e8-figure small { font-size: .85rem; font-weight: 400; }
.e8-housing { background: #001F39; color: var(--warm); border-top: 3px solid var(--blue); }
.e8-housing .e8-kicker, .e8-housing > figcaption em { color: var(--blue); }
.e8-housing-top { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; margin: 1.65rem 0 1.5rem; gap: .5rem; }
.e8-housing-top img { width: 100%; height: auto; display: block; }
.e8-take-home > span { display: block; font-size: .9rem; color: #C4DBE9; }
.e8-take-home strong { font-size: 3rem; line-height: 1.2; display: block; font-weight: 600; margin: .35rem 0; }
.e8-take-home small { display: block; color: #C4DBE9; }
.e8-switch:not([hidden]) { display: flex; border: 1px solid #618CA7; padding: 4px; margin: 0 0 1.5rem; gap: 4px; }
.e8-switch button { flex: 1; appearance: none; border: 0; min-height: 44px; padding: .65rem .4rem; font: 500 .95rem/1.3 var(--font-sans); color: var(--white); background: transparent; cursor: pointer; }
.e8-switch button[aria-pressed="true"] { background: var(--paper); color: var(--navy); }
.e8-switch button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.e8-allocation { display: flex; width: 100%; height: 30px; }
.e8-allocation span { height: 100%; }
.e8-allocation [data-bar="fixed"] { background: #869DAD; }
.e8-allocation [data-bar="housing"] { background: #FF7A86; border-left: 2px solid #001F39; }
.e8-allocation [data-bar="remaining"] { background: var(--blue); border-left: 2px solid #001F39; }
.e8-legend { display: flex; flex-wrap: wrap; gap: .6rem 1rem; font-size: .8rem; margin-top: .75rem; }
.e8-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; background: #869DAD; margin-right: .4rem; }
.e8-legend span:nth-child(2)::before { background: #FF7A86; }
.e8-legend span:nth-child(3)::before { background: var(--blue); }
.e8-live-result { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid #3E6078; }
.e8-live-result span { font-size: .85rem; display: block; color: #C4DBE9; }
.e8-live-result strong { display: block; font-size: 2.45rem; line-height: 1.3; font-weight: 600; margin-top: .3rem; }
.e8-live-result > div:last-child strong { color: var(--blue); }
.e8-ledger { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 1.35rem 0 0; text-align: right; }
.e8-ledger caption { text-align: left; font-size: .9rem; font-weight: 500; padding-bottom: .65rem; }
.e8-ledger th:first-child { width: 44%; text-align: left; }
.e8-ledger th { font-weight: 400; }
.e8-ledger thead th { font-size: .8rem; color: #C4DBE9; padding: .6rem 0; vertical-align: bottom; }
.e8-ledger td, .e8-ledger tbody th { padding: .65rem 0; border-top: 1px solid #3E6078; font-size: .95rem; }
.e8-ledger .e8-housing-row { color: #FF9DA5; }
.e8-ledger .e8-total-row { color: var(--blue); }
.e8-ledger .e8-total-row th, .e8-ledger .e8-total-row td { font-weight: 600; }
.e8-delta { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; align-items: center; border-top: 1px solid #618CA7; margin-top: 1rem; padding-top: 1.25rem; }
.e8-delta strong { font-size: 2rem; font-weight: 600; }
.e8-delta strong small { display: block; color: #C4DBE9; margin-top: .15rem; }
.e8-delta > span { font-size: .95rem; }
.e8-housing .e8-note { color: #C4DBE9; }
.e8-reserve { background: #EDF2F4; border-top: 3px solid var(--splash); }
.e8-reserve .e8-kicker { color: #006AA9; }
.e8-reserve-stage { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: center; margin: 2rem 0; }
.e8-reserve-slip { background: var(--warm); padding: 1.2rem; border-top: 2px solid var(--blue); border-bottom: 1px solid #AABCCA; box-shadow: 0 5px 0 #D3DFE5, 0 12px 22px #00356112; }
.e8-reserve-slip span { display: block; font-size: .85rem; }
.e8-reserve-slip strong { display: block; font-size: 3.5rem; line-height: 1.2; margin: .65rem 0; font-weight: 500; }
.e8-reserve-slip small { display: block; border-top: 1px solid var(--line); padding-top: .6rem; font-size: .8rem; }
.e8-reserve-stage > p { font-size: 1.3rem; line-height: 1.4; margin: 0; }
.e8-reserve-stage > p em { font-size: 1.9rem; color: var(--splash); }
.e8-coverage-row + .e8-coverage-row { margin-top: 1.6rem; }
.e8-coverage-label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .65rem; }
.e8-coverage-label > span { font-size: 1rem; font-weight: 500; }
.e8-coverage-label small { display: block; color: var(--graph); font-size: .85rem; margin-top: .2rem; }
.e8-coverage-label > strong { font-size: 1.85rem; font-weight: 600; line-height: 1.2; text-align: right; }
.e8-coverage-scale { width: 100%; height: 26px; border-right: 1px dashed #8DA5B7; }
.e8-obligation { background: #C7D4DD; height: 100%; outline: 1px solid #547489; outline-offset: -1px; }
.e8-funded { display: block; background: var(--splash); height: 100%; transform-origin: left; }
.e8-scale-key { font-size: .8rem; display: flex; gap: .6rem; align-items: center; margin-top: 1.2rem; }
.e8-scale-key > span { width: 10px; height: 10px; background: var(--splash); flex-shrink: 0; }
.e8-payoff { padding: 0; }
.e8-payoff .e8-kicker { border-top: 1px solid var(--line); padding-top: 1.8rem; }
.e8-alternatives { font-size: 1rem; color: var(--graph); line-height: 1.5; margin: 1rem 0 1.5rem; }
.e8-loan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.e8-loan { background: var(--warm); border: 1px solid #C5D4DF; border-top: 3px solid var(--navy); min-width: 0; }
.e8-loan-car { border-top-color: var(--splash); }
.e8-loan-top { padding: 1.2rem 1.25rem 0; background: #E8EEF1; }
.e8-loan-top > span { font: 500 .75rem/1.5 var(--font-mono); color: var(--graph); }
.e8-figure .e8-loan-top h3 { display: flex; align-items: baseline; justify-content: space-between; font-size: 1.5rem; line-height: 1.3; font-weight: 600; margin: .35rem 0 0; }
.e8-loan-top h3 small { font-size: 1.2rem; }
.e8-loan-top img { display: block; width: 100%; height: 125px; object-fit: contain; margin: .5rem 0 0; }
.e8-loan-details { padding: 1.1rem 1.25rem 0; }
.e8-cfi { display: flex; justify-content: space-between; align-items: center; padding-bottom: .9rem; border-bottom: 1px solid var(--line); gap: .5rem; }
.e8-cfi > span { font-size: .85rem; }
.e8-cfi small { display: block; margin-top: .2rem; color: var(--graph); font-size: .75rem; }
.e8-cfi > strong { font-size: 1.75rem; font-weight: 500; }
.e8-original-payment { font-size: .8rem; line-height: 1.5; color: var(--graph); margin: .8rem 0 0; min-height: 2.4rem; }
.e8-balance { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.e8-balance > span { font-size: .8rem; display: block; }
.e8-balance > div { margin-top: .4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; }
.e8-balance s { font-size: .9rem; color: var(--graph); }
.e8-balance strong { font-size: 1.55rem; font-weight: 600; }
.e8-payment { padding: 1rem 0; }
.e8-payment > span { font-size: .85rem; display: block; }
.e8-payment > strong { font-size: 2.55rem; display: block; line-height: 1.2; margin-top: .4rem; font-weight: 600; }
.e8-payment small { display: block; margin-top: .2rem; }
.e8-payment p { font-size: .9rem; line-height: 1.5; color: var(--graph); margin: .75rem 0 0; }
.e8-relief { margin: 0 -1.25rem; padding: 1rem 1.25rem; background: #E8EEF1; border-top: 1px solid var(--line); }
.e8-relief > span { display: block; font-size: .8rem; }
.e8-relief > strong { font-size: 2rem; display: block; font-weight: 600; line-height: 1.2; margin-top: .35rem; }
.e8-loan-car .e8-relief { background: #003561; color: var(--white); }
.e8-loan-car .e8-relief strong { color: var(--blue); }
.e8-payoff-end { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.e8-payoff-end > span { font-size: 1.25rem; }
.e8-payoff-end em { color: var(--splash); font-size: 1.8rem; }
.e8-payoff-end strong { font-size: 2.65rem; text-align: right; font-weight: 600; }
.e8-payoff-end small { display: block; font-size: .8rem; }
@keyframes e8-reserve-emphasis { 0%,100% { filter: brightness(1); } 45% { filter: brightness(1.2); } }
@keyframes e8-emphasis { 0%,100% { box-shadow: -4px 0 0 0 #4AADDF00; } 35%,65% { box-shadow: -4px 0 0 0 var(--blue); } }
.e8-reserve.e8-in-view .e8-funded { animation: e8-reserve-emphasis 1.1s ease; }
.e8-payoff.e8-in-view .e8-balance { animation: e8-emphasis 1.3s ease .15s; }
.e8-payoff.e8-in-view .e8-payment { animation: e8-emphasis 1.3s ease 1.25s; }
.e8-payoff.e8-in-view .e8-relief { animation: e8-emphasis 1.3s ease 2.35s; }
.e8-sr-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .episode-08-article .article-header h1 { font-size: 2.4rem; }
  .episode-08-article .article-copy h2 { font-size: 1.65rem; }
  .episode-08-article .article-next h2 { font-size: 2rem; }
  .episode-08-article .article-next-links { flex-basis: auto; }
  .episode-08-article .article-next-links a { text-align: left; }
}
@media (max-width: 560px) {
  .e8-figure { padding: 1.5rem 1.1rem; }
  .e8-figure > figcaption { font-size: 1.55rem; }
  .e8-figure > figcaption em { font-size: 2.15rem; }
  .e8-housing-top { grid-template-columns: 1fr; margin: 1.4rem 0; position: relative; }
  .e8-housing-top img { position: absolute; width: 46%; right: -5px; bottom: -4px; }
  .e8-take-home strong { font-size: 2.65rem; }
  .e8-take-home small { font-size: .8rem; max-width: 54%; }
  .e8-switch button { font-size: .85rem; }
  .e8-live-result { gap: .5rem; }
  .e8-live-result span { font-size: .8rem; }
  .e8-live-result strong { font-size: 2rem; }
  .e8-ledger th:first-child { width: 43%; }
  .e8-ledger td, .e8-ledger tbody th { font-size: .8rem; }
  .e8-ledger thead th { font-size: .75rem; }
  .e8-delta { align-items: flex-start; gap: .6rem 1rem; }
  .e8-delta > span { font-size: .9rem; }
  .e8-reserve-stage { grid-template-columns: 1fr; gap: 1.3rem; margin: 1.4rem 0 1.8rem; }
  .e8-reserve-slip { padding: 1.2rem 1.3rem; }
  .e8-reserve-slip strong { font-size: 3.6rem; }
  .e8-reserve-stage > p br { display: none; }
  .e8-reserve-stage > p { font-size: 1.15rem; }
  .e8-reserve-stage > p em { font-size: 1.5rem; }
  .e8-coverage-label > span { font-size: .9rem; }
  .e8-coverage-label strong { font-size: 1.7rem; }
  .e8-coverage-label small { font-size: .8rem; }
  .e8-payoff { padding: 0; }
  .e8-loan-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .e8-loan-top { position: relative; min-height: 130px; padding-top: 1.3rem; }
  .e8-figure .e8-loan-top h3 { display: block; width: 52%; }
  .e8-loan-top h3 small { display: block; margin-top: .5rem; }
  .e8-loan-top img { position: absolute; right: .5rem; bottom: .2rem; width: 46%; height: 115px; }
  .e8-cfi > span, .e8-balance > span, .e8-payment > span, .e8-relief > span { font-size: .9rem; }
  .e8-payment > strong { font-size: 3rem; }
  .e8-payoff-end { align-items: flex-start; flex-direction: column; }
  .e8-payoff-end strong { text-align: left; }
}
@media (max-width: 360px) {
  .episode-08-article .article-header h1 { font-size: 2rem; }
  .e8-figure { padding-left: .85rem; padding-right: .85rem; }
  .e8-payoff { padding: 0; }
  .e8-figure > figcaption em { font-size: 1.9rem; }
  .e8-legend { gap: .4rem .6rem; font-size: .75rem; }
  .e8-live-result strong { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .e8-figure *, .e8-figure *::before { animation: none !important; transition: none !important; }
}
