/* ============================================================
   DLD Register — v3
   Single-typeface analyst terminal. No editorial italics,
   no tracked-uppercase labels, no inline separators as decoration.
   ============================================================ */

:root {
  /* Surfaces — slightly cool near-white, less "paper" */
  --bg: #F1F1ED;
  --bg-deep: #E8E8E2;
  --surface: #F6F6F2;
  --surface-2: #FAFAF7;
  --paper: #FCFCFA;

  /* Hairlines */
  --line: rgba(20, 20, 20, 0.07);
  --line-2: rgba(20, 20, 20, 0.13);
  --line-3: rgba(20, 20, 20, 0.24);
  --line-4: rgba(20, 20, 20, 0.50);

  /* Ink ladder */
  --ink: #141414;
  --ink-2: #3A3A38;
  --ink-3: #6B6B66;
  --ink-4: #9A9A93;
  --ink-5: #C2C2BB;

  /* Single accent — deep print red, used sparingly */
  --hot: #8A2A1E;
  --hot-2: #6E2017;
  --hot-soft: rgba(138, 42, 30, 0.07);
  --hot-line: rgba(138, 42, 30, 0.32);

  /* Direction */
  --pos: #2D6A38;
  --neg: #A8322A;

  /* Type — one sans family, mono only for numerical strings */
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --fs-micro: 10.5px;
  --fs-tiny: 11.5px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 28px;
  --fs-display: 56px;

  --maxw: 1640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* ============================================================
   Top bar
   ============================================================ */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  gap: 28px;
}

.bar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand__mark {
  width: 22px;
  height: 22px;
  background: var(--ink);
  flex-shrink: 0;
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--hot);
}
.brand__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.brand__name b {
  font-weight: 600;
}
.brand__name span {
  font-weight: 400;
  color: var(--ink-3);
}
.brand__sub {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  padding-left: 16px;
  border-left: 1px solid var(--line-2);
  line-height: 1.3;
  max-width: 220px;
}

.bar__right {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.bar__date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.bar__date .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot);
  animation: pulse 2.4s ease-in-out infinite;
}
.bar__date .sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--line-2);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.bar__nav {
  display: flex;
  align-items: center;
}
.bar__nav a {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-3);
  padding: 8px 14px;
  position: relative;
  transition: color 0.12s;
}
.bar__nav a:hover { color: var(--ink); }
.bar__nav a.on { color: var(--ink); font-weight: 500; }
.bar__nav a.on::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -3px;
  height: 2px;
  background: var(--ink);
}

.bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 14px;
  border: 0;
  cursor: pointer;
  transition: background 0.12s;
}
.bar__btn:hover { background: var(--ink-2); }
.bar__btn.alt {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-3);
}
.bar__btn.alt:hover { border-color: var(--ink); }

/* ============================================================
   Filter strip
   ============================================================ */

.filters {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 0 14px;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: 3px;
  padding: 8px 18px;
  cursor: pointer;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  transition: background 0.12s;
}
.filter:first-child { border-left: 1px solid var(--line); }
.filter:hover { background: var(--surface); }

