/* Complex research uses the selected dashboard palette and local Korean type. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.complex-navigation { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.complex-navigation button { border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; }
.complex-navigation button[aria-current=page] { border-bottom-color:var(--accent); color:var(--accent); font-weight:700; }
.complex-navigation #recent-detail { margin:0; font-size:14px; border-top:0; display:inline-flex!important; }
.complex-navigation #recent-detail[hidden] { display:none!important; }
.complex-navigation #compare-count { position:static; margin-left:6px; }
.complex-search h2 { font-size:24px; margin-bottom:20px; }
.complex-search-form label { display:block; color:var(--muted); font-size:13px; margin-bottom:8px; }
.complex-search-controls { display:flex; gap:10px; max-width:720px; }
.complex-search-controls input { flex:1; min-width:0; font-size:16px; padding:14px; }
.complex-search-controls button { min-width:76px; }
.complex-search .complex-row { grid-template-columns:minmax(0,1fr) auto; }
.recent-complexes { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.recent-complexes .recent-region-select { text-align:left; }
.recent-complexes.recent-regions { margin-top:14px; }
.recent-complexes small { display:block; color:var(--muted); font-size:11px; }
#detail-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; }
#detail-metrics .metric { padding:16px; border-bottom:1px solid var(--line); }
#detail-metrics .metric:nth-child(4n) { border-right:0; }
#detail-metrics .metric strong { font-size:23px; }
.latest-contract { border-top:1px solid var(--line); margin-top:18px; padding-top:16px; font-size:14px; }
.latest-contract p { margin:6px 0; }
.latest-contract strong { font-variant-numeric:tabular-nums; }
.comparison-summary { margin:14px 0; padding:0 14px; border-left:3px solid var(--accent); font-size:14px; }
.comparison-summary p { margin:8px 0; }
.compare-actions { display:flex; flex-wrap:wrap; gap:8px; }
#compare-link { width:100%; min-width:0; }
.compare-scroll { position:relative; isolation:isolate; overflow-x:auto; max-width:100%; }
.compare-scroll .compare-table { min-width:620px; }
.compare-scroll .compare-table :is(th,td) { vertical-align:top; }
.compare-scroll .compare-table th:first-child { position:sticky; left:0; z-index:1; width:140px; background:var(--surface); }
.compare-scroll select { width:100%; min-width:0; margin-top:8px; }
.compare-scroll .name-button { font-size:14px; }
.price-distribution-card { grid-column:1/-1; }
.distribution-actions { display:flex; flex-wrap:wrap; gap:8px; }
.distribution-actions button { font-size:14px; }
.distribution-actions button[aria-pressed=true] { color:var(--accent); background:var(--selected); }
.distribution-controls { display:flex; flex-wrap:wrap; gap:4px 18px; min-width:0; padding:8px 0; margin:10px 0; border:0; border-top:1px solid var(--line); }
.distribution-controls legend { padding:0 8px 0 0; color:var(--muted); font-size:12px; }
.distribution-controls label { display:flex; align-items:center; gap:7px; min-height:44px; cursor:pointer; font-size:13px; }
.distribution-controls input { width:17px; height:17px; margin:0; accent-color:var(--accent); }
.distribution-controls label:has(input:disabled) { color:var(--muted); cursor:default; }
.distribution-method { margin:8px 0; color:var(--muted); font-size:13px; }
.distribution-method summary { cursor:pointer; padding:8px 0; min-height:44px; }
.distribution-method p { line-height:1.7; }
.distribution-data td small { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.distribution-data [id$="distribution-summary"] table { min-width:1300px; }
.transaction-trend-chart { height:410px; }
.distribution-data { margin-top:12px; }
.distribution-data summary { cursor:pointer; min-height:44px; padding:8px 0; }
.distribution-data label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:16px 0 8px; }
.chart-data-scroll { overflow:auto; max-height:320px; max-width:100%; }
.chart-data-scroll table { width:100%; min-width:480px; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.chart-data-scroll :is(th,td) { padding:8px 12px; text-align:right; border-bottom:1px solid var(--line); }
.chart-data-scroll th:first-child { text-align:left; }
.chart-data-scroll thead { position:sticky; top:0; background:var(--surface); }
#price-distribution-dialog { width:min(1280px,96vw); max-width:96vw; max-height:94dvh; padding:24px; }
#price-distribution-dialog .section-heading { flex-direction:row; }
#price-distribution-large-chart { height:clamp(240px,65dvh,740px); }
/* Keep the chosen Research palette. Space goes to prices and explicit conditions. */
.context-location { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; min-width:0; }
.context-location > span { color:var(--muted); font-size:14px; overflow-wrap:anywhere; }
#region-change { color:var(--accent); font-weight:650; white-space:normal; text-align:left; }
.search-scope-control { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.complex-search .search-scope-control label { margin:0; }
.search-scope-control select { font-size:14px; }
#complex-search-scope-note:empty { display:none; }
#listing-budget { font-weight:600; color:var(--accent); }
.complex-row .amount { white-space:normal; max-width:300px; }
.complex-row .amount small { font-size:13px; }
.budget-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; padding:12px; min-width:0; border:1px solid var(--line); border-radius:7px; }
.budget-fields legend { font-size:14px; }
.budget-fields input { width:100%; min-width:0; }
.budget-fields p { grid-column:1/-1; margin:0; }
#compare-tray { position:static; inset:auto; transform:none; display:flex; flex-wrap:wrap; gap:8px; max-width:none; width:auto; margin:12px 0; padding:8px 12px; box-shadow:none; }
#compare-tray-actions { display:flex; flex-wrap:wrap; gap:8px; }
#compare-tray button { font-size:14px; min-height:44px; }
#compare-tray-toggle { color:var(--accent); }
#detail-area { max-width:100%; min-width:0; }
#detail-area-note { font-size:13px; }
#detail-rent-conditions { border-top:1px solid var(--line); margin-top:16px; }
#detail-rent-conditions h3 { font-size:16px; margin:16px 0 8px; }
.rent-bands { margin:0; }
.rent-bands > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; padding:10px 0; border-bottom:1px solid var(--line); }
.rent-bands dt,.rent-bands dd { margin:0; overflow-wrap:anywhere; }
.rent-bands dd { font-weight:600; }
#map-chart path[role=button]:focus-visible { outline:3px solid var(--accent); outline-offset:2px; stroke:var(--accent); stroke-width:3; }
html[data-design] :is(.header-actions button,.metric span,.metric small,.complex-row small,.compare-add,#status,.muted) { font-size:13px; }
html[data-design] .kind-switch button { min-height:44px; }
html[data-design] .compare-scroll .compare-table { min-width:760px; }
@media(max-width:900px) { .navigation { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) {
  .transaction-trend-chart { height:350px; }
  .price-distribution-card .section-heading { gap:8px; }
  #price-distribution-dialog { padding:14px; }
  html[data-design] main { padding-top:12px; }
  html[data-design] .heading { margin-bottom:8px; }
  #view-description { display:none; }
  body:is([data-view=complexes],[data-view=detail]) .heading { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body:is([data-view=complexes],[data-view=detail]) .heading button { display:none; }
  .complex-navigation { margin-bottom:10px; }
  html[data-design] .card { padding:14px; }
  .complex-search h2 { margin-bottom:8px; }
  .complex-search-controls input { padding:10px; min-height:44px; }
  .complex-search-controls button { min-height:44px; }
  #complex-search-scope-note { margin:8px 0 0; }
  .context-location { gap:2px 8px; }
  #region-change { border:0; padding:0; min-height:32px; background:transparent; }
  html[data-design] .context-bar { padding:8px 12px; gap:6px; }
  #status { margin:6px 0 10px; }
  #overview-complexes .section-heading { gap:8px; margin-bottom:6px; }
  #listing-scope { margin:4px 0; }
  .complex-row { padding:12px 0; }
  .complex-row .name-button { min-height:32px; }
  .complex-row .amount { max-width:none; }
  .complex-row .amount small { font-size:13px; }
  html[data-design] .navigation button { font-size:13px; }
  html[data-design] .header-actions button { min-height:44px; }
  .filters .budget-fields { grid-column:1/-1; }
  #compare-tray { padding:6px 10px; margin:8px 0; }
  #compare-tray-actions { flex-basis:100%; }
  #detail-content > .card:first-child > .section-heading { flex-direction:row; align-items:flex-start; margin-bottom:8px; }
  #detail-add { flex-shrink:0; font-size:13px; padding:6px; }
  #detail-address { margin:4px 0; }
  #detail-content .inline-label { margin:8px 0; flex-wrap:wrap; }
  #detail-scope { display:none; }
  #detail-metrics { margin-top:8px; }
  #detail-area-note { margin:8px 0; }
  .return-list { margin-bottom:10px; }
  html[data-design] .metric small { line-height:1.5; }
  .complex-search h2 { font-size:20px; }
  .complex-navigation { gap:0; }
  .complex-navigation button { font-size:13px; padding:9px; }
  .complex-navigation #recent-detail { font-size:13px; }
  #compare-view .section-heading { flex-direction:column; align-items:flex-start; }
  #detail-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #detail-metrics .metric { padding:12px; }
  #detail-metrics .metric:nth-child(2n) { border-right:0; }
  #detail-metrics .metric strong { font-size:21px; }
  .compare-scroll .compare-table { display:table; table-layout:fixed; }
  .compare-scroll .compare-table thead { display:table-header-group; }
  .compare-scroll .compare-table tbody { display:table-row-group; }
  .compare-scroll .compare-table tr { display:table-row; }
  .compare-scroll .compare-table :is(th,td) { display:table-cell; padding:12px; border-bottom:1px solid var(--line); width:auto; }
  .compare-scroll .compare-table td:before { display:none; }
  .compare-scroll .compare-table th:first-child { width:110px; }
}

/* Connected workspace: the active destination joins the shared context surface.
   Navigation buttons retain native keyboard behavior and aria-current semantics. */
html #complex-navigation.journey-navigation {
  position:sticky; top:72px; z-index:12; display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch;
  gap:4px; padding:6px 6px 0; margin:0;
  background:var(--soft,var(--paper)); border:1px solid var(--line);
  border-bottom:0; border-radius:12px 12px 0 0;
}
html #complex-navigation.journey-navigation button {
  position:relative; display:flex!important; flex-direction:column;
  align-items:flex-start; justify-content:center; gap:4px;
  min-width:0; min-height:76px; margin:0; padding:14px 20px;
  border:1px solid transparent; border-bottom:1px solid var(--line);
  border-radius:8px 8px 0 0; background:transparent;
  text-align:left; color:var(--muted); white-space:normal; box-shadow:none;
}
html #complex-navigation.journey-navigation button:hover:not(:disabled):not([aria-current]) {
  background:var(--selected,var(--paper)); color:var(--ink);
}
html #complex-navigation.journey-navigation button[aria-current=page] {
  background:var(--surface); border-color:var(--line); border-bottom-color:var(--surface);
  color:var(--ink); box-shadow:0 -2px 0 var(--accent);
}
html #complex-navigation.journey-navigation button:disabled { opacity:1; color:var(--muted); cursor:not-allowed; }
.journey-title { font-size:15px; font-weight:650; }
.journey-navigation small { display:block; max-width:100%; font-size:12px; font-weight:400; color:var(--muted); overflow-wrap:anywhere; line-height:1.5; }
html #complex-navigation #compare-count { position:static; display:inline-block; margin-left:6px; min-width:20px; padding:0 6px; border-radius:5px; font-size:11px; background:var(--line); color:var(--ink); vertical-align:1px; }
html #complex-navigation button[aria-current] #compare-count { background:var(--accent); color:var(--surface); }
.journey-context { padding:16px 26px 18px; margin:0 0 18px; background:var(--surface); border:1px solid var(--line); border-top:0; border-radius:0 0 12px 12px; }
.journey-context p { margin:0; font-size:13px; line-height:1.6; }
.journey-context .journey-retention { color:var(--muted); font-size:12px; margin-top:8px; }
.journey-candidates { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:12px; }
.journey-candidates:empty { display:none; }
.journey-candidates-label { color:var(--muted); font-size:12px; margin-right:4px; }
.journey-candidates button { font-size:13px; min-height:36px; padding:5px 12px; max-width:100%; overflow-wrap:anywhere; }
.journey-candidates button[aria-current] { border-color:var(--accent); color:var(--accent); }
@media(max-width:900px) { html #complex-navigation.journey-navigation { top:64px; } }
@media(max-width:600px) {
  html #complex-navigation.journey-navigation { gap:2px; padding:4px 4px 0; }
  html #complex-navigation.journey-navigation button { padding:10px 8px; min-height:78px; justify-content:flex-start; }
  .journey-title { font-size:12px; letter-spacing:-.035em; }
  .journey-navigation small { font-size:11px; }
  html #complex-navigation #compare-count { margin-left:2px; min-width:16px; padding:0 4px; font-size:10px; }
  .journey-context { padding:12px 14px 14px; margin-bottom:12px; }
  .journey-context p { font-size:12px; }
  .journey-context .journey-retention { font-size:11px; }
}

/* Recent locations are separate selection and removal controls. */
.recent-regions-section { grid-column:1/-1; min-width:0; padding-bottom:16px; border-bottom:1px solid var(--line); }
.recent-regions-section h3 { margin:0; font-size:14px; font-weight:650; }
.recent-regions-section > .muted { margin:6px 0 12px; font-size:12px; }
.recent-regions { display:flex; flex-wrap:wrap; gap:8px; list-style:none; margin:0; padding:0; }
.recent-regions li { display:flex; align-items:stretch; min-width:0; max-width:100%; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface); }
html .recent-regions button { border:0; border-radius:0; background:transparent; min-height:44px; }
html .recent-region-select { text-align:left; font-size:13px; padding:8px 10px; overflow-wrap:anywhere; min-width:0; }
.recent-region-select small { display:block; color:var(--muted); font-size:11px; }
html .recent-region-select[aria-current] { color:var(--accent); background:var(--selected,var(--paper)); font-weight:650; }
html .recent-region-remove { flex:0 0 44px; width:44px; padding:4px; font-size:20px; color:var(--muted); border-left:1px solid var(--line); }
html .recent-regions button:focus-visible { outline-offset:-3px; }

