:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --panel-soft: #eef3f1;
  --ink: #17221f;
  --muted: #66746f;
  --line: #d8e0dd;
  --green: #087766;
  --green-2: #dff2ec;
  --coral: #d16a4a;
  --coral-2: #f4e3dd;
  --blue: #2f6f9f;
  --blue-2: #e0ebf3;
  --gold: #b89435;
  --gold-2: #f0ead7;
  --violet: #665f99;
  --sidebar-bg: #0e1f1c;
  --sidebar-muted: #aebdb8;
  --shadow: 0 8px 26px rgba(20, 31, 28, 0.07);
  --radius: 8px;
  --sidebar: 286px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 0;
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: white;
  color: var(--sidebar-bg);
  font-weight: 800;
}

.sidebar .brand-kicker {
  color: #7fe2cd;
}

.sidebar .brand h1 {
  color: white;
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.language-control,
.filter-row,
.compare-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-btn,
.filter-btn,
.ghost-btn,
.primary-btn {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 9px 13px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.lang-btn:hover,
.filter-btn:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.lang-btn.active,
.filter-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.sidebar .lang-btn {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

.sidebar .lang-btn.active {
  background: white;
  color: var(--sidebar-bg);
  border-color: white;
}

.primary-btn {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-weight: 750;
}

.ghost-btn {
  background: #fbfcfa;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-muted);
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.source-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.source-note span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.source-note strong {
  font-size: 0.96rem;
}

.main {
  padding: 24px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.toolbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.toolbar h2 {
  margin: 0;
  font-size: 1.72rem;
  line-height: 1.2;
  max-width: 740px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box input,
select,
.map-controls input,
.lead-form input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  outline: none;
}

.search-box input {
  width: 270px;
}

.search-box input:focus,
select:focus,
.lead-form input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(17, 115, 95, 0.12);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 132px;
  padding: 17px;
  display: grid;
  align-content: space-between;
  border-left-width: 5px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card strong {
  font-size: 1.9rem;
  line-height: 1.1;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.heatmap-panel {
  display: grid;
  gap: 14px;
}

.data-alert {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #cfe2dc;
  border-radius: var(--radius);
  background: #f7fbf9;
}

.data-alert strong {
  color: var(--green);
}

.data-alert p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.heatmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.map-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e8eeec;
}

.leaflet-map,
.google-map,
.fallback-heat-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.leaflet-map {
  z-index: 1;
}

.leaflet-map .leaflet-tile-pane {
  filter: grayscale(0.15) saturate(0.62) contrast(1.04) brightness(1.03);
}

.leaflet-map.is-hidden {
  display: none;
}

.google-map {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.google-map.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 4;
}

.fallback-heat-canvas {
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.fallback-heat-canvas.is-hidden {
  display: none;
}

.google-heat-canvas {
  mix-blend-mode: multiply;
}

.leaflet-heat-canvas {
  mix-blend-mode: multiply;
  pointer-events: none;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-tooltip {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font: 12px/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
}

.leaflet-zone-tooltip {
  padding: 8px 10px;
  border-color: rgba(8, 119, 102, 0.22);
  background: rgba(255, 255, 255, 0.96);
  font-weight: 750;
}

.map-zone-label-wrap {
  pointer-events: none;
}

.map-zone-label {
  min-width: 118px;
  padding: 6px 8px 7px;
  border: 1px solid rgba(8, 119, 102, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(20, 31, 28, 0.13);
  text-align: center;
}

.map-zone-label span,
.map-zone-label strong,
.map-zone-label em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-zone-label span {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 900;
}

.map-zone-label strong {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.2;
}

.map-zone-label small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 750;
}

.map-zone-label em {
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
}

.map-price-label-wrap {
  pointer-events: none;
}

.map-price-label {
  min-width: 128px;
  padding: 7px 9px;
  border: 1px solid rgba(216, 224, 221, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(20, 31, 28, 0.14);
}

.map-price-label span,
.map-price-label em,
.map-price-label strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-price-label span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
}

.map-price-label strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
}

.map-price-label small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
}

.map-price-label em {
  color: var(--green);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 850;
}

.map-fallback {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  max-width: min(360px, calc(100% - 36px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.map-fallback.is-hidden {
  display: none;
}

.map-fallback strong,
.map-fallback span {
  display: block;
}

.map-fallback strong {
  margin-bottom: 4px;
}

.map-fallback span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.88rem;
}

.map-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.map-mode-copy {
  display: grid;
  gap: 8px;
}

.map-mode-copy strong {
  font-size: 1.02rem;
}

.map-mode-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.metric-buttons {
  display: grid;
  gap: 8px;
}

.metric-btn {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  padding: 11px 12px;
  display: grid;
  gap: 3px;
  align-content: center;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.metric-btn span {
  font-weight: 850;
  font-size: 0.96rem;
}

.metric-btn small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.metric-btn:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.metric-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.metric-btn.active small {
  color: rgba(255, 255, 255, 0.78);
}

.map-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.map-controls input,
.map-controls select {
  width: 100%;
}

.map-controls input[type="file"] {
  padding: 8px;
  background: #fbfcfa;
}

.map-stats {
  display: grid;
  gap: 10px;
}

.map-stats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.map-stats strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.map-current-card,
.map-leader-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.map-current-card p,
.map-leader-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.map-leader-card {
  background: var(--green-2);
  border-color: #c3ded6;
}

.map-leader-card strong {
  color: var(--green);
  font-size: 1.06rem;
}

.map-leader-card p {
  color: var(--ink);
  font-weight: 850;
}

.map-ranking {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.map-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-ranking-head span {
  margin: 0;
  font-size: 0.78rem;
}

.map-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0 8px;
  border-top: 1px solid rgba(216, 224, 221, 0.75);
}

.map-rank-row div {
  min-width: 0;
}

.map-rank-row span {
  margin: 0 0 2px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
}

.map-rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-rank-row em {
  align-self: end;
  color: var(--ink);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.map-rank-row i {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--coral));
}

.heat-scale {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.heat-scale span {
  margin: 0;
}

.heat-scale b {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(8, 119, 102, 0.32), rgba(184, 148, 53, 0.78), rgba(201, 93, 66, 0.95));
}

.map-message,
.map-note {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.5;
}

.map-message {
  color: var(--green);
  font-weight: 800;
}

.map-note {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.price-board {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.price-board-head {
  display: grid;
  gap: 5px;
}

.price-board-head strong {
  font-size: 1.02rem;
}

.price-board-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.product-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.product-tab {
  min-height: 38px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
}

.product-tab.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.price-benchmark-list {
  display: grid;
  gap: 9px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.price-benchmark-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.price-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.price-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.price-card-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

.price-card-head span {
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
}

.price-card-head b {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  font-size: 0.76rem;
  white-space: nowrap;
}

.price-main {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.05;
}

.price-main span {
  display: inline;
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.price-benchmark-card dl {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 8px;
  margin: 0;
}

.price-benchmark-card dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.price-benchmark-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.price-depth {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
}

.price-depth span {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.price-depth i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.price-depth b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.accent-green {
  border-left-color: var(--green);
}

.accent-coral {
  border-left-color: var(--coral);
}

.accent-blue {
  border-left-color: var(--blue);
}

.accent-gold {
  border-left-color: var(--gold);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h3,
.panel h4 {
  margin: 0;
}

.panel h3 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.panel h4 {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}

.zone-map {
  position: relative;
  height: 365px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 74% 41%, rgba(226, 235, 246, 0.95), transparent 28%),
    linear-gradient(140deg, #eaf2f1 0%, #e5f0ec 46%, #f9f6ee 46%, #f0eadc 100%);
  border: 1px solid var(--line);
}

.water-band {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 40%, rgba(66, 110, 166, 0.18) 40% 54%, transparent 54%),
    radial-gradient(circle at 70% 22%, rgba(66, 110, 166, 0.22), transparent 23%);
}

.map-base {
  position: absolute;
  left: 9%;
  bottom: -20%;
  width: 62%;
  height: 52%;
  transform: rotate(-9deg);
  border-radius: 55% 50% 35% 44%;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(24, 33, 29, 0.08);
}

.zone-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 3px solid #fff;
  background: var(--blue);
  color: white;
  box-shadow: 0 10px 26px rgba(24, 33, 29, 0.18);
}

.zone-marker span {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  padding: 4px 8px;
  white-space: nowrap;
  pointer-events: none;
}

.zone-marker.hot {
  background: var(--coral);
  min-width: 58px;
  min-height: 58px;
}

.zone-marker.warm {
  background: var(--green);
  min-width: 52px;
  min-height: 52px;
}

.zone-marker.cool {
  background: var(--gold);
}

.zone-marker.active {
  outline: 4px solid rgba(17, 115, 95, 0.2);
}

.map-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.legend-dot.hot {
  background: var(--coral);
}

.legend-dot.warm {
  background: var(--green);
}

.legend-dot.cool {
  background: var(--gold);
}

.score {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 1.18rem;
}

.facts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.facts-list div {
  min-height: 78px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.facts-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.facts-list dd {
  margin: 0;
  font-weight: 800;
}

.split-copy {
  display: grid;
  gap: 12px;
}

.split-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-item {
  display: grid;
  grid-template-columns: 130px minmax(120px, 1fr) 72px;
  align-items: center;
  gap: 10px;
}

.bar-label {
  font-size: 0.85rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 14px;
  background: var(--panel-soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--coral));
}

.bar-value {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.comparison-panel {
  min-height: 290px;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  font-size: 0.84rem;
}

.compare-chip input {
  accent-color: var(--green);
}

.radar-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.radar-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 10px;
}

.radar-name {
  color: var(--muted);
  font-size: 0.82rem;
}

.radar-bars {
  display: grid;
  gap: 6px;
}

.mini-bar {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
}

.mini-track {
  height: 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--violet);
}

.project-panel {
  display: grid;
  gap: 14px;
}

.transaction-panel {
  display: grid;
  gap: 14px;
}

.listing-panel {
  display: grid;
  gap: 14px;
  border-left: 5px solid var(--green);
}

.listing-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  align-items: start;
}

.listing-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.listing-copy strong {
  font-size: 1.02rem;
}

.listing-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.listing-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-form .full-span,
.listing-form button,
.listing-form .privacy-note,
.listing-form .form-message {
  grid-column: 1 / -1;
}

.privacy-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.transaction-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1.15fr) minmax(98px, 0.36fr) minmax(160px, 0.7fr) minmax(140px, 0.55fr) minmax(140px, 0.55fr);
  gap: 10px;
  align-items: end;
}

.transaction-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.transaction-toolbar input,
.transaction-toolbar select {
  width: 100%;
}

.transaction-search-btn {
  min-height: 43px;
  width: 100%;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.segment-btn {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 800;
}

.segment-btn:last-child {
  border-right: 0;
}

.segment-btn.active {
  background: var(--ink);
  color: white;
}

.transaction-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.transaction-summary div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.transaction-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.transaction-summary strong {
  font-size: 1.08rem;
}

.transaction-table-wrap table {
  min-width: 980px;
}

.transaction-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.transaction-type.primary {
  background: var(--green-2);
  color: var(--green);
}

.transaction-type.resale {
  background: var(--coral-2);
  color: var(--coral);
}

.transaction-unit {
  display: grid;
  gap: 3px;
}

.transaction-unit strong {
  color: var(--green);
}

.transaction-unit span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #fbfcfa;
  font-size: 0.78rem;
  font-weight: 800;
}

td {
  font-size: 0.9rem;
  line-height: 1.45;
}

tr:last-child td {
  border-bottom: 0;
}

.project-name {
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
}

.project-score {
  display: inline-flex;
  width: 42px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--green-2);
  color: var(--green);
  font-weight: 850;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
}

.brief-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.brief-controls label,
.lead-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.brief-controls select,
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
}

textarea {
  width: 100%;
  min-height: 184px;
  resize: vertical;
  line-height: 1.6;
}

.brief-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.lead-form {
  display: grid;
  gap: 12px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 750;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-grid a {
  min-height: 74px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  text-decoration: none;
  color: var(--green);
  font-weight: 750;
  line-height: 1.35;
}

.source-grid a:hover {
  border-color: var(--green);
}

.disclaimer {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .heatmap-layout,
  .listing-grid,
  .brief-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand,
  .language-control,
  .source-note,
  .main,
  .toolbar,
  .tool-actions,
  .metric-grid,
  .dashboard-grid,
  .brief-grid,
  .panel {
    min-width: 0;
    max-width: 100%;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .nav-list a {
    white-space: nowrap;
  }

  .source-note {
    margin-top: 0;
  }

  .main {
    padding: 16px;
    width: 100%;
    overflow: hidden;
  }

  .toolbar h2 {
    font-size: 1.36rem;
  }

  .search-box input {
    width: min(100%, 340px);
  }

  .metric-grid,
  .facts-list,
  .brief-controls,
  .listing-form,
  .map-stats,
  .transaction-toolbar,
  .transaction-summary,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 430px;
  }

  .zone-map {
    height: 330px;
  }

  .bar-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-value {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .brand {
    align-items: flex-start;
  }

  .tool-actions,
  .tool-actions select,
  .search-box,
  .search-box input {
    width: 100%;
  }

  .metric-card strong {
    font-size: 1.55rem;
  }

  .map-stage {
    min-height: 360px;
  }

  .panel-header {
    flex-direction: column;
  }

  .zone-marker span {
    font-size: 0.68rem;
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .zone-marker.hot {
    min-width: 48px;
    min-height: 48px;
  }

  .zone-marker.warm {
    min-width: 44px;
    min-height: 44px;
  }
}
