/* Public service shell. Legacy design previews retain their own layouts. */
html[data-portal] {
  --rail-width:0px; --header-height:72px; --navigation-height:56px;
  --content-top:calc(var(--header-height) + var(--navigation-height));
  --ink:#182b44; --muted:#62748b; --paper:#f4f6f9; --surface:#ffffff;
  --soft:#f4f7fb; --line:#dfe5ed; --accent:#1262d9; --selected:#edf4ff;
  --chart-primary:#1764c7; --chart-secondary:#12877d; --chart-tertiary:#7462b5;
  --chart-warning:#aa791c; --chart-negative:#c74c4c; --chart-ink:#182b44;
  --chart-muted:#63748b; --chart-line:#bdc9d8; --chart-grid:#e9eef4;
  --chart-tooltip:#ffffff; color-scheme:light;
}
html[data-portal] body { --ink:#182b44; --muted:#62748b; --paper:#f4f6f9; --surface:#ffffff; --soft:#f4f7fb; --line:#dfe5ed; --accent:#1262d9; --selected:#edf4ff; display:block; background:var(--paper); color:var(--ink); font-size:14px; line-height:1.65; }
html[data-portal] :is(button,input,select) { border-radius:6px; transition:background-color .12s,border-color .12s; }
html[data-portal] button { font-weight:500; }
html[data-portal] button:hover:not(:disabled) { background:var(--selected); border-color:#a4bce0; }
html[data-portal] .primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:650; }
html[data-portal] .primary:hover { background:#0c50b7; border-color:#0c50b7; }
html[data-portal] .topbar { display:flex; position:sticky; inset:0 0 auto; z-index:25; height:var(--header-height); padding:12px max(32px,calc((100vw - 1392px)/2)); border-bottom:1px solid var(--line); box-shadow:none; }
html[data-portal] .brand { display:flex; align-items:center; gap:12px; color:var(--ink); white-space:nowrap; }
html[data-portal] .brand-emblem { width:38px; height:38px; color:var(--accent); flex-shrink:0; }
html[data-portal] .brand .brand-copy { display:flex; flex-direction:column; gap:0; margin:0; color:var(--ink); }
html[data-portal] .brand strong { font-size:23px; font-weight:750; letter-spacing:-.06em; line-height:1.3; }
html[data-portal] .brand small { font-size:11px; color:var(--muted); font-weight:450; letter-spacing:.01em; }
html[data-portal] .header-actions { gap:18px; }
html[data-portal] #as-of { font-size:12px; color:var(--muted); }
html[data-portal] #conditions-button { min-height:40px; padding:8px 14px; background:var(--surface); border-color:#cbd6e4; }
html[data-portal] .navigation { display:flex; flex-direction:row; align-items:stretch; position:sticky; inset:auto; top:var(--header-height); z-index:24; height:var(--navigation-height); width:100%; padding:0 max(32px,calc((100vw - 1392px)/2)); gap:32px; background:var(--surface); color:var(--muted); border:0; border-bottom:1px solid var(--line); box-shadow:none; }
html[data-portal] .navigation .rail-brand,html[data-portal] .navigation .rail-note { display:none; }
html[data-portal] .navigation button { display:flex; flex-direction:row; align-items:center; justify-content:center; gap:8px; min-height:0; min-width:108px; padding:0 4px; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; color:var(--muted); font-size:15px; font-weight:650; box-shadow:none; }
html[data-portal] .navigation button.active { color:var(--accent); border-bottom-color:var(--accent); background:transparent; box-shadow:none; }
html[data-portal] .navigation svg { width:19px; height:19px; }
html[data-portal] main { width:100%; max-width:1456px; min-height:calc(100dvh - var(--content-top)); padding:28px 32px 100px; margin:0 auto; }
html[data-portal] h1 { font-size:28px; font-weight:750; letter-spacing:-.045em; }
html[data-portal] h2 { font-size:18px; font-weight:700; letter-spacing:-.025em; }
html[data-portal] h3 { letter-spacing:-.02em; }
html[data-portal] .heading { margin-bottom:24px; }
html[data-portal] #complex-navigation.journey-navigation { position:static; display:flex; gap:28px; margin:0 0 24px; padding:0; border:0; border-bottom:1px solid var(--line); background:transparent; }
html[data-portal] #complex-navigation.journey-navigation button { flex:none; min-height:44px; padding:0 2px 10px; border:0; border-bottom:2px solid transparent; background:transparent; border-radius:0; box-shadow:none; }
html[data-portal] #complex-navigation.journey-navigation button[aria-current=page] { color:var(--accent); border-bottom-color:var(--accent); background:transparent; }
html[data-portal] .journey-title { font-size:14px; }
html[data-portal] #complex-navigation #compare-count { border-radius:4px; background:#e8edf4; }
html[data-portal] #complex-navigation button[aria-current] #compare-count { background:var(--selected); color:var(--accent); }
html[data-portal] .card { border:1px solid var(--line); border-radius:10px; padding:24px; box-shadow:none; }
html[data-portal] .chart-grid { gap:20px; }
html[data-portal] #discovery-header { margin-bottom:24px; }
html[data-portal] #discovery-header .complex-search { grid-template-columns:minmax(240px,.9fr) minmax(0,1.4fr); padding:28px; border-top:3px solid #233f66; gap:0 36px; }
html[data-portal] #discovery-title { font-size:28px; line-height:1.35; letter-spacing:-.05em; margin-bottom:10px; }
html[data-portal] .search-intro p { font-size:14px; max-width:35ch; line-height:1.7; }
html[data-portal] #discovery-header .search-scope-control { margin-bottom:8px; gap:12px; }
html[data-portal] #discovery-header .search-scope-control label { color:var(--muted); }
html[data-portal] #discovery-header .search-scope-control select { color:var(--ink); font-weight:600; }
html[data-portal] #discovery-header .complex-search-controls { min-height:58px; padding:5px 5px 5px 16px; border:2px solid var(--accent); border-radius:8px; gap:12px; }
html[data-portal] #discovery-header .complex-search-controls input { min-height:44px; font-size:16px; }
html[data-portal] #discovery-header .complex-search-controls button { min-width:80px; min-height:44px; }
html[data-portal] #complex-search-scope-note { color:var(--muted); font-size:12px; margin-top:8px; }
html[data-portal] #discovery-header .search-recent { margin-top:24px; padding-top:18px; }
html[data-portal] #query-context { padding:16px 20px; margin-bottom:20px; border-radius:8px; gap:12px 24px; }
html[data-portal] .quick-filters { gap:8px; }
html[data-portal] .kind-switch { padding:3px; border:1px solid #e1e7f0; background:#f1f4f8; border-radius:7px; }
html[data-portal] .kind-switch button { min-height:36px; padding:6px 14px; }
html[data-portal] .kind-switch button[aria-pressed=true] { box-shadow:0 1px 3px #16325212; color:var(--accent); }
html[data-portal] #region-change { font-weight:650; color:var(--ink); }
html[data-portal] .listing { padding:0; overflow:hidden; }
html[data-portal] .listing > .section-heading { padding:22px 24px 0; margin-bottom:8px; }
html[data-portal] #listing-location-slot #query-context { padding:0 24px 18px; border:0; margin:0; }
html[data-portal] .listing-columns { padding:10px 24px; background:#f7f9fc; font-size:12px; }
html[data-portal] #complex-list .complex-row { padding:20px 24px; }
html[data-portal] #complex-list .complex-row:hover { background:#f9fbfe; }
html[data-portal] .name-button { color:#1e3554; font-size:16px; font-weight:650; }
html[data-portal] .complex-row .amount strong { font-size:24px; font-weight:750; letter-spacing:-.045em; }
html[data-portal] .complex-row .amount small { font-size:12px; }
html[data-portal] .compare-add { border-color:#c9d6e7; color:#365579; background:white; }
html[data-portal] .compare-add[aria-pressed=true] { background:var(--selected); color:var(--accent); border-color:#8eb2e7; }
html[data-portal] .journey-context { margin-bottom:18px; }
html[data-portal] .journey-context > summary { min-height:36px; padding:6px 0; font-size:12px; }
html[data-portal] .metrics { background:var(--surface); border:1px solid var(--line); border-radius:8px; }
html[data-portal] .metric { padding:0 24px; }
html[data-portal] .metric strong { font-size:28px; letter-spacing:-.045em; }
html[data-portal] .metric span { font-size:13px; color:var(--muted); }
html[data-portal] .metric small { font-size:12px; }
html[data-portal] #detail-name { font-size:26px; }
html[data-portal] #detail-address { font-size:13px; margin:6px 0 12px; }
html[data-portal] .detail-region-link { min-height:36px; margin:0; padding:5px 10px; font-size:12px; color:var(--accent); background:var(--selected); border-color:#d4e3fa; }
html[data-portal] #detail-area { min-width:180px; }
html[data-portal] #detail-metrics { border-radius:8px; margin-top:20px; }
html[data-portal] #detail-metrics .metric { padding:20px; }
html[data-portal] #detail-metrics .metric strong { font-size:26px; }
html[data-portal] .section-links { top:var(--content-top); gap:28px; border-bottom-color:#d2dce9; }
html[data-portal] .section-links button { min-height:48px; }
html[data-portal] .trend-window { background:#f7f9fc; border:1px solid #e9eef5; }
html[data-portal] .trend-year-options button { min-width:56px; }
html[data-portal] .distribution-method summary { font-size:12px; }
html[data-portal] #settings-dialog { border:1px solid #d5dfeb; border-radius:12px; box-shadow:0 20px 60px #182b4433; }
html[data-portal] .settings-heading { padding:20px 24px; }
html[data-portal] #compare-tray { border-radius:8px; border-color:#c4d7f2; box-shadow:0 4px 18px #18345a14; }
html[data-portal] .compare-table th { background:#f5f8fc; font-size:13px; }
html[data-portal] .compare-table td { font-size:14px; }
html[data-portal] .comparison-summary { background:#f7faff; padding:12px 16px; border-left-color:#7da8e7; }
html[data-portal] .method { padding:18px 20px; margin:24px 0; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:13px; }
html[data-portal] .method p { max-width:100ch; }
html[data-portal] footer { display:flex; align-items:center; justify-content:space-between; gap:20px; width:100%; max-width:1456px; margin:0 auto; padding:28px 32px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
html[data-portal] .footer-source { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; }
html[data-portal] .footer-source strong { font-size:14px; color:var(--ink); }
html[data-portal] body[data-view=map] main,html[data-portal] body[data-view=map]:has(#compare-tray:not([hidden])) main { height:calc(100dvh - var(--content-top)); min-height:0; max-width:none; padding:16px 24px; }
html[data-portal] body[data-view=map] footer { display:none; }
html[data-portal] .map-workspace-toolbar { padding:10px 16px; }
html[data-portal] .map-panel-heading { padding:20px; }
html[data-portal] .map-property-row { padding:18px 20px; }
html[data-portal] .map-selected-heading { background:#f0f5fc; }
html[data-portal] .map-selected-price strong { font-size:30px; }
html[data-portal] body[data-view=map] #query-context { margin:0; padding:8px 14px; border-radius:0; }
html[data-portal] body[data-view=map] #compare-tray { box-shadow:none; border:0; }
@media(max-width:1100px) {
  html[data-portal] main { padding:24px 24px 100px; }
  html[data-portal] #discovery-header .complex-search { grid-template-columns:minmax(210px,.8fr) minmax(0,1.2fr); gap:0 24px; padding:24px; }
  html[data-portal] #discovery-title { font-size:25px; }
}
@media(max-width:900px) {
  html[data-portal] { --header-height:60px; --navigation-height:48px; }
  html[data-portal] .topbar { padding:8px 20px; }
  html[data-portal] .brand-emblem { width:32px; height:32px; }
  html[data-portal] .brand { gap:8px; }
  html[data-portal] .brand strong { font-size:20px; }
  html[data-portal] .brand small { font-size:10px; }
  html[data-portal] .navigation { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding:0 20px; }
  html[data-portal] .navigation button { min-width:0; gap:6px; font-size:13px; }
  html[data-portal] main { padding:20px 20px 100px; }
  html[data-portal] #complex-navigation.journey-navigation { gap:24px; margin-bottom:20px; }
  html[data-portal] #discovery-header .complex-search { grid-template-columns:minmax(0,1fr); }
  html[data-portal] .search-intro { margin-bottom:16px; }
  html[data-portal] #complex-search-scope-note { grid-column:1; }
  html[data-portal] .metric { padding:16px; }
  html[data-portal] .header-actions { gap:8px; }
  html[data-portal] #as-of { display:none; }
  html[data-portal] #detail-metrics .metric { padding:16px; }
  html[data-portal] #detail-metrics .metric strong { font-size:23px; }
  html[data-portal] body[data-view=map] main,html[data-portal] body[data-view=map]:has(#compare-tray:not([hidden])) main { padding:0; }
  html[data-portal] .map-workspace-toolbar { padding:10px 12px; }
  html[data-portal] .map-panel-heading { padding:16px; }
  html[data-portal] .map-property-row { padding:16px; }
}
@media(max-width:600px) {
  html[data-portal] { --header-height:56px; }
  html[data-portal] .topbar { padding:8px 14px; }
  html[data-portal] .brand-emblem { width:30px; height:30px; }
  html[data-portal] .brand strong { font-size:18px; }
  html[data-portal] .brand small { display:none; }
  html[data-portal] #conditions-button { min-height:36px; padding:6px 8px; font-size:12px; }
  html[data-portal] .header-actions svg { width:16px; height:16px; }
  html[data-portal] .navigation { padding:0 12px; }
  html[data-portal] .navigation svg { width:17px; height:17px; }
  html[data-portal] main { padding:16px 12px 96px; }
  html[data-portal] #complex-navigation.journey-navigation { justify-content:flex-start; gap:24px; margin-bottom:16px; }
  html[data-portal] #complex-navigation.journey-navigation button { min-height:38px; padding-bottom:8px; }
  html[data-portal] .journey-title { font-size:13px; }
  html[data-portal] .card { padding:18px 16px; border-radius:8px; }
  html[data-portal] #discovery-header { margin-bottom:16px; }
  html[data-portal] #discovery-header .complex-search { padding:20px 16px; }
  html[data-portal] #discovery-title { font-size:23px; margin-bottom:8px; }
  html[data-portal] .search-intro { margin-bottom:12px; }
  html[data-portal] .search-intro p { font-size:13px; }
  html[data-portal] #discovery-header .complex-search-controls { padding-left:10px; min-height:54px; gap:8px; }
  html[data-portal] #discovery-header .complex-search-controls button { min-width:60px; }
  html[data-portal] #discovery-header .search-recent { margin-top:16px; padding-top:12px; gap:8px; }
  html[data-portal] #query-context { padding:12px; }
  html[data-portal] .listing { padding:0; }
  html[data-portal] .listing > .section-heading { padding:18px 16px 0; }
  html[data-portal] #listing-location-slot #query-context { padding:0 16px 14px; }
  html[data-portal] #complex-list .complex-row { padding:16px; }
  html[data-portal] .name-button { font-size:15px; }
  html[data-portal] .complex-row .amount strong { font-size:22px; }
  html[data-portal] .complex-row .amount small { font-size:12px; }
  html[data-portal] #detail-name { font-size:22px; }
  html[data-portal] #detail-address { font-size:12px; }
  html[data-portal] #detail-metrics { margin-top:14px; }
  html[data-portal] #detail-metrics .metric { padding:14px; }
  html[data-portal] #detail-metrics .metric strong { font-size:23px; }
  html[data-portal] .section-links { gap:22px; }
  html[data-portal] .method { padding:14px 16px; }
  html[data-portal] footer { flex-direction:column; align-items:flex-start; padding:24px 16px; gap:10px; }
  html[data-portal] .map-workspace-toolbar { padding:8px; }
}
@media(max-height:500px) {
  html[data-portal]:has(body[data-view=map]) { --header-height:0px; --navigation-height:48px; }
  html[data-portal] body[data-view=map] .topbar { display:none; }
  html[data-portal] body[data-view=map] .navigation { top:0; }
  html[data-portal] body[data-view=map] main,html[data-portal] body[data-view=map]:has(#compare-tray:not([hidden])) main { padding:0; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-portal] :is(button,input,select) { transition:none; }
}
/* The header's physical height must match the sticky offsets on every screen. */
html[data-portal] .topbar { min-height:var(--header-height); }

html[data-portal] .map-price-marker[aria-pressed=true],html[data-portal] .map-price-marker[aria-pressed=true]:hover { background:var(--accent); color:white; border-color:var(--accent); }
html[data-portal] .map-price-marker[aria-pressed=true] small { color:white; }
html[data-portal] .trend-year-options button[aria-pressed=true]:hover { background:var(--accent); color:white; }
html[data-portal] #detail-filter-slot #query-context { padding:0; margin:16px 0; border:0; }
html[data-portal] #detail-filter-slot .context-location { display:none; }
/* Selection changes immediately so white marker text never crosses a pale transition. */
html[data-portal] .map-price-marker { transition:none; }
@media(max-width:900px) {
  html[data-portal] .detail-region-link { min-height:44px; }
}
@media(max-width:600px) {
  html[data-portal] .topbar { padding-top:6px; padding-bottom:6px; }
  html[data-portal] #conditions-button { min-height:44px; }
}
@media(max-height:600px) and (min-width:600px) {
  html[data-portal] { --header-height:48px; --navigation-height:44px; }
  html[data-portal] .brand-emblem { width:28px; height:28px; }
  html[data-portal] .brand strong { font-size:20px; }
  html[data-portal] .brand small { display:none; }
  html[data-portal] main { padding-top:14px; }
  html[data-portal] #complex-navigation.journey-navigation { margin-bottom:12px; }
  html[data-portal] #complex-navigation.journey-navigation button { min-height:36px; padding-bottom:8px; }
  html[data-portal] #discovery-header .complex-search { grid-template-columns:minmax(190px,.8fr) minmax(0,1.5fr); padding:16px 20px; gap:0 24px; }
  html[data-portal] #discovery-title { font-size:22px; }
  html[data-portal] .search-intro { margin:0; }
  html[data-portal] .search-intro p { font-size:12px; }
}
@media(max-height:500px) and (max-width:599px) {
  html[data-portal] { --header-height:48px; --navigation-height:44px; }
  html[data-portal] main { padding-top:12px; }
  html[data-portal] .search-intro p { display:none; }
  html[data-portal] #discovery-header .complex-search { padding:14px; }
  html[data-portal] #discovery-title { font-size:20px; }
}

/* Search and conditions form one workspace; results carry the visual emphasis. */
html[data-portal] #quick-kind { display:none; }
html[data-portal] .load-error { color:#a52828!important; }
html[data-portal] #complexes-view.busy { opacity:1; }
html[data-portal] .listing-result-tools { display:flex; align-items:center; gap:8px; }
html[data-portal]:has(body[data-view=complexes]) { --header-height:60px; --navigation-height:48px; }
html[data-portal] body[data-view=complexes] main { padding-top:20px; }
html[data-portal] body[data-view=complexes] #complex-navigation { display:none; }
html[data-portal] #discovery-header { padding-bottom:14px; margin-bottom:4px; border-bottom:1px solid var(--line); }
html[data-portal] #discovery-header .complex-search { display:grid; grid-template-columns:240px minmax(0,1fr); align-items:center; gap:18px; padding:0; border:0; background:transparent; border-radius:0; }
html[data-portal] #discovery-header .search-intro { margin:0; }
html[data-portal] #discovery-title { font-size:22px; margin:0; }
html[data-portal] #discovery-header .search-intro p { display:none; }
html[data-portal] #discovery-header .complex-search-controls { min-height:48px; height:48px; padding:3px 3px 3px 12px; border-radius:6px; }
html[data-portal] #discovery-header .complex-search-controls input { min-height:36px; padding:0; }
html[data-portal] #discovery-header .complex-search-controls button { min-height:38px; min-width:68px; flex-shrink:0; white-space:nowrap; }
html[data-portal] #complex-search-scope-note { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
html[data-portal] #discovery-filter-slot #query-context { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; justify-content:flex-start; gap:8px; padding:0; margin:12px 0 0; border:0; border-radius:0; background:transparent; }
html[data-portal] #discovery-filter-slot .context-location { display:contents; }
html[data-portal] #discovery-filter-slot #current-context,html[data-portal] #discovery-filter-slot #recent-regions-inline { display:none; }
html[data-portal] #discovery-filter-slot #region-change { min-height:44px; padding:6px 12px; border:1px solid var(--line); border-radius:6px; background:white; max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html[data-portal] #discovery-filter-slot .quick-filters { display:flex; width:auto; align-items:center; gap:8px; }
html[data-portal] #discovery-filter-slot .kind-switch { padding:0; background:white; }
html[data-portal] #discovery-filter-slot .kind-switch button { min-height:42px; padding:6px 16px; }
html[data-portal] #discovery-filter-slot .kind-switch button[aria-pressed=true] { background:var(--selected); box-shadow:none; }
html[data-portal] #discovery-filter-slot #quick-period { min-width:124px; min-height:44px; }
html[data-portal] #discovery-filter-slot [data-listing-condition=area] { min-height:44px; }
html[data-portal] #discovery-filter-slot [data-listing-condition=budget] { display:none; }
html[data-portal] .listing-condition-summary { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-top:8px; color:var(--muted); font-size:12px; }
html[data-portal] #listing-applied-conditions { margin:0; line-height:1.7; }
html[data-portal] #listing-reset { padding:0; min-height:24px; border:0; color:var(--accent); background:transparent; white-space:nowrap; font-size:12px; }
html[data-portal] #listing-name-options { margin-top:10px; }
html[data-portal] #listing-name-options .search-scope-control { display:flex; align-items:center; justify-content:flex-start; gap:12px; margin:0; }
html[data-portal] #listing-name-options label { margin:0; font-size:12px; }
html[data-portal] #listing-name-options select { min-height:44px; font-size:13px; }
html[data-portal] body[data-view=complexes] .listing { border:0; border-radius:0; background:transparent; }
html[data-portal] body[data-view=complexes] .listing > .section-heading { padding:0; margin:0; min-height:56px; align-items:center; }
html[data-portal] .listing-heading p,html[data-portal] body[data-view=complexes] #listing-budget { display:none; }
html[data-portal] #listing-title { font-size:17px; }
html[data-portal] #listing-compare { font-size:12px; min-height:36px; padding:5px 10px; white-space:nowrap; }
html[data-portal] #listing-compare-count { margin-left:4px; font-variant-numeric:tabular-nums; color:var(--accent); font-weight:700; }
html[data-portal] #sort { min-height:36px; font-size:12px; }
html[data-portal] #listing-data-note { margin:0 0 8px; font-size:12px; }
html[data-portal] #listing-data-note:empty { display:none; }
html[data-portal] #listing-status-slot .load-status { display:flex; align-items:center; flex-wrap:wrap; padding:12px 18px; margin:0; background:var(--surface); }
html[data-portal] #listing-status-slot .load-status:has(#status:empty):has(#load-retry[hidden]) { display:none; }
html[data-portal] #listing-status-slot #status { margin:0; font-size:13px; }
html[data-portal] #listing-status-slot .load-status.quiet-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
html[data-portal] #overview-complexes[data-listing-state=error] #listing-status-slot { padding:12px 0; }
html[data-portal] #overview-complexes[data-listing-state=error] .load-status { min-height:120px; }
html[data-portal] #overview-complexes[data-listing-state=loading] #listing-data-note,html[data-portal] #overview-complexes:not([data-listing-state=ready]) .listing-tools,html[data-portal] body[data-listing-mode=name] .listing-tools { display:none; }
html[data-portal] #complex-list,html[data-portal] #complex-search-results { background:white; border-bottom:1px solid var(--line); }
html[data-portal] #complex-list .complex-row { padding:16px 18px; min-height:104px; }
html[data-portal] #complex-search-results .complex-row { display:grid; grid-template-columns:minmax(0,1fr) 100px; gap:20px; padding:16px 18px; align-items:center; min-height:84px; }
html[data-portal] #complex-search-results .compare-add { grid-column:2; grid-row:1; }
html[data-portal] .complex-row .amount { text-align:right; font-variant-numeric:tabular-nums lining-nums; }
html[data-portal] #listing-empty { padding:24px 18px; background:white; }
html[data-portal] #listing-empty h3 { font-size:16px; margin:0 0 6px; }
html[data-portal] #listing-empty p { font-size:13px; margin:0 0 16px; }
html[data-portal] .listing-skeleton-row { display:grid; grid-template-columns:1fr 160px; gap:24px; padding:22px 18px; min-height:104px; border-bottom:1px solid var(--line); background:white; }
html[data-portal] .listing-skeleton-row span { display:block; height:16px; margin:5px 0; background:#e6ecf3; border-radius:3px; max-width:280px; }
html[data-portal] .listing-skeleton-row span+span { width:60%; height:12px; }
html[data-portal] .listing-skeleton-row>div:last-child span { height:24px; margin-left:auto; }
html[data-portal] .listing-skeleton-row>div:last-child span+span { height:12px; width:40%; }
html[data-portal] #listing-history { margin-top:16px; font-size:12px; color:var(--muted); }
html[data-portal] #listing-history summary { min-height:36px; padding:8px 0; cursor:pointer; }
html[data-portal] #listing-history .search-recent { padding:12px 0; border:0; }
html[data-portal] #listing-history h2 { display:none; }
html[data-portal] body[data-view=complexes] #compare-tray { position:static; inset:auto; max-width:none; width:auto; transform:none; margin:16px 0; }
/* Comparison candidates belong to the document, alongside the current analysis. */
html[data-portal] body:not([data-view=map]) #compare-tray { position:static; inset:auto; z-index:auto; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; width:auto; max-width:none; margin:12px 0 20px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:none; }
html[data-portal] body:not([data-view=map]) #compare-tray-text { min-width:0; font-size:13px; font-weight:650; color:var(--ink); }
html[data-portal] body:not([data-view=map]) #compare-tray > button { min-height:44px; padding:8px 10px; font-size:13px; white-space:nowrap; }
html[data-portal] body:not([data-view=map]) #compare-tray-toggle { border-color:transparent; background:transparent; color:var(--muted); }
html[data-portal] body:not([data-view=map]) #compare-tray-toggle[aria-expanded=true] { background:var(--selected); color:var(--accent); }
html[data-portal] body:not([data-view=map]) #compare-tray-actions { display:grid; grid-column:1/-1; gap:12px; min-width:0; padding-top:12px; border-top:1px solid var(--line); }
html[data-portal] body:not([data-view=map]) #clear-comparison { justify-self:end; min-height:44px; font-size:12px; }
html[data-portal] body:has(#compare-tray:not([hidden])) main { padding-bottom:100px; }
@media(max-width:600px) {
  html[data-portal] body:not([data-view=map]) #compare-tray { gap:6px; padding:8px 10px; }
  html[data-portal] body:not([data-view=map]) #compare-tray > button { padding:8px; font-size:12px; }
  html[data-portal] body:not([data-view=map]) #compare-tray-text { font-size:12px; }
}
@media(max-width:900px) {
  html[data-portal] #discovery-header .complex-search { grid-template-columns:1fr; gap:10px; }
  html[data-portal] #discovery-title { font-size:20px; }
}
@media(max-width:600px) {
  html[data-portal]:has(body[data-view=complexes]) { --header-height:56px; --navigation-height:44px; }
  html[data-portal] body[data-view=complexes] main { padding-top:12px; }
  html[data-portal] #discovery-header { padding-bottom:8px; margin-bottom:0; }
  html[data-portal] #discovery-filter-slot #query-context { display:grid; grid-template-columns:minmax(0,1fr) 66px minmax(0,1.15fr) 54px; gap:6px; margin-top:10px; }
  html[data-portal] #discovery-filter-slot .quick-filters { display:contents; }
  html[data-portal] #discovery-filter-slot .kind-switch { display:none; }
  html[data-portal] #discovery-filter-slot #quick-kind { display:block; min-width:0; width:100%; min-height:44px; padding:5px; font-size:12px; }
  html[data-portal] #discovery-filter-slot #quick-period { width:100%; min-width:0; max-width:none; min-height:44px; padding:5px 2px; font-size:12px; }
  html[data-portal] #discovery-filter-slot #region-change { padding:5px 7px; max-width:none; width:100%; font-size:12px; }
  html[data-portal] #discovery-filter-slot [data-listing-condition=area] { padding:5px; font-size:12px; }
  html[data-portal] .listing-condition-summary,html[data-portal] #listing-reset { font-size:11px; }
  html[data-portal] body[data-view=complexes] .listing>.section-heading { min-height:50px; gap:6px; }
  html[data-portal] #listing-title { font-size:15px; }
  html[data-portal] .listing-result-tools { gap:5px; }
  html[data-portal] #listing-compare { min-height:44px; font-size:11px; padding:4px 7px; }
  html[data-portal] #sort { min-height:44px; font-size:11px; padding:4px; width:82px; }
  html[data-portal] #listing-data-note { font-size:11px; line-height:1.6; margin-bottom:7px; }
  html[data-portal] #complex-list .complex-row { grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; min-height:120px; padding:12px; }
  html[data-portal] #complex-list .complex-row .amount { grid-column:2; grid-row:1; text-align:right; }
  html[data-portal] #complex-list .complex-row .amount strong { font-size:22px; white-space:nowrap; }
  html[data-portal] #complex-list .complex-row .compare-add { grid-column:2; grid-row:2; min-height:44px; min-width:88px; justify-self:end; }
  html[data-portal] #complex-list .complex-row>div:first-child { grid-column:1; grid-row:1/3; align-self:start; }
  html[data-portal] #complex-list .name-button,html[data-portal] #complex-search-results .name-button { font-size:14px; text-align:left; line-height:1.6; }
  html[data-portal] .complex-row small,html[data-portal] .complex-row .amount small { font-size:11px; }
  html[data-portal] #complex-search-results .complex-row { gap:12px; padding:12px; grid-template-columns:minmax(0,1fr) 88px; }
  html[data-portal] .listing-skeleton-row { min-height:120px; padding:20px 12px; grid-template-columns:1fr 94px; gap:12px; }
  html[data-portal] #listing-empty { padding:20px 12px; }
}
@media(max-height:600px) and (min-width:600px) {
  html[data-portal]:has(body[data-view=complexes]) { --header-height:48px; --navigation-height:44px; }
  html[data-portal] #discovery-header .complex-search { grid-template-columns:210px minmax(0,1fr); gap:16px; }
  html[data-portal] body[data-view=complexes] main { padding-top:10px; }
  html[data-portal] #discovery-filter-slot #query-context { margin-top:8px; }
  html[data-portal] .listing-condition-summary { margin-top:4px; }
  html[data-portal] body[data-view=complexes] .listing>.section-heading { min-height:44px; }
  html[data-portal] body[data-view=complexes] .listing-columns { display:none; }
  html[data-portal] #complex-list .complex-row { min-height:84px; padding:12px 18px; }
}
@media(prefers-reduced-motion:no-preference) {
  html[data-portal] .listing-skeleton-row span { animation:portal-loading 1.8s ease-in-out infinite; }
  @keyframes portal-loading { 50% { opacity:.5; } }
}