/* Shared history, available directly beneath the current location. */
.context-location { flex:1; }
.recent-regions-inline { flex-basis:100%; min-width:0; max-width:100%; padding-top:8px; }
.recent-regions-caption { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
#recent-regions-main { flex-wrap:nowrap; overflow-x:auto; padding:2px 2px 6px; scrollbar-width:thin; }
#recent-regions-main li { flex-shrink:0; }
#recent-regions-main .recent-region-select { white-space:nowrap; }
#recent-regions-main .recent-region-select small { display:inline; margin-left:7px; }
.context-bar:has(.recent-regions-inline:not([hidden])) { align-items:flex-start; }
@media(max-width:600px) {
  .context-location { flex-basis:100%; width:100%; }
}

.trend-window { padding:14px 16px; margin:16px 0; background:var(--soft,var(--paper)); border-radius:8px; }
.trend-window-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 16px; margin-bottom:10px; }
.trend-window-heading strong { font-size:13px; }
.trend-window-heading > span { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.trend-year-options { display:flex; gap:6px; }
.trend-year-options button { min-width:64px; min-height:44px; }
html .trend-year-options button[aria-pressed=true] { color:var(--surface); background:var(--accent); border-color:var(--accent); font-weight:700; }
.trend-window p { font-size:12px; color:var(--muted); margin:8px 0 0; }
@media(max-width:600px) {
  .trend-window { padding:12px; }
  .trend-year-options { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
  .trend-year-options button { min-width:0; padding:8px 4px; font-size:13px; }
}