.filter__label {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
.filter__value {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.filter__value .caret {
  opacity: 0.4;
  font-size: 9px;
  font-weight: 400;
}

/* breadcrumb row */
.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.crumbs .path {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
}
.crumbs .path .sep { color: var(--ink-5); font-size: 12px; }
.crumbs .path .here { color: var(--ink); font-weight: 500; }
.crumbs .path a:hover { color: var(--ink); }

.chips { display: flex; gap: 8px; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  border-radius: 0;
}
.chip:hover { border-color: var(--line-3); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip .x { color: var(--ink-4); font-size: 11px; }
.chip[aria-pressed="true"] .x { color: var(--bg); opacity: 0.5; }
.chip.tiny { padding: 4px 9px; font-size: 11px; }

/* ============================================================
   Typography — eyebrows / heads
   No tracked uppercase. Sentence case, weight contrast.
   ============================================================ */

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow .num {
  font-family: var(--mono);
  color: var(--ink-4);
  font-weight: 400;
}
.eyebrow .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 24px;
  max-width: 60px;
}
.eyebrow .ctx { color: var(--ink-4); font-weight: 400; }

h1, h2, h3 { margin: 0; font-weight: 500; }
.display {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.display .roman {
  font-weight: 400;
  color: var(--ink-3);
}

.hed {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.hed .muted { color: var(--ink-3); font-weight: 400; }
.hed.sm { font-size: 20px; }

.kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-3);
}

/* ============================================================
   Metrics
   ============================================================ */

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric__label {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.metric__val {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 500;
  line-height: 1;
}
.metric__val.lg { font-size: 40px; letter-spacing: -0.025em; }
.metric__val.xl { font-size: 56px; line-height: 0.95; letter-spacing: -0.03em; }
.metric__val .unit {
  font-size: 0.42em;
  color: var(--ink-3);
  margin-left: 4px;
  font-weight: 400;
  vertical-align: 0.5em;
}
.metric__sub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.metric__sub .pos { color: var(--pos); font-weight: 500; }
.metric__sub .neg { color: var(--neg); font-weight: 500; }
.metric__sub .hot { color: var(--hot); font-weight: 500; }
.metric__sub .gap { display: inline-block; width: 8px; }

/* ============================================================
   Map
   ============================================================ */

.map-wrap {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}

.map svg { display: block; width: 100%; height: 100%; }

.map .grid line {
  stroke: rgba(20, 20, 20, 0.05);
  stroke-width: 0.5;
}
.map .coast {
  fill: none;
  stroke: rgba(20, 20, 20, 0.18);
  stroke-width: 0.7;
}
.map .area {
  fill: rgba(20, 20, 20, 0.04);
  stroke: rgba(20, 20, 20, 0.28);
  stroke-width: 0.6;
  cursor: pointer;
  transition: fill 0.14s, stroke 0.14s;
}
.map .area:hover,
.map .area.hover {
  fill: rgba(138, 42, 30, 0.18);
  stroke: var(--hot);
  stroke-width: 1.2;
}
.map .area.selected {
  fill: rgba(138, 42, 30, 0.28);
  stroke: var(--hot);
  stroke-width: 1.3;
}
.map .area.dim { opacity: 0.32; }
.map .label {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--ink-2);
  pointer-events: none;
  font-weight: 500;
}
.map .label.sm { fill: var(--ink-3); font-size: 9px; font-weight: 400; }
.map .marker-cross {
  stroke: var(--hot);
  stroke-width: 1.2;
  fill: none;
}

.map .heat-0 { fill: rgba(20, 20, 20, 0.03); }
.map .heat-1 { fill: rgba(20, 20, 20, 0.08); }
.map .heat-2 { fill: rgba(20, 20, 20, 0.15); }
.map .heat-3 { fill: rgba(138, 42, 30, 0.20); stroke: rgba(138, 42, 30, 0.40); }
.map .heat-4 { fill: rgba(138, 42, 30, 0.42); stroke: var(--hot); }

.map-titlebar {
  position: absolute;
  top: 22px;
  left: 24px;
  pointer-events: none;
  max-width: 540px;
}
.map-titlebar .lbl {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.map-titlebar .ttl {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 6px;
  line-height: 1.15;
}
.map-titlebar .ttl .muted { color: var(--ink-3); font-weight: 400; }

.map-legend {
  position: absolute;
  left: 24px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.map-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
}
.map-legend__row.title { color: var(--ink-2); font-weight: 500; }
.map-legend__sw {
  width: 22px;
  height: 8px;
  border: 1px solid var(--line-2);
}
.map-legend__scale-text { margin-left: 8px; color: var(--ink-4); }

.map-scale {
  position: absolute;
  right: 24px;
  bottom: 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.map-scale__bar {
  width: 64px;
  height: 6px;
  border-left: 1px solid var(--ink-3);
  border-right: 1px solid var(--ink-3);
  position: relative;
}
.map-scale__bar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink-3);
}

.map-shade {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  background: var(--paper);
  border: 1px solid var(--line-2);
}
.map-shade button {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  padding: 9px 14px;
  cursor: pointer;
  border-right: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
}
.map-shade button:last-child { border-right: 0; }
.map-shade button:hover { color: var(--ink); }
.map-shade button.on { background: var(--ink); color: var(--bg); }

.map-tip {
  position: absolute;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--line-3);
  padding: 14px 16px;
  min-width: 240px;
  font-size: 12.5px;
  display: none;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.08);
}
.map-tip.show { display: block; }
.map-tip h4 {
  margin: 0 0 2px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.map-tip .tip-sub {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 400;
  display: block;
  margin-bottom: 10px;
}
.map-tip .row {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}
.map-tip .row span:last-child {
  color: var(--ink);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.map-tip .hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
}
.map-tip .hint .hot { color: var(--hot); font-weight: 500; }

/* radius popover */
.radius {
  position: absolute;
  top: 60px;
  right: 24px;
  width: 312px;
  background: var(--paper);
  border: 1px solid var(--line-3);
  padding: 18px;
  z-index: 30;
  display: none;
  box-shadow: 0 12px 32px rgba(20, 20, 20, 0.10);
}
.radius.show { display: block; }
.radius h4 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.radius p {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}
.radius__row { display: flex; gap: 6px; margin-bottom: 8px; }
.radius__row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 0;
}
.radius__row input:focus { outline: 0; border-color: var(--ink); }
.radius__row button {
  background: var(--ink);
  border: 0;
  color: var(--bg);
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.radius__row button.alt {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-3);
}
.radius__list {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 6px;
}
.radius__list .lbl { color: var(--ink-3); margin-bottom: 8px; font-weight: 500; }
.radius__list .r {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 5px 0;
  align-items: baseline;
}
.radius__list .r .km {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.radius__list .r .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Tables / ledger
   ============================================================ */

table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
table.ledger th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
}
table.ledger th.r, table.ledger td.r { text-align: right; }
table.ledger td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: baseline;
}
table.ledger td.num,
table.ledger th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
table.ledger td.sub {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}
table.ledger tr.lnk { cursor: pointer; transition: background 0.1s; }
table.ledger tr.lnk:hover { background: var(--surface); }
table.ledger tr.lnk:hover td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
table.ledger td .rank {
  display: inline-block;
  width: 26px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}
