/* Vestra: the market overview, the metro screener, one metro's page and the metro signals.
   Uses the tokens and components at the top of app.css; nothing here sets a color of its own. */

/* ---------- search: a metro among the companies ---------- */
.sr b.sr-metro { font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--s1); background: color-mix(in srgb, var(--s1) 10%, transparent); border-radius: 999px; padding: 4px 8px; justify-self: start; }

/* ---------- market overview ---------- */
.pm-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.pm-kpis .kpi { box-shadow: none; background: var(--panel-2); border-color: transparent; }
.mk-tile small.muted { font-size: 11.5px; }
.pm-row, .pm-yours { grid-template-columns: minmax(96px, 30%) minmax(0, 1fr) auto auto; }
.pm-row b, .pm-yours b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-yours .ev-pill { justify-self: end; }
.sec-n small.pm-syms { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
@media (max-width: 560px) { .sec-n small.pm-syms { display: none; } .pm-row, .pm-yours { grid-template-columns: minmax(84px, 36%) minmax(0, 1fr) auto; } .pm-row > span:empty { display: none; } .pm-yours .nm { display: none; } }
.pm-split { font: 600 15px var(--head); margin: 8px 0 -6px; }

/* ---------- metro signals ---------- */
.pm-flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-top: 14px; }
.pm-flag { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); transition: border-color .12s, transform .06s; }
.pm-flag:hover { border-color: var(--muted); transform: translateY(-1px); }
.pm-flag-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pm-flag-h b { font: 600 15px var(--head); }
.pm-flag-r { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.45; }
.pm-flag-r .ev-pill { justify-self: start; }
.pm-flag-r.lv1 { color: var(--muted); }

