/* Rent or buy in a sentence (PV-010, js/rentvsbuy-ui.js). Steady mood: monochrome plus the one accent; nothing celebrates.
   Linked before pocket.css (pocket.css stays last); classes are rb2-* and rb-*, so the old rv-* shell that Debt, Home value
   and Mortgage still borrow from pocket.css stays untouched. Uses the Money · Ledger tokens.
   Laptop: the sentence and the crossover chart on the left; what it means for you and the assumptions on the right.
   Phone (≤1100px): one column, in the same order. Design: docs/design/planning-v2/proto.html?screen=rentbuy */

.rb2 { display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.rb2-h .pl-tool-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.rb2-sub { margin: 4px 0 0; font: 400 13.5px var(--font-sans); color: var(--text-dim); }
.rb2-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.rb2-side { display: grid; gap: 14px; min-width: 0; }
.rb2-card { display: grid; gap: 12px; padding: 22px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.rb2-flat { background: var(--surface-2); box-shadow: none; }
.rb2-k { margin: 0; font: 600 15px var(--font-sans); color: var(--text); }

/* the sentence: the answer, large; four numbers drag */
.rb-sent { margin: 0; font: 600 26px/1.34 var(--font-sans); letter-spacing: -.02em; color: var(--text); max-width: 36ch; text-wrap: balance; }
.rb-sent .sp-ans { color: var(--accent); }
.rb-sent-xs { font-size: 15px; font-weight: 500; line-height: 1.6; letter-spacing: 0; color: var(--text-mid); max-width: none; }
.rb-after { margin: 0; font: 400 14px/1.5 var(--font-sans); color: var(--text-mid); }
.rb2-main .sp-hint { margin: -4px 0 0; }

/* the chart: buying in the accent, renting dashed in ink; the crossover a pin with its year */
.rb-chart { min-width: 0; }
.rb-svg { display: block; width: 100%; height: auto; overflow: visible; }
.rb-svg-n { display: none; }
@container (max-width: 520px) { .rb-svg-w { display: none; } .rb-svg-n { display: block; } }
.rb-tick line { stroke: var(--border); }
.rb-tick text, .rb-xl { font: 400 10.5px var(--font-mono); fill: var(--text-dim); }
.rb-line { stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.rb-line.rb-buy { stroke: var(--accent); }
.rb-line.rb-rent { stroke: var(--text-mid); stroke-dasharray: 5 4; }
.rb-pinl { stroke: var(--text-dim); stroke-dasharray: 2 3; }
.rb-pin { fill: var(--surface); stroke: var(--accent); stroke-width: 2.25; }
.rb-pin-t { font: 600 11.5px var(--font-sans); fill: var(--text); }
.rb-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 400 12.5px/1.4 var(--font-sans); color: var(--text-dim); }
.rb-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rb-sw { flex: none; width: 18px; height: 0; border-top: 2.5px solid var(--accent); }
.rb-sw.rb-rent { border-top: 2.5px dashed var(--text-mid); }

/* what it means for you */
.rb-facts { display: grid; }
.rb-fact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--border); font: 400 14px var(--font-sans); color: var(--text); }
.rb-fact:last-child { border-bottom: 0; }
.rb-fact > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.rb-fact small { font: 400 12px/1.4 var(--font-sans); color: var(--text-dim); }
.rb-fact b { font: 600 14px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--text-mid); }
.rb-ic svg { width: 18px; height: 18px; }

.rb2-save { min-height: 48px; margin-top: 4px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: 600 14px var(--font-sans); cursor: pointer; }
.rb2-save:hover { background: var(--accent-fill-hi); }
.rb2-save:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rb2-save:disabled { opacity: .6; cursor: default; }
.rb2-status { margin-top: -4px; font: 400 12.5px var(--font-sans); color: var(--text-dim); }
.rb2-status:empty { display: none; }

@media (max-width: 1100px) { .rb2-grid { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 640px) {
  .rb2-card { padding: 18px 16px; }
  .rb-sent { font-size: 22px; }
  .rb-sent-xs { font-size: 15px; }
}
@media (max-width: 768px) { .rb2-h .pl-tool-title { font-size: 28px; } }