table.ledger .building-name {
  font-weight: 500;
}
table.ledger .building-name .ctx {
  display: block;
  color: var(--ink-3);
  font-weight: 400;
  font-size: 11.5px;
  margin-top: 2px;
}
table.ledger .building-name .ctx-inline {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 11.5px;
  margin-left: 8px;
}
table.ledger td .pct-bar {
  display: inline-block;
  width: 100px;
  height: 5px;
  background: var(--line);
  position: relative;
  vertical-align: middle;
  margin-right: 12px;
}
table.ledger td .pct-bar > span {
  position: absolute;
  inset: 0;
  background: var(--ink);
}
table.ledger td .pct-bar.hot > span { background: var(--hot); }
table.ledger td .pct-bar.muted > span { background: var(--ink-3); }

/* tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line-2);
}
.tab {
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.12s;
  position: relative;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.tab .count {
  color: var(--ink-4);
  margin-left: 8px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 400;
}

/* ============================================================
   Cycle chart
   ============================================================ */

.cycle svg { display: block; width: 100%; height: auto; }
.cycle .bar { fill: var(--ink-4); transition: fill 0.12s; }
.cycle .bar.now { fill: var(--hot); }
.cycle .bar:hover { fill: var(--ink); }
.cycle .baseline { stroke: var(--line); stroke-width: 0.5; }
.cycle .label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-3);
}
.cycle .ann-line { stroke: var(--ink-4); stroke-width: 0.5; stroke-dasharray: 2 2; }
.cycle .ann {
  font-family: var(--sans);
  font-size: 11px;
  fill: var(--ink-3);
  font-weight: 500;
}
.cycle .ann.right { text-anchor: end; }
.cycle .ann .em {
  font-family: var(--mono);
  font-size: 12px;
  fill: var(--ink);
  font-weight: 400;
}

/* ============================================================
   Yield scatter
   ============================================================ */

