/* properties.css: the property portfolio (#properties) and one property (#properties/<id>). Uses the tokens and component
   classes in app.css. Blue (--s1) is the highlighted data, amber (--s2) wants attention, --up and --down are gains and
   losses; the brand green is never used for data. */

/* ---------- the bar at the top ---------- */
.pp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; }
.pp-cur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pp-fx { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.inp.pp-n.sm { width: 84px; padding: 5px 8px; }
.pp-store { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; flex-wrap: wrap; }
.pp-store .help { margin-left: 0; }
.pp-store .ulink { color: var(--fg); font-weight: 500; }
.pp-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 55%, transparent); flex: none; }
.pp-store.ok .pp-dot { background: var(--s1); }
.pp-store.busy .pp-dot { background: var(--s1); }
.pp-store.warn { color: var(--s2); }
.pp-store.warn .pp-dot { background: var(--s2); }
@media (prefers-reduced-motion: no-preference) { .pp-store.busy .pp-dot { animation: pppulse 1.2s ease-in-out infinite; } @keyframes pppulse { 50% { opacity: .3; } } }
.pp-ex { display: inline-flex; align-items: center; gap: 6px; }
.pp-msg { margin: -10px 0 -8px; font-size: 13px; color: var(--muted); min-height: 0; }
.pp-msg:empty { display: none; }
.pp-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pp-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pp-rate { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pp-rate .help { margin-left: 0; }
.pp-link { all: unset; cursor: pointer; font-size: 12px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pp-link:hover { text-decoration-color: var(--fg); }
.pp-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.pp-warn { color: var(--s2); }
.pp-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 20px; align-items: start; }
.pp-grid2.lad { grid-template-columns: minmax(0, 1.55fr) minmax(min(100%, 360px), 1fr); }
@media (max-width: 1100px) { .pp-grid2.lad { grid-template-columns: minmax(0, 1fr); } }

/* ---------- an empty portfolio ---------- */
.pp-empty { padding: clamp(20px, 4vw, 40px); }
.pp-empty-h { max-width: 70ch; margin-bottom: 22px; }
.pp-empty-h h2 { font: 600 clamp(20px, 2.4vw, 26px)/1.2 var(--head); margin: 0 0 8px; letter-spacing: -.01em; }
.pp-empty-h p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.pp-starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.pp-start { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.pp-start b { font: 600 15px var(--head); }
.pp-start p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }

/* ---------- the headline ---------- */
.pp-heroes { display: flex; flex-direction: column; gap: 12px; }
.pp-hero { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.6fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.pp-hero-main { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.pp-k { display: flex; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pp-big { font: 600 clamp(36px, 4vw, 50px)/1.05 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pp-split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); margin-top: 6px; }
.pp-split i { display: block; height: 100%; }
.pp-split i.eq { background: var(--s1); }
.pp-split i.dt { flex: 1; background: color-mix(in srgb, var(--muted) 30%, var(--panel)); }
.pp-split-l { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.pp-split-l span { display: inline-flex; align-items: center; gap: 6px; }
i.k { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
i.k.eq { background: var(--s1); }
i.k.dt { background: color-mix(in srgb, var(--muted) 30%, var(--panel)); }
.pp-hero-main small { font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.pp-hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-ht { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.pp-ht > span { display: flex; align-items: center; font-size: 12px; color: var(--muted); font-weight: 500; }
.pp-ht > b { font: 600 20px/1.25 var(--head); letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pp-ht > b.warn { color: var(--s2); }
.pp-ht > small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pp-ht:hover { background: var(--panel-2); }
a.pp-ht:hover > b { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
@media (max-width: 1100px) { .pp-hero { grid-template-columns: minmax(0, 1fr); } .pp-hero-main { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 640px) { .pp-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-ht { padding: 10px 12px; } .pp-ht > b { font-size: 17px; } .pp-ht > small { white-space: normal; } .pp-hero-main { padding: 16px; } }

/* ---------- worth a look ---------- */
.pp-attn { border-left: 3px solid var(--s2); }
.pp-attn .panel-h { margin-bottom: 8px; }
.pp-attn-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 4px 24px; }
.pp-attn-l li { position: relative; padding: 5px 0 5px 16px; font-size: 13.5px; line-height: 1.45; }
.pp-attn-l li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--s2); }
.pp-attn-l a:hover { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.pp-more { margin-top: 4px; }
.pp-more summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* ---------- the properties table ---------- */
.pp-active { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.pp-active:empty { display: none; }
.pp-af { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--s1) 45%, var(--line)); background: color-mix(in srgb, var(--s1) 8%, var(--panel)); color: var(--fg); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 12.5px; cursor: pointer; }
.pp-af i { font-style: normal; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: var(--muted); font-size: 14px; }
.pp-af:hover i { background: var(--panel-2); color: var(--fg); }
.pp-ranges { display: grid; grid-template-columns: minmax(150px, auto) 84px auto 84px; gap: 5px 8px; align-items: center; padding: 2px 6px; }
.pp-rl { font-size: 13px; font-weight: 500; }
.pp-rl small { color: var(--muted); font-weight: 400; }
.pp-scroll { max-height: min(70vh, 900px); }
.pp-t .sb-r { cursor: pointer; }
.pp-t tr.off td { color: var(--muted); }
.pp-nm { display: flex; flex-direction: column; gap: 1px; min-width: 230px; max-width: 320px; }
.pp-nm a { font-weight: 600; white-space: normal; }
.pp-nm a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-nm small { font-size: 12px; color: var(--muted); white-space: normal; line-height: 1.35; }
.pp-nm .ev-pill { display: inline-block; margin-right: 2px; vertical-align: 1px; }
.pp-when { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.pp-when small { font-size: 11.5px; color: var(--muted); }
.pp-when.soon .num, .pp-when.soon small { color: var(--s2); }
.pp-ltv { display: inline-flex; align-items: center; gap: 8px; }
.pp-ltv.over .num { color: var(--s2); }
.pp-ltv.over .sb-meter i { background: var(--s2); }
.pp-nofx { color: var(--muted); }
@media (max-width: 640px) { .pp-nm { min-width: 160px; } .pp-ranges { grid-template-columns: minmax(0, 1fr) 72px auto 72px; } .inp.pp-n.sm { width: 72px; } }

/* ---------- debt ladder ---------- */
.pp-lad { display: grid; grid-template-columns: repeat(11, minmax(40px, 1fr)); gap: 6px; align-items: end; overflow-x: auto; padding-bottom: 2px; }
.pp-lad-c { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pp-lad-v { font: 500 11px var(--mono); color: var(--fg); white-space: nowrap; min-height: 14px; }
.pp-lad-b { position: relative; width: 100%; max-width: 46px; height: 110px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.pp-lad-b i { display: block; width: 100%; }
.pp-lad-b i.soon { background: var(--s2); }
.pp-lad-b i.later { background: var(--s1); }
.pp-lad-y { font: 11px var(--mono); color: var(--muted); }
.pp-lad-c.none .pp-lad-y { opacity: .6; }
.pp-lad-sum { margin: 12px 0 10px; font-size: 13.5px; line-height: 1.5; }
.pp-lad-sum.warn { color: var(--s2); }
.pp-lad-sum.muted { color: var(--muted); font-size: 12.5px; }
table.wl.pp-lt { min-width: 520px; font-size: 13px; }
.pp-lt th:nth-child(2), .pp-lt td:nth-child(2) { text-align: left; }
.pp-lt td:nth-child(2) { white-space: normal; min-width: 150px; }
.pp-lt td:nth-child(2) small, .pp-lt td:first-child small { white-space: normal; }
.pp-lt td { padding: 8px 10px; vertical-align: top; }
.pp-lt td small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.pp-lt td a { font-weight: 600; }
.pp-lt td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-lt tr.pp-yr td { background: var(--panel-2); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 5px 10px; text-align: left; }
.pp-lt tr.soon td:first-child { box-shadow: inset 3px 0 0 var(--s2); }
.pp-lt tr.soon td:first-child .num { color: var(--s2); font-weight: 600; }

/* ---------- lease calendar ---------- */
.pp-cal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; }
.pp-cal-c { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.pp-cal-b { width: 100%; max-width: 30px; height: 64px; display: flex; align-items: flex-end; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.pp-cal-b i { display: block; width: 100%; background: var(--s1); }
.pp-cal-m { font: 10.5px var(--mono); color: var(--muted); }
.pp-cal-n { font: 600 11px var(--mono); min-height: 13px; }
.pp-lc { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.pp-lc li { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.pp-lc li:first-child { border-top: 0; }
.pp-lc-d { display: flex; flex-direction: column; line-height: 1.25; }
.pp-lc-d small, .pp-lc-p small { font-size: 11.5px; color: var(--muted); }
.pp-lc-p { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pp-lc-p a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-lc-p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-lc li.soon .pp-lc-d, .pp-lc li.ended .pp-lc-d { color: var(--s2); }

/* ---------- charts ---------- */
.pp-chart { min-height: 230px; }
.pp-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.pp-grid.zero { stroke: var(--muted); stroke-opacity: .6; }
.pp-a.base { fill: color-mix(in srgb, var(--muted) 34%, var(--panel)); }
.pp-a.pay { fill: var(--s1); fill-opacity: .7; }
.pp-a.app { fill: var(--s3); fill-opacity: .5; }
.pp-a.app.neg { fill: var(--down); fill-opacity: .35; }
.pp-line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; }
.pp-rule { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.pp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pp-legend b { color: var(--fg); font-weight: 600; }
.pp-legend i.k.base { background: color-mix(in srgb, var(--muted) 34%, var(--panel)); }
.pp-legend i.k.pay { background: var(--s1); }
.pp-legend i.k.app { background: color-mix(in srgb, var(--s3) 60%, var(--panel)); }
.pp-legend i.k.app.neg { background: color-mix(in srgb, var(--down) 45%, var(--panel)); }
.pp-legend-t { margin-left: auto; color: var(--fg) !important; }
.pp-fan.outer { fill: var(--chart); fill-opacity: .1; }
.pp-fan.inner { fill: var(--chart); fill-opacity: .2; }
.pp-mid { fill: none; stroke: var(--chart); stroke-width: 2.25; }
.pp-start { stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 5 4; }
.pp-range { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: center; }
.pp-rfs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pp-rf { background: var(--panel); padding: 10px 14px; display: flex; flex-direction: column; gap: 1px; }
.pp-rf span { font-size: 12px; color: var(--muted); }
.pp-rf b { font: 600 18px/1.25 var(--head); }
.pp-rf small { font-size: 12px; color: var(--muted); }
@media (max-width: 820px) { .pp-range { grid-template-columns: minmax(0, 1fr); } .pp-rfs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- concentration ---------- */
.pp-bars { display: flex; flex-direction: column; gap: 2px; }
.pp-bar { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 2fr) auto 44px; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pp-bar:first-child { border-top: 0; }
.pp-bar-l { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; font-weight: 500; }
.pp-bar-l small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.pp-bar-t { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.pp-bar-t i { display: block; height: 100%; background: var(--s1); border-radius: 4px; }
.pp-bar.big .pp-bar-t i { background: var(--s2); }
.pp-bar-v { color: var(--muted); font-size: 12.5px; text-align: right; }
.pp-bar-s { text-align: right; }
@media (max-width: 520px) { .pp-bar { grid-template-columns: minmax(0, 1fr) auto 40px; } .pp-bar-t { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- stress tests ---------- */
.pp-st { display: flex; flex-direction: column; }
.pp-st-r { display: grid; grid-template-columns: minmax(220px, 1.4fr) 130px minmax(90px, 1fr) 120px 60px 56px minmax(200px, 1.6fr); gap: 12px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 13.5px; }
.pp-st-r > :nth-child(n+2):nth-child(-n+6) { text-align: right; justify-self: end; }
.pp-st .pp-st-r > .pp-st-bar { justify-self: stretch; text-align: left; }
.pp-st-h { border-top: 0; padding-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pp-st-r.base { background: var(--panel-2); border-radius: 6px; border-top-color: transparent; }
.pp-st-r.all { border-top: 1px solid color-mix(in srgb, var(--muted) 50%, var(--line)); font-weight: 500; }
.pp-st-n { display: flex; align-items: center; font-weight: 500; }
.sb-dbar.wide { width: 100%; max-width: 180px; height: 8px; }
.pp-st-x { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; min-width: 0; }
.pp-names { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.pp-names a { color: var(--down); font-weight: 500; }
.pp-names-w { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.pp-names a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pp-over { color: var(--s2); font-size: 12px; }
.pp-over .pp-names { display: inline-flex; }
.pp-over .pp-names a { color: var(--s2); }
@media (max-width: 1100px) {
  .pp-st-h { display: none; }
  .pp-st-r { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 6px; }
  .pp-st .pp-st-r > .pp-st-n { grid-column: 1 / 3; }
  .pp-st .pp-st-r > :nth-child(2) { grid-column: 3; grid-row: 1; font-size: 15px; }
  .pp-st .pp-st-r > .pp-st-bar { grid-column: 1 / -1; }
  .pp-st .pp-st-r > [data-k] { grid-column: auto; justify-self: stretch; text-align: left; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
  .pp-st .pp-st-r > [data-k]::before { content: attr(data-k); color: var(--muted); font: 500 11px var(--sans); }
  .pp-st .pp-st-r > .pp-st-x { grid-column: 1 / -1; }
  .sb-dbar.wide { max-width: none; }
}

/* ---------- one property ---------- */
.pp-ph { align-items: flex-end; }
.pp-ph-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pp-back { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pp-back::before { content: "\2190  "; }
.pp-back:hover { color: var(--fg); }
.pp-save { font-size: 12.5px; color: var(--muted); }
.pp-edit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 20px; align-items: start; }
.pp-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pp-res { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 2px; }
.pp-res-h { display: flex; align-items: center; padding: 2px 2px 0; }
@media (max-width: 1000px) { .pp-edit { grid-template-columns: minmax(0, 1fr); } .pp-res { position: static; max-height: none; overflow: visible; order: -1; } }
.pp-g { padding: 0; }
.pp-g > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 14px 16px; cursor: pointer; list-style: none; border-radius: var(--r); }
.pp-g > summary::-webkit-details-marker { display: none; }
.pp-g > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 2px; align-self: center; transition: transform .15s; }
.pp-g[open] > summary::before { transform: rotate(45deg); }
.pp-g > summary:hover { background: var(--panel-2); }
.pp-g > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pp-gt { font: 600 15px var(--head); }
.pp-gs { font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 200px; }
.pp-g[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.pp-gb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pp-gb > * { max-width: 100%; }
.pp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; width: 100%; }
.pp-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pp-f.wide { grid-column: 1 / -1; }
.pp-f.span2 { grid-column: span 2; }
@media (max-width: 560px) { .pp-f.span2 { grid-column: 1 / -1; } }
.pp-fl { display: flex; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pp-f .inp, .pp-f .sel { width: 100%; }
.pp-u { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-width: 0; }
.pp-u:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.pp-u i { font-style: normal; font-size: 12.5px; color: var(--muted); padding: 0 8px; white-space: nowrap; }
.pp-u i:first-child { padding-right: 0; }
.pp-u .inp { border: 0; background: transparent; min-width: 0; flex: 1; width: 100%; outline: none; }
.inp.pp-n { font-variant-numeric: tabular-nums; }
.inp.pp-t, .inp.pp-d { width: 100%; }
.pp-hint { display: block; font-size: 12px; color: var(--s2); margin-top: 4px; }
.pp-hint:empty { display: none; }
.pp-metro .search { max-width: none; }
.pp-metro .search input { padding: 7px 10px; background-image: none; }
.pp-mlist .sr { grid-template-columns: 34px 1fr auto; }
.pp-vals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; width: 100%; }
.pp-vc { gap: 8px; }
.pp-vc.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--panel); }
.pp-vc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pp-vc-h b { font-size: 13.5px; }
.pp-vc-v { font: 600 22px/1.2 var(--head); }
.pp-vc small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pp-vc .btn { align-self: flex-start; }
.pp-loan { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.pp-loan .inp, .pp-loan .sel, .pp-loan .pp-u { background: var(--panel); }
.pp-loan .pp-u .inp { background: transparent; }
.pp-loan-h { display: grid; grid-template-columns: minmax(150px, auto) minmax(0, 1fr) 26px; gap: 8px; align-items: center; }
.pp-loan-h .xbtn { opacity: .8; }
.pp-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.pp-check input { accent-color: var(--accent); margin: 0; }
.pp-sub > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pp-sub[open] > summary { margin-bottom: 8px; }
.pp-loan-f { margin: 0; font-size: 12.5px; color: var(--fg); padding-top: 8px; border-top: 1px dashed var(--line); }
.pp-rhint { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.pp-rhint:empty { display: none; }
.pp-rhint b { color: var(--fg); }
.pp-units { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pp-unit { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(130px, 1.1fr) minmax(170px, 1.3fr) 26px; gap: 8px; align-items: center; }
.pp-unit-d { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.pp-unit-d .inp { flex: 1; min-width: 0; }
@media (max-width: 560px) { .pp-unit { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 26px; } .pp-unit-d { grid-column: 1 / 3; grid-row: 2; } .pp-loan-h { grid-template-columns: minmax(0, 1fr) 26px; } .pp-loan-h > .inp { grid-column: 1; grid-row: 2; } }
.pp-formf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 0; }
.btn.pp-del { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, var(--line)); }
.btn.pp-del:hover { background: color-mix(in srgb, var(--down) 9%, var(--panel)); border-color: var(--down); }

/* the results beside the form */
.pp-vts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pp-vts > .pp-vt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rd.pp-vt { cursor: default; padding: 12px 14px; box-shadow: none; }
.rd.pp-vt .rd-h { font-size: 12.5px; font-weight: 500; color: var(--muted); min-height: 20px; }
.rd.pp-vt .rd-h > span { display: flex; align-items: center; }
.rd.pp-vt .rd-b b { font-size: 21px; font-variant-numeric: tabular-nums; }
.rd.pp-vt .rd-b b.up { color: var(--up); } .rd.pp-vt .rd-b b.down { color: var(--down); }
@media (max-width: 1000px) { .pp-vts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); } }
@media (max-width: 420px) { .pp-vts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rd.pp-vt { padding: 10px 11px; } .rd.pp-vt .rd-b b { font-size: 18px; } }
.pp-flow .panel-h, .pp-am .panel-h, .pp-mk .panel-h { margin-bottom: 10px; }
.pp-fbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); }
.pp-fbar.short { background: transparent; height: 6px; margin-top: 4px; border-radius: 3px; }
.pp-fbar i { display: block; height: 100%; }
.pp-fbar .vac, i.k.vac { background: color-mix(in srgb, var(--muted) 22%, var(--panel)); }
.pp-fbar .ops, i.k.ops { background: color-mix(in srgb, var(--muted) 48%, var(--panel)); }
.pp-fbar .res, i.k.res { background: color-mix(in srgb, var(--muted) 75%, var(--panel)); }
.pp-fbar .debt, i.k.debt { background: var(--s1); }
.pp-fbar .cf, i.k.cf { background: var(--up); }
.pp-fbar .neg, i.k.neg { background: var(--down); }
.pp-fbar .gap { background: transparent; }
.pp-fdl { margin: 12px 0 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pp-fdl div { display: flex; justify-content: space-between; gap: 12px; }
.pp-fdl dt { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.pp-fdl dd { margin: 0; }
.pp-fdl .tot { border-top: 1px solid var(--line); padding-top: 5px; margin-top: 3px; font-weight: 600; }
.pp-fdl .tot dt { color: var(--fg); }
.pp-am-l { padding: 10px 0; border-top: 1px solid var(--line); }
.pp-am-l:first-of-type { border-top: 0; padding-top: 0; }
.pp-am-l > b { display: block; font-size: 13.5px; margin-bottom: 6px; }
.pp-kv { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pp-kv div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pp-kv dt { color: var(--muted); }
.pp-kv dd { margin: 0; text-align: right; }
.pp-mk-n { display: block; font: 600 15px var(--head); margin-bottom: 6px; }
.pp-mk .more { margin-left: 0; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .pp-tools { justify-content: flex-start; }
  .pp-tbl .sb-row .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 1px; }
  .pp-tbl .sb-row .chips::-webkit-scrollbar { display: none; }
  .pp-tbl .chip { flex: none; }
  .pp-side { width: 100%; }
  .pp-lad { grid-template-columns: repeat(11, minmax(58px, 1fr)); }
  .pp-lad-v { font-size: 10.5px; }
  .pp-row { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
  .pp-gb { padding: 12px; }
  .pp-loan { padding: 10px; }
  .pp-u i { padding: 0 6px; }
}

/* ---------- design pass (2026-11-25) ---------- */
/* Column headings in the stress tests read like every other table's: sentence case, not capitals. */
.pp-st-h { font-size: 12px; letter-spacing: 0; text-transform: none; }
/* The lease calendar ends level with the debt ladder beside it, its list of leases filling the height instead of leaving a gap below. */
@media (min-width: 1101px) {
  .pp-grid2.lad { align-items: stretch; }
  .pp-ladder, .pp-leases { display: flex; flex-direction: column; min-width: 0; }
  .pp-ladder > .panel, .pp-leases > .panel { flex: 1; display: flex; flex-direction: column; }
  .pp-leases .pp-lc { flex: 1 1 0; min-height: 220px; max-height: none; }
}
/* A unit's lease end date shows in full. */
@media (min-width: 561px) { .pp-unit { grid-template-columns: minmax(72px, 1fr) minmax(118px, 1.1fr) auto 26px; } .pp-unit-d .inp { flex: none; width: 136px; padding-inline: 8px; } }
@media (max-width: 900px) {
  .pp-back { display: inline-flex; align-items: center; min-height: 44px; }
  .pp-store .ulink { display: inline-flex; align-items: center; min-height: 44px; }
}
/* A label's "?" stays right after its last word when the label wraps, instead of floating to the far edge. */
.pp-st-n, .pp-ht > span, .pp-fl, .rd.pp-vt .rd-h > span { display: block; }
@media (max-width: 900px) {
  /* Property names inside lists and tables: a finger-sized area to press without moving the lines apart. */
  .pp-names a, .pp-lt td a, .pp-lc-p a, .pp-attn-l a { display: inline-block; padding-block: 12px; margin-block: -12px; }
}

/* The hero's figures each carry a small picture (tile-viz.js) at the foot of their cell. */
.pp-ht-viz { margin-top: auto; padding-top: 6px; }
.pp-ht-viz .tv { display: block; width: 100%; height: auto; max-height: 40px; overflow: visible; }

/* ---------- phone pass (Moe's Vestra row 45) ---------- */
/* The properties as cards on a phone: name and call, then each chosen column with its name over its value. The totals
   row is left out there; the tiles above carry the totals. */
@media (max-width: 640px) {
  .sb:has(table.pp-t) .sb-scroll { overflow: visible; max-height: none; border: 0; }
  table.sb-t.pp-t { display: block; width: 100%; min-width: 0; }
  table.sb-t.pp-t thead, table.sb-t.pp-t tfoot { display: none; }
  table.sb-t.pp-t tbody { display: grid; gap: 10px; }
  table.sb-t.pp-t tr.sb-r { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  table.sb-t.pp-t tr.sb-r > td { position: static; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 0; border: 0; background: none; box-shadow: none; text-align: left; white-space: normal; order: 10; font-variant-numeric: tabular-nums; }
  table.sb-t.pp-t tr.sb-r > td[data-l]::before { content: attr(data-l); font: 600 10.5px/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  table.sb-t.pp-t tr.sb-r > td[data-k="name"]::before, table.sb-t.pp-t tr.sb-r > td[data-k="call"]::before { content: none; }
  table.sb-t.pp-t tr.sb-r > td[data-k="name"] { grid-column: 1 / 3; order: 0; }
  table.sb-t.pp-t tr.sb-r > td[data-k="call"] { grid-column: 3; order: 1; align-items: flex-end; }
  table.sb-t.pp-t tr.sb-r > td[data-k="value"] { order: 2; } table.sb-t.pp-t tr.sb-r > td[data-k="equity"] { order: 3; } table.sb-t.pp-t tr.sb-r > td[data-k="cfMo"] { order: 4; }
  table.sb-t.pp-t tr.sb-r > td[data-k="value"], table.sb-t.pp-t tr.sb-r > td[data-k="equity"], table.sb-t.pp-t tr.sb-r > td[data-k="cfMo"] { font: 600 15px/1.25 var(--head); }
  table.sb-t.pp-t tr.sb-r > td[data-k="cfMo"]::before { content: "Cash flow /mo"; }
  table.sb-t.pp-t tr.sb-r > td[data-k="rentMo"]::before { content: "Rent /mo"; }
  table.sb-t.pp-t .sb-sub { display: block; white-space: normal; line-height: 1.6; }
  table.sb-t.pp-t .sb-nm { white-space: normal; }
}
@media (max-width: 640px) {
  table.sb-t.pp-t tr.sb-r > td > * { text-align: left; align-self: flex-start; }
  table.sb-t.pp-t tr.sb-r > td[data-k="cf"]::before { content: "Cash flow /yr"; }
  table.sb-t.pp-t tr.sb-r > td[data-k="noi"]::before { content: "NOI /yr"; }
  table.sb-t.pp-t tr.sb-r > td[data-k="ds"]::before { content: "Loan /yr"; }
}

/* "Worth a look": the rest of the items join the same grid; one button shows or hides them (Moe, 2026-11-26). */
.pp-attn-l li[hidden] { display: none; }
.pp-attn-more { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0 4px; padding: 6px 10px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--fg); font: 600 12.5px var(--sans); cursor: pointer; transition: background .12s, border-color .12s; }
.pp-attn-more:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pp-attn-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-attn-chev { width: 15px; height: 15px; color: var(--muted); transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.pp-attn-more[aria-expanded="true"] .pp-attn-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .pp-attn-chev { transition: none; } }
