:root {
  --bg: #0f1720;
  --panel: #16212c;
  --panel-alt: #1c2a37;
  --border: #2a3947;
  --text: #e8edf2;
  --text-dim: #93a3b0;
  --accent: #3fb9ae;
  --accent-soft: rgba(63, 185, 174, 0.15);
  --up: #e2735e;
  --down: #6fbf73;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #06211e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brand-name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.sample-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f3b23e;
  border: 1px solid rgba(243, 178, 62, 0.4);
  background: rgba(243, 178, 62, 0.12);
  padding: 3px 7px;
  border-radius: 5px;
}

.search-wrap {
  flex: 1;
  max-width: 420px;
}

#search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

#search:focus {
  border-color: var(--accent);
}

.body {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.property-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.property-list li {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.property-list li:hover,
.property-list li.active {
  background: var(--panel-alt);
}

.pl-address {
  font-size: 13.5px;
  font-weight: 600;
}

.pl-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
}

.map-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

#map {
  position: absolute;
  inset: 0;
}

.detail-panel {
  /* Wider than the 340px it started at: the panel now carries seven sections
     plus an aerial view, and 340 made every one of them wrap. */
  width: 420px;
  flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  padding: 18px;
  overflow-y: auto;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover { color: var(--text); }

.aerial-wrap {
  position: relative;
  margin: -18px -18px 16px;
  height: 220px;
  background: var(--panel-alt);
  overflow: hidden;
}

#aerialMap {
  position: absolute;
  inset: 0;
}

.aerial-credit {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
  pointer-events: none;
}

.detail-address {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 2px;
  padding-right: 24px;
}

.detail-neighborhood {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 4px;
}

.detail-lot {
  color: var(--text-dim);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  flex: 1;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 18px 0 10px;
}

.sale-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.sale-row:last-child { border-bottom: none; }

.sale-date { color: var(--text-dim); font-size: 13px; }
.sale-price { font-weight: 700; font-size: 14px; }
.sale-delta { font-size: 11px; margin-left: 6px; }
.sale-delta.up { color: var(--up); }
.sale-delta.down { color: var(--down); }

.trend-chart-v2 {
  position: relative;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px 4px;
  margin-bottom: 16px;
}

.trend-unavailable {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.trend-unavailable-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}

.trend-unavailable-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.trend-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  z-index: 1;
}

.trend-badge.up { color: var(--up); background: rgba(226, 115, 94, 0.12); }
.trend-badge.down { color: var(--down); background: rgba(111, 191, 115, 0.12); }

.trend-line-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.trend-grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.trend-axis-label {
  font-size: 8.5px;
  fill: var(--text-dim);
}

.trend-point-label {
  font-size: 9px;
  font-weight: 700;
  fill: var(--text);
}

.trend-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trend-dot {
  fill: var(--accent);
  stroke: var(--panel-alt);
  stroke-width: 1.5;
}

.source-note {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.maplibregl-popup-content {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
}

.maplibregl-popup-tip {
  border-top-color: var(--panel) !important;
  border-bottom-color: var(--panel) !important;
}

.marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #06211e;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(63, 185, 174, 0.25);
}

.marker.active {
  background: #f3b23e;
  box-shadow: 0 0 0 4px rgba(243, 178, 62, 0.3);
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .detail-panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 20; }
}

/* ---- Zoning ---- */
.zoning-loading { color: var(--text-dim); font-size: 13px; padding: 10px 0; }

.zoning-block {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  margin-bottom: 10px;
}

.zoning-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.zoning-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.zoning-code {
  font-size: 15px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}

