:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --teal: var(--accent);
  --teal-dark: var(--accent-dark);
  --amber: #f59e0b;
  --red: #dc2626;
  --green: #059669;
  --border: var(--line);
  --shadow: 0 1px 3px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-data: "Inter", ui-rounded, "SF Pro Rounded", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  font-feature-settings: "kern";
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 36px 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.topbar.is-landing {
  min-height: min(660px, 62vh);
  align-content: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  background: var(--bg);
}

.topbar.is-landing #municipalIndexLine {
  display: none;
}

.topbar.is-report {
  justify-items: stretch;
  padding: 10px 22px 8px;
  background: rgba(248, 250, 252, 0.94);
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 720;
}

h3 {
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--accent);
  font-weight: 620;
}

h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.stats-line,
.subtle {
  color: var(--muted);
  font-size: 13px;
}

.brand-block {
  display: grid;
  gap: 9px;
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
}

.hero-copy {
  max-width: 720px;
  color: #94a3b8;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.42;
  font-weight: 430;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--line);
}

.hero-badge-ai {
  background: #eef2ff;
  color: var(--accent);
  border-color: #c7d2fe;
}

.hero-badge svg {
  flex-shrink: 0;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  width: min(900px, 100%);
}

.topbar.is-report .searchbar {
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px) 132px;
  align-items: center;
  width: min(1160px, 100%);
}

.topbar.is-report .brand-block {
  grid-column: auto;
  justify-items: start;
  text-align: left;
  gap: 2px;
}

.topbar.is-report .hero-copy,
.topbar.is-report #municipalIndexLine,
.topbar.is-report .hero-badges {
  display: none;
}

.topbar.is-report h1 {
  font-size: 17px;
}

.topbar.is-report .stats-line {
  display: none;
}

.topbar.is-report .search-status {
  grid-column: auto;
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-field {
  display: grid;
  gap: 5px;
}

.searchbar input {
  min-width: 0;
  height: 56px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  outline: none;
  font-size: 16px;
}

.topbar.is-report .searchbar input {
  height: 42px;
  font-size: 14px;
}

.searchbar input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.searchbar button,
.secondary-button {
  height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--teal);
  color: white;
  font-weight: 700;
}

.topbar.is-report .searchbar button {
  height: 42px;
}

.searchbar button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.search-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.data-status {
  opacity: 0.82;
}

.searchbar.is-loading input {
  background-image: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.06), transparent);
  background-size: 220% 100%;
  animation: search-sheen 1.1s ease-in-out infinite;
}