.yieldplot {
  width: 100%;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
}
.yieldplot svg { display: block; width: 100%; height: auto; }
.yieldplot .axis-ln { stroke: var(--line-2); stroke-width: 0.6; }
.yieldplot .axis-tk { stroke: var(--ink-4); stroke-width: 0.6; }
.yieldplot .axis-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: var(--ink-3);
}
.yieldplot .axis-title {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  fill: var(--ink-2);
}
.yieldplot .quad-ln {
  stroke: var(--ink-4);
  stroke-width: 0.5;
  stroke-dasharray: 3 3;
}
.yieldplot .quad-lbl {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  fill: var(--ink-3);
}
.yieldplot .dot {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.2;
  transition: fill 0.12s, r 0.12s;
  cursor: pointer;
}
.yieldplot .dot.hot { fill: var(--hot); }
.yieldplot .dot:hover { fill: var(--hot-2); }
.yieldplot .dot-lbl {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  fill: var(--ink-2);
  pointer-events: none;
}
.yieldplot .dot-lbl.hot { fill: var(--hot); font-weight: 600; }

.yield-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  gap: 28px;
  flex-wrap: wrap;
}
.yield-meta .legend-row { display: flex; gap: 26px; flex-wrap: wrap; }
.yield-meta .legend-row .leg { display: flex; align-items: center; gap: 8px; }
.yield-meta .leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}
.yield-meta .leg-dot.hot { background: var(--hot); }
.yield-meta .leg-dot.big { width: 14px; height: 14px; }
.yield-meta .note { color: var(--ink-4); }

/* ============================================================
   Spark
   ============================================================ */

.spark { width: 100%; height: 60px; }
.spark .ln { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.spark .ln.hot { stroke: var(--hot); }
.spark .area-fill { fill: rgba(138, 42, 30, 0.08); }
.spark .pt { fill: var(--hot); }

/* ============================================================
   Histogram (room mix)
   ============================================================ */

.histo {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 0 4px;
}
.histo .b {
  flex: 1;
  background: var(--ink-5);
  position: relative;
  transition: background 0.14s;
}
.histo .b:hover { background: var(--ink-3); }
.histo .b.peak { background: var(--hot); }
.histo .b span {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
.histo .b em {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  font-weight: 500;
}

/* ============================================================
   Footer ticker
   ============================================================ */

.regstrip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  height: 44px;
  padding: 0 28px;
  border-top: 1px solid var(--line-2);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  background: var(--bg);
}
.regstrip__left {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}
.regstrip__left .meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}
.regstrip__left .meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot);
  animation: pulse 2.4s ease-in-out infinite;
}
.regstrip__left .vr {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--line-2);
}
.regstrip__left .num {
  font-family: var(--mono);
  color: var(--ink-2);
}

.regstrip__feed {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  min-width: 0;
}
.regstrip__feed .tick {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
  color: var(--ink-2);
  font-size: 12px;
}
.regstrip__feed .tick:first-child { border-left: 0; padding-left: 0; }
.regstrip__feed .tick .kind {
  font-weight: 500;
  color: var(--ink);
  font-size: 11.5px;
}
.regstrip__feed .tick .kind.hot { color: var(--hot); }
.regstrip__feed .tick .place { color: var(--ink-2); }
.regstrip__feed .tick .price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ============================================================
   Hero — drill pages
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border-bottom: 1px solid var(--line-2);
}
.hero__left {
  padding: 48px 40px 40px;
  border-right: 1px solid var(--line-2);
  position: relative;
}
.hero__right {
  background: var(--surface);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 40px;
  align-content: start;
}

.hero__mini-map {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 200px;
  height: 140px;
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
}

.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  margin-right: 6px;
}
.tag.hot { color: var(--hot); border-color: var(--hot-line); }

.dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 28px;
  font-size: 13px;
}
.dl dt {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  align-self: center;
  font-weight: 500;
}
.dl dd {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.dl dd .ctx {
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 6px;
  font-size: 12px;
}

/* ============================================================
   Page layout
   ============================================================ */

.home {
  display: grid;
  grid-template-columns: 1fr 480px;
  height: calc(100vh - 64px - 54px - 44px);
  min-height: 720px;
}

.home__map { position: relative; }
.home__side {
  border-left: 1px solid var(--line-2);
  overflow-y: auto;
  background: var(--bg);
}

.section {
  padding: 44px 40px;
  border-bottom: 1px solid var(--line-2);
}
.section h2.h {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.018em;
  margin: 8px 0 22px;
  line-height: 1.22;
}
.section h2.h .muted { color: var(--ink-3); font-weight: 400; }

.section-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-2);
}
.section-grid-4 > div {
  padding: 32px 32px;
  border-right: 1px solid var(--line);
}
.section-grid-4 > div:last-child { border-right: 0; }

.section-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-2);
}
.section-grid-2 > div {
  padding: 40px;
  border-right: 1px solid var(--line-2);
}
.section-grid-2 > div:last-child { border-right: 0; }

.area-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
}
.area-main { border-right: 1px solid var(--line-2); }
.area-side { background: var(--surface); }

/* ============================================================
   Misc
   ============================================================ */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.hr { border-top: 1px solid var(--line); margin: 16px 0; }

.flag {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ink-4);
}
.flag.hot { background: var(--hot); }
.flag.pos { background: var(--pos); }

.as-of {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.as-of .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hot);
}

/* Compare strip */
.compare {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-2);
  border-right: 0;
}
.compare > div {
  padding: 24px;
  border-right: 1px solid var(--line-2);
  background: var(--surface);
}
.compare > div.self { background: var(--hot-soft); border-right-color: var(--hot-line); }
.compare .nm {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.compare .nm .ctx {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  letter-spacing: 0;
}
.compare .v {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 18px;
  letter-spacing: -0.02em;
}
.compare .vsub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.compare .vsub .delta { color: var(--neg); font-weight: 500; }
.compare .stat-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.compare .stat-row .lbl {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.compare .stat-row .v2 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.compare .stat-row .v2.hot { color: var(--hot); }

/* Transaction log */
.tx-log td.flag { width: 8px; padding: 0; }
.tx-log td.flag span { display: block; width: 3px; height: 28px; margin: 4px 0; }
.tx-log td.code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.tx-log .pre { color: var(--hot); }

/* Building specimen */
.specimen {
  display: grid;
  grid-template-columns: 340px 1fr 380px;
  border-bottom: 1px solid var(--line-2);
}
.specimen__elev {
  border-right: 1px solid var(--line-2);
  background: var(--surface);
  position: relative;
  padding: 32px 24px 24px;
}
.specimen__main {
  padding: 48px 44px;
  border-right: 1px solid var(--line-2);
}
.specimen__side {
  padding: 32px 28px;
  background: var(--surface);
}
.elev-svg { width: 100%; height: 480px; }
.tower-spec {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
  margin-top: 16px;
}
.elev-svg rect.shaft { fill: rgba(20, 20, 20, 0.05); stroke: var(--line-3); stroke-width: 0.8; }
.elev-svg line.floor { stroke: rgba(20, 20, 20, 0.05); stroke-width: 0.5; }
.elev-svg line.floor.mark { stroke: var(--ink-4); stroke-width: 0.8; }
.elev-svg .callout-line { stroke: var(--hot); stroke-width: 0.8; }
.elev-svg .callout {
  font-family: var(--sans);
  font-size: 11px;
  fill: var(--ink);
  font-weight: 500;
}
.elev-svg .callout.mute {
  fill: var(--ink-3);
  font-weight: 400;
}
.elev-svg .crown { fill: var(--hot); }
.elev-svg .ground-text {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: var(--ink-2);
}

/* Floor heatmap */
.floorgrid {
  display: grid;
  gap: 2px;
  font-size: 0;
}
.floorgrid .yrlbl,
.floorgrid .fllbl {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 2px;
  display: flex;
  align-items: center;
  height: 22px;
  line-height: 1;
}
.floorgrid .yrlbl { justify-content: center; }
.floorgrid .fllbl { justify-content: flex-end; padding-right: 10px; }
.floorgrid .fllbl .unit { color: var(--ink-4); margin-left: 8px; }
.floorgrid .cell { height: 22px; background: rgba(20, 20, 20, 0.04); }
.floorgrid .cell.h1 { background: rgba(138, 42, 30, 0.12); }
.floorgrid .cell.h2 { background: rgba(138, 42, 30, 0.24); }
.floorgrid .cell.h3 { background: rgba(138, 42, 30, 0.40); }
.floorgrid .cell.h4 { background: rgba(138, 42, 30, 0.60); }
.floorgrid .cell.h5 { background: rgba(138, 42, 30, 0.80); }

/* Caveats list (building page) */
.caveats {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.caveats li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
}
.caveats li:last-child { border-bottom: 0; }
.caveats li .n {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-4);
}
.caveats li strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* Two-column metadata under a header (replaces inline · lists) */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 28px;
  margin-top: 6px;
}
.meta-row .item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-row .item .k {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.meta-row .item .v {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.meta-row .vr {
  width: 1px;
  background: var(--line-2);
  align-self: stretch;
}

/* ============================================================
   Methodology modal
   ============================================================ */
.method-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-3);
  border-radius: 50%;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  line-height: 1;
}
.method-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface);
}