/* ---------- the metro table ---------- */
.mx-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.mx-active { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.mx-active:not(:empty) { padding-bottom: 10px; }
.mx-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); }
.mx-chip button { all: unset; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; text-align: center; line-height: 18px; color: var(--muted); }
.mx-chip button:hover { background: var(--panel); color: var(--fg); }
.mx-chip button:focus-visible { outline: 2px solid var(--accent); }
.mx-name { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.mx-star { all: unset; cursor: pointer; font-size: 15px; line-height: 1; color: color-mix(in srgb, var(--muted) 55%, transparent); padding: 2px; border-radius: 4px; }
.mx-star:hover { color: var(--muted); }
.mx-star[aria-pressed="true"] { color: var(--s2); }
.mx-star:focus-visible { outline: 2px solid var(--accent); }
.mx-t td svg { width: 92px; height: 26px; display: block; margin-left: auto; }
.mx-r { cursor: pointer; }
.sb-pop.mx-ranges { width: min(560px, calc(100vw - 40px)); max-height: min(70vh, 640px); overflow: auto; }
.mx-rhint { margin: 0 6px 6px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.mx-rgrid { display: grid; grid-template-columns: minmax(120px, 1fr) 96px auto 96px; gap: 6px 8px; align-items: center; margin: 0 6px 4px; }
.mx-rgrid .inp { width: 100%; padding: 5px 8px; font-size: 13px; }
.mx-rl { font-size: 13px; font-weight: 500; }
.mx-rl small { color: var(--muted); font-weight: 400; }
.sb-pop.mx-model { width: min(520px, calc(100vw - 40px)); }
.mx-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 4px 6px; }
.mx-mf { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mx-mf > span { display: flex; align-items: center; }
.mx-mf .inp { width: 100%; }
@media (max-width: 640px) { .mx-rgrid { grid-template-columns: minmax(0, 1fr) 72px auto 72px; } .mx-mgrid { grid-template-columns: minmax(0, 1fr); } .mx-name { min-width: 150px; } }

/* ---------- one metro ---------- */
.mt-ctl { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.mt-chart { position: relative; height: clamp(280px, 42vh, 440px); }
.mt-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.mt-leg i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.mt-leg .mt-read { margin-left: auto; color: var(--fg); font-variant-numeric: tabular-nums; }
.mt-small { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.mt-sm { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; background: var(--panel-2); min-width: 0; }
.mt-sm-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mt-sm-h > span { display: flex; align-items: center; }
.mt-sm-h b { font: 600 18px var(--head); color: var(--fg); }
.mt-sm-s { display: flex; justify-content: space-between; font-size: 12px; }
.mt-sm-c svg { width: 100%; height: 56px; display: block; margin-top: 6px; }
.mt-sm-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.mt-wf { display: flex; flex-direction: column; gap: 2px; }
.mt-wf-r { display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr) 84px; gap: 12px; align-items: center; padding: 5px 4px; border-radius: 6px; }
.mt-wf-r.sub, .mt-wf-r.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; }
.mt-wf-r.sub .mt-wf-l, .mt-wf-r.total .mt-wf-l { font-weight: 600; }
.mt-wf-l { font-size: 13px; display: flex; flex-direction: column; }
.mt-wf-l small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.mt-wf-t { height: 8px; border-radius: 4px; background: var(--panel-2); position: relative; overflow: hidden; }
.mt-wf-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.mt-wf-t i.pos { background: var(--s1); }
.mt-wf-t i.down { background: color-mix(in srgb, var(--down) 70%, transparent); }
.mt-wf-t i.up { background: var(--up); }
.mt-wf-r b { text-align: right; font-weight: 600; }
.mt-earn-k { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 4px 0; font-size: 13px; color: var(--muted); }
.mt-earn-k span { display: inline-flex; align-items: center; gap: 4px; }
.mt-earn-k b { color: var(--fg); font-weight: 600; }
.mt-earn-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mt-cmp th[scope="row"] { text-align: left; font-weight: 500; color: var(--fg); text-transform: none; letter-spacing: 0; font-size: 13px; }
.mt-cmp td { padding: 8px 12px; }
@media (max-width: 640px) { .mt-wf-r { grid-template-columns: minmax(0, 1fr) 72px; } .mt-wf-t { display: none; } .mt-leg .mt-read { margin-left: 0; width: 100%; } }

/* ---------- watchlist ---------- */
/* The search box grows sideways in a row of controls; on its own in the page's column it must not grow tall. */
.view > .search { flex: none; }
.panel-h .watch-search { margin-left: auto; }
.al-metro-say { font-size: 13px; }
/* The subject column has one width, so every rule's wording starts at the same place. */
.al-rule { grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto auto; }
.al-rule .ev-s { overflow-wrap: anywhere; }
@media (max-width: 900px) { .al-rule { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto auto; } .al-rule .ev-s { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------- phone navigation: Market, Deals, Properties, Watchlist and More ---------- */
@media (max-width: 900px) {
  .mobile-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mobile-nav a span, .mobile-nav button span:not(.count) { font-size: 11.5px; letter-spacing: -.01em; }
}
@media (max-width: 640px) { .mx-kpis, .pm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mx-kpis .kpi:first-child { grid-column: 1 / -1; } }

/* ---------- the menu: a quiet label above the listed real estate tools ---------- */
.side-sec { display: block; margin: 14px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; }
html.nav-min .side-sec { visibility: hidden; height: 1px; margin: 8px 12px; border-top: 1px solid var(--line); }

/* ---------- Vestra: the mark, the name and the accent from the Vestra mockup (vestra-ai-dashboard) ---------- */
/* An ink rounded square with a V cut out of it (white on light, near black on dark), the name set tight in Inter. The accent comes from app.css. */
.brand { gap: 9px; }
.brand-mark.vx { width: 28px; height: 28px; stroke: none; }
.brand-mark.vx rect { fill: var(--mark-tile); }
.brand-mark.vx path { fill: none; stroke: var(--mark-v); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font: 700 22px/1 var(--sans); letter-spacing: -.055em; }
.top-brand .brand-mark.vx { width: 26px; height: 26px; }
html.nav-min .side .brand-mark.vx { width: 30px; height: 30px; }

/* ---------- the "Sample data" pill beside the name ---------- */
.sample-pill { border: 0; border-radius: 999px; padding: 3px 9px; font: 600 11px/1.4 var(--sans); letter-spacing: .02em; white-space: nowrap; cursor: pointer; color: var(--s2); background: var(--warn-soft); }
.sample-pill:hover { box-shadow: inset 0 0 0 1px var(--s2); }
.sample-pill[hidden] { display: none; }
.side-top .sample-pill { margin-left: 2px; }
html.nav-min .side .sample-pill { display: none; }
.top-in .sample-pill { margin-right: auto; }

/* ---------- the Simulator: frameworks applied to every metro ---------- */
.sim-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 212px), 1fr)); gap: 10px; }
.sim-card { all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; transition: border-color .12s, transform .06s; min-width: 0; }
.sim-card:hover { border-color: var(--muted); transform: translateY(-1px); }
.sim-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sim-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.sim-card b { font: 600 14.5px var(--head); padding-right: 46px; }
.sim-tag { font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sim-card-s { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 12px; font-weight: 600; }
.sim-edited { position: absolute; top: 10px; right: 10px; font: 600 10px/1.6 var(--sans); font-style: normal; text-transform: uppercase; letter-spacing: .05em; color: var(--s2); background: var(--warn-soft); border-radius: 999px; padding: 0 7px; }
.sim-main { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .sim-main { grid-template-columns: minmax(0, 1fr); } }
.sim-def { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
@media (max-width: 1100px) { .sim-def { position: static; max-height: none; } }
.sim-name { font: 600 19px var(--head); margin: 0; }
.sim-thesis { margin: 0 0 10px; line-height: 1.55; }
.sim-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 6px; font-size: 13px; }
.sim-dl dt { color: var(--muted); font-weight: 600; }
.sim-dl dd { margin: 0; line-height: 1.45; }
.sim-h3 { display: flex; align-items: center; gap: 4px; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sim-rules { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sim-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "l b x" "m m m"; gap: 4px 8px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--panel-2); }
.sim-rule.off { opacity: .55; }
.sim-rl { grid-area: l; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; min-width: 0; }
.sim-rl input { accent-color: var(--accent); margin: 0; }
.sim-rl > span { display: flex; align-items: center; }
.sim-rule .sim-badge { grid-area: b; }
.sim-rule .xbtn { grid-area: x; }
.sim-mm { grid-area: m; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 42px; gap: 6px; align-items: center; }
.sim-mm .inp { width: 100%; padding: 5px 8px; font-size: 13px; }
.sim-u { font-size: 12px; }
.sim-badge { font: 600 10.5px/1.6 var(--sans); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.sim-badge.h { color: var(--s1); background: color-mix(in srgb, var(--s1) 11%, transparent); }
.sim-badge.t { color: var(--s2); background: var(--warn-soft); }
.sim-in { display: flex; align-items: center; gap: 6px; }
.sim-in small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.sim-rate { font-size: 12.5px; color: var(--muted); margin: 8px 6px 4px; }
.sim-more { margin-top: 8px; }
.sim-more summary { cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 0; }
.sim-out { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sim-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.sim-scroll { max-height: min(70vh, 760px); border-radius: var(--r); border: 1px solid var(--line); }
.sim-t .btn.sm { white-space: nowrap; }
.sim-sum p { margin: 0 0 6px; max-width: 110ch; }
.sim-sum p:first-child { font-weight: 600; }
.sim-skip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.sim-chart { position: relative; min-height: 120px; margin-top: 8px; }
.sim-chart svg { width: 100%; height: auto; display: block; }
.sim-pt { fill: var(--fg); font-size: 11.5px; font-weight: 600; }
.sim-yt td, .sim-yt th { white-space: nowrap; }
@media (max-width: 640px) { .sim-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sim-tag { display: none; } .sim-card b { font-size: 13.5px; } .sim-mm { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 30px; } }
@media (max-width: 640px) { .sim-yr { display: none; } .sim-card-s { flex-wrap: wrap; gap: 2px 8px; } }

/* ---------- design pass (2026-11-25) ---------- */
/* Metros on the move: the six lists as a row of filter chips under the title, wrapping cleanly on a desktop and scrolling in one line on a phone. */
.seg.pm-move { background: none; padding: 0; gap: 6px; border: 0; border-radius: 0; margin: 0 0 10px; }
.seg.pm-move button { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--panel); color: var(--fg); font: 500 12.5px var(--sans); white-space: nowrap; }
.seg.pm-move button:hover { background: var(--panel-2); }
.seg.pm-move button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: none; font-weight: 600; }
@media (max-width: 640px) { .seg.pm-move { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; } .seg.pm-move::-webkit-scrollbar { display: none; } .seg.pm-move button { flex: none; } }
/* Canada's rates: in a narrow panel the small chart narrows, and in a very narrow one it gives way, so the names keep their room. */
.mk-rows { container-type: inline-size; }
@container (max-width: 460px) { .mk-row { grid-template-columns: minmax(0, 1fr) 52px auto 70px; gap: 10px; } .mk-row svg { width: 52px; } }
@container (max-width: 340px) { .mk-row { grid-template-columns: minmax(0, 1fr) auto 70px; } .mk-row > svg { display: none; } }
/* A followed metro's name column is only as wide as names need, so its value, rent and yield fit on the line. */
@media (min-width: 561px) { .pm-yours { grid-template-columns: minmax(96px, 22%) minmax(0, 1fr) auto auto; } }
.pm-pair { align-items: start; }
/* The Simulator: space between the panels on Compare, ten framework cards as two rows of five, square keys for a bar chart. */
.sim-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 1100px) { .sim-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sim-leg i { height: 10px; border-radius: 2px; vertical-align: -1px; }
@media (max-width: 640px) {
  /* Compare on a phone: the framework column wraps its line, so the figures beside it can scroll into view. */
  .sim-t td:first-child > * { width: 168px; white-space: normal; }
  .sim-t td:first-child .sb-sub { display: block; }
}
/* The watchlist table fits a desktop panel without scrolling sideways to reach its last column. */
.watch-scroll .wl :is(th, td) { padding-inline: 9px; }
.watch-scroll .wl svg { width: 72px; }
/* A label's "?" stays right after its last word when the label wraps. */
.mt-sm-h > span, .mx-mf > span { display: block; }
/* A card's title only leaves room for the Edited badge when the badge is there, so most titles keep to one line. */
.sim-card b { padding-right: 0; }
.sim-card:has(.sim-edited) b { padding-right: 46px; }
/* The Market overview's place bar: country, then state or province, then city or region. Every card below follows it. */
.pm-place { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pm-place-l { font: 600 11.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pm-place .seg button { font: 500 13px var(--sans); padding: 7px 14px; }
.pm-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pm-sel .inp { width: auto; min-width: 190px; max-width: 280px; padding: 6px 10px; font-size: 13px; color: var(--fg); }
.pm-sel .inp:disabled { color: var(--muted); opacity: .7; }
.pm-here { margin-left: auto; color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.pm-here::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pm-place > .btn { margin-left: auto; }
.pm-natside { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 12.5px; }
.pm-row.on { background: var(--accent-soft); border-radius: 8px; }
.grid2.g64.pm-ca-first { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.grid2.g64.pm-ca-first > .pm-ca-rates { order: -1; }
@media (max-width: 900px) { .grid2.g64.pm-ca-first { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pm-place { padding: 10px 12px; gap: 8px; }
  .pm-place-l { width: 100%; }
  .pm-place .seg { width: 100%; } .pm-place .seg button { flex: 1; }
  .pm-sel { width: 100%; } .pm-sel > span { flex: none; width: 62px; } .pm-sel .inp { flex: 1; min-width: 0; max-width: none; font-size: 16px; }
  .pm-here, .pm-place > .btn { margin-left: 0; }
}
