:root {
  color-scheme: light;
  --navy: #192b49;
  --navy-dark: #111d33;
  --navy-mid: #294264;
  --red: #a8434d;
  --red-soft: #f7e9eb;
  --paper: #e9e6dd;
  --surface: #f5f2eb;
  --surface-muted: #e5e2d9;
  --surface-control: #eef0f4;
  --surface-hover: #f7f8fb;
  --ink: #1d2c45;
  --muted: #738097;
  --line: #d8dce5;
  --shadow: 0 8px 24px rgba(25, 43, 73, .055);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar {
  height: 100vh; min-height: 650px; position: sticky; top: 0; display: flex; flex-direction: column;
  overflow: hidden; padding: 26px 16px 18px; color: var(--ink); background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; margin: 2px 8px 46px; color: var(--navy); text-decoration: none; }
.brand-mark { width: 28px; height: 31px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.brand-mark span { display: block; width: 7px; border-radius: 5px 5px 1px 1px; background: #526988; }
.brand-mark span:nth-child(1) { height: 19px; opacity: .68; }
.brand-mark span:nth-child(2) { height: 28px; background: #d17a81; }
.brand-mark span:nth-child(3) { height: 23px; opacity: .83; }
.brand strong { display: block; font-size: 22px; line-height: 1; letter-spacing: -1px; }
.brand small { display: block; margin-top: 4px; color: #7c899d; font-size: 9px; letter-spacing: 1.1px; text-transform: uppercase; }
.side-label { padding: 0 10px 11px; color: #8793a5; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.side-nav { display: grid; gap: 6px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-left: 2px solid transparent; border-radius: 7px; color: #5d6d84; font-size: 12px; text-decoration: none; transition: background .18s, color .18s; }
.nav-item[hidden] { display: none; }
.nav-item:hover { color: var(--navy); background: var(--surface-muted); }
.nav-item.active { border-left-color: #c26b73; color: #fff; background: var(--navy); box-shadow: 0 2px 7px rgba(25,43,73,.12); }
.nav-item.active:hover { color: #fff; background: var(--navy); }
.nav-icon { width: 19px; color: #718098; font-size: 17px; text-align: center; }
.nav-item.active .nav-icon { color: #fff; }
.nav-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: #cf7d83; }
.sidebar-bottom { position: relative; z-index: 1; margin-top: auto; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: 15px 4px 0; color: #728097; font-size: 10px; }
.status-pip { width: 6px; height: 6px; border-radius: 50%; background: #bb747b; box-shadow: 0 0 0 4px rgba(187,116,123,.13); }

.main-content { width: min(100%, 1480px); margin: 0 auto; padding: 0 42px 28px; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.admin-menu {
  position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 7px;
  margin: 0 0 12px; padding: 9px 12px; overflow-x: auto; border-bottom: 1px solid var(--line);
  background: rgba(245,242,235,.97); backdrop-filter: blur(9px); scrollbar-width: thin;
}
.admin-menu a {
  flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px;
  color: #4c5f7b; background: var(--surface-control); font-size: 10px; font-weight: 650; text-decoration: none;
}
.admin-menu a:hover { border-color: #a3afc0; color: var(--navy); background: #fffdfa; }
.admin-menu a.active, .admin-menu a[aria-current="page"] { border-color: var(--navy); color: #fff; background: var(--navy); }
#manualRecords { scroll-margin-top: 82px; }
.breadcrumbs { color: #8290a4; font-size: 9px; font-weight: 600; letter-spacing: 1.1px; }
.breadcrumbs strong { color: #52647f; }
.crumb-slash { margin: 0 9px; color: #b2bdcb; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.local-badge { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 20px; color: #65738a; background: var(--surface-control); font-size: 9px; }
.local-badge span { width: 6px; height: 6px; border-radius: 50%; background: #667d9e; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: var(--surface-control); font-size: 17px; line-height: 1; }
.icon-button:hover { color: var(--red); border-color: #d7b2b6; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--surface-muted); font-size: 12px; font-weight: 700; }

.intro-row { min-height: 174px; position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden; padding: 22px 2px 19px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 2px 0 11px; color: #687a94; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.eyebrow-line { width: 18px; height: 2px; background: var(--red); }
.intro-row h1 { margin: 0; color: var(--navy); font-size: clamp(30px, 3vw, 39px); line-height: 1.1; letter-spacing: -1.6px; }
.intro-row h1 em { color: var(--red); font-style: normal; }
.intro-copy { max-width: 560px; margin: 10px 0 0; color: #687890; font-size: 12px; line-height: 1.6; }
.intro-mark { width: 126px; height: 126px; flex: 0 0 126px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-right: 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: var(--surface); }
.intro-mark::before { content: ""; position: absolute; inset: 7px; border: 1px solid #ead8da; border-radius: 50%; }
.intro-mark-top { position: relative; z-index: 1; color: var(--red); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.intro-mark-value { position: relative; z-index: 1; margin: 1px 0; font-size: 30px; font-weight: 700; }
.intro-mark-icon { width: 34px; height: 34px; display: grid; place-items: center; }
.intro-mark-icon svg { width: 34px; height: 34px; display: block; }
.intro-mark-caption { position: relative; z-index: 1; color: #728099; font-size: 7px; font-weight: 700; line-height: 1.4; letter-spacing: .8px; text-align: center; }

.neighborhood-panel { display: grid; gap: 12px; margin: 0 0 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.neighborhood-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.neighborhood-heading-copy { min-width: 0; flex: 1; }
.neighborhood-kicker { color: var(--red); font-size: 8px; font-weight: 750; letter-spacing: 1px; }
.neighborhood-heading-copy h2 { margin: 3px 0 2px; color: var(--navy); font-size: 18px; letter-spacing: -.4px; }
.neighborhood-heading-copy p { margin: 0; color: #7d899d; font-size: 10px; }
.neighborhood-total { min-width: 112px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: #6f7d93; background: var(--surface-control); font-size: 9px; }
.neighborhood-total strong { color: var(--navy); font-size: 21px; line-height: 1; }
.neighborhood-total span { max-width: 82px; line-height: 1.35; }
.neighborhood-panel-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid #e9edf2; color: #79869a; font-size: 8px; letter-spacing: .7px; }
.neighborhood-panel-subhead strong { color: var(--red); font-family: "Avenir Next", "Segoe UI", sans-serif; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; }
.neighborhood-panel-subhead > span { color: #8b97a8; font-size: 9px; letter-spacing: 0; }
.neighborhood-suggestions { display: flex; flex-wrap: wrap; gap: 7px; }
.neighborhood-suggestion { min-width: 190px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); background: var(--surface-control); text-align: left; transition: border-color .16s, background .16s; cursor: pointer; }
.neighborhood-suggestion:hover, .neighborhood-suggestion:focus-visible { border-color: #a99f90; background: var(--surface-hover); }
.neighborhood-suggestion[aria-pressed="true"] { border-color: var(--navy); color: #fff; background: var(--navy); box-shadow: 0 2px 5px rgba(25,43,73,.18); }
.neighborhood-suggestion[aria-pressed="true"] .neighborhood-suggestion-copy strong,
.neighborhood-suggestion[aria-pressed="true"] .neighborhood-suggestion-copy small,
.neighborhood-suggestion[aria-pressed="true"] .neighborhood-suggestion-count,
.neighborhood-suggestion[aria-pressed="true"] .neighborhood-suggestion-count b { color: #fff; }
.neighborhood-suggestion-copy { min-width: 0; display: grid; gap: 3px; }
.neighborhood-suggestion-copy strong { overflow: hidden; color: var(--navy); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.neighborhood-suggestion-copy small { overflow: hidden; color: #8793a5; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.neighborhood-suggestion-count { flex: none; color: #8793a5; font-size: 8px; white-space: nowrap; }
.neighborhood-suggestion-count b { margin-left: 2px; color: var(--red); }
.neighborhood-empty { padding: 12px; border-radius: 6px; color: #79869a; background: var(--surface-muted); font-size: 10px; }
.quick-search-panel { min-width: 0; scroll-margin-top: 16px; }
.quick-search-content { display: grid; gap: 10px; }
.quick-mobile-district-groups { display: none; }
.quick-neighborhood-grid { max-width: 640px; display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
.quick-neighborhood-selector { max-width: 520px; }
.quick-neighborhood-selector select { min-height: 39px; border-color: var(--line); color: #293d5c; background-color: var(--surface-control); font-weight: 600; }
.quick-neighborhood-selector select option { background: var(--surface); color: #293d5c; }
.quick-neighborhood-empty { max-width: 640px; }
.quick-location-card { min-width: 0; display: grid; align-content: start; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.quick-location-heading { min-width: 0; display: flex; align-items: center; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid #edf0f4; }
.quick-location-mark { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid #ead5d7; border-radius: 6px; color: var(--red); background: #fbf2f3; font-size: 15px; }
.quick-location-heading > div { min-width: 0; display: grid; gap: 3px; }
.quick-location-heading strong { overflow: hidden; color: var(--navy); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quick-location-heading small { color: #8995a7; font-size: 7px; letter-spacing: .55px; }
.quick-search-group { display: grid; gap: 5px; }
.quick-search-group-title { color: #8a96a8; font-size: 7px; font-weight: 750; letter-spacing: .65px; }
.quick-option-list { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-search-option { min-width: 122px; flex: 1 1 122px; padding: 7px 8px; background: var(--surface-control); }
.quick-search-option .neighborhood-suggestion-copy { gap: 2px; }
.quick-neighborhood-grid .quick-search-option .neighborhood-suggestion-copy strong,
.quick-district-list .quick-search-option .neighborhood-suggestion-copy strong { font-size: 9px; }
.quick-search-option .neighborhood-suggestion-copy small, .quick-search-option .neighborhood-suggestion-count { font-size: 7px; }
.quick-district-list .quick-search-option { min-width: 205px; flex: 1 1 205px; }

.filter-panel { padding: 17px 18px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.filter-heading, .filter-heading > div, .card-heading, .card-heading > div, .results-heading, .data-section-title, .data-section-title > div { display: flex; align-items: center; }
.filter-heading, .card-heading, .data-section-title { justify-content: space-between; }
.filter-heading h2, .card-heading h2, .results-heading h2, .data-section-title h2 { margin: 0; color: var(--navy); font-size: 14px; letter-spacing: -.25px; }
.section-index { width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; margin-right: 9px; border-radius: 6px; color: #536989; background: #e8ecf2; font-size: 9px; font-weight: 700; }
.section-index.pale { color: #f2c9cd; background: rgba(255,255,255,.1); }
.text-button { padding: 6px; border: 0; color: #64748b; background: transparent; font-size: 10px; }
.text-button:hover { color: var(--red); }
.text-button span { margin-left: 3px; color: var(--red); font-size: 14px; }
.filter-primary { display: grid; grid-template-columns: minmax(210px,1.4fr) repeat(5,minmax(110px,1fr)) minmax(185px,1.3fr); gap: 11px; margin-top: 16px; }
.filter-field label { display: block; margin: 0 0 6px; color: #748198; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.filter-field select, .filter-field input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; color: #344762; background: var(--surface-control); font-size: 11px; transition: border-color .16s, box-shadow .16s; }
.filter-field select { appearance: none; padding-right: 25px; background-image: linear-gradient(45deg,transparent 50%,#73839a 50%),linear-gradient(135deg,#73839a 50%,transparent 50%); background-repeat: no-repeat; background-position: calc(100% - 12px) 15px,calc(100% - 8px) 15px; background-size: 4px 4px,4px 4px; }
.filter-field select option, .sort-control select option, .page-size-control select option { color: #344762; background: var(--surface); }
.filter-field select:focus, .filter-field input:focus { border-color: #8496b1; box-shadow: 0 0 0 3px rgba(71,96,137,.1); }
.filter-field select:disabled { color: #a5afbd; background-color: var(--surface); cursor: not-allowed; }
.segmented { min-height: 36px; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #e8ecf2; }
.field-transaction .segmented { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.segmented button { flex: 1; padding: 0 7px; border: 0; border-radius: 4px; color: #6d7c92; background: transparent; font-size: 10px; }
.segmented button:hover { color: var(--navy); background: var(--surface); }
.segmented button.selected { color: #fff; background: var(--navy); box-shadow: 0 2px 5px rgba(25,43,73,.18); }
.search-wrap { position: relative; }
.search-wrap > span { position: absolute; top: 5px; left: 10px; color: #7c8aa0; font-size: 18px; line-height: 1; }
.search-wrap input { padding-left: 31px; }
.advanced-filters { margin-top: 14px; border-top: 1px solid #edf0f4; }
.advanced-filters summary { min-height: 37px; display: flex; align-items: center; gap: 8px; padding-top: 10px; color: #546781; cursor: pointer; list-style: none; }
.advanced-filters summary::-webkit-details-marker { display: none; }
.advanced-chevron { display: inline-block; color: var(--red); font-size: 16px; transition: transform .16s; }
.advanced-filters[open] .advanced-chevron { transform: rotate(180deg); }
.advanced-filters summary strong { color: var(--navy); font-size: 10px; }
.advanced-filters summary > span:nth-of-type(2) { color: #8a96a8; font-size: 9px; }
.advanced-count { width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-size: 9px; font-weight: 700; }
.advanced-grid { display: grid; grid-template-columns: minmax(160px,.85fr) minmax(220px,1.2fr) minmax(225px,1.2fr); gap: 12px; padding: 10px 0 3px; }
.filter-year-strip { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding: 11px 12px; border: 1px solid #dfe4ec; border-radius: 8px; background: linear-gradient(110deg,#e8ecf2,var(--surface)); }
.filter-year-strip > strong { flex: none; color: #748198; font-size: 9px; letter-spacing: .7px; }
.year-chips { min-height: 38px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.year-chip { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 20px; color: #52647f; background: var(--surface-control); font-size: 10px; font-weight: 600; cursor: pointer; transition: border-color .16s, background .16s, color .16s, transform .16s; }
.year-chip:hover { border-color: #8194b0; color: var(--navy); transform: translateY(-1px); }
.year-chip.selected { border-color: #263b5d; color: #fff; background: #263b5d; box-shadow: 0 3px 8px rgba(25,43,73,.17); }
.year-chip.period-chip { border-color: #e8c6c9; color: #9d4851; background: #fff8f8; }
.year-chip.period-chip:hover { border-color: #ce9299; background: #fff1f2; }
.year-chip.period-chip.selected { border-color: #a8434d; color: #fff; background: #a8434d; box-shadow: 0 3px 8px rgba(168,67,77,.2); }
.price-range { display: flex; align-items: center; gap: 7px; }
.price-range input { min-width: 0; }
.price-range > span { color: #a3adbb; font-size: 10px; }
.active-filters { min-height: 27px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.active-label { margin-right: 2px; color: #8b96a7; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
.filter-chip { min-height: 23px; display: inline-flex; align-items: center; gap: 7px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 20px; color: #52647f; background: var(--surface-control); font-size: 9px; }
.filter-chip:hover { border-color: #d5aeb2; color: var(--red); background: #fffafb; }
.filter-chip span { color: var(--red); font-size: 13px; line-height: .8; }
.filter-chip.fixed { border-color: #e7cdd0; color: #8b3f48; background: #fbf2f3; }

.insight-grid { display: grid; grid-template-columns: minmax(300px,.9fr) minmax(0,1.35fr); gap: 11px; margin: 12px 0 25px; }
.estimate-card { min-height: 214px; position: relative; overflow: hidden; padding: 16px 18px; border-radius: 9px; color: #fff; background: linear-gradient(115deg,#172640,#263b5d); }
.estimate-card { grid-column: 1 / -1; }
.estimate-card::after { content: ""; position: absolute; top: 65px; right: -105px; width: 205px; height: 205px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025),0 0 0 60px rgba(255,255,255,.018); }
.estimate-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.estimate-chip { padding: 5px 8px; border: 1px solid rgba(241,206,209,.28); border-radius: 20px; color: #e9c2c6; font-size: 8px; letter-spacing: .8px; }
.estimate-content { position: relative; z-index: 1; margin: 17px 0 14px; }
.estimate-kicker { color: #bdc9d9; font-size: 10px; }
.estimate-value { margin-top: 5px; color: #fff; font-size: clamp(25px,2.5vw,32px); font-weight: 700; letter-spacing: -1px; }
.estimate-sub { margin-top: 5px; color: #b9c6d7; font-size: 10px; }
.estimate-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.estimate-meta span { padding: 5px 7px; border: 1px solid rgba(255,255,255,.09); border-radius: 4px; color: #dbe2eb; background: rgba(255,255,255,.07); font-size: 9px; }
.estimate-rule { height: 1px; position: relative; z-index: 1; background: rgba(255,255,255,.13); }
.estimate-foot { max-width: 480px; position: relative; z-index: 1; margin-top: 8px; color: #bfcbda; font-size: 9px; line-height: 1.5; }
.estimate-empty { max-width: 350px; color: #fff; font-size: 17px; font-weight: 650; line-height: 1.35; }
.estimate-empty-sub { max-width: 340px; margin-top: 7px; color: #c2ccda; font-size: 10px; line-height: 1.55; }
.estimate-historical { display: inline-block; margin-top: 8px; padding: 4px 6px; border-radius: 4px; color: #f0c7cb; background: rgba(168,67,77,.22); font-size: 8px; letter-spacing: .35px; }
.annual-estimate-context { position: relative; z-index: 1; margin-bottom: 10px; color: #c4cede; font-size: 10px; }
.annual-average-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.annual-year-card { min-width: 0; display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: rgba(255,255,255,.055); }
.annual-year-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.annual-year-top strong { color: #fff; font-size: 19px; letter-spacing: -.5px; }
.annual-year-top span { color: #bcc8d9; font-size: 8px; letter-spacing: .6px; }
.annual-average-block { min-width: 0; display: grid; gap: 4px; }
.annual-average-block small, .annual-change small { color: #b9c6d7; font-size: 8px; }
.annual-average-value { overflow: hidden; color: #fff; font-size: clamp(16px,2vw,23px); font-weight: 700; letter-spacing: -.6px; text-overflow: ellipsis; white-space: nowrap; }
.annual-year-sample { color: #bbc7d7; font-size: 8px; line-height: 1.45; }
.annual-change { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.11); }
.annual-change strong { color: #dbe4ef; font-size: 11px; white-space: nowrap; }
.annual-change.positive strong { color: #ffc0c5; }
.annual-change.negative strong { color: #a8e7d6; }
.annual-change.flat strong, .annual-change.unavailable strong { color: #c1cbd8; font-size: 9px; }
.results-section { margin: 18px 0 28px; scroll-margin-top: 16px; }
.results-heading { align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.results-heading > div:first-child { display: grid; grid-template-columns: 23px auto; align-items: center; }
.results-heading .section-index { grid-row: span 2; }
.results-heading p { grid-column: 2; margin: 4px 0 0; color: #7f8ca0; font-size: 10px; }
.results-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.result-range { color: #738097; font-size: 10px; white-space: nowrap; }
.sort-control, .page-size-control { display: flex; align-items: center; gap: 6px; color: #78859a; font-size: 9px; white-space: nowrap; }
.sort-control select, .page-size-control select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; color: #465a77; background: var(--surface-control); font-size: 10px; }
.cards-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; gap: 9px; }
.property-card { min-width: 0; display: flex; flex-direction: column; padding: 11px 12px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .16s, box-shadow .16s; }
.property-card:hover { border-color: #c5cfdd; box-shadow: 0 7px 18px rgba(25,43,73,.07); }
.card-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.transaction-badge { padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.transaction-badge.sale { color: #873d46; background: var(--red-soft); }
.transaction-badge.rent { color: #294264; background: #e7edf6; }
.transaction-badge.transfer { color: #7d4249; border: 1px solid #ead5d7; background: var(--surface-control); }
.transaction-badge.landshare { color: #315f4a; background: #e5efe8; }
.year-badge { color: #8490a2; font-size: 9px; }
.property-title-row { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.property-heading { min-width: 0; }
.property-title { overflow: hidden; color: var(--navy); font-size: 12px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.location-line { overflow: hidden; margin-top: 3px; color: #79869a; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.card-price { flex: 0 0 auto; color: var(--navy); font-size: 14px; font-weight: 700; letter-spacing: -.35px; line-height: 1.2; text-align: right; white-space: nowrap; }
.card-price.missing { color: #9aa4b2; font-size: 10px; font-weight: 500; letter-spacing: 0; white-space: normal; }
.card-address { overflow: hidden; margin-top: 8px; color: #7d899b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; padding-top: 8px; }
.meta-chip { max-width: 100%; overflow: hidden; padding: 4px 6px; border-radius: 4px; color: #63728a; background: var(--surface-control); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.meta-chip.area { color: #873d46; background: #f8eff0; }
.empty-state { padding: 34px 20px; border: 1px dashed var(--line); border-radius: 9px; color: #718097; background: rgba(233,230,221,.96); text-align: center; }
.empty-state > span { color: #8997aa; font-size: 26px; }
.empty-state h3 { margin: 7px 0 4px; color: var(--navy); font-size: 14px; }
.empty-state p { margin: 0; color: #8491a4; font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 15px; }
.pagination-pages { display: flex; align-items: center; gap: 4px; }
.page-button, .pagination-step { min-width: 31px; height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; color: #536783; background: var(--surface-control); font-size: 10px; }
.page-button:hover, .pagination-step:not(:disabled):hover { border-color: #c88b91; color: var(--red); }
.page-button.selected { border-color: var(--navy); color: #fff; background: var(--navy); }
.pagination-step { padding: 0 10px; }
.pagination-step:disabled { color: #aab3bf; background: var(--surface); cursor: default; }
.pagination-step span { font-size: 9px; }
.page-status { display: none; color: #75839a; font-size: 9px; }
.pagination-ellipsis { width: 15px; color: #8d99aa; font-size: 11px; text-align: center; }

.data-section { padding-top: 20px; border-top: 1px solid var(--line); }
.data-section-title { align-items: flex-start; }
.data-section-title > div { align-items: center; }
.data-section-title > p { margin: 3px 0 0; color: #8390a3; font-size: 10px; }
.data-workspace { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 15px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-control); }
.folder-illustration { width: 60px; height: 48px; position: relative; }
.folder-back, .folder-front { position: absolute; display: block; }
.folder-back { top: 3px; left: 5px; width: 50px; height: 35px; border-radius: 5px 5px 2px 2px; background: var(--surface-muted); transform: rotate(-6deg); }
.folder-front { top: 13px; left: 2px; width: 58px; height: 34px; display: flex; align-items: flex-end; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-muted); transform: rotate(2deg); }
.folder-front i { padding: 4px 2px; border-radius: 2px; color: #7f4148; background: var(--surface); font-size: 5px; font-style: normal; font-weight: 700; }
.folder-copy strong { color: var(--navy); font-size: 11px; }
.folder-copy p { max-width: 600px; margin: 5px 0 0; color: #728097; font-size: 10px; line-height: 1.5; }
.folder-copy code { padding: 2px 4px; border-radius: 3px; color: #405777; background: var(--surface); font-size: 9px; }
.source-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.source-pill { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: #6c7b92; background: var(--surface-muted); font-size: 9px; }
.source-pill strong { color: var(--navy); font-size: 9px; }
.import-button { padding: 10px 12px; border: 0; border-radius: 6px; color: #fff; background: var(--red); font-size: 10px; font-weight: 700; white-space: nowrap; transition: background .16s; }
.import-button:hover { background: #923842; }
.import-button span { margin-right: 3px; font-size: 14px; vertical-align: -1px; }
.import-button:disabled { opacity: .62; cursor: wait; }
.notice { margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; color: #405777; background: var(--surface-control); font-size: 10px; }
.notice.error { border-color: #ead5d7; color: #873d46; background: #fff8f8; }
.copy-success-toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; max-width: calc(100vw - 36px);
  padding: 9px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  color: #fff; background: var(--navy); box-shadow: 0 8px 24px rgba(25,43,73,.2);
  font-size: 11px; font-weight: 650; line-height: 1.4; opacity: 0; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease; pointer-events: none;
}
.copy-success-toast.is-visible { opacity: 1; transform: translateY(0); }
.copy-success-toast[hidden] { display: none; }
.method-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-control); }
.method-icon { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #536989; background: #e6ebf2; font-family: Georgia,serif; font-size: 10px; font-weight: 700; }
.method-note p { margin: 0; color: #738097; font-size: 9px; line-height: 1.5; }
.method-note strong { color: #405777; }
.footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 24px; padding-top: 11px; border-top: 1px solid var(--line); color: #8995a7; font-size: 9px; letter-spacing: .35px; }

@media (max-width: 1320px) {
  .main-content { padding-right: 30px; padding-left: 30px; }
  .filter-primary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .field-transaction, .search-field { grid-column: span 3; }
  .cards-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  .main-content { padding-right: 22px; padding-left: 22px; }
  .advanced-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .insight-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); }
  .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .app-shell { grid-template-columns: 64px minmax(0,1fr); }
  .sidebar { min-height: 100vh; padding: 18px 8px; }
  .brand { justify-content: center; margin: 3px 0 42px; }
  .brand > span:last-child, .side-label, .nav-item > span:not(.nav-icon):not(.nav-dot), .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active { border-left-color: transparent; box-shadow: 0 2px 5px rgba(25,43,73,.15); }
  .nav-icon { font-size: 19px; }
  .nav-dot { display: none; }
  .insight-grid { grid-template-columns: 1fr; }
  .estimate-card { min-height: 205px; }
  .data-workspace { grid-template-columns: 60px minmax(0,1fr); }
  .import-button { grid-column: 2; justify-self: start; }
  .data-section-title { display: block; }
  .data-section-title > p { margin: 7px 0 0 32px; }
}
@media (max-width: 560px) {
  .field-transaction .segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; min-height: 0; position: sticky; z-index: 5; top: 0; flex-direction: row; align-items: center; justify-content: space-between; padding: 9px 13px; box-shadow: 0 4px 14px rgba(17,29,51,.13); }
  .admin-menu { top: 52px; gap: 6px; margin: 0 -13px 12px; padding: 7px 13px; scrollbar-width: none; }
  .admin-menu::-webkit-scrollbar { display: none; }
  .admin-menu a { padding: 7px 9px; font-size: 9px; }
  .brand { gap: 7px; margin: 0; }
  .brand > span:last-child { display: block; }
  .brand-mark { width: 24px; transform: scale(.82); transform-origin: left center; }
  .brand strong { font-size: 19px; }
  .brand small { margin-top: 3px; font-size: 7px; }
  .side-nav { display: flex; gap: 4px; }
  .nav-item { width: 32px; height: 32px; min-height: 32px; }
  .nav-icon { font-size: 16px; }
  .main-content { padding: 0 13px 20px; }
  .topbar { height: 54px; }
  .breadcrumbs { font-size: 7px; }
  .top-actions { gap: 7px; }
  .local-badge { padding: 5px 6px; font-size: 7px; }
  .icon-button { width: 27px; height: 27px; }
  .avatar { width: 25px; height: 25px; }
  .intro-row { min-height: 154px; padding: 17px 0; }
  .intro-row h1 { font-size: 30px; }
  .intro-copy { max-width: 315px; font-size: 10px; }
  .eyebrow { font-size: 7px; }
  .intro-mark { width: 80px; height: 80px; flex-basis: 80px; margin-right: 1px; }
  .intro-mark::before { inset: 5px; }
  .intro-mark-top { font-size: 7px; }
  .intro-mark-value { font-size: 21px; }
  .intro-mark-caption { font-size: 5px; }
  .neighborhood-panel { gap: 10px; margin-bottom: 14px; padding: 13px 12px; }
  .neighborhood-heading-copy h2 { font-size: 15px; }
  .neighborhood-heading-copy p { font-size: 9px; }
  .neighborhood-total { min-width: 96px; gap: 7px; padding: 7px 8px; }
  .neighborhood-total strong { font-size: 18px; }
  .neighborhood-panel-subhead { font-size: 7px; }
  .neighborhood-panel-subhead strong { font-size: 8.5px; }
  .neighborhood-panel-subhead > span { font-size: 8px; }
  .neighborhood-suggestion { min-width: 0; flex: 1 1 calc(50% - 4px); padding: 8px; }
  .quick-neighborhood-grid { grid-template-columns: 1fr; gap: 7px; }
  .quick-location-card { gap: 8px; padding: 9px; }
  .quick-search-option { min-width: 0; flex-basis: calc(50% - 3px); padding: 7px; }
  .quick-district-list .quick-search-option { min-width: 0; flex-basis: 100%; }
  .quick-search-option .neighborhood-suggestion-count { font-size: 6px; }
  #quickPage .quick-desktop-district-heading, #quickPage .quick-desktop-district-list { display: none; }
  #quickPage .quick-mobile-district-groups { display: grid; gap: 9px; }
  #quickPage .quick-mobile-district-group { display: grid; gap: 5px; }
  #quickPage .quick-mobile-district-field { max-width: none; }
  #quickPage .quick-mobile-district-result .quick-search-option { width: 100%; min-width: 0; }
  #quickPage .annual-growth-section { margin-bottom: 0; }
  .filter-panel { padding: 13px 11px 10px; }
  .filter-heading h2, .card-heading h2, .results-heading h2, .data-section-title h2 { font-size: 12px; }
  .filter-primary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 8px; margin-top: 13px; }
  .field-transaction, .search-field { grid-column: span 2; }
  .filter-year-strip { align-items: flex-start; flex-direction: column; gap: 5px; margin-top: 10px; padding-top: 9px; }
  .year-chips { width: 100%; min-height: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .year-chip { width: 100%; min-height: 35px; padding: 0 5px; font-size: 9px; }
  #quickPage .filter-year-strip { gap: 7px; margin: 12px 0 16px; padding: 10px 11px; border-radius: 8px; background: linear-gradient(110deg,#e8ecf2,var(--surface)); box-shadow: 0 2px 8px rgba(25,43,73,.045); }
  #quickPage .filter-year-strip > strong { color: #718098; font-size: 8px; letter-spacing: .55px; }
  #quickPage .year-chips { display: flex; flex-wrap: wrap; gap: 4px; }
  #quickPage .year-chip { width: auto; min-height: 29px; flex: 0 0 auto; padding: 0 10px; border-radius: 5px; font-size: 9px; }
  #quickPage .year-chip.selected, #quickPage .year-chip.period-chip.selected { box-shadow: none; }
  .filter-field label { font-size: 8px; }
  .filter-field select, .filter-field input { height: 34px; font-size: 10px; }
  .segmented { min-height: 34px; }
  .segmented button { font-size: 9px; }
  .advanced-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 8px; }
  .advanced-filters summary > span:nth-of-type(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .active-filters { gap: 4px; margin-top: 8px; }
  .filter-chip { min-height: 21px; font-size: 8px; }
  .section-index { width: 21px; height: 21px; margin-right: 7px; }
  .insight-grid { gap: 8px; margin: 9px 0 20px; }
  .estimate-card { min-height: 194px; padding: 13px; }
  .estimate-value { font-size: 25px; }
  .annual-estimate-context { font-size: 9px; }
  .annual-average-grid { grid-template-columns: 1fr; gap: 6px; }
  .annual-year-card { grid-template-columns: 42px minmax(0,1fr) minmax(68px,80px); grid-template-areas: "year average change" "year sample change"; align-items: center; gap: 3px 8px; padding: 8px 9px; }
  .annual-year-top { grid-area: year; flex-direction: column; align-items: flex-start; gap: 2px; }
  .annual-year-top strong { font-size: 15px; }
  .annual-year-top span { font-size: 6px; }
  .annual-average-block { grid-area: average; display: flex; align-items: baseline; gap: 5px; }
  .annual-average-block small { flex: none; font-size: 7px; }
  .annual-average-value { font-size: 13px; }
  .annual-year-sample { grid-area: sample; font-size: 7px; }
  .annual-change { grid-area: change; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 0; border-top: 0; }
  .annual-change small { font-size: 6px; text-align: right; }
  .annual-change strong { font-size: 9px; }
  .annual-change.flat strong, .annual-change.unavailable strong { font-size: 7px; }
  .results-heading { align-items: flex-start; gap: 8px; }
  .results-heading h2 { font-size: 11px; }
  .results-heading p { max-width: 205px; font-size: 8px; line-height: 1.4; }
  .results-tools { flex-wrap: wrap; justify-content: flex-end; gap: 5px 8px; }
  .result-range, .sort-control, .page-size-control { font-size: 8px; }
  .sort-control select, .page-size-control select { padding: 5px; font-size: 8px; }
  .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .property-card { min-height: 139px; padding: 8px; }
  .card-topline { margin-bottom: 6px; }
  .transaction-badge { padding: 3px 5px; font-size: 7px; }
  .year-badge { font-size: 8px; }
  .property-title-row { display: block; }
  .property-title { font-size: 10px; }
  .location-line { font-size: 8px; }
  .card-price { margin-top: 6px; font-size: 12px; text-align: left; }
  .card-price.missing { font-size: 9px; }
  .card-address { margin-top: 5px; font-size: 8px; }
  .card-meta { gap: 3px; padding-top: 6px; }
  .meta-chip { padding: 3px 4px; font-size: 7px; }
  .pagination { gap: 5px; }
  .pagination-pages { gap: 2px; }
  .page-button, .pagination-step { min-width: 28px; height: 29px; padding: 0 5px; font-size: 9px; }
  .pagination-step { padding: 0 7px; }
  .pagination-step span { display: none; }
  .page-status { display: inline; }
  .data-workspace { grid-template-columns: 42px minmax(0,1fr); gap: 8px; padding: 11px; }
  .folder-illustration { transform: scale(.7); transform-origin: left center; }
  .folder-copy p { font-size: 8px; }
  .import-button { font-size: 9px; }
  .method-note p { font-size: 8px; }
  .footer { font-size: 7px; }
}
@media (max-width: 380px) {
  .cards-grid { grid-template-columns: 1fr; }
  .property-card { min-height: 0; }
  .property-title-row { display: flex; }
  .card-price { margin-top: 0; text-align: right; }
  .intro-mark { display: none; }
}

/* Comparable transactions: desktop table and compact horizontal rows on small screens. */
.comparables-table-wrap { width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 3px 14px rgba(25,43,73,.035); }
.comparables-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.comparables-table .col-property { width: 23%; }
.comparables-table .col-city { width: 9%; }
.comparables-table .col-district { width: 10%; }
.comparables-table .col-neighborhood { width: 13%; }
.comparables-table .col-rooms { width: 10%; }
.comparables-table .col-date { width: 12%; }
.comparables-table .col-price { width: 14%; }
.comparables-table .col-detail { width: 9%; }
.comparables-table thead th { position: sticky; z-index: 1; top: 0; padding: 11px 9px; border-bottom: 1px solid var(--line); color: #718098; background: var(--surface-muted); font-size: 8px; font-weight: 750; letter-spacing: .55px; text-align: left; text-transform: uppercase; }
.comparables-table thead th:nth-child(5), .comparables-table thead th:nth-child(7), .comparables-table thead th:nth-child(8) { text-align: center; }
.comparables-table tbody td { min-width: 0; padding: 10px 9px; border-bottom: 1px solid #edf0f4; color: #52617a; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; vertical-align: middle; }
.comparables-table tbody td:nth-child(5) { text-align: center; white-space: nowrap; }
.comparables-table tbody tr:nth-child(even) td { background: var(--surface-control); }
.comparables-table tbody tr:last-child td { border-bottom: 0; }
.comparables-table tbody tr:hover td { background: var(--surface-hover); }
.record-primary { min-width: 0; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: start; gap: 4px 8px; }
.record-thumb { width: 36px; height: 42px; grid-row: 1 / span 2; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: #536988; background: linear-gradient(145deg,var(--surface),var(--surface-muted)); font-size: 21px; }
.record-primary .transaction-badge { grid-column: 2; justify-self: start; }
.record-property-copy { min-width: 0; grid-column: 2; display: grid; gap: 3px; }
.record-title { color: var(--navy); font-size: 10px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.record-address { color: #7b8799; font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.record-attribute-summary { display: -webkit-box; min-width: 0; color: #586a83; font-size: 8px; line-height: 1.4; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.record-mobile-location, .record-mobile-date { display: none; }
.record-price-cell { text-align: center; }
.record-price { color: var(--red); font-size: 10px; font-weight: 700; white-space: nowrap; }
.record-price.missing { color: #929daf; font-size: 9px; font-weight: 500; white-space: normal; }
.record-detail-cell { text-align: center; }
.detail-button { min-height: 31px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: var(--surface-control); font-size: 9px; font-weight: 650; white-space: nowrap; transition: color .16s, border-color .16s, background .16s; }
.detail-button:hover, .detail-button:focus-visible { border-color: #c98087; color: var(--red); background: #fffafb; }
.detail-button span { color: var(--red); font-size: 11px; }
.comparables-table-wrap:focus-within { outline: 2px solid rgba(168,67,77,.18); outline-offset: 2px; }

.detail-dialog { width: min(720px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 70px rgba(12,24,42,.24); }
.detail-dialog::backdrop { background: rgba(12,22,39,.58); backdrop-filter: blur(3px); }
.detail-dialog-shell { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 20px; }
.detail-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid #e9edf2; }
.detail-dialog-kicker { color: var(--red); font-size: 8px; font-weight: 750; letter-spacing: 1px; }
.detail-dialog-header h2 { margin: 4px 0 0; color: var(--navy); font-size: 20px; letter-spacing: -.45px; }
.detail-close { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #596b85; background: var(--surface-control); font-size: 24px; line-height: 1; }
.detail-close:hover, .detail-close:focus-visible { border-color: #d7a6ab; color: var(--red); background: #fffafb; }
.detail-dialog .property-card { min-height: 0; margin: 14px 0 18px; padding: 15px; border-color: #dfe4ec; border-radius: 8px; box-shadow: 0 4px 15px rgba(25,43,73,.045); }
.detail-dialog .property-title { overflow: visible; white-space: normal; }
.detail-dialog .location-line { overflow: visible; white-space: normal; }
.detail-dialog .card-address { max-height: none; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.detail-facts-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 2px 0 9px; }
.detail-facts-heading h3 { margin: 0; color: var(--navy); font-size: 12px; }
.detail-facts-heading span { color: #8894a6; font-size: 9px; }
.detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.detail-fact { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-control); }
.detail-fact dt { margin: 0 0 4px; color: #7d899c; font-size: 8px; font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
.detail-fact dd { margin: 0; color: #354762; font-size: 10px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.detail-disclaimer { margin: 12px 0 0; padding: 10px 11px; border-left: 3px solid var(--red); border-radius: 0 5px 5px 0; color: #687790; background: var(--surface-muted); font-size: 9px; line-height: 1.5; }

@media (max-width: 980px) {
  .comparables-table-wrap { overflow: hidden; }
  .comparables-table, .comparables-table thead, .comparables-table tbody { display: block; width: 100%; }
  .comparables-table colgroup { display: none; }
  .comparables-table thead tr, .comparables-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0,1fr) 52px minmax(96px,max-content) 64px;
    align-items: center;
    gap: 4px;
  }
  .comparables-table thead { border-bottom: 1px solid var(--line); background: var(--surface-muted); }
  .comparables-table thead th { position: static; display: block; padding: 9px 5px; border: 0; font-size: 9px; text-align: left; }
  .comparables-table thead th:nth-child(2), .comparables-table thead th:nth-child(3),
  .comparables-table thead th:nth-child(4), .comparables-table thead th:nth-child(6) { display: none; }
  .comparables-table thead th:nth-child(5), .comparables-table thead th:nth-child(7),
  .comparables-table thead th:nth-child(8) { text-align: center; }
  .comparables-table tbody tr { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; }
  .comparables-table tbody tr:nth-child(even) { background: var(--surface-control); }
  .comparables-table tbody td {
    min-width: 0; display: block; padding: 8px 5px; border: 0; color: #52617a;
    background: transparent; font-size: 10px; text-align: left;
  }
  .comparables-table tbody tr:nth-child(even) td { background: transparent; }
  .comparables-table tbody td::before { display: none; content: none; }
  .comparables-table tbody td:nth-child(2), .comparables-table tbody td:nth-child(3),
  .comparables-table tbody td:nth-child(4), .comparables-table tbody td:nth-child(6) { display: none; }
  .comparables-table tbody tr:hover td { background: transparent; }
  .comparables-table .record-property-cell { padding-left: 8px; }
  .record-primary { grid-template-columns: 32px minmax(0,1fr); gap: 3px 7px; }
  .record-thumb { width: 32px; height: 36px; font-size: 18px; }
  .record-title { font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .record-address { display: none; }
  .record-mobile-location { display: -webkit-box; min-width: 0; color: #77849a; font-size: 11px; line-height: 1.3; white-space: normal; overflow: hidden; overflow-wrap: normal; word-break: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .record-mobile-date { display: block; min-width: 0; color: #909bad; font-size: 10px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .comparables-table .record-rooms-cell { text-align: center; font-size: 12px; font-weight: 650; white-space: nowrap; }
  .comparables-table .record-price-cell { text-align: right; white-space: nowrap; }
  .record-price { font-size: 13px; }
  .comparables-table .record-detail-cell { text-align: center; }
  .detail-button { width: 100%; min-height: 40px; padding: 0 4px; font-size: 10px; }
}

@media (max-width: 560px) {
  .results-heading { flex-direction: column; align-items: stretch; }
  .results-tools { width: 100%; justify-content: space-between; gap: 6px; }
  .result-range { margin-right: auto; }
  .detail-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
  .detail-dialog-shell { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 14px; }
  .detail-dialog-header h2 { font-size: 17px; }
  .detail-close { width: 44px; height: 44px; flex-basis: 44px; }
  .comparables-table .detail-button { min-height: 44px; }
  .detail-dialog .property-card { margin: 11px 0 14px; padding: 12px; }
  .detail-facts { grid-template-columns: 1fr; gap: 6px; }
  .detail-fact { padding: 9px 10px; }
  .detail-facts-heading span { font-size: 8px; text-align: right; }
}

@media (max-width: 380px) {
  .detail-dialog-shell { padding: 11px; }
}

/* Mobile refinements: keep each result as a readable, touch-friendly table row. */
@media (max-width: 560px) {
  .filter-field label { font-size: 9px; }
  .filter-field select, .filter-field input { min-height: 44px; height: 44px; font-size: 13px; }
  .filter-field input[type="search"] { font-size: 16px; }
  .search-wrap > span { top: 10px; }
  .segmented { min-height: 44px; }
  .segmented button { min-height: 36px; padding: 0 4px; font-size: 10px; }
  .advanced-filters summary { min-height: 44px; }
  .year-chip { min-height: 38px; }
  .active-filters { gap: 6px; }
  .filter-chip { min-height: 29px; padding: 3px 8px; font-size: 9px; }
  .results-tools { flex-wrap: wrap; }
  .result-range, .sort-control, .page-size-control { font-size: 10px; }
  .sort-control select, .page-size-control select { min-height: 38px; font-size: 11px; }

  .comparables-table thead tr, .comparables-table tbody tr { grid-template-columns: minmax(0,1fr) 56px minmax(78px,max-content) 50px; gap: 2px; }
  .comparables-table thead th { padding: 8px 3px; font-size: 9px; letter-spacing: .1px; }
  .comparables-table thead th:nth-child(5) { font-size: 8px; line-height: 1.15; white-space: normal; }
  .comparables-table tbody td, .comparables-table tbody tr:nth-child(even) td { padding: 7px 3px; font-size: 11px; }
  .comparables-table .record-property-cell { padding-left: 6px; }
  .record-primary { grid-template-columns: 29px minmax(0,1fr); gap: 2px 5px; }
  .record-thumb { width: 29px; height: 33px; font-size: 16px; }
  .record-title { font-size: 12px; }
  .record-mobile-location { font-size: 10px; }
  .record-mobile-date { font-size: 10px; }
  .record-price { font-size: 12px; }
  .record-price.missing { font-size: 10px; }
  .comparables-table .record-rooms-cell { font-size: 12px; }
  .detail-button { min-height: 44px; padding: 0 2px; font-size: 11px; }
  .detail-button span { display: none; }

  .detail-dialog .property-title { font-size: 13px; }
  .detail-dialog .location-line { font-size: 11px; }
  .detail-dialog .card-price { font-size: 17px; }
  .detail-dialog .card-address { font-size: 11px; }
  .detail-fact dt { font-size: 9px; }
  .detail-fact dd { font-size: 12px; }
}

@media (max-width: 380px) {
  .main-content { padding-right: 10px; padding-left: 10px; }
  .comparables-table thead tr, .comparables-table tbody tr { grid-template-columns: minmax(0,1fr) 50px minmax(74px,max-content) 46px; gap: 1px; }
  .comparables-table tbody td, .comparables-table tbody tr:nth-child(even) td { padding-right: 2px; padding-left: 2px; }
}

/* Account access, user administration, and direct Excel uploads. */
.account-username { max-width: 150px; overflow: hidden; color: #61718a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-admin-link { color: var(--navy); font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.account-admin-link:hover { color: var(--red); text-decoration: underline; }
.account-manual-link { padding: 7px 9px; border-radius: 5px; color: var(--red); background: var(--red-soft); }
.account-manual-link:hover { color: var(--red); background: var(--surface-hover); text-decoration: none; }
.account-logout { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); background: var(--surface-control); font-size: 10px; font-weight: 650; }
.account-logout:hover { border-color: #d7b2b6; color: var(--red); }
.data-workspace { grid-template-columns: 76px minmax(0, 1fr); }
.file-uploader { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; min-width: 0; }
.file-dropzone { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 75px; padding: 12px 14px; border: 1px dashed #aab5c4; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.38); cursor: pointer; transition: border-color .16s, background .16s; }
.file-dropzone:hover, .file-dropzone:focus-visible, .file-dropzone.drag-active { outline: none; border-color: var(--red); background: #fff8f8; }
.file-dropzone strong { font-size: 11px; }
.file-dropzone > span { color: var(--muted); font-size: 10px; }
.file-dropzone small { flex-basis: 100%; color: var(--muted); font-size: 9px; }
.file-input-hidden { display: none !important; }
.browse-button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--navy); background: var(--surface); font-size: 10px; font-weight: 650; }
.browse-button:hover { border-color: #d7b2b6; color: var(--red); }
.selected-files { grid-column: 1; min-width: 0; color: #68768b; font-size: 10px; }
.selected-files ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.selected-files li { max-width: 100%; overflow: hidden; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); text-overflow: ellipsis; white-space: nowrap; }
.selected-files li span { margin-left: 6px; color: #8793a5; }
.file-uploader .import-button { grid-column: 2; grid-row: 1 / 3; min-height: 40px; }
.file-uploader .import-button:disabled { cursor: not-allowed; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.auth-brand { margin: 0 0 38px; }
.auth-card .eyebrow { margin: 0 0 9px; color: var(--red); font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.auth-card h1 { margin: 0; color: var(--navy); font-size: 26px; letter-spacing: -.7px; }
.auth-intro { margin: 8px 0 22px; color: #758197; font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 7px; color: #718098; font-size: 9px; font-weight: 700; letter-spacing: .7px; }
.auth-field input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; outline: none; color: var(--ink); background: #fffdfa; font-size: 13px; letter-spacing: normal; }
.auth-field input:focus { border-color: #889ab2; box-shadow: 0 0 0 3px rgba(82,105,136,.12); }
.password-control { position: relative; display: flex; align-items: center; }
.password-control input { padding-right: 68px; }
.password-visibility { position: absolute; right: 5px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 4px; color: var(--navy); background: transparent; font-size: 10px; font-weight: 650; }
.password-visibility:hover { color: var(--red); background: var(--surface-muted); }
.auth-submit { min-height: 42px; padding: 0 15px; border: 0; border-radius: 6px; color: #fff; background: var(--navy); font-size: 11px; font-weight: 700; }
.auth-submit:hover { background: var(--navy-dark); }
.auth-submit:disabled { opacity: .62; cursor: wait; }
.secondary-button { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: var(--surface); font-size: 9px; font-weight: 650; white-space: nowrap; }
.secondary-button:hover { border-color: #aab5c4; background: var(--surface-hover); }
.auth-notice { margin-top: 12px; }
.auth-help, .form-hint { margin: 14px 0 0; color: #7b8799; font-size: 10px; line-height: 1.6; }
.auth-help code { padding: 2px 4px; border-radius: 3px; color: #465773; background: var(--surface-muted); font-size: 10px; }


.manual-entry-panel { margin-top: 14px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.manual-entry-panel > summary { display: flex; align-items: center; gap: 7px; color: var(--navy); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.manual-entry-panel > summary::-webkit-details-marker { display: none; }
.manual-entry-panel > summary span { color: var(--red); font-size: 16px; }
.manual-entry-intro { margin: 9px 0 14px; color: #728097; font-size: 10px; line-height: 1.5; }
.manual-record-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.manual-dynamic-field { min-width: 0; }
.manual-step-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.manual-step-group[hidden] { display: none; }
.manual-extra-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-control); }
.manual-extra-grid[hidden] { display: none; }
.manual-extra-grid .auth-field { min-width: 0; }
.manual-extra-heading { grid-column: 1 / -1; color: var(--navy); font-size: 10px; letter-spacing: .06em; }
.manual-record-grid .auth-field input, .manual-record-grid .auth-field select { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; color: var(--ink); background: #fffdfa; font-size: 12px; letter-spacing: normal; }
.manual-record-grid .auth-field input:focus, .manual-record-grid .auth-field select:focus { border-color: #889ab2; box-shadow: 0 0 0 3px rgba(82,105,136,.12); }
.manual-record-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.manual-record-actions [hidden] { display: none; }
.manual-record-actions > span, .data-export-row > span { color: #7b8799; font-size: 10px; line-height: 1.5; }
.manual-record-actions .auth-submit { min-width: 140px; }
.manual-announcement { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.manual-announcement[hidden] { display: none; }
.manual-announcement-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.manual-announcement-heading h3 { margin: 0; color: var(--navy); font-size: 12px; }
.manual-announcement-heading p { margin: 4px 0 0; color: #7b8799; font-size: 10px; }
.manual-announcement textarea { display: block; width: 100%; min-height: 150px; padding: 11px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fffdfa; font: inherit; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.manual-announcement-status { display: block; min-height: 15px; margin-top: 5px; color: var(--navy); font-size: 10px; }
.data-export-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-control); }
.data-export-row .import-button { display: inline-block; text-decoration: none; }

@media (max-width: 800px) {
  .manual-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-step-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .top-actions { gap: 6px; }
  .account-username { display: none; }
  .account-admin-link { font-size: 9px; }
  .account-logout { min-height: 34px; padding: 0 7px; font-size: 9px; }
  .data-workspace { grid-template-columns: 1fr; }
  .folder-illustration { display: none; }
  .file-uploader { grid-template-columns: 1fr; }
  .file-dropzone, .selected-files, .file-uploader .import-button { grid-column: 1; grid-row: auto; }
  .file-uploader .import-button { width: 100%; min-height: 44px; }
  .auth-page { padding: 14px; }
  .auth-card { padding: 25px 20px; }
  .auth-brand { margin-bottom: 28px; }
  .manual-entry-panel { padding: 13px; }
  .manual-record-grid { grid-template-columns: 1fr; gap: 10px; }
  .manual-step-group { grid-template-columns: 1fr; gap: 10px; }
  .manual-extra-grid { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .manual-record-actions, .data-export-row { align-items: stretch; flex-direction: column; }
  .manual-record-actions .auth-submit, .manual-record-actions .secondary-button, .data-export-row .import-button { width: 100%; min-height: 42px; }
  .manual-announcement-heading { align-items: stretch; flex-direction: column; }
  .manual-announcement-heading .import-button { width: 100%; min-height: 42px; }
}