.method-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.method-modal.open { display: flex; }
.method-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.42);
}
.method-modal__panel {
  position: relative;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line-3);
  padding: 28px 36px 32px;
  box-shadow: 0 28px 72px rgba(20, 20, 20, 0.30);
  margin: 28px;
}
.method-modal__panel header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 20px;
}
.method-modal__panel header .kicker {
  grid-column: 1;
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.method-modal__panel header .m-title {
  grid-column: 1;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.method-modal__panel header .m-close {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  background: transparent;
  border: 0;
  font-size: 26px;
  color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.method-modal__panel header .m-close:hover { color: var(--ink); }

.method-modal__panel section { margin-top: 18px; }
.method-modal__panel section:first-of-type { margin-top: 0; }
.method-modal__panel .m-eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.method-modal__panel .m-what-body {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}
.method-modal__panel .m-sql-body {
  background: var(--bg);
  border: 1px solid var(--line-2);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 0;
  overflow-x: auto;
}
.method-modal__panel .m-sources-list,
.method-modal__panel .m-caveats-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.method-modal__panel .m-sources-list li,
.method-modal__panel .m-caveats-list li { margin: 4px 0; }
.method-modal__panel .m-caveats-list li { padding-left: 4px; }

/* MapLibre canvas anchor — make sure it fills the home map column */
#map { position: absolute; inset: 0; }
.map-wrap.home__map { position: relative; min-height: 600px; }

/* Loading shimmer for KPI placeholders */
.loading {
  background: linear-gradient(90deg,
    var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  color: transparent !important;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Floor / room-month heatmap grid */
.heatmap-grid {
  display: grid;
  gap: 2px;
  font-size: 0;
}
.heatmap-grid .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 3px 6px;
  display: flex;
  align-items: center;
  height: 24px;
}
.heatmap-grid .lbl.row { justify-content: flex-end; }
.heatmap-grid .lbl.col { justify-content: center; }
.heatmap-grid .cell {
  height: 24px;
  background: rgba(20,20,20,0.04);
  position: relative;
}
.heatmap-grid .cell.h1 { background: rgba(138,42,30,0.12); }
.heatmap-grid .cell.h2 { background: rgba(138,42,30,0.24); }
.heatmap-grid .cell.h3 { background: rgba(138,42,30,0.40); }
.heatmap-grid .cell.h4 { background: rgba(138,42,30,0.60); }
.heatmap-grid .cell.h5 { background: rgba(138,42,30,0.78); }

/* ============================================================
   Drill drawer — 2026-05-22 plot-level rebuild
   Slide-in panel anchored to the right edge of the viewport.
   ============================================================ */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 560px;
  max-width: 92vw;
  height: 100vh;
  background: var(--paper);
  border-left: 1px solid var(--line-3);
  box-shadow: -32px 0 64px rgba(20, 20, 20, 0.10),
              -2px 0 0 var(--ink);
  z-index: 60;
  transform: translateX(102%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--sans);
}
.drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0);
  z-index: 55;
  pointer-events: none;
  transition: background 0.42s ease;
}
.drawer-overlay.on {
  background: rgba(20, 20, 20, 0.18);
  pointer-events: auto;
}

.drawer__head {
  flex-shrink: 0;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: relative;
}
.drawer__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, color 0.12s;
}
.drawer__close:hover { border-color: var(--ink); color: var(--ink); }