.zoning-code.zoning-flag { color: #f3b23e; }

.zoning-desc { font-size: 13px; margin-top: 3px; }

.zoning-provenance {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 7px;
  line-height: 1.45;
}

.zoning-provenance a { color: var(--accent); }

.zoning-bylaw {
  display: block;
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.zoning-bylaw:hover { text-decoration: underline; }

.zoning-note {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.5;
}

.zoning-unavailable { font-size: 13px; font-weight: 600; }

.zoning-caveat {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 2px 0 14px;
}

/* ---- Comparables & area analytics ---- */
.comp-block {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 13px;
  margin-bottom: 14px;
}

.comp-summary { display: flex; gap: 14px; margin-bottom: 8px; }
.comp-summary > div { flex: 1; }
.comp-headline { font-size: 16px; font-weight: 700; margin-top: 2px; }

.comp-delta {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.comp-delta.up { color: var(--up); background: rgba(226, 115, 94, 0.12); }
.comp-delta.down { color: var(--down); background: rgba(111, 191, 115, 0.12); }

.comp-callout {
  font-size: 12px;
  line-height: 1.55;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(63, 185, 174, 0.08);
  border-left: 3px solid var(--accent);
  margin-bottom: 10px;
}
.comp-callout-flag {
  background: rgba(243, 178, 62, 0.1);
  border-left-color: #f3b23e;
}

.comp-list { border-top: 1px solid var(--border); margin-top: 4px; }

.comp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.comp-row:last-child { border-bottom: none; }
.comp-addr { font-size: 12.5px; font-weight: 600; }
.comp-meta { font-size: 11px; color: var(--text-dim); grid-column: 1; }
.comp-val { font-size: 12.5px; font-weight: 700; grid-row: 1 / span 2; align-self: center; }

.area-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
}
.area-value { font-size: 15px; font-weight: 700; }
.area-value.up { color: var(--up); }
.area-value.down { color: var(--down); }

/* ---- About link + the inline assessed-value explainer ---- */
.topbar-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.topbar-link:hover { color: var(--text); border-color: var(--accent); }

/* Placed directly above the value trend: this is where a reader decides the
   numbers are wrong, so the explanation has to be here rather than only on a
   page they would have to go looking for. */
.assessed-note {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-dim);
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 9px 11px;
  margin-bottom: 4px;
}

.assessed-note strong { color: var(--text); }
.assessed-note a { color: var(--accent); font-weight: 600; }

.sale-history {
  border-radius: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 16px;
}

.sale-history-empty {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}

.sale-history-lead {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.sale-history-lot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.sale-history-lot-label {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sale-history-lot-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 12px;
}

/* Expanded list of a many-lot property: keep it scrollable rather than letting
   it push the rest of the panel away. One property carries 1,942 lots. */
.sale-history-lot-value-all {
  max-height: 140px;
  overflow-y: auto;
  font-size: 13px;
  font-weight: 600;
}

.sale-history-more {
  display: block;
  width: 100%;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-dim);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.15s, color 0.15s;
}

.sale-history-more:hover,
.sale-history-more:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.sale-history-copy {
  margin-left: auto;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.sale-history-copy:hover,
.sale-history-copy:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.sale-history-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 11px 13px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s;
}

.sale-history-link:hover,
.sale-history-link:focus-visible {
  border-color: var(--accent);
}

.sale-history-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}

.gap-block {
  border-radius: 8px;
  border: 1px dashed var(--border);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.gap-row {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.gap-row:first-child { padding-top: 0; }

.gap-row:last-of-type {
  border-bottom: none;
  padding-bottom: 4px;
}

.gap-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.gap-reason {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.gap-footnote {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}

.ownership {
  border-radius: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.ownership-line {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.ownership-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}

/* Language toggle. Reads as the language you would switch TO, which is the
   convention a bilingual reader expects -- a button saying "English" while the
   page is already English is the common way to get this wrong. */
.lang-toggle {
  padding: 6px 12px;
  margin-right: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* The headline: five blocks carrying a reader from the assessed value to a
   filed review. Separate cards rather than one merged panel, so each answers
   one question and can be skipped; short by default, with the reasoning behind
   a "why this number" line inside the block that needs it. */
.headline { margin: 14px 0 6px; }

.hl {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.hl-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.hl-figure { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--text); }
.hl-figure span { font-size: 12.5px; font-weight: 400; color: var(--text-dim); }
.hl-figure-sm { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text); }
.hl-figure-muted { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.hl-muted { border-style: dashed; }
.hl-note { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: var(--text-dim); }

.hl-assessment { border-color: var(--accent); }
.hl-assessment .hl-figure { color: var(--accent); }

/* Over and under read differently, but neither shouts: this is a comparison of
   assessments, not a finding that someone has been wronged. */
.hl-over { color: var(--accent); }
.hl-under { color: var(--text-dim); }
.hl-verdict-more { border-color: var(--accent); }

/* The call to action is advice, not data, so it is deliberately a different
   surface from the figure cards -- filled rather than outlined, and warm rather
   than the teal used everywhere else. */
.hl-action {
  background: rgba(243, 178, 62, 0.10);
  border: 1px solid #f3b23e;
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.hl-action-title { font-size: 13px; font-weight: 700; color: #f3b23e; margin-bottom: 4px; }
.hl-action-body { font-size: 11.5px; line-height: 1.55; color: var(--text); }
.hl-action-calm { background: transparent; border-color: var(--border); }
.hl-action-calm .hl-action-title { color: var(--text); }

/* The filing block. The two controls come first and the steps after, because a
   reader who already knows the process should not have to scroll past it. */
.hl-file { border-color: var(--accent); }
.hl-file-primary,
.hl-file-copy {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  border-radius: 7px;
  cursor: pointer;
}
.hl-file-primary { background: var(--accent); color: #06211e; border: 1px solid var(--accent); }
.hl-file-copy { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.hl-file-copy:hover { background: var(--panel); }
.hl-file-copied { background: var(--accent); color: #06211e; }

.hl-file-steps { margin-top: 10px; display: grid; gap: 6px; }
.hl-file-steps div { font-size: 11.5px; line-height: 1.5; color: var(--text-dim); }
.hl-file-steps strong { color: var(--text); }

/* What the roll records. The only block whose value comes from the reader
   knowing something the app does not, so it reads as a checklist rather than a
   finding. */
.hl-facts-soft { border-color: #f3b23e; }

.facts-list { margin-top: 9px; border-top: 1px solid var(--border); }
.facts-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
}
.facts-row:last-child { border-bottom: none; }
.facts-label { color: var(--text-dim); }
.facts-value { color: var(--text); font-weight: 600; text-align: right; }
.facts-note-inline { font-weight: 400; color: #f3b23e; }

.facts-flag {
  margin-top: 9px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
  background: rgba(243, 178, 62, 0.10);
  border-left: 3px solid #f3b23e;
  border-radius: 5px;
}

/* Points supporting a challenge. Present only when the checks found
   something, so it carries weight when it does appear. */
.hl-evidence { border-color: #f3b23e; }

.ev-ref {
  padding: 9px 11px;
  margin-bottom: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text);
  background: rgba(243, 178, 62, 0.10);
  border-left: 3px solid #f3b23e;
  border-radius: 5px;
}

.ev-list { display: grid; gap: 9px; }
.ev-item { border-left: 2px solid var(--border); padding-left: 10px; }
.ev-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ev-detail { font-size: 11px; line-height: 1.55; color: var(--text-dim); }

/* The properties the verdict rests on. Shown on request rather than by
   default: a reader who accepts the number should not have to scroll a table
   to get past it, and one who doubts it should be able to see every row. */
.cmp-details { margin-top: 9px; }
.cmp-toggle {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 7px 9px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-align: center;
}
.cmp-toggle::-webkit-details-marker { display: none; }
.cmp-toggle:hover { background: var(--panel); }
.cmp-details[open] .cmp-toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.cmp-body { border: 1px solid var(--accent); border-top: none; border-radius: 0 0 6px 6px; }

.cmp-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
}

.cmp-list { display: flex; flex-direction: column; }

/* A button, not a div: these navigate, so they should be reachable by keyboard
   and announce themselves as actionable. */
.cmp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "addr val" "meta diff";
  gap: 1px 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  font-family: inherit;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.cmp-row:hover { background: var(--panel); }
.cmp-addr { grid-area: addr; font-size: 12px; color: var(--text); }
.cmp-meta { grid-area: meta; font-size: 10.5px; color: var(--text-dim); }
.cmp-val  { grid-area: val; font-size: 12px; font-weight: 600; color: var(--text); text-align: right; }
.cmp-diff { grid-area: diff; font-size: 10.5px; text-align: right; color: var(--text-dim); }
.cmp-higher .cmp-diff { color: var(--text-dim); }
.cmp-lower  .cmp-diff { color: var(--accent); }

.cmp-foot {
  padding: 8px 10px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* "Why this number" -- the caveats that make a figure honest, available without
   making every card a paragraph. */
.hl-why { margin-top: 8px; }
.hl-why summary {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.hl-why summary::-webkit-details-marker { display: none; }
.hl-why summary::before { content: "› "; display: inline-block; transition: transform 0.15s ease; }
.hl-why[open] summary::before { transform: rotate(90deg); }
.hl-why-body {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-dim);
}
.hl-why-body a { color: var(--accent); }
/* The form explainer runs to several short paragraphs; without spacing they
   read as one block and defeat the point of explaining anything. */
.hl-why-body p { margin: 0 0 7px; }
.hl-why-body p:last-child { margin-bottom: 0; }
.hl-why-body strong { color: var(--text); }
.hl-why-body em { color: var(--text); font-style: italic; }

/* Separates the headline group from the detail sections, so the panel reads as
   "the answer, then the evidence" rather than one undifferentiated list. */
.detail-more-label {
  margin: 20px 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.review {
  border-radius: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.review-line {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
}

/* The deadline is the one thing a reader must not skim past, so it gets the
   accent rule the value-trend gap notice uses rather than sitting as one more
   paragraph. */
.review-deadline {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.review-deadline-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.review-deadline-body {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}

.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 11px;
}

.review-links a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.review-links a:hover { text-decoration: underline; }

.review-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}

.char-block {
  border-radius: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 4px 14px 10px;
  margin-bottom: 16px;
}

.char-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.char-row:last-child { border-bottom: none; }

.char-label {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.char-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.char-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

/* Collapsible panel sections. Native <details>, so the disclosure is
   keyboard-operable and announced without any script. */
.sec {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--panel-alt);
  overflow: hidden;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s;
}

.sec-head::-webkit-details-marker { display: none; }
.sec-head:hover { background: rgba(255, 255, 255, 0.03); }

.sec-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sec-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

/* The answer, so the collapsed row is worth reading on its own. */
.sec-summary {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sec-chevron {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.15s;
}

.sec[open] > .sec-head > .sec-chevron { transform: rotate(-90deg); }

.sec[open] > .sec-head {
  border-bottom: 1px solid var(--border);
}

.sec-body { padding: 12px 13px 4px; }

/* Sections bring their own frame now, so inner blocks drop theirs. */
.sec-body .sale-history,
.sec-body .ownership,
.sec-body .char-block,
.sec-body .zoning-block {
  border: none;
  background: transparent;
  padding: 0;
  margin-bottom: 8px;
}

.sec-body .section-title:first-child { margin-top: 0; }

.detail-category {
  color: var(--accent);
  font-weight: 600;
}

/* Assessed-value breakdown. Bars rather than bare figures: the ratio is the
   insight, and two dollar amounts side by side read like a price. */
.vb-row { margin-bottom: 14px; }

.vb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}

.vb-label {
  font-size: 12.5px;
  color: var(--text);
}

.vb-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.vb-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--panel);
  overflow: hidden;
}

.vb-fill { height: 100%; border-radius: 3px; }
.vb-fill-land { background: var(--accent); }
.vb-fill-building { background: #f3b23e; }

.vb-pct {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.vb-total {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.vb-note {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* The caveat sits inside a section now, under the figure it qualifies, so it
   needs a separator above it rather than the standalone card treatment it had
   at the top of the panel. */
.assessed-note-inline {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
}
