/* Pay extra or refinance in sentences (PV-011, js/mortgage-ui.js). Linked before pocket.css (pocket.css stays last); an
   rf-* rule on an element that also wears an rv-* class (rv-card, rv-svg) needs .rf in front, or pocket.css wins on load
   order. It borrows the Rent vs buy shell (.rv, .rv-top, .rv-card, .rv-detail, .rv-years) and the Money · Ledger tokens.
   Steady mood: monochrome plus the one accent; nothing celebrates, nothing is red or green. The three lines differ by ink
   and dash, not by a good/bad colour: as is (dim), pay extra (the accent), refinance (ink, dashed).
   Laptop: the loan, then both answers side by side, then the chart (proto.html?screen=refi).
   Phone (≤1100px): one column; the year by year behind "More detail". */

.rf { container-type: inline-size; }
.rf-title { margin-right: auto; min-width: 0; }
.rf .rv-top .pl-tool-title { margin: 0; }
.rf-q { margin: 2px 0 0; font: 400 13.5px var(--font-sans); color: var(--text-dim); }

/* the sentences: the loan large, the two answers a step smaller; answers bold in ink, the payment in the accent */
.rf .rf-loan { display: grid; gap: 10px; padding: 22px; }
.rf-sent { margin: 0; font: 600 28px/1.34 var(--font-sans); letter-spacing: -.025em; color: var(--text); text-wrap: pretty; }
.rf-loan .rf-sent { max-width: 36ch; }
.rf-loan .rf-sent .sp-ans { color: var(--accent); }
.rf-sent-s { font-size: 19px; font-weight: 550; line-height: 1.45; letter-spacing: -.01em; }
.rf-sent-s .sp-ans { color: var(--text); font-weight: 600; }
#rf-refi .sp-ans { display: inline; white-space: normal; }   /* "lowers the payment by $411" is a phrase: let it wrap like words, not jump down whole */
.rf-loan .sp-hint { margin: -2px 0 0; }
.rf-note { margin: 0; font: 400 13px/1.45 var(--font-sans); color: var(--text-dim); }

/* both answers on one page: two cards side by side, never tabs */
.rf-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.rf .rf-card { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.rf-h { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 16px/1.3 var(--font-sans); color: var(--text); }
.rf-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--text-mid); }
.rf-ic svg { width: 16px; height: 16px; }
.rf-ic.is-extra { color: var(--accent); }
.rf-sub { margin: 0; font: 400 13.5px/1.5 var(--font-sans); color: var(--text-dim); }
.rf-means { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: auto 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font: 400 13.5px/1.5 var(--font-sans); color: var(--text-mid); }
.rf-means svg { width: 16px; height: 16px; margin-top: 2px; color: var(--text-dim); }
.rf-means b { color: var(--text); font-weight: 600; }
.rf-means .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* what I'd still owe */
.rf .rf-chart { padding: 20px 22px 16px; }
.rf-chart-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.rf-chart-h .rf-h { margin-right: auto; }
.rf-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 12.5px var(--font-sans); color: var(--text-mid); }
.rf-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rf-sw { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid; }
.rf-l { stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.rf-l-base { stroke: var(--text-dim); border-color: var(--text-dim); }
.rf-l-extra { stroke: var(--accent); border-color: var(--accent); }
.rf-l-refi { stroke: var(--text); border-color: var(--text); stroke-dasharray: 6 5; }
.rf-sw.rf-l-refi { border-top-style: dashed; }
.rf-pin { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.rf .rf-svg { margin-top: 6px; }
.rf .rf-svg-n { display: none; }
@container (max-width: 560px) { .rf .rf-svg-w { display: none; } .rf .rf-svg-n { display: block; } }
.rf .rv-years td small { display: block; margin-top: 2px; color: var(--text-dim); font: 400 11.5px var(--font-sans); }

@media (max-width: 1100px) {
  .rf-two { grid-template-columns: minmax(0, 1fr); }
  .rf .rf-loan, .rf .rf-card, .rf .rf-chart { padding: 18px 16px; }
  .rf-sent { font-size: 23px; line-height: 1.38; }
  .rf-sent-s { font-size: 17.5px; }
}
@media (max-width: 400px) { .rf-sent { font-size: 21px; } .rf-sent-s { font-size: 17px; } }