.drawer__crumb {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer__crumb a {
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 1px dotted var(--line-3);
}
.drawer__crumb a:hover { color: var(--hot); border-color: var(--hot-line); }
.drawer__crumb .sep { color: var(--ink-5); }
.drawer__crumb .here { color: var(--ink); font-weight: 500; border: 0; }

.drawer__title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin: 0 60px 4px 0;
}
.drawer__subtitle {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 6px;
}
.drawer__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hot-soft);
  color: var(--hot);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.drawer__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.drawer__kpi {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.drawer__kpi:last-child { border-right: 0; }
.drawer__kpi-label {
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer__kpi-val {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer__kpi-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  white-space: nowrap;
}
.drawer__kpi-sub .pos { color: var(--pos); }
.drawer__kpi-sub .neg { color: var(--neg); }

.drawer__tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line-2);
  background: var(--paper);
}
.drawer__tab {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: color 0.12s, border-color 0.12s;
  letter-spacing: 0.01em;
}
.drawer__tab:hover { color: var(--ink); }
.drawer__tab.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-5) transparent;
}
.drawer__body::-webkit-scrollbar { width: 8px; }
.drawer__body::-webkit-scrollbar-thumb { background: var(--ink-5); }

.drawer__pane { display: none; padding: 24px 28px 40px; }
.drawer__pane.on { display: block; }

.drawer-section { margin-bottom: 32px; }
.drawer-section:last-child { margin-bottom: 8px; }

.drawer-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.drawer-section__h {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 600;
  margin: 0;
}
.drawer-section__meta {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-3);
}

/* Project list inside drawer */
.proj-list { display: flex; flex-direction: column; }
.proj-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 64px 84px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 12px;
}
.proj-row:hover { background: var(--surface); padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
.proj-row__rank {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.proj-row__name {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-row__name small {
  display: block;
  color: var(--ink-3);
  font-weight: 400;
  font-size: 11px;
  margin-top: 2px;
}
.proj-row__deals {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: right;
}
.proj-row__psm {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: 12.5px;
  text-align: right;
}
.proj-row.matched .proj-row__name small {
  color: var(--hot);
  font-weight: 500;
}
.proj-row.matched .proj-row__rank {
  color: var(--hot);
}

/* Bar chart inside drawer (top projects horizontal bars) */
.proj-bars { display: flex; flex-direction: column; gap: 6px; }
.proj-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  position: relative;
}
.proj-bar-row .bar-track {
  display: block;
  height: 22px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.proj-bar-row .bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--hot);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-bar-row .bar-fill.ready { background: var(--ink-3); }
.proj-bar-row .bar-label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  z-index: 2;
  mix-blend-mode: multiply;
  font-size: 12px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-bar-row .bar-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: 12px;
  text-align: right;
}
.proj-bar-row:hover .bar-fill { filter: brightness(0.92); }

/* Transactions list inside drawer */
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 12.5px;
}
.tx-table th {
  text-align: left;
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.tx-table th.r { text-align: right; }
.tx-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tx-table td.r {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.tx-table td.date {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}
.tx-table td.aed {
  color: var(--ink);
  font-weight: 500;
}
.tx-table td.psm {
  color: var(--ink-3);
}
.tx-table .tag {
  font-family: var(--sans);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  display: inline-block;
  margin-right: 4px;
}
.tx-table .tag.offplan { background: var(--hot-soft); color: var(--hot); }
.tx-table .tag.ready { background: var(--surface); color: var(--ink-3); border: 1px solid var(--line-2); }

/* Sparkline / monthly chart inside drawer */
.spark {
  width: 100%;
  height: 96px;
  display: block;
  background: transparent;
}
.spark .ax { stroke: var(--line); stroke-width: 1; }
.spark .ln { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.spark .area { fill: var(--hot-soft); stroke: none; }
.spark .pt { fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; }
.spark .pt.now { fill: var(--hot); r: 4; }
.spark .lbl { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-4); }

/* Mini histogram (room mix) */
.mix-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  align-items: end;
  height: 88px;
  margin-bottom: 6px;
}
.mix-bars .col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.mix-bars .col .bar {
  width: 100%;
  background: var(--ink-4);
  min-height: 4px;
  transition: background 0.2s;
}
.mix-bars .col.peak .bar { background: var(--hot); }
.mix-bars .col em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.mix-labels {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--ink-3);
  text-align: center;
}