@keyframes search-sheen {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

.secondary-button {
  background: #f1f5f9;
  color: var(--ink);
  border: 1px solid var(--line);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.topbar.is-landing + .workspace {
  margin-top: -34px;
}

.results-panel {
  position: fixed;
  top: var(--results-top, 140px);
  left: var(--results-left, 14px);
  z-index: 10;
  width: var(--results-width, min(760px, calc(100% - 28px)));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr;
  max-height: min(520px, calc(100vh - var(--results-top, 140px) - 16px));
  overflow: hidden;
}

.topbar.is-report + .workspace .results-panel {
  width: var(--results-width, min(620px, calc(100% - 28px)));
}

.results-panel:not(.is-open) {
  display: none;
}

.panel-heading,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.results-list {
  overflow: auto;
  min-height: 0;
  transition: opacity 160ms ease;
  background:
    linear-gradient(var(--surface) 30%, transparent),
    linear-gradient(transparent, var(--surface) 70%) 0 100%,
    radial-gradient(farthest-side at 50% 0, rgba(15,23,42,0.08), transparent),
    radial-gradient(farthest-side at 50% 100%, rgba(15,23,42,0.08), transparent) 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 24px, 100% 24px, 100% 8px, 100% 8px;
  background-attachment: local, local, scroll, scroll;
}

.results-list.is-refreshing {
  opacity: 0.56;
}

.result-item {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition: background 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
}

.result-item:hover {
  background: #f1f5f9;
}

.result-item.active {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.result-title {
  font-weight: 760;
  line-height: 1.25;
}

.result-meta,
.result-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--teal-dark);
  padding: 1px 7px;
  font-weight: 850;
}

.result-group {
  border-bottom: 1px solid var(--line);
}

.unit-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.unit-choice-list button {
  display: grid;
  grid-template-columns: minmax(78px, 0.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.unit-choice-list button:hover {
  border-color: var(--teal);
}

.unit-choice-list button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.unit-choice-list span {
  color: var(--teal-dark);
  font-weight: 900;
}

.unit-choice-list small {
  color: var(--muted);
}

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

.report-loading,
.empty-state {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 0;
  text-align: left;
  color: var(--ink);
  padding-bottom: 32px;
}

.report-setup {
  display: grid;
  justify-items: center;
  padding: 26px 0;
}

.setup-card {
  width: min(900px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.setup-heading {
  display: grid;
  gap: 7px;
}

.setup-heading span,
.setup-subtitle,
.assumption-summary span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.setup-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.setup-heading p,
.setup-property p,
.assumption-summary p,
.setup-note {
  color: var(--muted);
}

.setup-property {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.05);
  padding: 14px;
}

.setup-property div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.setup-property span {
  color: var(--teal-dark);
  font-weight: 900;
}

.setup-property strong {
  font-size: 18px;
}

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

.setup-grid label,
.unit-row label {
  display: grid;
  gap: 6px;
}

.setup-grid label > span,
.unit-row label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.setup-grid select,
.unit-row select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 11px;
}

.setup-inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 12px;
}

.setup-inline-check input {
  width: 18px;
  height: 18px;
}

.setup-units {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.unit-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr);
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  padding: 12px;
}

.unit-row strong {
  padding-bottom: 10px;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.setup-actions button,
.assumption-summary button {
  min-height: 44px;
  border: 1px solid var(--teal);
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
}

.setup-actions .secondary-button,
.assumption-summary button {
  background: var(--surface-strong);
  color: var(--teal-dark);
  border-color: var(--line);
}

.assumption-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.05);
  padding: 14px;
}

.assumption-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.assumption-summary p {
  grid-column: 1 / -1;
  font-size: 14px;
}

/* --- Landing page multi-section layout --- */

.landing-section {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.landing-section:first-child {
  border-top: none;
}

.section-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: center;
}

.section-inner-center {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-text h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-inner-center h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-text p,
.section-inner-center > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 520px;
}

/* Report mockup */
/* Property showcase card */
.section-showcase {
  border-top: none;
  padding-top: 24px;
}

