/* Rent vs buy (tools/rent-vs-buy.html). Frame: tool-frame.css + tools/kit.css; verdict/banner: core.css. */

.rb-figure { font-size: clamp(64px, 8vw, 112px); letter-spacing: -0.04em; margin-top: 14px; }
.rb-summary { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.rb-summary .tf-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Hero chart: two net-worth lines */
.rb-fig { margin: 56px 0 0; padding: clamp(24px, 3vw, 36px); background: var(--stage-2); border: 1px solid var(--hair-stage); border-radius: var(--r-panel); }
.rb-fig-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 12px; }
.rb-fig-title { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--parchment); }
.rb-key { display: inline-flex; align-items: center; gap: 8px; font: 400 13px/1 var(--font-sans); color: var(--parchment-2); }
.rb-sw { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--parchment); }
.rb-sw--rent { border-top: 2px dashed var(--parchment-2); margin-left: 12px; }
.rb-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rb-grid { stroke: var(--hair-stage); stroke-width: 1; }
.rb-grid--zero { stroke: rgba(236, 230, 216, .3); }
.rb-ylab { fill: var(--parchment-3); font: 400 13px var(--font-sans); text-anchor: end; font-variant-numeric: tabular-nums; }
.rb-xlab { fill: var(--parchment-3); font: 400 13px var(--font-sans); text-anchor: middle; }
.rb-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rb-line--own { stroke: var(--parchment); }
.rb-line--rent { stroke: var(--parchment-2); stroke-dasharray: 7 6; }
.rb-cross { fill: var(--kesef); stroke: var(--stage-2); stroke-width: 3; }
.rb-cross-lab { fill: var(--kesef); font: 500 15px var(--font-sans); text-anchor: middle; }
.rb-scrubline { stroke: rgba(236, 230, 216, .35); stroke-width: 1; stroke-dasharray: 2 4; }
.rb-dot { stroke: var(--stage-2); stroke-width: 2; }
.rb-dot--own { fill: var(--parchment); }
.rb-dot--rent { fill: var(--parchment-2); }

.rb-scrub { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hair-stage); }
.rb-scrub label { font: 500 14px/1.3 var(--font-sans); color: var(--parchment); }
.rb-scrub output { font: 300 32px/1 var(--font-sans); letter-spacing: -0.02em; color: var(--parchment); font-variant-numeric: tabular-nums; }
.rb-scrub .ks-range { width: 100%; margin-top: 6px; height: 44px; }
.rb-scrub-read { margin: 6px 0 0; font: 400 15px/1.5 var(--font-sans); color: var(--parchment-2); min-height: 1.5em; }

@media (max-width: 760px) {
  .rb-fig { margin-top: 40px; padding: 18px; }
  .rb-ylab, .rb-xlab { font-size: 22px; }
  .rb-cross-lab { font-size: 24px; }
  .rb-line { stroke-width: 4; }
  .rb-figure { font-size: clamp(56px, 18vw, 96px); }
}

/* Work area */
.rb-hint { margin-top: 18px; }
.rb-status:empty { display: none; }
.rb-status { margin-top: 12px; }
.rb-sources a, .tk-guide a { color: var(--ink); text-underline-offset: 3px; }
.tk-rows dt .tk-hint { font-size: 12.5px; }
.tf-work select { width: 100%; padding: 0 40px 0 14px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312110E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.tf-work .kc-more .tk-two:first-child { margin-top: 8px; }

.rb-years { margin-top: 32px; padding: 0; }
.rb-years > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding: clamp(22px, 3vw, 32px); cursor: pointer; min-height: 56px; }
.rb-years > summary::-webkit-details-marker { display: none; }
.rb-years > summary small { font: 400 14px/1.4 var(--font-sans); color: var(--ink-2); }
.rb-years[open] > summary { border-bottom: 1px solid var(--hair); }
.rb-table-wrap { overflow-x: auto; padding: 0 clamp(12px, 3vw, 32px) 24px; }
.rb-tbl { width: 100%; border-collapse: collapse; font: 400 15px/1.3 var(--font-sans); color: var(--ink); min-width: 560px; }
.rb-tbl th, .rb-tbl td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-tbl thead th { font: 500 13px/1.3 var(--font-sans); color: var(--ink-2); }
.rb-tbl th:first-child { text-align: left; }
.rb-tr-cross { background: var(--kesef-soft); }
[hidden] { display: none !important; }

@media print {
  #site-header, footer, .tf-actions, .ks-reassure, .tk-actions, .tf-related, .kc-verdict__save, .kc-verdict__next, .rb-scrub, .sr-only { display: none !important; }
  .tf-hero, .rb-fig, .tf-summary { background: #fff !important; color: #000 !important; }
}
