/* ============================================================
   TOOLS PAGES (2026-10-09): page-scoped styles for
     mortgage-calculator.html, canadian-resources.html,
     neighborhoods.html, market-statistics.html.
   Loads after site.css and services.css (the .svc-* services system and
   the .k-* kit). Everything here is prefixed .tp-* or scoped under a page
   body class (.tp-mortgage, .tp-intl, .tp-hoods, .tp-stats) so no other
   page changes. Promotion candidates for the kit are marked "KIT?".
   ============================================================ */

/* ---------- shared: dark console extras ---------- */
/* range slider inside the dark toolkit console (KIT?) */
.tp-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; margin: 12px 0 2px; border-radius: 999px; background: rgba(255,255,255,.14); outline: none; cursor: pointer; }
.tp-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); border: 3px solid #101318; box-shadow: 0 0 0 1px rgba(255,255,255,.28); cursor: pointer; }
.tp-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); border: 3px solid #101318; box-shadow: 0 0 0 1px rgba(255,255,255,.28); cursor: pointer; }
.tp-range:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
/* .svc-field input styles every input; the range keeps only its track (amber fill = --p, set by the page JS) */
.svc-field input.tp-range, .tp-year input.tp-range { padding: 0; min-height: 0; height: 4px; border: 0; border-radius: 999px; box-shadow: none;
  background: linear-gradient(90deg, var(--amber) var(--p, 0%), rgba(255,255,255,.14) var(--p, 0%)); }