/* Off-plan / ready split bar */
.split-bar {
  display: flex;
  height: 12px;
  background: var(--surface);
  margin: 8px 0 6px;
  position: relative;
  overflow: hidden;
}
.split-bar > div { height: 100%; }
.split-bar .seg.offplan { background: var(--hot); }
.split-bar .seg.ready { background: var(--ink-4); }
.split-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}
.split-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  vertical-align: middle;
}
.split-legend .dot.offplan { background: var(--hot); }
.split-legend .dot.ready { background: var(--ink-4); }

/* Drawer empty/info banner */
.drawer-banner {
  background: var(--surface);
  border-left: 2px solid var(--ink);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 18px;
  line-height: 1.5;
}
.drawer-banner.hot { border-left-color: var(--hot); }
.drawer-banner b { color: var(--ink); font-weight: 600; }

/* Drill state visible on map (highlight current district) */
.maplibregl-canvas-container.drill-mode .maplibregl-canvas {
  cursor: pointer;
}

/* In-map back chip when district selected */
.map-backchip {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--paper);
  border: 1px solid var(--line-3);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  display: none;
  z-index: 25;
  box-shadow: 0 4px 16px rgba(20, 20, 20, 0.10);
  transition: border-color 0.12s, background 0.12s;
  gap: 6px;
  align-items: center;
}
.map-backchip.on { display: inline-flex; }
.map-backchip:hover { border-color: var(--ink); background: var(--surface); }
.map-backchip__arrow { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* Plot tooltip — richer than the polygon tip */
.plot-tip {
  position: absolute;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  z-index: 24;
  display: none;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.16);
}
.plot-tip.show { display: block; }
.plot-tip h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.plot-tip .meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.plot-tip .row {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11.5px;
}
.plot-tip .row span:last-child {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.plot-tip .footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
}
.plot-tip .footer .hot { color: var(--hot); font-weight: 500; }
.plot-tip .matched-pill {
  display: inline-block;
  background: var(--hot-soft);
  color: var(--hot);
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Coverage badge on drawer head when district selected */
.coverage-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 3px 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-left: 8px;
  vertical-align: middle;
}

/* Loader inside drawer */
.drawer-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  gap: 10px;
}
.drawer-loader .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: lo 1.2s ease-in-out infinite both;
}
.drawer-loader .dot:nth-child(2) { animation-delay: 0.15s; }
.drawer-loader .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes lo {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Boost map z-index relative to side panel when drawer is open */
.drawer-open .home__side { opacity: 0.4; pointer-events: none; transition: opacity 0.2s; }

/* Density tile (compact grid of small tiles for visual stat texture) */
.density-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 2px;
  margin: 8px 0 12px;
}
.density-grid .tile {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
}
.density-grid .tile.h1 { background: rgba(20, 20, 20, 0.12); }
.density-grid .tile.h2 { background: rgba(138, 42, 30, 0.30); }
.density-grid .tile.h3 { background: rgba(138, 42, 30, 0.55); }
.density-grid .tile.h4 { background: var(--hot); }

/* Mobile (drawer goes full-width) */
@media (max-width: 760px) {
  .drawer { width: 100vw; max-width: 100vw; }
  .drawer__kpis { grid-template-columns: repeat(2, 1fr); }
  .drawer__kpi:nth-child(2) { border-right: 0; }
  .drawer__kpi:nth-child(odd) { border-right: 1px solid var(--line); }
}