.showcase-card {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.showcase-property {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.showcase-address {
  display: flex;
  align-items: center;
  gap: 12px;
}

.showcase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.showcase-street {
  font-size: 17px;
  font-weight: 720;
}

.showcase-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.showcase-col {
  padding: 20px 22px;
}

.showcase-col:first-child {
  border-right: 1px solid var(--line);
}

.showcase-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 10px;
}

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

.showcase-stat {
  display: grid;
  gap: 1px;
}

.showcase-value {
  font-size: 18px;
  font-weight: 760;
  color: var(--ink);
}

.showcase-green { color: var(--green); }
.showcase-red { color: var(--red); }

.showcase-desc {
  font-size: 11px;
  color: var(--muted);
}

.showcase-verdict {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.showcase-mini-chart {
  margin-top: 4px;
}

.showcase-sparkline {
  width: 100%;
  height: 40px;
  display: block;
}

.showcase-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}

.showcase-bottom {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.showcase-flags-row {
  display: grid;
  gap: 8px;
  align-content: start;
}

.showcase-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.showcase-owner-blur {
  display: grid;
  gap: 8px;
  align-content: start;
}

.showcase-locked-row {
  display: grid;
  gap: 6px;
}

.showcase-blur-text {
  font-size: 13px;
  color: var(--muted);
  filter: blur(3px);
  user-select: none;
}

.showcase-unlock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.showcase-caption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  font-style: italic;
}

.mock-flag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.mock-flag-warn { background: #fef3c7; color: #92400e; }
.mock-flag-ok { background: #d1fae5; color: #065f46; }
.mock-flag-info { background: #e0e7ff; color: #3730a3; }

/* Feature deep-dive sections */
.section-feature-detail .section-inner {
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.section-feature-reverse .section-inner {
  direction: rtl;
}

.section-feature-reverse .section-inner > * {
  direction: ltr;
}

.feature-bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.feature-bullets li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.feature-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7d2fe;
}

/* Visual cards (feature section companions) */
.feature-visual {
  display: grid;
  align-content: start;
}

.visual-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.visual-comp-list {
  display: grid;
  gap: 0;
}

.visual-comp {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.visual-comp:last-child { border-bottom: none; }

.visual-comp-addr {
  font-weight: 600;
  color: var(--ink);
}

.visual-comp-price {
  font-weight: 720;
  color: var(--ink);
  font-size: 14px;
}

.visual-comp-meta {
  color: var(--muted);
  font-size: 11px;
}

.visual-comp-subject {
  background: #eef2ff;
  margin: 0 -20px;
  padding: 10px 20px;
  border-color: #c7d2fe;
}

/* Municipal records visual */
.visual-records {
  display: grid;
  gap: 0;
}

.visual-record {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.visual-record:last-child { border-bottom: none; }

.visual-record-type {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.visual-record-violation { background: #fee2e2; color: #991b1b; }
.visual-record-permit { background: #dbeafe; color: #1e40af; }
.visual-record-inspection { background: #f3f4f6; color: #374151; }

.visual-record-desc { color: var(--ink); }

.visual-record-status {
  font-size: 11px;
  font-weight: 600;
}

.visual-status-open { color: var(--red); }
.visual-status-closed { color: var(--green); }

.visual-ai-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
}

.visual-ai-badge svg { flex-shrink: 0; color: var(--green); }

/* Neighborhood visual */
.visual-neighborhood {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.visual-neigh-stat {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.visual-neigh-value {
  font-size: 20px;
  font-weight: 760;
  color: var(--ink);
}

.visual-neigh-label {
  font-size: 11px;
  color: var(--muted);
}

.visual-bar-section {
  display: grid;
  gap: 6px;
}

.visual-bar-label {
  font-size: 11px;
  color: var(--muted);
}

.visual-bar-track {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 24px;
}

.visual-bar-fill {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

/* Pricing */
.price-card {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.price-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 24px;
}

.price-dollar {
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
}

.price-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.price-cents {
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
}

.price-per {
  margin-left: 8px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.price-tier-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  text-align: left;
  margin-bottom: 4px;
}

.price-tier-paid {
  color: var(--accent);
  margin-top: 8px;
}

.price-free-list {
  margin-bottom: 8px;
}

.price-includes {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
}

.price-includes li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-includes li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #d1fae5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23065f46'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5 5-5 1 1z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.price-compare {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.compare-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  color: var(--muted);
}

.compare-item .compare-price {
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
}

.compare-item-you {
  color: var(--ink);
  font-weight: 600;
}

.compare-item-you .compare-price {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

/* Data sources */
.data-sources {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.data-source {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.data-source strong {
  font-size: 14px;
  font-weight: 700;
}

.data-source span {
  font-size: 13px;
  color: var(--muted);
}

/* Bottom CTA */
.section-cta {
  border-top: none;
  padding: 48px 24px 64px;
  text-align: center;
}

.section-cta h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 8px;
}

.section-cta p {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 860px) {
  .section-feature-detail .section-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .section-feature-reverse .section-inner {
    direction: ltr;
  }
}

.report-loading {
  max-width: 620px;
  margin: 46px auto;
  padding: 34px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.loading-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.loading-header h2 { margin: 0; font-size: 18px; }
.loading-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.loading-steps { display: flex; flex-direction: column; gap: 10px; }
.loading-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--muted);
  transition: color 0.3s;
}
.loading-step .step-icon {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.loading-step.active { color: var(--fg); font-weight: 500; }
.loading-step.active .step-icon {
  border-color: var(--accent);
  background: transparent;
  animation: pulse-ring 1.2s ease-in-out infinite;
}
.loading-step.done { color: var(--fg); }
.loading-step.done .step-icon {
  border-color: #16a34a; background: #16a34a;
}
.loading-step.done .step-icon::after {
  content: "✓"; color: #fff; font-size: 11px; font-weight: 700;
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
}
.report-progress {
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  transition: opacity 0.4s, max-height 0.4s;
  overflow: hidden;
}
.report-progress.all-done {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  border: none;
}
.progress-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.progress-chip {
  font-size: 12px; padding: 3px 10px; border-radius: 99px;
  background: var(--line); color: var(--muted);
  transition: all 0.3s;
}
.progress-chip.active {
  background: #eef2ff; color: var(--accent); font-weight: 500;
  animation: chip-pulse 1.5s ease-in-out infinite;
}
.progress-chip.done {
  background: #dcfce7; color: #16a34a; font-weight: 500;
}
@keyframes chip-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.loading-orb {
  width: 42px;
  height: 42px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--teal);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.skeleton {
  background: linear-gradient(90deg, var(--line) 25%, #f1f5f9 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-line, .skeleton-line-short, .skeleton-pill, .skeleton-number, .skeleton-label {
  background: linear-gradient(90deg, var(--line) 25%, #f1f5f9 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-line { height: 14px; margin-bottom: 8px; width: 100%; }
.skeleton-line:last-child { width: 60%; }
.skeleton-line-short { height: 14px; width: 40%; }
.skeleton-pill { display: inline-block; height: 24px; width: 80px; border-radius: 999px; }
.skeleton-number { height: 20px; width: 70%; margin-bottom: 6px; }
.skeleton-label { height: 12px; width: 90%; }

.animate-in { animation: fadeInUp 0.25s ease-out both; }
.stagger-1 { animation-delay: 0ms; }
.stagger-2 { animation-delay: 50ms; }
.stagger-3 { animation-delay: 100ms; }
.stagger-4 { animation-delay: 150ms; }
.stagger-5 { animation-delay: 200ms; }
.stagger-6 { animation-delay: 250ms; }

.property-view {
  display: grid;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  transition: opacity 150ms ease;
}

.property-view.is-switching {
  opacity: 0;
}

.property-header,
.report-summary,
.buyer-lens,
.info-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.property-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 18px;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.tiny-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 10px;
  vertical-align: middle;
}

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

.report-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  padding: 18px;
}

.report-summary p {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 430;
}

.summary-findings {
  display: grid;
  gap: 8px;
}

.summary-findings button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
}

.summary-findings button:hover,
.summary-findings button:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.summary-findings span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.summary-findings strong {
  font-family: var(--font-data);
  color: var(--teal-dark);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.buyer-lens {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.buyer-lens-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.buyer-lens-card:hover,
.buyer-lens-card:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}

.buyer-lens-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.buyer-lens-card strong {
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.buyer-lens-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.metric {
  min-height: 94px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  text-transform: uppercase;
}

.metric-value {
  font-family: var(--font-data);
  font-size: 21px;
  font-weight: 760;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

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

.context-signals {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.signal-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.context-signals .signal-card {
  min-height: 118px;
}

.context-signals .signal-card p {
  display: none;
}

.signal-card:hover,
.signal-card:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.signal-card-head {
  display: grid;
  gap: 6px;
}

.signal-card-head span,
.signal-card-foot {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.signal-card-head strong {
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.signal-card p {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 430;
}

.signal-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-transform: none;
}

.signal-card-attention {
  border-color: #e3b7ab;
}

.signal-card-positive {
  border-color: #aed6c8;
}

.summary-tile {
  display: grid;
  gap: 5px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.summary-tile strong {
  font-family: var(--font-data);
  font-size: 17px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.summary-tile span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ask-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 128, 118, 0.08), transparent 38%),
    var(--surface);
}

.ask-intro {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.question-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(251, 248, 241, 0.78);
}

.question-chips button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.question-chips button.active,
.question-chips button:hover {
  background: var(--surface-strong);
  color: var(--teal-dark);
  box-shadow: 0 8px 24px rgba(39, 33, 24, 0.08);
}

.analysis-answer {
  margin-top: 12px;
}

.analysis-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 46px rgba(39, 33, 24, 0.08);
}

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

.analysis-card-head span,
.analysis-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.analysis-card-head h4 {
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.15;
}

.analysis-card-head strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--teal-dark);
  padding: 7px 10px;
  font-size: 12px;
  text-transform: capitalize;
}

.analysis-card p {
  max-width: 980px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

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

.analysis-evidence button {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf8f1;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.analysis-evidence button:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.analysis-evidence span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analysis-actions,
.analysis-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-actions button,
.analysis-followups button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 850;
}

.analysis-actions button:hover,
.analysis-followups button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.analysis-followups::before {
  content: "Follow-ups";
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.insight-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.insight-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 13px;
  line-height: 1.4;
}

.mix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.mix-bars {
  display: grid;
  gap: 10px;
}

.mix-row {
  display: grid;
  gap: 6px;
}

.mix-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mix-row-head strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.mix-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.mix-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-section {
  padding: 16px;
  overflow: hidden;
}

.info-section.is-collapsed > :not(.section-title-row) {
  display: none;
}

.disclosure-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--teal-dark);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.fact-list {
  display: grid;
  grid-template-columns: minmax(128px, 0.45fr) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 14px 0 0;
}

.fact-list dt {
  color: var(--muted);
  font-size: 12px;
}

.fact-list dd {
  margin: 0;
  min-width: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.fact-link {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fact-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fact-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--teal-dark);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.fact-chip:hover,
.fact-chip:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}

.table-wrap {
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--surface-strong);
}

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

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

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

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  gap: 2px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented-control button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button.active {
  background: var(--surface-strong);
  color: var(--teal-dark);
  box-shadow: 0 1px 4px rgba(39, 35, 28, 0.08);
}

.holding-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.holding-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.holding-item button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 6px 0;
}

.table-link {
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0;
  text-align: left;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.muted-empty {
  color: var(--muted);
  padding: 8px 0;
}

.price {
  color: var(--teal-dark);
  font-weight: 800;
}

.warn {
  color: var(--red);
}

.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.confidence-high {
  background: #d8f0e8;
  color: #0f5d43;
}

.confidence-medium {
  background: #f7e7bd;
  color: #805510;
}

.confidence-low {
  background: #eadfd5;
  color: #704b3a;
}

.source-link {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.status-pill,
.signal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  background: #eef2f1;
  color: #44514f;
}

.signal-attention {
  background: #f4d4ca;
  color: #8c3326;
}

.signal-open {
  background: #f7e7bd;
  color: #805510;
}

.signal-history {
  background: #d8f0e8;
  color: #0f5d43;
}

.record-description {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.record-toolbar input {
  flex: 1 1 220px;
  width: min(320px, 100%);
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.record-toolbar input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.mobile-report-nav {
  display: none;
}

@media (max-width: 980px) {
  .topbar,
  .workspace,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .topbar.is-report .searchbar {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    padding: 14px;
  }

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

  .report-summary {
    grid-template-columns: 1fr;
  }

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

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

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

  .setup-grid {
    grid-template-columns: 1fr;
  }

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

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

  .mix-grid {
    grid-template-columns: 1fr;
  }

  .analysis-evidence {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  body:has(.mobile-report-nav:not([hidden])) {
    padding-bottom: 86px;
  }

  .topbar {
    padding: 14px;
  }

  .unit-choice-list button {
    grid-template-columns: 1fr;
  }

  .topbar.is-report {
    padding: 8px 10px;
  }

  .topbar.is-report .brand-block {
    display: none;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .topbar.is-report .searchbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .topbar.is-report .search-status {
    display: none;
  }

  .topbar.is-report .searchbar input,
  .topbar.is-report .searchbar button {
    height: 44px;
  }

  .searchbar button {
    width: 100%;
  }

  .topbar.is-report .searchbar button {
    width: auto;
    padding: 0 14px;
    font-size: 14px;
  }

  .property-header,
  .holding-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .buyer-lens-card strong {
    font-size: 20px;
  }

  .setup-card {
    padding: 16px;
    border-radius: 18px;
  }

  .setup-property div,
  .setup-actions {
    display: grid;
    justify-content: stretch;
  }

  .unit-row {
    grid-template-columns: 1fr 1fr;
  }

  .unit-row strong {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }

  .assumption-summary {
    grid-template-columns: 1fr;
  }

  .assumption-summary button {
    width: 100%;
  }

  .metric-value {
    font-size: clamp(18px, 7vw, 28px);
  }

  .portfolio-summary {
    grid-template-columns: 1fr;
  }

  .signals-grid {
    grid-template-columns: 1fr;
  }

  .context-signals {
    grid-template-columns: 1fr;
  }

  .question-chips {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-inline: -2px;
    padding: 6px;
    scroll-snap-type: x proximity;
  }

  .question-chips button {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }

  .analysis-card {
    padding: 14px;
  }

  .analysis-card-head {
    display: grid;
  }

  .analysis-card-head h4 {
    font-size: 18px;
  }

  .analysis-card p {
    font-size: 14px;
  }

  .fact-list {
    grid-template-columns: 1fr;
  }

  .mobile-report-nav:not([hidden]) {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(18px);
  }

  .mobile-report-nav button {
    min-width: 0;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-report-nav button:focus-visible,
  .mobile-report-nav button:hover {
    outline: none;
    background: #f1f5f9;
  }

  .mobile-report-nav button.active {
    background: #f1f5f9;
    color: var(--teal-dark);
  }

  .empty-state {
    justify-items: stretch;
    padding-top: 10px;
  }

  .hero-badges {
    gap: 6px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  .landing-section {
    padding: 48px 16px;
  }

  .section-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .showcase-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .showcase-stat-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .showcase-property {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .visual-neighborhood {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .visual-comp {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .visual-comp-meta {
    grid-column: 1 / -1;
  }

  .price-card {
    padding: 28px 20px;
  }

  .price-number {
    font-size: 48px;
  }

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

  .record-toolbar .segmented-control,
  .section-title-row .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1 1 auto;
  }
}

/* Story-based report layout */

.property-identity {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.property-snapshot {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  padding: 0 18px;
  min-height: 0;
  transition: opacity 0.3s;
  opacity: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.property-snapshot.loading {
  padding: 14px 18px;
  opacity: 1;
}
.property-snapshot.loaded {
  opacity: 1;
  padding: 14px 18px;
}
.snapshot-line {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.snapshot-line:last-child {
  border-bottom: none;
}
.snapshot-line strong {
  color: var(--text);
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #888);
  background: none;
  border: 1px solid var(--line, #e0e0e0);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.icon-action:hover {
  color: var(--text, #333);
  border-color: var(--text-muted, #999);
}
.icon-action svg { flex-shrink: 0; }

.identity-address {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.identity-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.condition-tag {
  animation: fadeIn 0.4s ease;
  cursor: help;
}
.condition-modernized, .condition-renovated {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}
.condition-well-maintained {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}
.condition-maintained {
  background: #e0e7ff !important;
  color: #3730a3 !important;
  border-color: #a5b4fc !important;
}
.condition-minimal-record {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border-color: #d1d5db !important;
}
.condition-deferred-maintenance {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fcd34d !important;
}
.condition-neglected {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}

.ai-condition-basis {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 8px;
}

/* --- Paywall / locked content --- */
.locked-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.locked-field h2 {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.locked-overlay {
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--accent);
}

.locked-overlay svg {
  width: 12px;
  height: 12px;
}

.locked-section {
  position: relative;
}

.locked-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.92));
  backdrop-filter: blur(4px);
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
}

.locked-section-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.locked-section-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.unlock-banner {
  background: linear-gradient(135deg, #eef2ff, #f0f4ff);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 4px;
}

.unlock-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.unlock-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
}

.unlock-text svg {
  flex-shrink: 0;
  color: var(--accent);
}

.unlock-button {
  flex-shrink: 0;
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
}

.unlock-button:hover {
  background: var(--accent-dark);
}

.masked-name {
  color: var(--muted);
  letter-spacing: 0.02em;
}

.unlocked .masked-name {
  color: inherit;
  letter-spacing: normal;
}

.unlocked .locked-field h2 {
  filter: none;
  user-select: auto;
  pointer-events: auto;
}

.unlocked .locked-overlay,
.unlocked .unlock-banner,
.unlocked .locked-section::after,
.unlocked .locked-section-badge {
  display: none;
}

.story-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.story-lead {
  padding: 16px 18px;
}

.story-lead h3 {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.story-lead p {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 430;
  max-width: 960px;
}

.story-lead p:empty {
  display: none;
}

.story-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.story-number {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.story-number:last-child {
  border-right: 0;
}

.story-number-value {
  display: block;
  font-family: var(--font-data);
  font-size: 17px;
  font-weight: 720;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.story-number-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.sparkline {
  display: block;
  width: 80px;
  height: 28px;
}

.story-toggle {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(241, 245, 249, 0.6);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.story-toggle:hover {
  background: rgba(241, 245, 249, 0.9);
}

.story-evidence {
  padding: 0 18px;
  border-top: 1px solid var(--line);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 300ms ease, opacity 200ms ease, padding 300ms ease;
}

.story-evidence.is-open {
  padding: 18px;
  max-height: 2000px;
  opacity: 1;
  overflow: visible;
}

.evidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.evidence-header h4 {
  margin: 0;
}

.evidence-subsection {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.evidence-subsection:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.story-minor .story-toggle {
  border-top: 0;
}

.story-section.has-attention {
  border-color: #e3b7ab;
}

.story-section.has-attention .story-lead h3 {
  color: var(--red);
}

@media (max-width: 560px) {
  .property-identity {
    display: grid;
    padding: 14px;
    gap: 10px;
  }

  .property-identity .icon-action {
    justify-self: start;
  }

  .property-snapshot {
    font-size: 13px;
  }

  .detail-panel {
    padding: 10px;
  }

  .story-lead {
    padding: 14px;
  }

  .story-lead p {
    font-size: 14px;
    line-height: 1.45;
  }

  .story-numbers {
    flex-wrap: wrap;
  }

  .story-number {
    flex: 1 1 45%;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
  }

  .story-number:nth-child(2n) {
    border-right: 0;
  }

  .story-number:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .story-number-value {
    font-size: 15px;
  }

  .story-toggle {
    padding: 14px;
    font-size: 14px;
    min-height: 48px;
  }

  .story-evidence.is-open {
    padding: 14px;
  }

  .identity-meta {
    gap: 5px;
    margin-top: 8px;
  }

  .identity-meta span {
    font-size: 11px;
    padding: 3px 7px;
  }
}

.benchmark-table {
  font-size: 12px;
  border-collapse: collapse;
  width: 100%;
}
.benchmark-table th {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 6px 6px;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.benchmark-table td {
  padding: 6px 6px;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light, #eee);
  white-space: nowrap;
}
.benchmark-table .bench-subject {
  background: var(--surface-strong, #fff);
  border-bottom: 2px solid var(--accent, teal);
}
.benchmark-table .bench-subject td {
  border-bottom: 2px solid var(--accent, teal);
}
.bench-better {
  background: rgba(34, 139, 34, 0.08);
}
.bench-worse {
  background: rgba(200, 50, 30, 0.08);
}
#benchmarkSection {
  margin-bottom: 1rem;
}
#compChart {
  border: 1px solid var(--border-light, #eee);
  border-radius: 8px;
  background: var(--surface-strong, #fff);
}
.ai-analysis-card {
  background: var(--surface-strong, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.ai-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #eef2ff;
  padding: 3px 8px;
  border-radius: 4px;
  color: #555;
}
.ai-risk {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ai-summary {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: var(--text, #333);
}
.ai-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 13px;
  line-height: 1.45;
}
.ai-item p {
  margin: 2px 0 0;
  color: var(--text-muted, #666);
}
.ai-severity {
  flex-shrink: 0;
  font-size: 14px;
}
.ai-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light, #eee);
  font-size: 13px;
}
.ai-actions ol {
  margin: 0.4rem 0 0 1.2rem;
  padding: 0;
  color: var(--text-muted, #666);
}
.ai-actions li {
  margin-bottom: 0.3rem;
  line-height: 1.45;
}
.ai-loading {
  font-size: 12px;
  color: var(--text-muted, #888);
  padding: 0.5rem 0;
  font-style: italic;
}
.comp-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}
.pager-btn {
  background: var(--surface-strong, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--accent, teal);
  font-weight: 600;
}
.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.pager-info {
  font-size: 12px;
  color: var(--text-muted, #888);
}

@media print {
  body { background: #fff; }
  .topbar, .results-panel, .mobile-report-nav, .empty-state,
  .report-loading, .story-toggle, #exportPdfButton,
  .segmented-control, .record-toolbar, #municipalSearch,
  .comp-pager, .icon-action { display: none !important; }
  .app-shell { display: block; }
  .workspace { display: block; }
  .detail-panel { max-width: 100%; padding: 0; }
  .property-view { padding: 0; }
  .story-evidence { display: block !important; max-height: none !important; opacity: 1 !important; overflow: visible !important; padding: 18px !important; }
  .story-section { break-inside: avoid; page-break-inside: avoid; margin-bottom: 1rem; }
  .table-wrap { overflow: visible; }
  #compMap { display: none !important; }
  .benchmark-table { font-size: 10px; }
}