.svc-field input.tp-range:hover, .svc-field input.tp-range:focus { border: 0; box-shadow: none; }
.svc-field .tp-range { margin: 14px 0 4px; }
.svc-field label.tp-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tp-hint { font-weight: 600; color: var(--amber); font-variant-numeric: tabular-nums; }
.svc-field.tp-tight { margin-bottom: 0; }
/* a fifth bar colour (PMI, warnings) */
.svc-bar .e { background: #C9502C; }
.svc-legend .sw.e { background: #C9502C; }
/* "/mo" suffix on the big readout */
.svc-big .mo { font-size: .4em; font-weight: 600; color: var(--term-dim); letter-spacing: -.01em; }
/* breakdown rows under a stacked bar */
.tp-legend { display: grid; gap: 7px; margin-top: 2px; }
.tp-legend .leg { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--term-text); }
.tp-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tp-legend .sw.a { background: var(--amber); } .tp-legend .sw.b { background: #C9CDD4; } .tp-legend .sw.c { background: #5F6670; }
.tp-legend .sw.d { background: repeating-linear-gradient(135deg, #8B9099 0 2px, transparent 2px 4px); outline: 1px solid #5F6670; }
.tp-legend .sw.e { background: #C9502C; }
.tp-legend .amt { margin-left: auto; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tp-delta { font-size: 12.5px; font-weight: 600; color: var(--term-dim); font-variant-numeric: tabular-nums; }
.tp-delta b.good { color: #8FD9A8; } .tp-delta b.bad { color: #FF9E8A; } .tp-delta b.par { color: var(--amber); }
.svc-tk .k-kv { margin-top: 4px; }
.svc-tk .k-kv div { font-size: 13.5px; padding: 8px 0; }
.svc-tk .k-kv dd small { font-weight: 600; color: var(--term-dim); margin-left: 4px; }
/* rate chip row in the hint line: two "use it" buttons */
.svc-ratehint .tp-sep { opacity: .4; }
/* first-payment split in the payment readout */
.tp-first { display: grid; gap: 9px; margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.tp-first .svc-out-line { margin: 0; }
.tp-first .svc-out-line b { color: #fff; font-variant-numeric: tabular-nums; }
.tp-first .svc-tk-cta { justify-self: start; }
/* chart inside the console input column */
.svc-tk .k-chart { margin-top: 4px; background: #0D1014; }
.svc-tk .k-chart-foot { margin-top: 10px; }
.tp-year { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; margin-top: 16px; }
.tp-year label { font-size: 12.5px; font-weight: 600; color: #A9AEB6; }
.tp-year output { font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tp-year .tp-range { grid-column: 1 / -1; margin-top: 4px; }
/* chart marks that only this page draws */
.k-chart .tp-marker { stroke: rgba(255,255,255,.5); stroke-width: 1; stroke-dasharray: 3 3; }
.k-chart .tp-marker-dot { fill: #fff; stroke: var(--amber); stroke-width: 2.5; }

/* hero KPI with a sparkline keeps its height before K draws it (CLS) */
.k-hero-side .k-spark { min-height: 36px; }

/* ---------- mortgage: light sections ---------- */
.tp-mortgage .svc-doors { margin-top: 0; }
.tp-reading { margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid rgba(16,17,20,.12); }
.tp-reading .k-head { margin-bottom: 18px; }
.tp-reading .k-head h2 { font-size: 1.35rem; }
@media (max-width: 700px) {
  .tp-year { margin-top: 12px; }
  .svc-ratehint { font-size: 12px; }
}

/* ---------- shared: callouts (vetted disclaimers keep their words; this is only the frame) ---------- */
.tp-callout { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--radius); border: 1px solid rgba(16,17,20,.12); background: #FBFAF7; }
.tp-callout svg { width: 24px; height: 24px; fill: none; stroke: var(--amber-ink, #8A5B00); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.tp-callout p { font-size: 14px; line-height: 1.65; color: var(--ink-soft); max-width: 36em; }   /* 92ch held ~135 characters a line (UX audit 2026-10-13, core-5) */
.tp-callout p b { color: var(--ink); }
.tp-callout.is-warn { border-color: rgba(138,91,0,.28); background: rgba(242,179,54,.09); }
.tp-callout.is-dark { margin-top: clamp(22px, 3vw, 30px); border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.tp-callout.is-dark svg { stroke: var(--amber); }
.tp-callout.is-dark p { color: rgba(255,255,255,.72); }
.tp-callout.is-dark p b { color: #fff; }
/* footer line under a console: verbatim disclaimer left, next step right */
.tp-tkfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 18px; font-size: 12.5px; line-height: 1.6; color: var(--term-dim); }
.tp-tkfoot > span { max-width: 38em; }
/* chip row on paper (the .svc-chips base is the dark console version) */
.tp-chips-light button { background: #fff; color: var(--ink); border-color: rgba(16,17,20,.16); }
.tp-chips-light button:hover { color: var(--ink); border-color: var(--ink); }
.tp-chips-light button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* small amber label on a card */
.tp-tag { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--k-accent); margin-bottom: 4px; }

/* ---------- international (canadian-resources.html) ---------- */
/* .svc-sub is the paper lede; on an ink band it needs the light tone (KIT? .k-ink .svc-sub) */
.k-ink .svc-sub, .k-dark .svc-sub { color: rgba(255,255,255,.72); }
.k-ink .svc-sub b, .k-dark .svc-sub b { color: #fff; }
.tp-intl .k-hero-side .k-kpis, .tp-hoods .k-hero-side .k-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-intl .k-hero-side .k-kpi .m { font-size: 11.5px; }
.tp-intl .k-hero-side .k-kpi .v small { font-size: .5em; font-weight: 600; color: var(--k-dim); }
.tp-first-read { padding-block: clamp(22px, 3vw, 32px) 0; }
.tp-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.svc-tk-in .tp-kv-dark { margin-top: 10px; }
.svc-tk-in .tp-kv-dark a { color: var(--amber); text-decoration: none; font-weight: 700; }
.svc-tk-in .tp-kv-dark a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tp-tiers div { padding-inline: 8px; margin-inline: -8px; border-radius: 6px; transition: background .2s ease; }
.tp-tiers div.on { background: rgba(242,179,54,.12); }
.tp-tiers div.on dt, .tp-tiers div.on dd { color: var(--amber); }
#tk-fx .svc-tk-out .svc-out-line b, #tk-spt .svc-tk-out .svc-out-line b, #tk-fp .svc-tk-out .svc-out-line b { color: #fff; font-weight: 700; }
.svc-big small { font-size: .38em; font-weight: 600; color: var(--term-dim); letter-spacing: -.01em; }
/* 183-day meter */
.tp-meter { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); margin: 26px 0 4px; }
.tp-meter .fill { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: 6px; background: var(--amber); transition: width .4s ease, background .3s ease; }
.tp-meter .mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: #fff; opacity: .7; }
.tp-meter .mark span { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tp-status { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; margin-top: 6px; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 800; border: 1px solid rgba(255,255,255,.18); color: #fff; }
.tp-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.tp-status.warn { background: #C9502C; border-color: #C9502C; }
.tp-status.warn::before { background: #fff; }
/* financing cards */
.tp-path .k-card-body { padding: 22px 22px 18px; gap: 8px; }
.tp-path h3, .tp-ratecard h3 { font-size: 1.15rem; }
.tp-path .k-card-body p a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 3px; }
.tp-path .k-card-foot a { color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.tp-path .k-card-foot a .arr, .tp-ratecard .k-card-foot .arr { color: var(--k-accent); display: inline-block; transition: transform .15s ease; }
.tp-path .k-card-foot a:hover .arr, .tp-ratecard:hover .k-card-foot .arr { transform: translateX(4px); }
.tp-ratecard { background: var(--ink); border-color: var(--ink); }
.tp-ratecard .k-card-body { padding: 22px 22px 18px; gap: 10px; }
.tp-ratecard .k-stat .v { font-size: clamp(2.4rem, 4vw, 3.2rem); }
.tp-ratecard .k-stat .k { margin-top: 8px; }
.tp-ratecard .k-card-foot { color: #fff; font-weight: 700; font-size: 13.5px; }
/* taxes split: head + callout left (sticky), points right */
.tp-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.tp-split-head { position: sticky; top: calc(var(--svc-nav-h, 56px) + 24px); }
.tp-split-head h2 { margin-bottom: 12px; }
.tp-split-head .tp-callout { margin-top: 22px; }
.tp-split .svc-point p a, .svc-feature .svc-point p a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 3px; }
/* residency cards on ink */
.tp-res .k-card-body { padding: 22px 20px; gap: 8px; }
.tp-res svg { width: 28px; height: 28px; margin-bottom: 8px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tp-res p { color: rgba(255,255,255,.68); }
/* why miami: a tighter points list beside the photo */
.tp-points-tight { margin-top: 22px; }
.tp-points-tight .svc-point { padding: 16px 0; }
.tp-intl .k-article .k-card-img { aspect-ratio: 16 / 9; }

@media (max-width: 1000px) {
  .tp-split { grid-template-columns: minmax(0, 1fr); }
  .tp-split-head { position: static; }
}
@media (max-width: 700px) {
  .tp-callout { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  .tp-callout p { font-size: 13.5px; }
  .tp-row3 { gap: 8px; }
  .tp-fx-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tp-intl .k-hero-side .k-kpi .m { display: none; }
  .tp-tkfoot { margin-top: 14px; }
}

/* ---------- neighborhoods (neighborhoods.html) ---------- */
.tp-hoods { --k-filters-h: 0px; }
.tp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--amber)); flex: none; }
.tp-tierbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 16px; }
.tp-tierbar .k-search { flex: 0 1 300px; }
.tp-tierbar .k-chip .tp-dot { width: 8px; height: 8px; }
.tp-tierbar .k-chip[aria-pressed="true"] .tp-dot { box-shadow: 0 0 0 1.5px var(--ink); }
.tp-split-hoods .k-map { height: 620px; min-height: 0; max-height: none; }
.tp-split-hoods .k-split-head { margin-bottom: 10px; }
/* the list: tier groups of compact rows, scrolling beside the map */
.tp-hood-list { height: 588px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--k-line); border-radius: var(--radius); background: var(--k-surface); scrollbar-width: thin; }
.tp-tierhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0; padding: 11px 16px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: #F1EEE7; border-bottom: 1px solid var(--k-line); }
.tp-tierhead small { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--k-dim); font-variant-numeric: tabular-nums; }
.tp-hood { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 14px; align-items: center; gap: 4px 12px; padding: 10px 16px; border-bottom: 1px solid var(--k-line); text-decoration: none; color: var(--k-text); transition: background .12s ease; }
.tp-hood:hover, .tp-hood.on { background: rgba(242,179,54,.13); }
.tp-hood:focus-visible { outline-offset: -3px; }
.tp-hood-n { min-width: 0; }
.tp-hood-n b, .tp-crow-n b { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.tp-hood-n small, .tp-crow-n small { display: block; margin-top: 1px; font-size: 12px; color: var(--k-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-hood-s, .tp-crow-s { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-hood-s b, .tp-crow-s b { display: block; font-size: 14px; font-weight: 800; }
.tp-hood-s small, .tp-crow-s small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--k-dim); }
.tp-hood-s.is-none small, .tp-crow-s.is-none small { font-weight: 600; }
.tp-hood-go { color: var(--k-accent); font-weight: 700; transition: transform .15s ease; }
.tp-hood:hover .tp-hood-go, .tp-crow:hover .tp-hood-go { transform: translateX(3px); }
.tp-more { display: none; }
.tp-mapfoot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 28px; margin-top: 18px; }
.tp-mapfoot .k-note { max-width: 54.98em; margin: 0; }
.tp-mapfoot .k-note a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tp-mapfoot .k-note a .arr { color: var(--k-accent); }
.tp-legend-row { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--k-dim); }
.tp-legend-row span { display: inline-flex; align-items: center; gap: 7px; }
.leaflet-tooltip.tp-tip { font: 700 12px 'Sora', 'Sora Fallback', sans-serif; color: var(--ink); border: 0; border-radius: 8px; padding: 5px 9px; box-shadow: 0 6px 18px rgba(16,17,20,.18); }
/* tiers explained (ink band) */
.tp-tiercard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 22px 20px 20px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.1); border-top: 3px solid var(--c); background: rgba(255,255,255,.035); }
.tp-tiercard-r { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c); color: color-mix(in srgb, var(--c) 62%, #fff); }
.tp-tiercard h3 { font-size: 1.25rem; color: #fff; }
.tp-tiercard p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.72); }
.tp-tiercard .tp-tiercard-x { font-size: 12.5px; color: var(--k-dim); }
.tp-tiercard-n { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; color: var(--k-dim); }
.tp-tiercard-n b { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
/* condo clusters */
.tp-cluster .k-card-img { aspect-ratio: 16 / 7; }
.tp-cluster .k-card-body { padding: 18px 20px 8px; gap: 6px; }  /* the kit card gap (was 4px: title glued to its line) */
.tp-cluster h3 { font-size: 1.2rem; }
.tp-crows { margin: 10px -20px 0; border-top: 1px solid var(--k-line); }
.tp-crow { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--k-line); text-decoration: none; color: var(--k-text); transition: background .12s ease; }
.tp-crow:last-child { border-bottom: 0; }
.tp-crow:hover { background: rgba(242,179,54,.13); }
.tp-crow:focus-visible { outline-offset: -3px; }
.tp-cnote { margin-top: 16px; }
/* hubs */
.tp-hub .k-card-img { aspect-ratio: 3 / 2; }
.tp-hub .go { font-weight: 700; color: var(--k-text); font-size: 13.5px; }
.tp-hub .go span { color: var(--k-accent); display: inline-block; transition: transform .15s ease; }

@media (max-width: 980px) {
  .tp-split-hoods .k-map { height: 360px; aspect-ratio: auto; }
  .tp-hood-list { height: auto; overflow: visible; }
  .tp-tierhead { position: static; }
  /* phones and tablets: five rows per tier until "Show all" (filters and search show everything) */
  .tp-hood-list:not(.is-filtering) .tp-tiergroup:not(.is-open) .tp-hood:nth-of-type(n+6) { display: none; }
  .tp-hood-list:not(.is-filtering) .tp-tiergroup:not(.is-open) .tp-more { display: block; }
  .tp-more { width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--k-line); background: transparent; color: var(--k-accent); font: 700 13px 'Sora', 'Sora Fallback', sans-serif; text-align: left; cursor: pointer; }
}
@media (max-width: 700px) {
  .tp-tierbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .tp-tierbar .k-search { flex: 1 1 auto; }
  .tp-tierbar .k-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .tp-split-hoods .k-map { height: 300px; aspect-ratio: auto; }
  .tp-hood { padding: 10px 14px; gap: 4px 10px; }
  /* ux 10-13: the stats line took ~170px of a 350px row, so each note was cut to two or three words
     ("Miami's estate ...", "Industry boun..."). Phones give the note and the stats a full line each. */
  .tp-hood { grid-template-columns: 10px minmax(0, 1fr) auto 14px; grid-template-areas: "dot name price go" "dot note note go" "dot meta meta go"; row-gap: 1px; }
  .tp-hood > .tp-dot { grid-area: dot; align-self: start; margin-top: 6px; }
  .tp-hood > .tp-hood-n, .tp-hood > .tp-hood-s { display: contents; }
  .tp-hood-n b { grid-area: name; }
  .tp-hood-n small { grid-area: note; white-space: normal; }
  .tp-hood-s b { grid-area: price; }
  .tp-hood-s small { grid-area: meta; text-align: left; }
  .tp-hood-s.is-none small { grid-area: price; text-align: right; }
  .tp-hood > .tp-hood-go { grid-area: go; }  /* .tp-hood-go is shared with the .tp-crow rows: scope it */
  .tp-crow { padding: 11px 16px; }
  .tp-crows { margin-inline: -16px; }
  .tp-cluster .k-card-body { padding: 16px 16px 6px; }
  .tp-mapfoot { flex-direction: column; }
}

/* ---------- market statistics (market-statistics.html + assets/market-stats.js v13) ---------- */
/* hero: the wire runs along the foot of the data hero */
.tp-stats-hero { display: flex; flex-direction: column; }
.tp-stats-hero .ov-wire { position: relative; z-index: 2; display: block; text-decoration: none; margin-top: auto; background: rgba(11,13,16,.82); border-top: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ov-wire .wm { cursor: pointer; transition: color .15s ease; }
.ov-wire .wm:hover, .ov-wire .wm:focus-visible { color: var(--amber); }
.ov-wire .wm b { color: var(--amber); }
.ov-wire .wm-lead { color: var(--term-dim); letter-spacing: .16em; }
.tp-stats .k-hero-side .k-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* the hero count is rewritten from the data file after load (8,240 in the HTML, 8,178 today); with proportional digits
   the new number is narrower, the line rewraps and the lede jumped 24px at 390 (CLS 0.0495, ux 10-13). Equal-width digits: same width, no rewrap */
.tp-stats #ms-count, .tp-stats .k-hero-side .k-kpi .v { font-variant-numeric: tabular-nums; }
/* the console's chip rows are drawn by market-stats.js: reserve their height, and give the Duel bar the row it ends up on,
   so filling the chips moves nothing (Spanish 1440: CLS 0.0286 from the Duel bar dropping a row, ux 10-13) */
.tp-stats .ms-tabs { min-height: 34px; }
@media (min-width: 701px) {
  .tp-stats .ov-controls > .ms-bar-duel { flex-basis: 100%; }
  /* the sales window never splits: in Spanish it is two characters longer once the script writes today's window,
     which wrapped the hero stamp onto a second line after load */
  .tp-stats #ms-window { white-space: nowrap; }
}
/* controls: the .ms-btn chips read like the kit's .k-chip, on the dark console */
.tp-console .svc-head { margin-bottom: clamp(20px, 2.6vw, 30px); }
.ov-controls { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: flex-start; }
.ms-bar { display: flex; align-items: center; gap: 14px; }
.ms-lab { flex: none; font-size: 12px; font-weight: 700; color: var(--term-dim); }
.ms-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.ms-btn { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.12); background: #171B21; color: var(--term-text); font: 600 12.5px 'Sora', 'Sora Fallback', sans-serif; cursor: pointer; white-space: nowrap; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.ms-btn:hover { border-color: rgba(242,179,54,.6); color: #fff; }
.ms-btn.active { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.ms-btn.is-disabled { opacity: .3; cursor: not-allowed; }
.ms-btn.is-disabled:hover { border-color: rgba(255,255,255,.12); color: var(--term-text); }
#ms-compare-toggle { border-color: rgba(242,179,54,.5); color: var(--amber); }
#ms-compare-toggle.active { background: var(--amber); color: var(--ink); }
/* market picker */
.ms-mkt { margin-top: 16px; border: 1px solid var(--term-line); border-radius: var(--radius); background: rgba(18,21,26,.6); padding: 14px 16px 8px; }
.ms-mkt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 8px; }
.ms-find { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 13px; background: #171B21; border: 1.5px solid rgba(255,255,255,.12); border-radius: 12px; transition: border-color .15s ease; }
.ms-find:focus-within { border-color: var(--amber); }
.ms-find svg { width: 15px; height: 15px; flex: none; stroke: var(--amber); fill: none; stroke-width: 2.2; stroke-linecap: round; }
.ms-find input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: 600 13.5px 'Sora', 'Sora Fallback', sans-serif; padding: 10px 0; }
.ms-find input::placeholder { color: #79808A; font-weight: 500; }
.ms-count { font-size: 12px; font-weight: 700; color: var(--term-dim); font-variant-numeric: tabular-nums; }
.ms-group { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.06); }
.ms-group[hidden], .ms-group-chips .ms-btn[hidden] { display: none; }
.ms-group-lab { flex: none; width: 112px; padding-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6D747D; }
.ms-group-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ms-group-chips .ms-btn { min-height: 32px; padding: 5px 12px; font-size: 12px; }
#ms-vsbar { border-top: 1px dashed rgba(242,179,54,.4); margin-top: 6px; }
.ms-vs-lab { margin: 12px 0 6px; font-size: 12px; font-weight: 800; color: var(--amber); }
/* the tape: four extremes as kit KPI tiles (buttons) */
.ov-tape { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.tape-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-width: 0; text-align: left; cursor: pointer; padding: 14px 16px; border: 1px solid var(--k-line); border-radius: 12px; background: var(--k-surface); color: var(--k-text); font-family: 'Sora', 'Sora Fallback', sans-serif; transition: border-color .15s ease, transform .15s ease; }
.tape-card[data-slug]:hover { border-color: rgba(242,179,54,.6); transform: translateY(-2px); }
.tape-card::before { content: ''; position: absolute; left: 16px; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--amber); }
.tape-k { font-size: 12px; font-weight: 600; color: var(--k-dim); }
.tape-mkt { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: #fff; }
.tape-v { margin-top: 2px; font: 800 clamp(1.35rem, 2vw, 1.7rem)/1.1 'Sora', 'Sora Fallback', sans-serif; letter-spacing: -.03em; color: var(--amber); font-variant-numeric: tabular-nums; }
.tape-sub { margin-top: 5px; font-size: 11.5px; color: var(--k-dim); }
/* dashboard: map | rail, ranking | side */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-areas: "map rail" "rank side"; gap: 14px; margin-top: 14px; align-items: start; }
.map-panel { grid-area: map; }
.map-body { position: relative; }  /* not .k-chart-body: its svg sizing would break Leaflet's SVG renderer */
.dash-rail { grid-area: rail; display: flex; flex-direction: column; align-self: stretch; }
.rank-panel { grid-area: rank; }
.dash-side { grid-area: side; display: grid; gap: 14px; align-content: start; }
#ms-map { height: 500px; border-radius: 10px; background: var(--term-bg); position: relative; z-index: 1; isolation: isolate; }
#ms-map .leaflet-interactive { transition: fill .5s ease, fill-opacity .5s ease, stroke .25s ease, stroke-width .2s ease; }
.tp-stats .leaflet-container { font-family: 'Sora', 'Sora Fallback', sans-serif; }
.tp-stats #ms-map .leaflet-control-attribution { background: rgba(11,13,16,.7); color: #7A8089; font-size: 9.5px; }
.tp-stats #ms-map .leaflet-control-attribution a { color: #9AA0A8; }
.tp-stats #ms-map .leaflet-control-zoom a { background: #12151A; color: #C9CDD4; border-color: rgba(255,255,255,.12); }
.leaflet-tooltip.ms-tip { background: rgba(11,13,16,.94); border: 1px solid var(--term-line); border-radius: 8px; color: var(--term-text); font: 12px/1.5 'Sora', 'Sora Fallback', sans-serif; padding: 8px 11px; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.leaflet-tooltip.ms-tip::before { display: none; }
.ms-tip b { color: #fff; } .ms-tip .amber { color: var(--amber); font-weight: 600; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: rgba(11,13,16,.88); border: 1px solid var(--term-line); border-radius: 8px; padding: 9px 12px; pointer-events: none; }
.map-legend .t { margin-bottom: 6px; font-size: 11px; font-weight: 700; color: var(--term-dim); }
.map-legend .bar { width: 150px; height: 8px; border-radius: 4px; border: 1px solid var(--term-line); background: linear-gradient(90deg, rgba(242,179,54,.10), rgba(242,179,54,.85)); }
.map-legend .mm { display: flex; justify-content: space-between; gap: 18px; margin-top: 5px; font-size: 11px; color: var(--term-text); font-variant-numeric: tabular-nums; }
/* ranking: scrolls inside its panel */
.rank-scroll { max-height: 452px; overflow: auto; overscroll-behavior: contain; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
#ms-chart .ms-bar-g { cursor: pointer; }
#ms-chart .bartrack { fill: rgba(255,255,255,.05); }
#ms-chart .barfill { fill: rgba(255,255,255,.22); transition: width .55s cubic-bezier(.22,1,.36,1), fill .25s ease; }
#ms-chart .ms-bar-g.on .barfill { fill: var(--amber); }
#ms-chart .ms-bar-g.hl .barfill { fill: #F6C159; }
#ms-chart .barname, #ms-chart .barval { fill: #7A8089; transition: fill .2s ease; }
#ms-chart .ms-bar-g.on .barname { fill: #fff; }
#ms-chart .ms-bar-g.on .barval { fill: var(--amber); }
#ms-chart .ms-bar-g.hl .barname, #ms-chart .ms-bar-g.hl .barval { fill: #fff; }
/* rail */
.rail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--k-line); }
.rail-name { color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.rail-geo { margin-top: 5px; font-size: 12px; color: var(--k-dim); }
.lean-badge { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--k-line-2); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--k-dim); white-space: nowrap; }
.lean-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lean-badge.buyer, .lean-dot.buyer { color: #7CC4CF; border-color: rgba(90,169,181,.55); background-color: rgba(90,169,181,.1); }
.lean-badge.seller, .lean-dot.seller { color: #E38FA1; border-color: rgba(200,69,95,.55); background-color: rgba(200,69,95,.1); }
.lean-badge.balanced, .lean-dot.balanced { color: var(--amber); border-color: rgba(242,179,54,.5); background-color: rgba(242,179,54,.08); }
.rail-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rail-kpis .k-kpi { padding: 12px 14px; background: rgba(255,255,255,.02); }
.rail-kpis .k-kpi .v { color: var(--amber); font-size: clamp(1.3rem, 1.7vw, 1.6rem); font-variant-numeric: tabular-nums; }
.rail-kpis .k-kpi .m { font-size: 11px; margin-top: 5px; }
.rail-k { margin: 16px 0 6px; font-size: 12px; font-weight: 700; color: var(--k-dim); }
.rail-read, .duel-verdict { font-size: 13.5px; line-height: 1.7; color: var(--term-text); }
.rail-read b, .duel-verdict b { font-weight: 700; }
.rail-cta { margin-top: auto; padding-top: 16px; }
/* duel */
.duel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--k-line); }
.duel-name { flex: 1; min-width: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.duel-name.b { text-align: right; }
.duel-vs { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.duel-geo { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 11px; color: var(--k-dim); }
.duel-geo span:last-child { text-align: right; }
.duel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--k-line); }
.duel-lab { font-size: 11px; font-weight: 700; color: var(--k-dim); text-align: center; white-space: nowrap; }
.duel-val { font-size: 16px; font-weight: 600; color: var(--term-text); font-variant-numeric: tabular-nums; }
.duel-row .duel-val:last-child { text-align: right; }
.duel-val.win { color: var(--amber); font-weight: 800; }
#ms-rail-duel .chart-title { font-size: 12px; font-weight: 700; color: var(--k-dim); text-transform: none; letter-spacing: 0; }
/* side: financing + leverage key */
.fin-panel { position: relative; overflow: hidden; border: 1px solid var(--k-line); border-radius: var(--radius); background: rgba(242,179,54,.06); padding: clamp(16px, 2.2vw, 22px); }
.fin-panel::after { content: ''; position: absolute; top: 0; left: 22px; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--amber); }
.fin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fin-lab { font-size: 1.02rem; font-weight: 800; color: #fff; letter-spacing: -.015em; }
.fin-asof { font-size: 12px; color: var(--k-dim); }
.fin-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.fin-k { font-size: 12px; font-weight: 600; color: var(--k-dim); }
.fin-v { margin-top: 3px; font: 800 1.6rem/1.1 'Sora', 'Sora Fallback', sans-serif; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--amber); text-decoration: none; }
.fin-cta .arr { transition: transform .18s ease; } .fin-cta:hover .arr { transform: translateX(4px); }
.fin-note { margin-top: 9px; font-size: 11.5px; line-height: 1.5; color: var(--k-dim); }
.lean-key .k-chart-head { margin-bottom: 10px; }
.lean-scale { display: grid; grid-template-columns: 5fr 3fr 6fr; gap: 3px; margin-bottom: 8px; }
.lean-scale i { height: 6px; border-radius: 3px; }
.lean-scale .s { background: #C8455F; } .lean-scale .b { background: var(--amber); } .lean-scale .u { background: #5AA9B5; }
.lean-key .k-kv dt { display: inline-flex; align-items: center; gap: 8px; }
.lean-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor !important; }
.lean-key .k-chart-foot { display: block; margin-top: 10px; }
/* table on paper */
.tp-stats .k-table-wrap { max-height: 640px; }
#ms-table { min-width: 780px; }
#ms-table th { cursor: pointer; user-select: none; }
#ms-table th:hover { color: var(--k-text); }
#ms-table th.sorted { color: var(--k-accent); }
#ms-table td b { display: block; line-height: 1.25; }
#ms-table td small { display: block; margin-top: 2px; font-size: 11.5px; }
#ms-table tbody tr { cursor: pointer; }
#ms-table tbody tr.sel td { background: rgba(242,179,54,.12); }
#ms-table tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
#ms-table tbody tr.selb td { background: rgba(242,179,54,.06); }
#ms-table tbody tr.selb td:first-child { box-shadow: inset 3px 0 0 rgba(242,179,54,.5); }
.ms-tablenote { margin-top: 14px; }  /* the kit .k-note measure (90ch); 110ch ran 142 characters a line at 1440 */
.tp-tablefoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 10px; }
.tp-link { font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.tp-link .arr { color: var(--k-accent); display: inline-block; transition: transform .15s ease; }
.tp-link:hover .arr { transform: translateX(4px); }
/* methodology */
.tp-method-facts { margin-top: 22px; }
/* ux 10-13: the eyebrow sat 2px above the h2 (kit heads keep 14px); in the narrow sticky column two fact
   columns squeezed labels to three lines ("Closed- / sales / window"), so they stack in one column there */
.tp-stats .tp-split-head .eyebrow { margin-bottom: 14px; }
@media (min-width: 981px) { .tp-stats .tp-method-facts { grid-template-columns: minmax(0, 1fr); } }
.tp-notvaluation { margin-top: clamp(26px, 3.4vw, 40px); }
.tp-notvaluation a { color: var(--ink); font-weight: 700; text-decoration-color: var(--amber); text-underline-offset: 3px; }

@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "rail" "rank" "side"; }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) { .ov-tape { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .ov-controls { flex-direction: column; flex-wrap: nowrap; gap: 12px; }
  .ms-bar { flex-direction: column; align-items: stretch; gap: 7px; width: 100%; min-width: 0; }
  .ms-bar .ms-lab { align-self: flex-start; }
  .ms-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin-inline: -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .ms-mkt { padding: 12px 12px 6px; }
  .ms-group { flex-direction: column; gap: 6px; }
  .ms-group-lab { width: auto; padding-top: 0; }
  .ms-group-chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #ms-map { height: 380px; }
  .map-legend .bar { width: 110px; }
  .rail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .rank-scroll { max-height: 380px; }
  #ms-table { min-width: 0; }
}

/* generated CONDO-LINKS block: its "Full directory" link is inline amber on paper (1.57:1).
   Markup stays as generated; ink text with an amber underline keeps the accent and passes contrast */
.tp-hoods #condo-links p > a[href="/condos/"] { color: var(--ink) !important; text-decoration: underline !important; text-decoration-color: var(--amber) !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }
