/* community — page-local rules for /communities/:name, in the v2 design language (9 Nov).
   Loaded AFTER v2.css (hero stage, aurora, reveals, bottom nav, glass tokens live there); every rule is scoped under
   body.v2-community. Token-only (no colour literals, no 1080px, no style="" / <style>). community.js and the server's
   <!--COMMUNITY_SSR--> fragment emit the classes styled below; the template's ids are untouched.
   The wrapper #mainContent (.v2-wrap .v2-content) replaced the old `.content`. Neither it nor the hero ever carried the
   `.page-content` link/sort-header rules (this page never used .page-content), so nothing needed re-scoping; links inside
   the body get the same accent/no-underline default `.page-content a` gave other pages (see the end of this file).
   Shared components (.op-* grid, .verify-cta, .nearby-chip, .card-flag, .loading, .cta-btn) live in chrome.css. */
:where(.v2-community), :where(.v2-community) :where(*, *::before, *::after) { box-sizing: border-box; }
:where(.v2-community) :where(*) { margin: 0; padding: 0; }
.v2-community { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.v2-community #mainContent a:not(.cta-btn):not(.tx-card):not(.nearby-chip):not(.page-btn) { color: var(--accent-text); text-decoration: none; }
.v2-community #mainContent a:not(.cta-btn):not(.tx-card):not(.nearby-chip):not(.page-btn):hover { text-decoration: underline; }

/* ── Hero: short dark stage; the server and community.js fill #heroTitle / #heroSub / #heroTrust / #mapLink ── */
.v2-community .v2-hero-short { padding-bottom: 28px; }
.v2-community #heroSub { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }
.v2-community .v2-locator {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(62%, 780px); opacity: .5;
  -webkit-mask-image: linear-gradient(to right, transparent, black 55%);
  mask-image: linear-gradient(to right, transparent, black 55%);
}
.v2-community .v2-locator .leaflet-container { background: var(--chrome); }
.v2-community .v2-locator .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.75) saturate(.5); }
.v2-community .hero-trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.v2-community .htrust-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: var(--radius-pill);
  font-size: var(--fs-2); font-weight: 600; color: var(--v2-on-ink);
  background: var(--v2-glass-fill); border: 1px solid var(--v2-glass-line); box-shadow: none;
  -webkit-backdrop-filter: var(--v2-glass-blur-sm); backdrop-filter: var(--v2-glass-blur-sm);
}
.v2-community .htrust-chip svg { width: 14px; height: 14px; flex: none; color: var(--v2-hl); }
.v2-community .htrust-ok { color: var(--v2-on-ink); border-color: color-mix(in srgb, var(--lime) 50%, transparent); }
.v2-community .hero-map-link { display: inline-block; margin-top: 18px; padding: 8px 0; font-size: var(--fs-3); font-weight: 600; color: var(--v2-hl); }
.v2-community .hero-map-link[hidden], .v2-community .hero-loc-note[hidden] { display: none; }
.v2-community .hero-loc-note { position: absolute; right: var(--v2-gutter); bottom: 10px; z-index: 1; font-size: var(--fs-1); color: var(--v2-on-ink-mute); }

/* ── Body ── */
.v2-community .v2-content { padding-bottom: var(--v2-sec); }
.v2-community .section { margin-top: var(--v2-sec); }
.v2-community .section-kicker { font-size: var(--fs-2); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.v2-community .section-title {
  font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  letter-spacing: -.04em; line-height: 1.02; margin: 0 0 14px; color: var(--text); text-wrap: balance;
}
.v2-community .section-intro { color: var(--text-muted); font-size: var(--fs-4); line-height: 1.65; margin: 0 0 28px; max-width: 46em; }
.v2-community .loading { color: var(--text-subtle); text-align: center; padding: 32px; font-size: var(--fs-2); }
.v2-community .card, .v2-community .prof-tile, .v2-community .prof-desc {
  background: var(--surface); border: 0; border-radius: 28px;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}
.v2-community .card { padding: clamp(20px, 3vw, 36px); }
.v2-community .card.op-card { padding: 0; overflow: hidden; }

/* Market summary = the dark big-numbers band (the one section holding the stagger KPI grid) */
.v2-community #mainContent > .section:has(> .kpi-grid.kk-stagger) {
  position: relative; isolation: isolate; margin-top: 0; margin-bottom: 88px; padding: 8px 0 var(--v2-sec); color: var(--v2-on-ink);
}
.v2-community #mainContent > .section:has(> .kpi-grid.kk-stagger)::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--chrome);
}
.v2-community #mainContent > .section:has(> .kpi-grid.kk-stagger)::after {
  content: ""; position: absolute; z-index: -1; top: 100%; left: 50%; width: 100vw; height: 88px; margin-left: -50vw; pointer-events: none;
  background: linear-gradient(to bottom, var(--chrome), var(--bg));
}
/* the first section's gold lead rule (chrome.css, `.content > .section:first-child`) no longer applies: the wrapper is not .content */
.v2-community .section:has(> .kpi-grid.kk-stagger) .section-kicker { color: var(--v2-hl); }
.v2-community .section:has(> .kpi-grid.kk-stagger) .section-title { color: var(--v2-on-ink); }
.v2-community .section:has(> .kpi-grid.kk-stagger) .sold-line { color: var(--v2-on-ink-mute); margin-top: 28px; max-width: 46em; }
.v2-community .section:has(> .kpi-grid.kk-stagger) .sold-line strong { color: var(--v2-on-ink); }
.v2-community .sold-line.is-spaced { margin-top: 12px; }

/* KPIs */
.v2-community .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin-top: 4px; }
.v2-community .kpi-box { background: var(--surface); padding: 18px 20px 16px; }
.v2-community .kpi-label { font-size: var(--fs-1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 13px; }
.v2-community .kpi-value { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: var(--num-hero); font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.v2-community .kpi-sub { font-size: var(--fs-1); color: var(--text-muted); margin-top: 11px; }
.v2-community .trend-up, .v2-community .trend-dn, .v2-community .trend-muted { display: inline-flex; align-items: center; gap: 5px; font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 700; font-size: var(--fs-6); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.v2-community .trend-up { color: var(--pos); }
.v2-community .trend-dn { color: var(--neg); }
.v2-community .trend-muted { color: var(--text-muted); font-size: var(--fs-5); }
/* other KPI grids (e.g. getting around): light v2 cards */
.v2-community .kpi-grid:not(.kk-stagger) .kpi-box { border: 0; border-radius: 24px; padding: 22px 24px; box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent); }
.v2-community .kpi-grid:not(.kk-stagger) .kpi-value { font-weight: 800; }
.v2-community .kpi-box.is-lowdata { background: var(--surface-muted); box-shadow: none; }
/* the stagger grid: big numbers on ink, ruled columns */
.v2-community .kpi-grid.kk-stagger { grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; }
.v2-community .kpi-grid.kk-stagger .kpi-box {
  background: transparent; box-shadow: none; border: 0; border-radius: 0; border-top: 1px solid var(--v2-glass-line);
  padding: 26px 20px 0 0;
}
.v2-community .kpi-grid.kk-stagger .kpi-box + .kpi-box { padding-left: 24px; border-left: 1px solid var(--v2-glass-line); }
.v2-community .kpi-grid.kk-stagger .kpi-label { color: var(--v2-on-ink-mute); letter-spacing: .1em; font-size: var(--fs-1); margin-bottom: 16px; }
.v2-community .kpi-grid.kk-stagger .kpi-value, .v2-community .kpi-grid.kk-stagger .trend-up, .v2-community .kpi-grid.kk-stagger .trend-dn, .v2-community .kpi-grid.kk-stagger .trend-muted {
  font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 800; font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums;
}
.v2-community .kpi-grid.kk-stagger .kpi-value { color: var(--v2-on-ink); }
.v2-community .kpi-grid.kk-stagger .num-affix { color: var(--v2-on-ink-mute); }
.v2-community .kpi-grid.kk-stagger .trend-up { color: var(--v2-hl); }
.v2-community .kpi-grid.kk-stagger .trend-dn { color: var(--v2-down); }
.v2-community .kpi-grid.kk-stagger .trend-muted { color: var(--v2-on-ink-mute); }
.v2-community .kpi-grid.kk-stagger .kpi-sub { color: var(--v2-on-ink-mute); font-size: var(--fs-2); margin-top: 14px; max-width: 18em; }

/* F5 — Price-trajectory card */
.v2-community .traj-card { display: flex; flex-direction: column; gap: 12px; }
.v2-community .traj-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.v2-community .traj-badge { display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 700; font-size: var(--fs-4); letter-spacing: -.01em; padding: 7px 16px; border-radius: var(--radius-pill); }
.v2-community .traj-rising  { color: var(--pos); background: var(--pos-bg); }
.v2-community .traj-cooling { color: var(--neg); background: var(--neg-bg); }
.v2-community .traj-steady, .v2-community .traj-nocall { color: var(--text-muted); background: var(--surface-alt); }
.v2-community .traj-conf { font-size: var(--fs-1); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); }
.v2-community .traj-line { font-size: var(--fs-4); line-height: 1.65; color: var(--text); }
.v2-community .traj-note { font-size: var(--fs-2); line-height: 1.6; color: var(--text-muted); }
.v2-community .traj-disc { font-size: var(--fs-1); line-height: 1.55; color: var(--text-subtle); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; }

/* F6 — Off-plan vs ready comparator; F16 registered-rents card (shares the .op-* grid from chrome.css) */
.v2-community .op-building { border-top: 1px solid var(--border); }
.v2-community .op-building-name { font-size: var(--fs-2); font-weight: 700; letter-spacing: .02em; color: var(--text); background: var(--surface-alt); padding: 12px 24px; }
.v2-community .op-head, .v2-community .op-row { padding-left: 24px; padding-right: 24px; }
.v2-community .op-foot { padding-left: 24px; padding-right: 24px; }
.v2-community .rent-or-buy { border-top: 1px solid var(--border); padding: 14px 24px 0; }
.v2-community .rent-or-buy .op-sub-title { font-size: var(--fs-2); font-weight: 600; margin: 0 0 6px; color: var(--text); }
.v2-community .rent-or-buy p { margin: 0 0 10px; line-height: 1.55; }
.v2-community .rent-or-buy .op-foot { border-top: 0; padding: 0 0 12px; }
.v2-community .op-foot.is-lead { margin: 0 0 8px; padding-top: 16px; border-top: 0; }
.v2-community .op-foot.is-around { border-top: 0; padding: 12px 0 0; }
/* registered-rents card headers: one style (same size, case, weight, tracking), one line; the gap column no longer wraps */
.v2-community .rents-card .op-head > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-community .rents-card .op-head .op-gap { white-space: nowrap; line-height: inherit; font-family: inherit; font-weight: inherit; font-size: inherit; color: inherit; }
@media (max-width: 560px) {
  .v2-community .op-building-name { padding: 8px 12px; font-size: var(--fs-1); }
  .v2-community .op-head, .v2-community .op-row, .v2-community .op-foot, .v2-community .rent-or-buy { padding-left: 12px; padding-right: 12px; }
  .v2-community .rents-card .op-head, .v2-community .rents-card .op-row { grid-template-columns: 44px minmax(0, 1.12fr) minmax(0, 1fr) 72px; gap: 4px; }
  .v2-community .rents-card .op-head > *, .v2-community .rents-card .op-head .op-gap { font-size: .625rem; letter-spacing: 0; }   /* fit-to-width phone table head: literal by design (59·M10) */
}
@media (max-width: 380px) {
  .v2-community .rents-card .op-head > *, .v2-community .rents-card .op-head .op-gap { font-size: .58rem; }   /* fit-to-width phone table head: literal by design (59·M10) */
}

/* Community profile */
.v2-community .prof-desc { padding: 20px 22px; font-size: var(--fs-3); line-height: 1.72; color: var(--text); margin-bottom: 14px; }
.v2-community .prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.v2-community .prof-tile { padding: 24px 26px; }
.v2-community .prof-lab { font-size: var(--fs-1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); }
.v2-community .prof-bar { height: 11px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; display: flex; margin-top: 12px; }
.v2-community .prof-bar.is-type { margin-top: 11px; }
.v2-community .prof-bar > span { display: block; height: 100%; }
.v2-community .prof-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-2); color: var(--text-muted); margin-top: 12px; }
.v2-community .prof-big { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: var(--num-lg); font-weight: 800; color: var(--text); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.v2-community .prof-sub { font-size: var(--fs-1); color: var(--text-muted); margin-top: 3px; }
/* min-height (not a fixed height): the bar + its 2-line cap can exceed 84px and would ride up into the label */
.v2-community .bed-cols { display: flex; align-items: flex-end; gap: 14px; min-height: 84px; margin-top: 14px; }
.v2-community .bed-col { flex: 1; text-align: center; }
.v2-community .bed-fill { border-radius: 4px 4px 0 0; }
.v2-community .bed-cap { font-size: var(--fs-1); color: var(--text-muted); margin-top: 7px; line-height: 1.3; }
.v2-community .bed-cap b { color: var(--text); }
.v2-community .prof-foot { margin-top: 12px; font-size: var(--fs-1); color: var(--text-subtle); }

/* Most-active-buildings league table */
.v2-community .league { padding: 10px 0; }
.v2-community .lg-row { display: grid; grid-template-columns: 30px 1fr 1fr auto; align-items: center; gap: 14px; padding: 16px 28px; border-top: 1px solid var(--border); transition: background-color 160ms var(--v2-out); }
.v2-community .lg-row:first-child { border-top: none; }
@media (hover: hover) and (pointer: fine) { .v2-community .lg-row:hover { background: var(--surface-alt); } }
.v2-community .lg-rank { font-family: 'Inter Tight', 'Inter', sans-serif; font-weight: 700; font-size: var(--fs-4); color: var(--accent); font-variant-numeric: tabular-nums; }
.v2-community .lg-name { font-size: var(--fs-3); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-community .lg-bar { height: 7px; border-radius: var(--radius-pill); background: var(--surface-alt); overflow: hidden; }
.v2-community .lg-bar > span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.v2-community .lg-count { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: var(--fs-3); font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-community .lg-count span { color: var(--text-subtle); font-weight: 400; font-size: var(--fs-1); }
.v2-community .league-more { margin-top: 14px; font-size: var(--fs-3); }

/* Top buildings / recent transactions: each .tx-card is an <a> (community.js) or the card inside one */
.v2-community .tx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.v2-community .tx-card {
  display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border: 0; border-radius: 24px; background: var(--surface);
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
  transition: transform 220ms var(--v2-out), box-shadow 220ms var(--v2-out);
}
@media (hover: hover) and (pointer: fine) {
  .v2-community .tx-card:hover { transform: translate3d(0, -3px, 0); box-shadow: 0 0 0 1px var(--accent), 0 18px 40px color-mix(in srgb, var(--accent) 22%, transparent); }
}
/* the anchor takes keyboard focus: ring its card */
.v2-community .tx-list a:focus-within .tx-card, .v2-community a.tx-card:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.v2-community .tx-project { font-weight: 600; font-size: var(--fs-3); color: var(--text); }
.v2-community .tx-meta { font-size: var(--fs-1); color: var(--text-muted); margin-top: 3px; }
.v2-community .tx-price { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: var(--fs-5); font-weight: 800; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.v2-community .tx-ppsf { font-size: var(--fs-1); color: var(--text-subtle); text-align: right; font-variant-numeric: tabular-nums; }
.v2-community .link-plain, .v2-community .link-plain:hover { text-decoration: none; }

/* Nearby / link clouds, pagination */
.v2-community .pagination, .v2-community .link-cloud, .v2-community .nearby-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.v2-community .pagination .page-btn, .v2-community .link-cloud a {
  min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: var(--radius-pill); font-size: var(--fs-3); font-weight: 600;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-ui); text-decoration: none;
  transition: border-color 160ms var(--v2-out), color 160ms var(--v2-out);
}
@media (hover: hover) and (pointer: fine) {
  .v2-community .pagination .page-btn:hover, .v2-community .link-cloud a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
}
.v2-community .link-more summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 10px 0; }
.v2-community .link-more .link-cloud { margin-top: 14px; }

/* Dark CTA card (lime action — the lime law); .cta-btn is in chrome.css */
.v2-community .cta-card { background: var(--chrome); border-radius: 28px; padding: 30px 28px; text-align: center; box-shadow: var(--shadow-lg); }
.v2-community .cta-card h3 { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: var(--fs-5); font-weight: 700; letter-spacing: -.02em; color: var(--chrome-ink); margin-bottom: 8px; }
.v2-community .cta-card p { color: var(--chrome-sub); font-size: var(--fs-3); margin-bottom: 20px; }

/* Verify CTA (after the content) */
.v2-community .verify-cta-wrap { max-width: var(--v2-wrap); margin: 0 auto var(--v2-sec); padding: 0 var(--v2-gutter); }
.v2-community .verify-cta { border-radius: 24px; padding: 20px 24px; }

@media (max-width: 900px) {
  .v2-community .kpi-grid.kk-stagger { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .v2-community .kpi-grid.kk-stagger .kpi-box:nth-child(odd) { padding-left: 0; border-left: 0; }
  .v2-community .kpi-grid.kk-stagger .kpi-box:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--v2-glass-line); }
}
@media (max-width: 640px) {
  .v2-community .v2-locator { width: 100%; opacity: .3; }
  .v2-community .lg-row { grid-template-columns: 26px 1fr auto; padding: 14px 18px; }
  .v2-community .lg-bar { display: none; }
  .v2-community .tx-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .v2-community .prof-grid { grid-template-columns: 1fr; }
  .v2-community .kpi-box { padding: 16px 14px 14px; }
  .v2-community .kpi-grid.kk-stagger .kpi-box { padding: 26px 20px 0 0; }
  .v2-community .kpi-grid.kk-stagger .kpi-box:nth-child(even) { padding-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-community .tx-card, .v2-community .lg-row, .v2-community .pagination .page-btn, .v2-community .link-cloud a { transition: none; }
  .v2-community .tx-card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .v2-community .htrust-chip { background: color-mix(in srgb, var(--chrome) 82%, var(--text-on-dark)); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Getting around (#around, getting-around-ssr.js, shared by community + building). 10 Nov: place names ran past the
   card in the 2-up phone grid (e.g. InsuranceMarket 230px in 124px). auto-fit so a 3-card set (no parking) leaves no
   empty slot when it fits one row; one card per row on phones; long names wrap, with a hard-break backstop. */
.v2-community #around .kpi-grid { grid-template-columns: 1fr 1fr; }
.v2-community #around .kpi-box:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 1000px) {
  .v2-community #around .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .v2-community #around .kpi-box:last-child:nth-child(odd) { grid-column: auto; }
}
.v2-community #around .kpi-value.is-name { overflow-wrap: anywhere; hyphens: auto; line-height: 1.08; }
@media (max-width: 560px) { .v2-community #around .kpi-grid { grid-template-columns: 1fr; } }
