:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --panel: #ffffff;
  --ink: #111827;
  --text: #111827;
  --muted: #647083;
  --line: #dce8f3;
  --line-strong: #c7d9e9;
  --navy: #10213f;
  --navy-dark: #091527;
  --navy-mid: #1a3767;
  --navy-soft: #eef2f8;
  --ultramarine: #31aef3;
  --ultramarine-deep: #0f97df;
  --ultramarine-soft: #e8f7ff;
  --clean-blue: #54b7f5;
  --clear-blue: #74c8ff;
  --blue-wash: #e7f6ff;
  --blue-lift: #35b9ff;
  --indigo-pop: #1ba8f8;
  --electric-blue: #35b9ff;
  --sky-blue: #5bb6f2;
  --ice-blue: #f3faff;
  --aqua-soft: #ddf5ff;
  --surface-cool: #f3f5f6;
  --surface-cool-strong: #e8edf2;
  --purple: var(--navy);
  --purple-dark: var(--navy-dark);
  --purple-soft: var(--navy-soft);
  --lime: #def49d;
  --mint: #d7e7dc;
  --charcoal: #041126;
  --sheet-bg: #fbfaf7;
  --green: #08783f;
  --red: #c73535;
  --amber: #9a6d20;
  --shadow: 0 26px 70px rgba(17, 126, 195, 0.16);
  --radius-shell: 22px;
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-small: 9px;
  --radius-pill: 999px;
}

@font-face {
  font-family: "Pretendard";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src:
    local("Pretendard Variable"),
    local("Pretendard");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 118px, rgba(116, 196, 235, 0.07) 0, rgba(116, 196, 235, 0) 34%),
    radial-gradient(circle at 86% 92px, rgba(36, 166, 232, 0.045) 0, rgba(36, 166, 232, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfaf7 48%, #f6f7f6 100%);
  color: var(--text);
  font-family: "Pretendard Variable", "Pretendard", sans-serif;
  font-kerning: normal;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: rgba(245, 250, 254, 0.42);
  backdrop-filter: blur(3px) saturate(1.04);
  color: #0b8fcf;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

body:not(.is-loading) .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 26px;
  color: #0b8fcf;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 22px 52px rgba(15, 117, 185, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 12px 24px rgba(11, 143, 207, 0.12));
  animation: loader-spin 980ms cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.loader-logo svg {
  display: block;
  width: 72px;
  height: 72px;
  overflow: visible;
}

.loader-logo path {
  fill: currentColor;
}

.loader-text {
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: #31546a;
  padding: 8px 14px;
  box-shadow: 0 12px 30px rgba(15, 117, 185, 0.08);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 0 clamp(18px, 4vw, 54px);
  background:
    radial-gradient(circle at 18% -86%, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 86% -78%, rgba(99, 190, 239, 0.24) 0, rgba(99, 190, 239, 0) 46%),
    linear-gradient(100deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 251, 253, 0.96) 48%, rgba(229, 244, 252, 0.92) 100%);
  border-bottom: 0;
  backdrop-filter: blur(18px);
  box-shadow:
    0 16px 38px rgba(40, 130, 190, 0.11),
    0 6px 16px rgba(5, 8, 23, 0.03);
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  justify-self: start;
  min-width: 0;
}

.brand {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.brand-home {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 4px 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
}

.brand-home:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  color: #0b8fcf;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(11, 143, 207, 0.16));
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-mark path {
  fill: currentColor;
}

.brand-title,
.topbar h1 {
  margin: 0;
  color: #07111f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.brand-tagline {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.source-pill {
  display: none;
}

.source-pill:empty {
  display: none;
}

.main-tabs {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 30px);
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.main-tabs button {
  height: 36px;
  border: 0;
  position: relative;
  border-radius: 0;
  background: transparent;
  color: #496678;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.main-tabs button.active {
  background: transparent;
  color: #0b8fcf;
  font-weight: 700;
  text-shadow: none;
  box-shadow: none;
}

.main-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 18px;
  height: 4px;
  border-radius: 3px;
  background: #0b8fcf;
  transform: translateX(-50%);
}

.main-tabs button:hover {
  color: #0b8fcf;
  background: transparent;
  transform: translateY(-1px);
}

.main-tabs button.active:hover {
  color: #087fc0;
  background: transparent;
}

.auth-actions {
  justify-self: end;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.auth-actions button {
  height: 34px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 15px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.login-button {
  background: transparent;
  color: #2e5268;
}

.signup-button {
  background: #052235;
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(5, 73, 116, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.menu-button {
  justify-self: end;
  display: none;
  gap: 2px;
  width: auto;
  height: 34px;
  place-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(244, 248, 253, 0.96);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.menu-button span {
  display: none;
}

.menu-button::after {
  content: "메뉴";
}

.home-view {
  width: min(680px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(20px, 3.4vw, 36px) 0 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.4vw, 22px);
  align-items: start;
}

.home-copy {
  min-width: 0;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin-bottom: 12px;
  border-radius: var(--radius-pill);
  background: #e8f7ff;
  color: #0e8fd1;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.hero-kicker::before {
  content: "✦";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: #46bdf7;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
}

.home-copy p {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 18px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  background: #07111f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.home-copy h2 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(32px, 4.8vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  word-break: keep-all;
}

.home-copy h2 span {
  display: block;
}

.hero-title-base {
  color: #07111f;
}

.hero-title-accent {
  color: #1aa7ef;
}

.home-copy > span {
  display: block;
  max-width: 420px;
  margin: 12px auto 0;
  color: #586b78;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.42;
  word-break: keep-all;
}

.home-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: min(600px, 100%);
  justify-self: center;
  min-width: 0;
  border: 0;
  border-radius: var(--radius-shell);
  background: #ffffff;
  padding: 18px 20px 20px;
  box-shadow:
    0 30px 78px rgba(42, 126, 180, 0.08),
    0 6px 18px rgba(17, 24, 39, 0.035);
}

.home-form-tabs {
  align-self: start;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: min(430px, 100%);
  margin: 0 0 2px;
  border-radius: var(--radius-pill);
  background: #f2f8fd;
  padding: 4px;
  overflow: hidden;
  box-shadow:
    0 8px 18px rgba(35, 167, 238, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-mode-tab {
  height: 38px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #64748b;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.home-mode-tab:hover {
  color: #0e8fd1;
  background: rgba(255, 255, 255, 0.72);
}

.home-mode-tab.active {
  background: #ffffff;
  color: #0b86c9;
  box-shadow:
    0 8px 18px rgba(35, 167, 238, 0.12),
    inset 0 0 0 1px rgba(211, 234, 248, 0.78);
}

.home-mode-panel {
  display: grid;
}

.home-mode-panel[hidden] {
  display: none;
}

.mode-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.home-field,
.mode-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.home-field {
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
}

.home-field label,
.field-label,
.mode-group legend,
.controls span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.home-field label,
.field-label {
  white-space: nowrap;
  line-height: 1.2;
}

.compact-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  justify-self: center;
  width: min(500px, 100%);
}

.home-section {
  grid-column: 1 / -1;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.location-field {
  grid-column: 1 / -1;
  grid-template-columns: 86px minmax(0, 1fr);
  width: auto;
}

.cash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 46px;
  border-radius: var(--radius-control);
  background: #edf4fc;
  padding: 0 14px 0 0;
}

.cash-row > span {
  color: var(--navy-dark);
  font-size: 15px;
  font-weight: 700;
}

.stacked-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.stacked-control small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

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

.mode-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 46px;
  border-radius: var(--radius-control);
  background: #edf4fc;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mode-options label:has(input:checked) {
  background: #46b8f4;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(35, 167, 238, 0.2);
}

.location-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}

.home-advanced {
  display: grid;
  justify-self: center;
  width: min(500px, 100%);
  gap: 12px;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.home-detail-toggle {
  justify-self: stretch;
  width: 100%;
  height: 46px;
  position: relative;
  border-radius: var(--radius-control);
  border: 0;
  background: #ffffff;
  color: #4b5565;
  padding: 0 42px 0 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.home-detail-toggle[aria-expanded="true"] {
  background: #ffffff;
  color: #0e8fd1;
  box-shadow:
    0 10px 22px rgba(17, 24, 39, 0.055),
    inset 0 0 0 1px rgba(49, 174, 243, 0.16);
}

.home-detail-toggle::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.72;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 0.16s ease;
}

.home-detail-toggle[aria-expanded="true"]::after {
  transform: translateY(-34%) rotate(225deg);
}

.home-detail-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.home-detail-fields[hidden] {
  display: none;
}

.advanced-choice-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px 0;
}

.advanced-choice-group + .advanced-choice-group {
  box-shadow: inset 0 1px 0 rgba(225, 230, 239, 0.82);
}

.advanced-label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 46px;
  white-space: nowrap;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.advanced-option {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(207, 216, 230, 0.86),
    0 6px 16px rgba(17, 24, 39, 0.035);
}

.advanced-option.active {
  background: #46b8f4;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(35, 167, 238, 0.2);
}

.advanced-option.active::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 9px;
  margin-left: 8px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.advanced-direct-button.active::after {
  content: none;
}

.home-direct-range,
.home-direct-single {
  display: none;
}

.advanced-direct-dialog {
  width: min(390px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  box-shadow: 0 28px 76px rgba(17, 24, 39, 0.24);
}

.advanced-direct-dialog::backdrop {
  background: rgba(17, 24, 39, 0.34);
}

.advanced-direct-panel {
  display: grid;
  gap: 18px;
  background: #ffffff;
  padding: 20px;
}

.advanced-direct-panel header,
.advanced-direct-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.advanced-direct-panel header strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.advanced-direct-panel footer button,
#advancedDirectCloseButton {
  height: 40px;
  border: 0;
  border-radius: var(--radius-control);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

#advancedDirectCloseButton,
#advancedDirectResetButton {
  background: #eef1f6;
  color: var(--muted);
}

#advancedDirectApplyButton {
  background: #07111f;
  color: #ffffff;
}

.advanced-direct-body {
  display: grid;
  gap: 18px;
}

.direct-input-row {
  display: grid;
  gap: 8px;
}

.direct-input-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.direct-range-grid,
.direct-single-grid {
  display: grid;
  align-items: center;
  gap: 8px;
}

.direct-range-grid {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.direct-single-grid {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.advanced-direct-body input,
.advanced-direct-body select {
  height: 48px;
  border: 0;
  border-radius: var(--radius-control);
  background: #f4f6fa;
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.advanced-direct-body span,
.advanced-direct-body small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.home-direct-range span,
.home-direct-range small,
.home-direct-single span,
.home-direct-single small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.home-panel .home-direct-input {
  width: min(180px, 100%);
  height: 34px;
  border-radius: var(--radius-small);
  background: #ffffff;
  font-size: 13px;
  text-align: center;
}

.home-direct-range .home-direct-input {
  flex: 1;
  min-width: 0;
  width: auto;
}

.home-direct-single .home-direct-input {
  width: 72px;
}

.home-panel .home-direct-input[hidden] {
  display: none;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: #667085;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.gap-inline {
  width: auto;
  justify-self: end;
}

.home-panel input,
.home-panel select,
.home-panel button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--radius-control);
  background: #edf7ff;
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
}

.home-panel .advanced-option {
  width: 100%;
  height: 46px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow:
    inset 0 0 0 1px rgba(203, 224, 238, 0.78),
    0 6px 16px rgba(42, 152, 218, 0.045);
}

.home-panel .advanced-option.active {
  background: #46b8f4;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(35, 167, 238, 0.2);
}

.home-detail-toggle {
  width: 100%;
}

.home-panel .home-detail-toggle {
  justify-self: stretch;
  width: 100%;
  height: 46px;
  position: relative;
  border-radius: var(--radius-control);
  border: 0;
  background: #ffffff;
  color: #4b5565;
  padding: 0 42px 0 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.home-panel .home-detail-toggle[aria-expanded="true"] {
  background: #ffffff;
  color: #0e8fd1;
  box-shadow:
    0 10px 22px rgba(17, 24, 39, 0.055),
    inset 0 0 0 1px rgba(49, 174, 243, 0.16);
}

.home-panel .home-mode-tab {
  height: 38px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #667085;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.home-panel .home-mode-tab.active {
  background: #ffffff;
  color: #0b86c9;
  box-shadow:
    0 8px 18px rgba(35, 167, 238, 0.12),
    inset 0 0 0 1px rgba(211, 234, 248, 0.78);
}

.home-panel .mode-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.home-panel select {
  appearance: none;
  padding-right: 34px;
}

.amount-input {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  height: 46px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
}

.amount-input input {
  height: 44px;
  border: 0;
  background: transparent;
}

.gap-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 46px;
  align-self: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  padding: 0 0 0 6px;
  color: #0b1020;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.gap-inline:has(input:checked) {
  background: transparent;
}

.gap-inline input {
  width: 14px;
  height: 14px;
  accent-color: #31aef3;
}

.home-panel select:disabled {
  color: #64748b;
  cursor: not-allowed;
}

.select-wrap:has(select:disabled)::after {
  border-color: #d7e2f0;
}

#showResultsButton,
#introShowResultsButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(240px, 100%);
  justify-self: center;
  min-height: 50px;
  height: auto;
  border: 0;
  border-radius: var(--radius-pill);
  background: #07111f;
  color: #ffffff;
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  box-shadow:
    0 20px 40px rgba(7, 17, 31, 0.24),
    0 7px 18px rgba(17, 24, 39, 0.1);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

#showResultsButton:hover,
#introShowResultsButton:hover {
  background: #0b1a2e;
  box-shadow:
    0 24px 46px rgba(49, 174, 243, 0.24),
    0 7px 18px rgba(17, 24, 39, 0.1);
  transform: translateY(-1px);
}

#showResultsButton:active,
#introShowResultsButton:active {
  box-shadow: 0 10px 20px rgba(7, 27, 54, 0.18);
  transform: translateY(0);
}

.button-logo {
  display: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
}

.button-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.button-logo path {
  fill: currentColor;
}

#showResultsButton.is-loading,
#introShowResultsButton.is-loading {
  pointer-events: none;
  opacity: 0.96;
}

#showResultsButton.is-loading .button-logo,
#introShowResultsButton.is-loading .button-logo {
  display: inline-grid;
  place-items: center;
  animation: logoSpin 780ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .loader-logo,
  #showResultsButton.is-loading .button-logo,
  #introShowResultsButton.is-loading .button-logo {
    animation: none;
  }
}

.footer {
  display: block;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: rgba(17, 17, 17, 0.55);
  font-size: 12px;
}

.footer div {
  display: grid;
  gap: 4px;
}

.footer span {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.footer strong {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.footer small {
  display: block;
  margin-top: 10px;
  color: rgba(17, 17, 17, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.is-hidden {
  display: none !important;
}

.results-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--sheet-bg);
}

.result-toolbar {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: grid;
  background:
    radial-gradient(circle at 90% 0%, rgba(83, 190, 255, 0.16), transparent 38%),
    #ffffff;
  padding: 10px 14px;
  box-shadow:
    0 10px 28px rgba(40, 148, 214, 0.1);
  backdrop-filter: blur(14px);
}

.controls {
  display: grid;
  grid-template-columns: minmax(118px, 0.82fr) minmax(126px, 0.72fr) minmax(118px, 0.64fr) minmax(118px, 0.64fr) auto auto minmax(190px, auto);
  gap: 8px;
  align-items: center;
  padding: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.result-field,
.controls label {
  display: grid;
  gap: 5px;
}

.controls label > span:first-child,
.result-field > span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.toggle-control {
  min-width: 110px;
}

.toggle-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  border: 0;
  background: #edf7ff;
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.toggle-box input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #31aef3;
}

.controls input,
.controls select,
.controls button,
#detailSearchButton,
#rerunSearchButton,
#detailApplyButton {
  height: 38px;
  border: 0;
  background: #edf7ff;
  border-radius: var(--radius-control);
  color: var(--text);
  padding: 0 13px;
  box-shadow: none;
}

#detailSearchButton,
#rerunSearchButton,
#detailApplyButton {
  font-weight: 700;
}

#detailSearchButton {
  background: #ffffff;
  color: #0e8fd1;
  box-shadow: inset 0 0 0 1px rgba(49, 174, 243, 0.14);
}

#rerunSearchButton,
#detailApplyButton {
  background: #07111f;
  color: #ffffff;
  padding: 0 14px;
}

.detail-dialog {
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  box-shadow: 0 24px 70px rgba(5, 8, 23, 0.18);
}

.detail-dialog::backdrop {
  background: rgba(9, 20, 34, 0.32);
}

.detail-dialog-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
}

.detail-dialog-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-dialog-panel header strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

#detailCloseButton {
  height: 30px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-cool);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.detail-dialog-panel .result-field {
  gap: 6px;
}

.detail-dialog-panel input,
.detail-dialog-panel select {
  height: 40px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-cool);
  padding: 0 12px;
  font: inherit;
}

.mvp-view {
  width: 100%;
  min-height: calc(100vh - 72px);
  display: grid;
  background: var(--bg);
}

.mvp-frame {
  width: 100%;
  min-height: calc(100vh - 72px);
  border: 0;
  background: var(--bg);
}

.result-views {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr;
  background: var(--sheet-bg);
}

.result-tabs {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 3px;
  border-radius: var(--radius-pill);
  background: #edf7ff;
  padding: 4px;
  box-shadow: none;
}

.result-tab {
  height: 30px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: none !important;
}

.result-tab.active {
  background: #46b8f4;
  color: #ffffff;
}

.result-status {
  grid-column: 1 / -1;
  min-height: 32px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-control);
  background: linear-gradient(135deg, rgba(237, 247, 255, 0.92), rgba(255, 255, 255, 0.76));
  color: #496678;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.results-view[data-active-tab="explore"] .result-tab[data-result-view="map"] {
  display: none;
}

.results-view[data-active-tab="report"] .result-tabs,
.results-view[data-active-tab="report"] #detailSearchButton {
  display: none;
}

.result-panel {
  min-height: 0;
  display: none;
}

.result-panel.active {
  display: grid;
  min-height: 0;
}

.report-content {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
  padding: 14px;
  overflow: auto;
  background: #f5f9fd;
}

.report-hero,
.report-section,
.report-metrics article {
  border: 0;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(7, 31, 74, 0.08);
}

.report-hero {
  display: grid;
  gap: 10px;
  border-radius: var(--radius-shell);
  padding: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(circle at 94% 4%, rgba(83, 190, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #edf9ff 100%);
}

.report-hero span {
  color: #0e8fd1;
  font-size: 13px;
  font-weight: 700;
}

.report-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.report-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  word-break: keep-all;
}

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

.report-metrics article {
  display: grid;
  gap: 8px;
  min-height: 104px;
  border-radius: var(--radius-card);
  padding: 16px;
  background:
    radial-gradient(circle at 96% 0%, rgba(83, 190, 255, 0.18), transparent 36%),
    #ffffff;
}

.report-metrics span,
.report-section header span,
.report-candidates span,
.report-candidates dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.report-metrics strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.report-section {
  display: grid;
  gap: 14px;
  border-radius: var(--radius-shell);
  padding: 18px;
}

.report-section header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.report-section header strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

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

.report-candidates article {
  display: grid;
  align-content: start;
  gap: 10px;
  border-radius: var(--radius-card);
  background: #f4f7fc;
  padding: 16px;
}

.report-candidates article > strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.report-candidates dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 0;
}

.report-candidates dl div {
  display: grid;
  gap: 3px;
}

.report-candidates dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.report-candidates p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.map-placeholder {
  display: grid;
  gap: 14px;
  min-height: 100%;
  margin: 0 14px 14px;
  border-radius: var(--radius-shell);
  background:
    radial-gradient(circle at 18% 20%, rgba(83, 190, 255, 0.2), transparent 30%),
    radial-gradient(circle at 62% 8%, rgba(49, 174, 243, 0.12), transparent 38%),
    linear-gradient(135deg, #ffffff, #edf8ff);
  padding: 22px;
  box-shadow: 0 18px 46px rgba(6, 26, 61, 0.08);
}

.map-placeholder > strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.map-placeholder > span,
.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.map-list {
  display: block;
  min-height: 540px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 18% 16%, rgba(83, 190, 255, 0.16), transparent 30%),
    rgba(247, 251, 255, 0.9);
  padding: 18px;
  box-shadow: none;
}

.map-loading,
.map-list > p {
  margin: 0;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

.boundary-map {
  display: block;
  width: 100%;
  height: min(64vh, 680px);
  min-height: 520px;
}

.boundary-region {
  stroke: rgba(248, 251, 255, 0.94);
  stroke-width: 1.2;
  cursor: pointer;
  outline: none;
  transition:
    fill 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}

.boundary-region:hover,
.boundary-region:focus-visible,
.boundary-region.active {
  filter: drop-shadow(0 10px 20px rgba(5, 8, 23, 0.16));
  stroke: rgba(5, 8, 23, 0.32);
  stroke-width: 2.4;
}

.boundary-region.is-muted {
  opacity: 0.28;
}

.boundary-region.is-empty {
  fill: #dde4f0;
}

.boundary-region.is-low {
  fill: #dff4ff;
}

.boundary-region.is-mid {
  fill: rgba(83, 182, 242, 0.72);
}

.boundary-region.is-high {
  fill: #31aef3;
}

.boundary-label {
  pointer-events: none;
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(248, 251, 255, 0.94);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5px;
  text-anchor: middle;
  dominant-baseline: central;
}

.boundary-label.is-high {
  fill: #ffffff;
  stroke: rgba(16, 20, 36, 0.72);
}

.map-region,
.result-card {
  display: grid;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
}

.map-region {
  min-height: 116px;
  align-content: space-between;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 30px rgba(6, 26, 61, 0.06);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.map-region:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(6, 26, 61, 0.1);
}

.map-region.active {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(49, 174, 243, 0.24);
}

.map-region.is-empty {
  background: #dde4f0;
  color: #667085;
}

.map-region.is-low {
  background: #dff4ff;
  color: var(--ink);
}

.map-region.is-mid {
  background: rgba(83, 182, 242, 0.72);
  color: #0b1020;
}

.map-region.is-high {
  background: #31aef3;
  color: #ffffff;
}

.map-region strong,
.result-card strong {
  color: inherit;
  font-size: 16px;
  font-weight: 700;
}

.map-region span {
  color: inherit;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

.table-paywall {
  margin: 0 14px 12px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(6, 26, 61, 0.06);
}

.table-paywall,
.result-card span,
.result-card dt {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.card-list {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  overflow: auto;
  padding: 16px;
}

.result-card {
  gap: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 22px 52px rgba(14, 40, 78, 0.1),
    0 3px 12px rgba(34, 145, 214, 0.05);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 28px 62px rgba(14, 40, 78, 0.14),
    0 5px 16px rgba(34, 145, 214, 0.07);
}

.card-photo {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background-image: url("./assets/apartment-card-mockup.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, rgba(4, 17, 38, 0), rgba(4, 17, 38, 0.44));
}

.card-photo-badge {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 27px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: #08253a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(4, 17, 38, 0.18);
}

.card-content {
  display: grid;
  gap: 14px;
  padding: 15px;
}

.card-title {
  display: grid;
  gap: 5px;
  padding: 0;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.card-metrics div {
  min-width: 0;
  border-radius: var(--radius-control);
  background: #f3f7fb;
  padding: 10px 11px;
}

.card-metrics div.is-primary {
  background: #eef8ff;
}

.result-card dt,
.result-card dd {
  margin: 0;
}

.result-card dd {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
}

.card-judgment {
  margin: 0;
  border-radius: var(--radius-control);
  background: #f7f9fc;
  color: #28445a;
  padding: 10px 11px;
  font-size: 13px;
  line-height: 1.45;
}

.sheet-shell {
  min-height: 0;
  overflow: auto;
  border: 0;
  margin: 0 14px 14px;
  border-radius: var(--radius-card);
  background: #f7fbff;
  box-shadow:
    0 18px 48px rgba(18, 83, 132, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 3450px;
  width: 100%;
  font-size: 12.5px;
  background: #ffffff;
  color: #1b2d3f;
  font-variant-numeric: tabular-nums;
}

th,
td {
  border-right: 1px solid rgba(207, 225, 239, 0.72);
  border-bottom: 1px solid #e6eef7;
  min-width: 112px;
  max-width: 180px;
  padding: 8px 10px;
  line-height: 1.3;
  white-space: nowrap;
  text-align: right;
}

td {
  height: 35px;
  background: #ffffff;
  color: #22384e;
  font-weight: 500;
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 46px;
  border-right: 0;
  border-top: 1px solid #d7efff;
  border-bottom: 3px solid #43b6f3;
  background: #f1f9ff;
  color: #15364d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(0, 111, 207, 0.1),
    0 4px 12px rgba(10, 96, 150, 0.06);
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

th:hover {
  border-top-color: #bfe7ff;
  border-bottom-color: #0a9fea;
  background: #e6f6ff;
  color: #005fb8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(0, 95, 184, 0.14),
    0 5px 14px rgba(10, 96, 150, 0.08);
}

th.is-sorted {
  border-top-color: #8ad8ff;
  border-bottom-color: #005bd9;
  background: #dbf2ff;
  color: #0047bb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(0, 91, 217, 0.18),
    0 5px 16px rgba(0, 91, 217, 0.1);
}

.filter-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

th:first-child {
  z-index: 4;
  background: #eaf7ff;
}

th:first-child.is-sorted {
  background: #dbf2ff;
}

td:first-child {
  background: #fbfdff;
  box-shadow: 8px 0 16px rgba(16, 87, 140, 0.05);
}

tbody tr:nth-child(even) td {
  background: #f8fbfe;
}

tbody tr:nth-child(even) td:first-child {
  background: #f4f9fe;
}

tbody tr:hover td {
  background: #eaf7ff;
}

tbody tr:hover td:first-child {
  background: #e3f3ff;
}

td.positive,
td.risk,
td.warning {
  font-weight: 700;
}

input:focus,
select:focus,
button:focus {
  outline: none;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(49, 174, 243, 0.24);
  outline-offset: 2px;
}

td.text {
  text-align: left;
}

td.grade {
  font-weight: 700;
  text-align: center;
}

.positive {
  color: var(--green);
  font-weight: 700;
}

.risk {
  color: var(--red);
  font-weight: 700;
}

.warning {
  color: var(--amber);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
  }

  .auth-actions {
    display: none;
  }

  .home-view {
    width: min(680px, calc(100% - 36px));
    align-content: start;
    gap: 22px;
  }

  .home-copy h2 {
    max-width: 680px;
  }

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

  #detailSearchButton,
  #rerunSearchButton {
    grid-column: auto;
  }

  .result-tabs {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .result-status {
    grid-column: 1 / -1;
  }

  .result-tab {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .app {
    grid-template-rows: auto 1fr auto;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 7px 14px;
  }

  .brand-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 12px;
    min-width: 0;
  }

  .main-tabs {
    width: 100%;
    justify-self: start;
    justify-content: flex-start;
    gap: 16px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-tabs::-webkit-scrollbar {
    display: none;
  }

  .main-tabs button {
    flex: 0 0 auto;
    height: 30px;
    padding: 0;
    font-size: 12px;
  }

  .main-tabs button.active::after {
    bottom: 0;
    width: 16px;
    height: 3px;
  }

  .brand-mark {
    width: 21px;
    height: 21px;
  }

  .brand-title,
  .topbar h1 {
    font-size: 16px;
  }

  .brand {
    gap: 6px;
  }

  .brand-tagline {
    display: none;
  }

  .auth-actions {
    display: none;
  }

  .menu-button {
    display: inline-grid;
    grid-column: 2;
    grid-row: 1;
  }

  .mvp-view {
    width: 100%;
    min-height: calc(100vh - 188px);
    padding: 0;
    gap: 0;
  }

  .mvp-frame {
    min-height: calc(100vh - 188px);
  }

  .home-view {
    width: min(100% - 44px, 520px);
    padding: 42px 0 20px;
    gap: 24px;
  }

  .home-copy p {
    min-height: 32px;
    margin-bottom: 14px;
    border-radius: var(--radius-small);
    font-size: 12px;
  }

  .home-copy h2 {
    font-size: clamp(28px, 8.2vw, 36px);
    line-height: 1.12;
  }

  .home-copy > span {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.48;
  }

  .home-panel {
    gap: 14px;
    border-radius: var(--radius-shell);
    padding: 18px 18px 20px;
  }

  .home-form-tabs {
    width: 100%;
    margin: 0 0 2px;
    padding: 5px;
  }

  .home-panel .home-mode-tab {
    height: 38px;
    font-size: 13px;
  }

  .compact-fields,
  .controls {
    grid-template-columns: 1fr;
  }

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

  .compact-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-section,
  .location-field {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .advanced-choice-group {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
  }

  .advanced-label {
    line-height: 44px;
  }

  .home-direct-range,
  .home-direct-single {
    grid-column: 3;
    gap: 5px;
  }

  .mode-options,
  .location-selects {
    gap: 8px;
  }

  .mode-options label {
    height: 44px;
    padding: 0 8px;
    font-size: 12.5px;
  }

  .cash-row {
    height: 44px;
  }

  .home-detail-fields {
    gap: 0;
  }

  .home-advanced {
    width: min(100%, 500px);
    padding-top: 0;
  }

  .choice-options {
    grid-auto-flow: column;
    grid-auto-columns: minmax(92px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
  }

  .home-panel .advanced-option {
    height: 44px;
    font-size: 13px;
  }

  .home-direct-range .home-direct-input {
    width: auto;
  }

  .home-direct-single .home-direct-input {
    width: 48px;
  }

  .home-direct-range span,
  .home-direct-range small,
  .home-direct-single span,
  .home-direct-single small {
    font-size: 11.5px;
  }

  .primary-field,
  .location-field,
  .gap-inline {
    grid-column: auto;
    width: 100%;
  }

  .primary-field {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    column-gap: 10px;
  }

  .primary-field .gap-inline {
    grid-column: auto;
    justify-self: end;
    width: auto;
    height: 46px;
    padding: 0;
    font-size: 12.5px;
  }

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

  .home-panel select {
    padding-left: 12px;
    padding-right: 30px;
    font-size: 13.5px;
  }

  .result-toolbar {
    top: 112px;
    padding: 8px 10px;
  }

  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
  }

  .toggle-control,
  #detailSearchButton,
  #rerunSearchButton {
    min-width: 0;
  }

  .result-tabs {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .result-tab {
    flex: 1;
    padding: 0 8px;
  }

  .result-status {
    min-height: 30px;
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .report-content {
    padding: 12px;
  }

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

  .report-section header {
    display: grid;
    align-items: start;
  }

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

  .map-placeholder {
    margin: 0 12px 12px;
    padding: 16px;
  }

  .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }

  .result-card {
    min-width: 0;
  }

  .card-photo {
    aspect-ratio: 4 / 3;
  }

  .card-photo-badge {
    right: 8px;
    bottom: 8px;
    height: 23px;
    padding: 0 8px;
    font-size: 10px;
  }

  .card-content {
    gap: 9px;
    padding: 10px;
  }

  .card-title {
    gap: 2px;
    padding: 0;
    min-width: 0;
  }

  .card-metrics {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0;
    min-width: 0;
  }

  .card-metrics div {
    padding: 7px 8px;
  }

  .result-card strong {
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-card span,
  .result-card dt {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-card dd {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-judgment {
    margin: 0;
    padding: 8px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  #showResultsButton {
    width: min(240px, 100%);
    justify-self: center;
  }

  .footer {
    width: min(100% - 24px, 520px);
    padding: 10px 0 14px;
  }

  #detailSearchButton,
  #rerunSearchButton {
    grid-column: auto;
  }
}

/* Airtable-inspired design system layer */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #181d26;
  --body: #333840;
  --text: #333840;
  --muted: #41454d;
  --line: #dddddd;
  --line-strong: #9297a0;
  --navy: #181d26;
  --navy-dark: #0d1218;
  --navy-mid: #333840;
  --navy-soft: #f8fafc;
  --ultramarine: #1b61c9;
  --ultramarine-deep: #1a3866;
  --ultramarine-soft: #f8fafc;
  --surface-cool: #f8fafc;
  --surface-cool-strong: #e0e2e6;
  --sheet-bg: #ffffff;
  --green: #006400;
  --red: #aa2d00;
  --amber: #d9a441;
  --shadow: none;
  --radius-shell: 12px;
  --radius-card: 10px;
  --radius-control: 6px;
  --radius-small: 6px;
  --radius-pill: 12px;
}

body {
  background: #ffffff;
  color: var(--text);
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.page-loader {
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(2px);
  color: var(--ink);
}

.loader-logo {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(24, 29, 38, 0.08);
  filter: none;
}

.loader-text {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--body, #333840);
  box-shadow: none;
  font-weight: 500;
}

.topbar {
  min-height: 64px;
  padding: 0 clamp(24px, 4vw, 48px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--ink);
  filter: none;
}

.brand-title,
.topbar h1 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.main-tabs {
  gap: 24px;
}

.main-tabs button {
  height: 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  transition: color 120ms ease;
}

.main-tabs button:hover,
.main-tabs button.active,
.main-tabs button.active:hover {
  color: var(--ink);
  transform: none;
}

.main-tabs button.active {
  font-weight: 500;
}

.main-tabs button.active::after {
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: var(--ink);
}

.auth-actions button,
.menu-button {
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.login-button {
  color: var(--ink);
}

.signup-button {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.menu-button {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.home-view {
  width: min(760px, calc(100% - 48px));
  padding: clamp(56px, 8vw, 96px) 0 32px;
  gap: 32px;
}

.home-copy h2 {
  color: var(--ink);
  font-size: clamp(34px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.16;
}

.home-copy h2 span,
.hero-title-accent {
  color: inherit;
  font-weight: inherit;
}

.hero-kicker {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
}

.home-copy > span,
.home-copy p {
  color: var(--body, #333840);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.home-panel,
.detail-dialog-panel,
.report-section,
.report-metrics article,
.result-card {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.home-panel {
  border-radius: 12px;
  padding: 24px;
}

.home-form-tabs {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 4px;
  box-shadow: none;
}

.home-panel .home-mode-tab {
  height: 40px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
}

.home-panel .home-mode-tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.home-section,
.advanced-choice-group {
  border: 0;
  background: transparent;
}

.home-field > label,
.field-label,
.advanced-label,
.controls label > span:first-child,
.result-field > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.home-panel input,
.home-panel select,
.home-panel button,
.controls input,
.controls select,
.controls button,
.toggle-box,
.detail-dialog-panel input,
.detail-dialog-panel select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
}

.amount-input,
.cash-row,
.location-selects .select-wrap,
.stacked-control {
  border-color: var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.mode-options label,
.advanced-option {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--body, #333840);
  box-shadow: none;
  font-weight: 400;
}

.mode-options input:checked + span,
.home-panel .advanced-option.active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
}

.home-panel .home-detail-toggle {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-weight: 500;
}

.home-panel .home-detail-toggle[aria-expanded="true"] {
  border-color: var(--ink);
  background: #f8fafc;
  color: var(--ink);
}

#showResultsButton,
#rerunSearchButton,
#detailApplyButton {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 500;
}

#showResultsButton:hover,
#showResultsButton:active {
  background: #0d1218;
  transform: none;
  box-shadow: none;
}

#detailSearchButton,
#detailCloseButton {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-weight: 500;
}

.footer {
  width: min(1280px, calc(100% - 48px));
  padding: 48px 0;
  color: var(--muted);
}

.footer span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
}

.footer strong {
  color: var(--body, #333840);
  font-weight: 400;
}

.footer small {
  color: var(--muted);
}

.results-view,
.result-views,
.mvp-view,
.mvp-frame {
  background: #ffffff;
}

.result-toolbar {
  top: 64px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.controls {
  gap: 8px;
}

.result-tabs {
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 4px;
}

.result-tab {
  height: 34px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
}

.result-tab.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.result-status,
.table-paywall {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
  font-weight: 400;
}

.report-content {
  background: #ffffff;
}

.report-hero {
  border-radius: 12px;
  background: #181d26;
  color: #ffffff;
  box-shadow: none;
}

.report-hero span,
.report-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.report-hero h2 {
  color: #ffffff;
  font-weight: 400;
}

.report-metrics article,
.report-candidates article,
.card-metrics div,
.card-judgment {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

.report-metrics strong,
.report-section header strong,
.report-candidates article > strong,
.result-card strong {
  color: var(--ink);
  font-weight: 500;
}

.card-list {
  background: #ffffff;
}

.result-card {
  border-radius: 10px;
  overflow: hidden;
}

.result-card:hover {
  transform: none;
  box-shadow: none;
}

.card-photo {
  border-radius: 10px 10px 0 0;
}

.card-photo-badge {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.map-placeholder {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.map-list,
.boundary-map-shell {
  background: #f8fafc;
  box-shadow: none;
}

.map-region {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
}

.map-region.active {
  box-shadow: none;
}

.sheet-shell {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

table {
  background: #ffffff;
  color: var(--body, #333840);
  font-size: 13px;
}

th,
td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

td {
  height: 36px;
  background: #ffffff;
  color: var(--body, #333840);
  font-weight: 400;
}

th {
  height: 44px;
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

th:hover {
  border-bottom-color: var(--ink);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

th.is-sorted,
th:first-child.is-sorted {
  border-bottom: 2px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

th:first-child,
td:first-child,
tbody tr:nth-child(even) td:first-child,
tbody tr:hover td:first-child {
  background: #ffffff;
  box-shadow: none;
}

tbody tr:nth-child(even) td {
  background: #fbfbfb;
}

tbody tr:hover td {
  background: #f8fafc;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid #458fff;
  outline-offset: 2px;
}

.positive {
  color: #006400;
}

.risk {
  color: #aa2d00;
}

.warning {
  color: #d9a441;
}

@media (max-width: 1100px) {
  .topbar {
    min-height: 64px;
  }

  .result-toolbar {
    top: 64px;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 58px;
    padding: 8px 16px;
  }

  .main-tabs button {
    height: 32px;
    font-size: 13px;
  }

  .home-view {
    width: min(100% - 32px, 760px);
    padding-top: 56px;
  }

  .home-copy h2 {
    font-size: 32px;
  }

  .home-panel {
    padding: 18px;
  }

  .result-toolbar {
    top: 94px;
  }

  .result-tabs,
  .result-status {
    border-radius: 10px;
  }
}

/* Lamborghini-inspired design system layer */
:root {
  --bg: #000000;
  --panel: #202020;
  --ink: #ffffff;
  --body: #f5f5f5;
  --text: #ffffff;
  --muted: #969696;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.5);
  --navy: #000000;
  --navy-dark: #000000;
  --navy-mid: #202020;
  --navy-soft: #181818;
  --ultramarine: #29abe2;
  --ultramarine-deep: #1eaedb;
  --ultramarine-soft: #202020;
  --surface-cool: #181818;
  --surface-cool-strong: #202020;
  --sheet-bg: #000000;
  --green: #39bf45;
  --red: #ffce3e;
  --amber: #ffc000;
  --shadow: none;
  --radius-shell: 0;
  --radius-card: 0;
  --radius-control: 0;
  --radius-small: 0;
  --radius-pill: 0;
}

body {
  background: #000000;
  color: #ffffff;
  font-family: "Pretendard Variable", "Pretendard", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page-loader {
  background: rgba(0, 0, 0, 0.58);
  color: #ffc000;
  backdrop-filter: none;
}

.loader-logo {
  border-radius: 0;
  background: #000000;
  color: #ffc000;
  box-shadow: none;
  filter: none;
}

.loader-text {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.96px;
}

.topbar {
  min-height: 72px;
  padding: 0 clamp(24px, 4vw, 56px);
  background: #000000;
  border-bottom: 1px solid #202020;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-home:hover,
.main-tabs button:hover {
  transform: none;
}

.brand-mark {
  color: #ffc000;
  filter: none;
}

.brand-title,
.topbar h1 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.main-tabs {
  gap: 32px;
}

.main-tabs button {
  height: 40px;
  color: #f5f5f5;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.main-tabs button.active,
.main-tabs button:hover,
.main-tabs button.active:hover {
  color: #ffc000;
}

.main-tabs button.active {
  font-weight: 400;
}

.main-tabs button.active::after {
  bottom: 2px;
  width: 100%;
  height: 2px;
  border-radius: 0;
  background: #ffc000;
}

.auth-actions button,
.menu-button {
  height: 44px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.login-button {
  color: #ffffff;
}

.signup-button {
  background: #ffc000;
  color: #000000;
  box-shadow: none;
}

.menu-button {
  background: transparent;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.home-view {
  width: min(860px, calc(100% - 80px));
  padding: clamp(56px, 7vw, 96px) 0 40px;
}

.hero-kicker {
  border: 1px solid #202020;
  border-radius: 0;
  background: #181818;
  color: #ffc000;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.96px;
}

.home-copy h2 {
  color: #ffffff;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.home-copy h2 span,
.hero-title-accent {
  color: #ffffff;
  font-weight: 400;
}

.home-copy > span,
.home-copy p {
  color: #969696;
  font-size: 16px;
  font-weight: 400;
}

.home-panel,
.detail-dialog-panel,
.result-card,
.report-section,
.report-metrics article,
.map-placeholder {
  border: 1px solid #202020;
  border-radius: 0;
  background: #181818;
  color: #ffffff;
  box-shadow: none;
}

.home-panel {
  padding: 32px;
}

.home-form-tabs,
.result-tabs {
  border: 1px solid #202020;
  border-radius: 0;
  background: #000000;
  box-shadow: none;
}

.home-panel .home-mode-tab,
.result-tab {
  border-radius: 0;
  background: transparent;
  color: #969696;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.home-panel .home-mode-tab.active,
.result-tab.active {
  background: #202020;
  color: #ffffff;
  box-shadow: none;
}

.home-field > label,
.field-label,
.advanced-label,
.controls label > span:first-child,
.result-field > span:first-child {
  color: #969696;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.96px;
}

.home-panel input,
.home-panel select,
.home-panel button,
.controls input,
.controls select,
.controls button,
.toggle-box,
.detail-dialog-panel input,
.detail-dialog-panel select,
.amount-input,
.cash-row,
.location-selects .select-wrap,
.stacked-control {
  border: 1px solid #494949;
  border-radius: 0;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}

.home-panel input::placeholder,
.controls input::placeholder,
.detail-dialog-panel input::placeholder {
  color: #7d7d7d;
}

.mode-options label,
.advanced-option {
  border: 1px solid #494949;
  border-radius: 0;
  background: #000000;
  color: #f5f5f5;
  box-shadow: none;
  font-weight: 400;
}

.mode-options input:checked + span,
.home-panel .advanced-option.active {
  background: #ffc000;
  color: #000000;
  box-shadow: none;
}

.home-panel .home-detail-toggle {
  border: 1px solid #494949;
  border-radius: 0;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.home-panel .home-detail-toggle[aria-expanded="true"] {
  border-color: #ffc000;
  background: #202020;
  color: #ffc000;
}

#showResultsButton,
#rerunSearchButton,
#detailApplyButton {
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: #ffc000;
  color: #000000;
  box-shadow: none;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

#showResultsButton:hover,
#showResultsButton:active,
#rerunSearchButton:hover,
#detailApplyButton:hover {
  background: #917300;
  color: #000000;
  transform: none;
  box-shadow: none;
}

#detailSearchButton,
#detailCloseButton {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-weight: 400;
  text-transform: uppercase;
}

#detailSearchButton:hover,
#detailCloseButton:hover {
  background: #1eaedb;
  color: #ffffff;
}

.footer {
  width: min(1280px, calc(100% - 80px));
  padding: 56px 0;
  color: #7d7d7d;
}

.footer span {
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
}

.footer strong,
.footer small {
  color: #969696;
  font-weight: 400;
}

.results-view,
.result-views,
.mvp-view,
.mvp-frame {
  background: #000000;
}

.result-toolbar {
  top: 72px;
  border-bottom: 1px solid #202020;
  background: #000000;
  box-shadow: none;
  backdrop-filter: none;
}

.result-status,
.table-paywall {
  border: 1px solid #202020;
  border-radius: 0;
  background: #181818;
  color: #969696;
  box-shadow: none;
}

.report-content,
.card-list {
  background: #000000;
}

.report-hero {
  border: 1px solid #202020;
  border-radius: 0;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}

.report-hero span {
  color: #ffc000;
  text-transform: uppercase;
  letter-spacing: 0.96px;
}

.report-hero h2 {
  color: #ffffff;
  font-weight: 400;
  text-transform: uppercase;
}

.report-hero p,
.report-metrics span,
.report-section header span,
.report-candidates span,
.report-candidates dt,
.result-card span,
.result-card dt {
  color: #969696;
}

.report-metrics article,
.report-candidates article,
.card-metrics div,
.card-judgment {
  border: 1px solid #202020;
  border-radius: 0;
  background: #202020;
  box-shadow: none;
}

.report-metrics strong,
.report-section header strong,
.report-candidates article > strong,
.result-card strong,
.result-card dd {
  color: #ffffff;
  font-weight: 400;
}

.result-card {
  border-radius: 0;
  overflow: hidden;
}

.result-card:hover {
  transform: none;
  box-shadow: none;
}

.card-photo,
.card-photo-badge,
.card-judgment,
.card-metrics div {
  border-radius: 0;
}

.card-photo-badge {
  border: 1px solid #494949;
  background: #000000;
  color: #ffc000;
  box-shadow: none;
}

.map-list,
.boundary-map-shell {
  background: #000000;
  box-shadow: none;
}

.map-region {
  border: 1px solid #202020;
  border-radius: 0;
  background: #181818;
  color: #ffffff;
  box-shadow: none;
}

.map-region.active {
  border-color: #ffc000;
  box-shadow: none;
}

.boundary-region.is-empty {
  fill: #202020;
}

.boundary-region.is-low {
  fill: #494949;
}

.boundary-region.is-mid {
  fill: #917300;
}

.boundary-region.is-high {
  fill: #ffc000;
}

.sheet-shell {
  margin: 0 14px 14px;
  border: 1px solid #202020;
  border-radius: 0;
  background: #000000;
  box-shadow: none;
}

table {
  background: #000000;
  color: #f5f5f5;
  font-size: 13px;
}

th,
td {
  border-right: 1px solid #202020;
  border-bottom: 1px solid #202020;
}

td {
  height: 38px;
  background: #000000;
  color: #f5f5f5;
  font-weight: 400;
}

th {
  height: 46px;
  border-top: 0;
  border-bottom: 1px solid #494949;
  background: #181818;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  box-shadow: none;
}

th:hover {
  border-bottom-color: #ffc000;
  background: #202020;
  color: #ffc000;
  box-shadow: none;
}

th.is-sorted,
th:first-child.is-sorted {
  border-bottom: 2px solid #ffc000;
  background: #202020;
  color: #ffc000;
  box-shadow: none;
}

th:first-child,
td:first-child,
tbody tr:nth-child(even) td:first-child,
tbody tr:hover td:first-child {
  background: #000000;
  box-shadow: none;
}

tbody tr:nth-child(even) td {
  background: #111111;
}

tbody tr:hover td {
  background: #202020;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid #29abe2;
  outline-offset: 2px;
}

.positive {
  color: #39bf45;
}

.risk,
.warning {
  color: #ffce3e;
}

@media (max-width: 1100px) {
  .topbar {
    min-height: 68px;
  }

  .result-toolbar {
    top: 68px;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 62px;
    padding: 8px 16px;
  }

  .main-tabs {
    gap: 18px;
  }

  .main-tabs button {
    height: 34px;
    font-size: 12px;
  }

  .home-view {
    width: min(100% - 32px, 860px);
    padding-top: 48px;
  }

  .home-copy h2 {
    font-size: 40px;
  }

  .home-panel {
    padding: 18px;
  }

  .result-toolbar {
    top: 104px;
  }
}

/* KRDS component metrics layer
   Keep KRDS as sizing/density/accessibility guidance. Color decisions must flow
   through brand tokens so reference systems do not replace the site theme. */
:root {
  --shadow: none;
  --radius-shell: 8px;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-small: 4px;
  --radius-pill: 1000px;
}

* {
  letter-spacing: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard GOV", "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

.page-loader {
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(2px);
  color: var(--ultramarine);
}

.loader-logo {
  border-radius: 8px;
  background: var(--panel);
  color: var(--ultramarine);
  box-shadow: none;
  filter: none;
}

.loader-text {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--body);
  box-shadow: none;
  letter-spacing: 0;
  text-transform: none;
}

.topbar {
  min-height: 64px;
  padding: 0 clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--surface-cool-strong);
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--ultramarine);
  filter: none;
}

.brand-title,
.topbar h1 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.main-tabs {
  gap: 24px;
}

.main-tabs button {
  height: 44px;
  color: var(--body);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.main-tabs button:hover,
.main-tabs button.active,
.main-tabs button.active:hover {
  color: var(--ultramarine);
}

.main-tabs button.active {
  font-weight: 700;
}

.main-tabs button.active::after {
  bottom: 0;
  height: 2px;
  border-radius: 0;
  background: var(--ultramarine);
}

.auth-actions button,
.menu-button {
  height: 48px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.login-button {
  color: var(--ink);
}

.signup-button {
  border: 1px solid var(--ultramarine);
  background: var(--ultramarine);
  color: #ffffff;
  box-shadow: none;
}

.signup-button:hover {
  background: var(--ultramarine-deep);
  color: #ffffff;
  box-shadow: none;
}

.menu-button {
  background: var(--panel);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.home-view {
  width: min(900px, calc(100% - 48px));
  padding: clamp(40px, 6vw, 72px) 0 32px;
}

.hero-kicker {
  border: 1px solid var(--ultramarine);
  border-radius: 1000px;
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
  box-shadow: none;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.home-copy h2 {
  color: var(--ink);
  font-size: clamp(28px, 4.6vw, 40px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.home-copy h2 span,
.hero-title-accent {
  color: var(--ink);
  font-weight: 700;
}

.home-copy > span,
.home-copy p {
  color: var(--body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

.home-panel,
.detail-dialog-panel,
.result-card,
.report-section,
.report-metrics article,
.map-placeholder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.home-panel {
  padding: 24px;
}

.home-form-tabs,
.result-tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-cool);
  box-shadow: none;
}

.home-panel .home-mode-tab,
.result-tab {
  border-radius: 6px;
  background: transparent;
  color: var(--body);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.home-panel .home-mode-tab.active,
.result-tab.active {
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
  box-shadow: inset 0 0 0 1px var(--ultramarine);
  font-weight: 700;
}

.home-field > label,
.field-label,
.advanced-label,
.controls label > span:first-child,
.result-field > span:first-child {
  color: var(--body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.home-panel input,
.home-panel select,
.home-panel button,
.controls input,
.controls select,
.controls button,
.toggle-box,
.detail-dialog-panel input,
.detail-dialog-panel select,
.amount-input,
.cash-row,
.location-selects .select-wrap,
.stacked-control {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
  font-size: 17px;
  font-weight: 400;
}

.home-panel input::placeholder,
.controls input::placeholder,
.detail-dialog-panel input::placeholder {
  color: var(--muted);
}

.mode-options label,
.advanced-option {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
  font-weight: 400;
}

.mode-options input:checked + span,
.home-panel .advanced-option.active {
  background: var(--ultramarine);
  color: #ffffff;
  box-shadow: none;
}

.home-panel .home-detail-toggle {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.home-panel .home-detail-toggle[aria-expanded="true"] {
  border-color: var(--ultramarine);
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
}

#showResultsButton,
#rerunSearchButton,
#detailApplyButton {
  min-height: 48px;
  border: 1px solid var(--ultramarine);
  border-radius: 6px;
  background: var(--ultramarine);
  color: #ffffff;
  box-shadow: none;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

#showResultsButton:hover,
#showResultsButton:active,
#rerunSearchButton:hover,
#detailApplyButton:hover {
  border-color: var(--ultramarine-deep);
  background: var(--ultramarine-deep);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

#detailSearchButton,
#detailCloseButton {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-weight: 400;
  text-transform: none;
}

#detailSearchButton:hover,
#detailCloseButton:hover {
  background: var(--surface-cool);
  color: var(--ink);
}

.footer {
  width: min(1200px, calc(100% - 48px));
  padding: 40px 0;
  color: var(--muted);
}

.footer span {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.footer strong,
.footer small {
  color: var(--body);
  font-weight: 400;
}

.results-view,
.result-views,
.mvp-view,
.mvp-frame,
.report-content,
.card-list {
  background: var(--panel);
}

.result-toolbar {
  top: 64px;
  border-bottom: 1px solid var(--surface-cool-strong);
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.result-status,
.table-paywall {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--body);
  box-shadow: none;
}

.report-hero {
  border: 0;
  border-radius: 8px;
  background: var(--ultramarine-soft);
  color: var(--ink);
  box-shadow: none;
}

.report-hero span {
  color: var(--ultramarine-deep);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.report-hero h2 {
  color: var(--ink);
  font-weight: 700;
  text-transform: none;
}

.report-hero p,
.report-metrics span,
.report-section header span,
.report-candidates span,
.report-candidates dt,
.result-card span,
.result-card dt {
  color: var(--muted);
}

.report-metrics article,
.report-candidates article,
.card-metrics div,
.card-judgment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-cool);
  box-shadow: none;
}

.report-metrics strong,
.report-section header strong,
.report-candidates article > strong,
.result-card strong,
.result-card dd {
  color: var(--ink);
  font-weight: 700;
}

.result-card {
  border-radius: 8px;
  overflow: hidden;
}

.result-card:hover {
  box-shadow: none;
  transform: none;
}

.card-photo {
  border-radius: 8px 8px 0 0;
}

.card-photo-badge {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ultramarine-deep);
  box-shadow: none;
}

.card-judgment,
.card-metrics div {
  border-radius: 8px;
}

.map-list,
.boundary-map-shell {
  background: var(--surface-cool);
  box-shadow: none;
}

.map-region {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.map-region.active {
  border-color: var(--ultramarine);
  box-shadow: none;
}

.boundary-region.is-empty {
  fill: #cdd1d5;
}

.boundary-region.is-low {
  fill: #d8e5fd;
}

.boundary-region.is-mid {
  fill: #86aff9;
}

.boundary-region.is-high {
  fill: var(--ultramarine);
}

.sheet-shell {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

table {
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
}

th,
td {
  border-right: 1px solid var(--surface-cool-strong);
  border-bottom: 1px solid var(--surface-cool-strong);
}

td {
  height: 40px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 400;
}

th {
  height: 48px;
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-cool);
  color: var(--ink);
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

th:hover {
  border-bottom-color: var(--ultramarine);
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
  box-shadow: none;
}

th.is-sorted,
th:first-child.is-sorted {
  border-bottom: 2px solid var(--ultramarine);
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
  box-shadow: none;
}

th:first-child,
td:first-child,
tbody tr:nth-child(even) td:first-child,
tbody tr:hover td:first-child {
  background: var(--panel);
  box-shadow: none;
}

tbody tr:nth-child(even) td {
  background: var(--surface-cool);
}

tbody tr:hover td {
  background: var(--ultramarine-soft);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--ultramarine) 35%, transparent);
  outline-offset: 2px;
}

.positive {
  color: var(--green);
}

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

.warning {
  color: var(--amber);
}

@media (max-width: 1100px) {
  .topbar {
    min-height: 64px;
  }

  .result-toolbar {
    top: 64px;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 58px;
    padding: 8px 16px;
  }

  .main-tabs {
    gap: 18px;
  }

  .main-tabs button {
    height: 34px;
    font-size: 15px;
  }

  .home-view {
    width: min(100% - 32px, 900px);
    padding-top: 40px;
  }

  .home-copy h2 {
    font-size: 28px;
  }

  .home-panel {
    padding: 18px;
  }

  .result-toolbar {
    top: 104px;
  }
}

/* KRDS final component refinements: structure only, brand tokens for color */
.app {
  background: var(--bg);
}

.brand-group {
  gap: clamp(18px, 3vw, 36px);
}

.brand-home {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.brand-home:hover {
  opacity: 1;
  transform: none;
}

.source-pill {
  display: none;
}

.advanced-option.active::after {
  border-right-color: currentColor;
  border-bottom-color: currentColor;
}

.advanced-direct-dialog {
  width: min(430px, calc(100% - 32px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.1), 0 4px 8px 0 rgba(0, 0, 0, 0.1);
}

.advanced-direct-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.advanced-direct-panel {
  display: grid;
  gap: 24px;
  border-radius: 12px;
  background: var(--panel);
  padding: 32px;
  color: var(--ink);
}

.advanced-direct-panel header,
.advanced-direct-panel footer {
  gap: 12px;
}

.advanced-direct-panel header strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
}

.advanced-direct-panel footer button,
#advancedDirectCloseButton {
  height: 48px;
  border-radius: 6px;
  padding: 0 16px;
  box-shadow: none;
  font-size: 17px;
  font-weight: 400;
}

#advancedDirectCloseButton,
#advancedDirectResetButton {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

#advancedDirectApplyButton {
  border: 1px solid var(--ultramarine);
  background: var(--ultramarine);
  color: #ffffff;
}

#advancedDirectApplyButton:hover {
  border-color: var(--ultramarine-deep);
  background: var(--ultramarine-deep);
}

.advanced-direct-body {
  gap: 16px;
}

.direct-input-row {
  gap: 8px;
}

.direct-input-row label {
  color: var(--body);
  font-size: 15px;
  font-weight: 700;
}

.advanced-direct-body input,
.advanced-direct-body select {
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  box-shadow: none;
  font-size: 17px;
  font-weight: 400;
}

.advanced-direct-body span,
.advanced-direct-body small,
.home-direct-range span,
.home-direct-range small,
.home-direct-single span,
.home-direct-single small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.button-logo {
  color: currentColor;
  filter: none;
}

#showResultsButton.is-loading {
  opacity: 1;
}

/* Warm off-white + deep blue brand layer */
:root {
  --bg: #f7f4ee;
  --panel: #ffffff;
  --ink: #1f2429;
  --body: #3f474f;
  --text: #1f2429;
  --muted: #667078;
  --line: #ded8cf;
  --line-strong: #b8aea2;
  --navy: #1f5eff;
  --navy-dark: #12348f;
  --navy-mid: #1746c7;
  --navy-soft: #e8efff;
  --ultramarine: #1f5eff;
  --ultramarine-deep: #1746c7;
  --ultramarine-soft: #e8efff;
  --on-primary: #ffffff;
  --surface-cool: #fbfaf7;
  --surface-cool-strong: #eee8df;
  --surface-table-head: #f1ede6;
  --table-border: #e5ded5;
  --map-base: #e9e1d7;
  --map-active: #adc3ff;
  --sheet-bg: #f7f4ee;
  --green: #1f7a4d;
  --red: #d84a3a;
  --amber: #9d6a1f;
  --shadow: 0 14px 34px rgba(61, 52, 41, 0.08);
}

body,
.app {
  background: var(--bg);
  color: var(--text);
}

.topbar {
  border-bottom: 1px solid rgba(222, 216, 207, 0.82);
  background: rgba(251, 250, 247, 0.92);
  box-shadow: 0 8px 24px rgba(61, 52, 41, 0.05);
}

.page-loader {
  background: rgba(247, 244, 238, 0.68);
  color: var(--ultramarine);
}

.loader-logo,
.loader-text {
  color: var(--ultramarine);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  box-shadow: 0 16px 38px rgba(31, 94, 255, 0.1);
}

.brand-mark,
.hero-title-accent,
.main-tabs button.active,
.main-tabs button:hover,
.home-mode-tab.active,
.result-tab.active,
.result-tab:hover,
.source-pill,
.map-place.is-selected strong,
.card-meta,
.report-candidates article strong {
  color: var(--ultramarine);
}

.main-tabs button.active::after {
  background: var(--ultramarine);
}

.signup-button,
#showResultsButton,
#detailApplyButton,
#advancedDirectApplyButton,
.advanced-option.active {
  border-color: var(--ultramarine);
  background: var(--ultramarine);
  color: var(--on-primary);
}

.signup-button:hover,
#showResultsButton:hover,
#detailApplyButton:hover,
#advancedDirectApplyButton:hover {
  border-color: var(--ultramarine-deep);
  background: var(--ultramarine-deep);
  color: var(--on-primary);
}

.home-view,
.results-view,
.result-toolbar,
.footer,
.sheet-shell,
.home-panel,
.report-content > section,
.map-placeholder,
.result-panel,
.card-list article,
.detail-dialog-panel,
.advanced-direct-panel {
  background-color: var(--panel);
}

.result-toolbar {
  border-bottom-color: var(--line);
}

.home-panel,
.report-content > section,
.map-placeholder,
.card-list article,
.detail-dialog-panel,
.advanced-direct-panel,
.sheet-shell,
.result-field input,
.result-field select,
.amount-input,
.location-selects select,
.home-direct-input,
.advanced-direct-body input,
.advanced-direct-body select,
.toggle-box,
.home-mode-tab,
.result-tab,
.advanced-option,
#detailSearchButton,
#rerunSearchButton,
.login-button,
#advancedDirectCloseButton,
#advancedDirectResetButton {
  border-color: var(--line);
}

.home-mode-tab.active,
.result-tab.active,
.advanced-option.active {
  box-shadow: inset 0 0 0 1px var(--ultramarine);
}

.home-mode-tab.active,
.result-tab.active,
.advanced-option.active:not(.advanced-direct-button) {
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
}

#detailSearchButton,
#rerunSearchButton,
.login-button,
#advancedDirectCloseButton,
#advancedDirectResetButton {
  background: var(--panel);
  color: var(--ink);
}

.result-field input,
.result-field select,
.amount-input,
.location-selects select,
.home-direct-input,
.advanced-direct-body input,
.advanced-direct-body select,
.toggle-box {
  background: var(--panel);
  color: var(--ink);
}

.table-paywall,
th {
  background: var(--surface-table-head);
  color: var(--ink);
}

td {
  background: var(--panel);
  color: var(--ink);
}

tbody tr:nth-child(even) td {
  background: #fbfaf7;
}

tbody tr:hover td,
th:hover,
th.is-sorted,
th:first-child.is-sorted {
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
}

th:hover,
th.is-sorted,
th:first-child.is-sorted {
  border-bottom-color: var(--ultramarine);
}

th,
td {
  border-color: var(--table-border);
}

.korea-map path,
.map-region {
  fill: var(--map-base);
}

.korea-map path.is-active,
.map-region.is-active {
  fill: var(--map-active);
}

.korea-map path.is-selected,
.map-region.is-selected {
  fill: var(--ultramarine);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(31, 94, 255, 0.28);
  outline-offset: 2px;
}

.positive {
  color: var(--green);
}

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

.warning {
  color: var(--amber);
}

/* Warm brand page-level corrections */
.home-view,
.results-view,
.result-views,
.report-content,
.card-list,
.footer {
  background: transparent;
}

.result-panel {
  background: transparent;
}

th,
th:first-child {
  background: var(--surface-table-head);
  color: var(--ink);
}

td:first-child {
  background: var(--panel);
}

tbody tr:nth-child(even) td,
tbody tr:nth-child(even) td:first-child {
  background: #fbfaf7;
}

tbody tr:hover td,
tbody tr:hover td:first-child {
  background: var(--ultramarine-soft);
}

/* Exploration-first layout */
.results-view {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 72px);
  padding: 18px 14px 14px;
  background: var(--bg);
}

.explore-summary,
.result-toolbar,
.card-view-heading,
.result-card,
.sheet-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.explore-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
}

.explore-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.explore-eyebrow {
  color: var(--ultramarine);
  font-size: 13px;
  font-weight: 800;
}

.explore-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

.explore-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.explore-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.explore-metrics div {
  display: grid;
  align-content: space-between;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 14px;
}

.explore-metrics dt,
.explore-metrics dd {
  margin: 0;
}

.explore-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.explore-metrics dd {
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
}

.explore-metrics small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.result-toolbar {
  position: sticky;
  top: 72px;
  z-index: 10;
  padding: 12px;
}

.controls {
  grid-template-columns: minmax(128px, 0.8fr) minmax(132px, 0.72fr) minmax(132px, 0.72fr) minmax(132px, 0.72fr) auto auto minmax(190px, auto);
  gap: 9px;
}

.controls input,
.controls select,
.controls button,
.toggle-box,
.result-status {
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.result-status {
  min-height: 30px;
  padding: 7px 10px;
  box-shadow: none;
}

.result-tabs {
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.result-tab.active {
  background: var(--ultramarine-soft);
  color: var(--ultramarine-deep);
}

.result-views {
  min-height: 0;
  background: transparent;
}

.card-view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 14px 16px;
}

.card-view-heading div {
  display: grid;
  gap: 4px;
}

.card-view-heading span,
.card-view-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-view-heading strong {
  color: var(--ink);
  font-size: 18px;
}

.card-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding: 0 0 10px;
}

.result-card {
  overflow: hidden;
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 94, 255, 0.34);
  box-shadow: none;
}

.card-photo {
  aspect-ratio: auto;
  min-height: 42px;
  border-radius: 0;
  background: var(--surface-table-head);
  background-image: none;
}

.card-photo::after {
  display: none;
}

.card-photo-badge {
  left: 12px;
  right: auto;
  bottom: 8px;
  height: 26px;
  background: var(--panel);
  color: var(--ultramarine-deep);
  box-shadow: none;
}

.card-content {
  gap: 12px;
  padding: 16px;
}

.card-metrics div,
.card-judgment {
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.card-metrics div.is-primary {
  background: var(--ultramarine-soft);
}

.sheet-shell {
  margin: 0;
}

@media (max-width: 920px) {
  .results-view {
    padding: 12px;
  }

  .explore-summary {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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

  .result-tabs,
  .result-status {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .explore-copy h1 {
    font-size: 30px;
  }

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

  .explore-metrics div {
    min-height: 104px;
    padding: 12px;
  }

  .explore-metrics dd {
    font-size: 20px;
  }

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

  .card-view-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .explore-metrics,
  .controls {
    grid-template-columns: 1fr;
  }
}

/* Product-category style top tabs */
.main-tabs {
  gap: clamp(12px, 2.4vw, 24px);
}

.main-tabs button {
  height: 52px;
  border-radius: 14px;
  padding: 0 clamp(18px, 2.4vw, 26px);
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.main-tabs button:hover {
  color: var(--ultramarine);
  background: color-mix(in srgb, var(--ultramarine) 8%, transparent);
  transform: none;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  color: #ffffff;
  background: var(--ultramarine);
  box-shadow: 0 12px 24px rgba(31, 94, 255, 0.16);
}

.main-tabs button.active::after {
  display: none;
}

@media (max-width: 760px) {
  .main-tabs {
    gap: 10px;
  }

  .main-tabs button {
    height: 46px;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 15px;
  }
}

/* Diagnosis result dashboard */
.results-view[data-active-tab="report"] {
  background: #f6f8fb;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 20px clamp(18px, 3.4vw, 34px) 28px;
}

.results-view[data-active-tab="report"] .result-toolbar {
  position: sticky;
  top: 74px;
  width: min(1180px, 100%);
  justify-self: center;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px 20px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.results-view[data-active-tab="report"] .controls {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
}

.results-view[data-active-tab="report"] .controls label > span:first-child,
.results-view[data-active-tab="report"] .result-field > span:first-child {
  color: #64748b;
  font-size: 12px;
}

.results-view[data-active-tab="report"] .controls input,
.results-view[data-active-tab="report"] .controls select,
.results-view[data-active-tab="report"] .toggle-box {
  height: 48px;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 750;
}

.results-view[data-active-tab="report"] #rerunSearchButton {
  height: 48px;
  border-radius: 8px;
  background: #0b5ee8;
  color: #ffffff;
  padding: 0 22px;
  box-shadow: 0 10px 20px rgba(11, 94, 232, 0.18);
}

.results-view[data-active-tab="report"] .result-status {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 1px solid #e1e9f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #475569;
  padding: 10px 14px;
}

.results-view[data-active-tab="report"] .result-views {
  width: min(1180px, 100%);
  justify-self: center;
}

.results-view[data-active-tab="report"] .report-content {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0;
  background: transparent;
}

.report-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: stretch;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 22px 24px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.report-hero h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.report-condition-card {
  display: grid;
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  padding: 16px;
}

.report-condition-card strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.report-condition-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.report-condition-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-condition-card dt {
  color: #64748b;
  font-size: 13px;
}

.report-condition-card dd {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.report-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-metrics article {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.report-metrics article::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
}

.report-metrics article.is-success::before {
  background: #22c55e;
}

.report-metrics article.is-near::before {
  background: #f59e0b;
}

.report-metrics article.is-over::before {
  background: #ef4444;
}

.report-metrics article.is-muted::before {
  background: #94a3b8;
}

.report-metrics strong {
  font-size: 26px;
}

.report-metrics small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.report-region-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0;
}

.report-region-tabs span {
  flex: 0 0 auto;
  min-width: 88px;
  display: grid;
  gap: 5px;
  justify-items: center;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 16px;
  color: #334155;
}

.report-region-tabs span.active {
  border-color: #0b5ee8;
  background: #eff6ff;
  color: #0b5ee8;
}

.report-region-tabs strong {
  font-size: 14px;
  font-weight: 800;
}

.report-region-tabs small {
  font-size: 13px;
  font-weight: 800;
}

.report-section {
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.report-section header {
  align-items: center;
}

.report-section header div {
  display: grid;
  gap: 5px;
}

.report-section header > span {
  flex: 0 0 auto;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  padding: 9px 12px;
  font-weight: 800;
}

.report-candidates {
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
}

.report-candidates article {
  display: grid;
  grid-template-columns: 24px minmax(170px, 1.2fr) minmax(130px, 1fr) 80px minmax(320px, 1.6fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5eaf2;
  border-radius: 0;
  background: #ffffff;
  padding: 14px 16px;
}

.report-candidates article:last-child {
  border-bottom: 0;
}

.report-star {
  color: #94a3b8;
  font-size: 18px;
}

.report-candidates article > strong {
  font-size: 15px;
}

.report-candidates dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.report-candidates dd {
  color: #0f172a;
  font-size: 13px;
}

.report-candidates dl div:nth-child(3) dd {
  color: #16a34a;
}

.report-candidates p {
  grid-column: 2 / -1;
  color: #64748b;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="report"] .controls,
  .report-hero,
  .report-metrics {
    grid-template-columns: 1fr;
  }

  .report-candidates article {
    grid-template-columns: 24px 1fr;
  }

  .report-candidates article > span:not(.report-star),
  .report-candidates dl,
  .report-candidates p {
    grid-column: 2 / -1;
  }
}

/* Full dashboard treatment for diagnosis results */
.report-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

.report-main-column,
.report-side-column {
  display: grid;
  gap: 16px;
}

.report-side-column {
  position: sticky;
  top: 178px;
}

.report-hero {
  grid-template-columns: 1fr;
  min-height: 148px;
}

.report-condition-card,
.report-side-card {
  display: grid;
  gap: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.report-condition-card {
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
}

.report-condition-card button,
.report-side-card button {
  height: 38px;
  border: 1px solid #cbd7e8;
  border-radius: 8px;
  background: #ffffff;
  color: #0f2852;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.report-alert-card {
  border-color: #b9d5ff;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf3ff 100%);
}

.report-alert-card button {
  border-color: #0b5ee8;
  background: #0b5ee8;
  color: #ffffff;
}

.report-side-card strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.report-side-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.report-side-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: report-side-list;
}

.report-side-card li {
  counter-increment: report-side-list;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.report-side-card li::before {
  content: counter(report-side-list);
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #edf2f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.report-source-card {
  background: #f8fbff;
}

.report-candidates article {
  grid-template-columns: 24px minmax(150px, 1.1fr) minmax(120px, 0.85fr) 72px minmax(360px, 1.8fr);
}

@media (max-width: 1120px) {
  .report-dashboard {
    grid-template-columns: 1fr;
  }

  .report-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .report-side-column {
    grid-template-columns: 1fr;
  }
}

/* Apartment finder: compact rental checkbox beside the budget input. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox {
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #536278;
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #1262e3;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox:has(input:checked) {
  color: #1258c8;
}

.results-view[data-active-tab="explore"] .field-label-secondary {
  font-size: inherit !important;
  font-weight: 480 !important;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox {
    height: 40px;
    padding-right: 1px;
    font-size: 12px;
  }
}

/* Apartment finder: distinguish the search mode from result sorting. */
.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
  gap: 0 !important;
}

.results-view[data-active-tab="explore"] .analysis-control-group {
  flex: 0 0 auto;
  min-width: max-content;
  display: flex;
  align-self: stretch;
  align-items: center;
  padding: 0;
}

.results-view[data-active-tab="explore"] .analysis-control-group + .analysis-control-group {
  margin-left: 20px;
  border-left: 0;
  padding: 0;
}

.results-view[data-active-tab="explore"] .analysis-control-group + .analysis-control-group::before {
  display: none;
}

.results-view[data-active-tab="explore"] .analysis-group-buttons {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-control-group .excel-analysis-tab {
  min-height: 36px;
}

.results-view[data-active-tab="explore"] .analysis-mode-group .analysis-group-buttons {
  gap: 20px;
  align-self: stretch;
  align-items: stretch;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group .excel-analysis-tab {
  min-height: 60px;
  border-radius: 0;
  padding: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group .excel-analysis-tab::after {
  display: block;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group .excel-analysis-tab.active {
  background: transparent;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .analysis-group-buttons {
  gap: 6px;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab {
  position: relative;
  min-height: 32px;
  gap: 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4f5f75;
  padding: 0 9px;
  transition: background 150ms ease, color 150ms ease;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab span {
  font-size: 12px;
  font-weight: 710;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab + .excel-analysis-tab {
  border-left: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab::after {
  display: none;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab:hover {
  background: #f5f7fa;
  color: #243750;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab.active {
  background: #eef5ff;
  color: #1262e3;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab.active:hover {
  background: #e8f1ff;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-sort-group .excel-analysis-tab.active::after {
  display: none;
}

.results-view[data-active-tab="explore"] .analysis-sort-icon {
  position: relative;
  width: 8px;
  min-width: 8px;
  height: 6px;
  display: inline-block;
  color: #8d9aad;
  font-style: normal;
}

.results-view[data-active-tab="explore"] .analysis-sort-icon::before,
.results-view[data-active-tab="explore"] .analysis-sort-icon::after {
  content: "";
  position: absolute;
  left: 1.5px;
  width: 3.5px;
  height: 3.5px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.results-view[data-active-tab="explore"] .analysis-sort-icon::before {
  top: -1px;
  transform: rotate(45deg);
}

.results-view[data-active-tab="explore"] .analysis-sort-icon::after {
  bottom: -1px;
  transform: rotate(225deg);
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.active .analysis-sort-icon {
  color: #1262e3;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab[data-sort-priority]::before {
  content: attr(data-sort-priority);
  width: 16px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1262e3;
  color: #ffffff;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab[data-sort-priority] {
  cursor: grab;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-priority-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-priority-drag-over {
  background: #dceaff;
  box-shadow: inset 0 0 0 2px #1262e3 !important;
}

.results-view[data-active-tab="explore"] .analysis-priority-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.results-view[data-active-tab="explore"] .analysis-priority-actions button {
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #53637a;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .analysis-priority-actions button.active {
  background: transparent;
  color: #1262e3;
}

.results-view[data-active-tab="explore"] .analysis-priority-actions button[hidden] {
  display: none;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-strip-filter {
  position: relative;
}

.results-view[data-active-tab="explore"] .priority-sort-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  z-index: 40;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid #dce5f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(29, 51, 82, 0.16);
}

.results-view[data-active-tab="explore"] .priority-sort-panel[hidden] {
  display: none;
}

.results-view[data-active-tab="explore"] .priority-sort-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.results-view[data-active-tab="explore"] .priority-sort-panel > header > div {
  display: grid;
  gap: 2px;
}

.results-view[data-active-tab="explore"] .priority-sort-panel > header strong {
  color: #1c2c43;
  font-size: 13px;
}

.results-view[data-active-tab="explore"] .priority-sort-panel > header span {
  color: #7a889b;
  font-size: 10px;
}

.results-view[data-active-tab="explore"] #prioritySortDoneButton {
  border: 0;
  border-radius: 6px;
  background: #1262e3;
  color: #ffffff;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 780;
}

.results-view[data-active-tab="explore"] .priority-sort-list {
  display: grid;
  gap: 5px;
}

.results-view[data-active-tab="explore"] .priority-sort-item {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  background: #f4f6f9;
  padding: 5px 7px;
}

.results-view[data-active-tab="explore"] .priority-sort-item.is-dragging {
  opacity: 0.45;
}

.results-view[data-active-tab="explore"] .priority-sort-item.is-drag-over {
  box-shadow: inset 0 2px #1262e3;
}

.results-view[data-active-tab="explore"] .priority-sort-handle {
  color: #93a0b2;
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.results-view[data-active-tab="explore"] .priority-sort-item > b {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1262e3;
  color: #ffffff;
  font-size: 9px;
}

.results-view[data-active-tab="explore"] .priority-sort-item > strong {
  overflow: hidden;
  color: #26374e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .priority-sort-direction,
.results-view[data-active-tab="explore"] .priority-sort-move-controls button {
  border: 0;
  background: transparent;
  color: #52647b;
  font-size: 10px;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .priority-sort-move-controls {
  display: inline-flex;
  gap: 1px;
}

.results-view[data-active-tab="explore"] .priority-sort-move-controls button {
  width: 24px;
  height: 28px;
  padding: 0;
}

.results-view[data-active-tab="explore"] .priority-sort-move-controls button:disabled {
  opacity: 0.25;
}

.results-view[data-active-tab="explore"] .priority-sort-empty {
  margin: 0;
  border-radius: 7px;
  background: #f4f6f9;
  padding: 13px;
  color: #718096;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .priority-sort-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 12px;
    left: 10px;
    width: auto;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
    align-items: stretch !important;
  }

  .results-view[data-active-tab="explore"] .analysis-control-group {
    padding-top: 0;
    padding-bottom: 0;
  }

  .results-view[data-active-tab="explore"] .analysis-control-group + .analysis-control-group {
    margin-left: 16px;
    padding-left: 0;
  }

  .results-view[data-active-tab="explore"] .analysis-group-buttons {
    gap: 14px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group .excel-analysis-tab {
    min-height: 46px;
  }

  .results-view[data-active-tab="explore"] .analysis-sort-group .analysis-group-buttons {
    gap: 6px;
  }
}

/* Match the explore budget mode control to the home residence/rental segment. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
  position: relative;
  width: 132px;
  min-width: 132px;
  height: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 9px;
  background: #f5f8fc;
  padding: 3px;
  box-sizing: border-box;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(31, 45, 61, 0.12);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment:has(button[data-explore-purchase-mode="gap"][aria-pressed="true"])::before {
  transform: translateX(100%);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5f6f83;
  padding: 0 3px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button[aria-pressed="true"] {
  color: #245fae;
  font-weight: 760;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button:focus-visible {
  outline: 2px solid rgba(20, 99, 230, 0.35);
  outline-offset: -2px;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
    width: 118px;
    min-width: 118px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button {
    font-size: 10.2px;
    letter-spacing: -0.02em;
  }
}

/* Reference dashboard grammar */
:root {
  --ref-bg: #f6f8fb;
  --ref-panel: #ffffff;
  --ref-panel-soft: #f8fbff;
  --ref-ink: #0f172a;
  --ref-text: #182235;
  --ref-muted: #64748b;
  --ref-subtle: #94a3b8;
  --ref-line: #d9e2ef;
  --ref-line-soft: #e8edf5;
  --ref-blue: #0b5ee8;
  --ref-blue-dark: #084fc5;
  --ref-blue-soft: #eaf2ff;
  --ref-green: #05a857;
  --ref-orange: #f59e0b;
  --ref-red: #ef4444;
  --ref-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  --ref-shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.09);
  --radius-shell: 8px;
  --radius-card: 8px;
  --radius-control: 8px;
  --radius-small: 6px;
}

body {
  background: var(--ref-bg);
  color: var(--ref-text);
}

.app {
  background: var(--ref-bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--ref-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(10px);
}

.brand-group {
  display: grid;
  width: 100%;
  gap: 0;
}

.brand-home {
  width: max-content;
  max-width: calc(100% - 360px);
  display: inline-grid;
  grid-template-columns: 30px auto auto;
  align-items: end;
  gap: 0 10px;
  margin: 0;
  padding: 16px clamp(24px, 3.8vw, 48px) 14px;
  border-radius: 0;
}

.brand-home:hover {
  opacity: 1;
  transform: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--ref-blue);
  filter: none;
}

.brand-title,
.topbar h1 {
  color: var(--ref-blue);
  font-size: 29px;
  font-weight: 850;
  line-height: 0.95;
}

.brand-tagline {
  display: inline-block;
  align-self: center;
  margin-left: 12px;
  padding-bottom: 1px;
  color: #4b5f7a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.main-tabs {
  width: 100%;
  min-width: 0;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--ref-line-soft);
  padding: 9px clamp(24px, 3.8vw, 48px);
  scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.main-tabs button {
  flex: 0 0 auto;
  height: 46px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: #334155;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 750;
  box-shadow: none;
}

.main-tabs button.active {
  background: var(--ref-blue);
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 10px 22px rgba(11, 94, 232, 0.2);
}

.main-tabs button.active::after {
  display: none;
}

.main-tabs button:not(.active):hover {
  background: var(--ref-blue-soft);
  color: var(--ref-blue);
  transform: none;
}

.main-tabs .nav-only-tab {
  color: #475569;
}

.auth-actions {
  position: absolute;
  top: 18px;
  right: clamp(24px, 3.8vw, 48px);
  display: inline-flex;
  gap: 20px;
  align-items: center;
}

.auth-actions button {
  height: 30px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ref-ink);
  padding: 0 2px;
  font-size: 14px;
  font-weight: 750;
  box-shadow: none;
}

.auth-actions button:hover {
  color: var(--ref-blue);
}

.top-link-button.has-count span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--ref-blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.menu-button {
  display: none;
}

.page-loader {
  background: rgba(246, 248, 251, 0.82);
  color: var(--ref-blue);
}

.loader-logo {
  border-radius: var(--radius-card);
  color: var(--ref-blue);
  box-shadow: var(--ref-shadow-strong);
}

.loader-text {
  border-radius: var(--radius-control);
  color: var(--ref-muted);
  box-shadow: var(--ref-shadow);
}

.home-view {
  width: min(1180px, calc(100% - 64px));
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 470px);
  align-items: center;
  gap: 46px;
  padding: 56px 0 68px;
  background: transparent;
}

.home-copy {
  align-content: center;
  gap: 18px;
  text-align: left;
}

.hero-kicker {
  width: max-content;
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-control);
  background: var(--ref-panel);
  color: var(--ref-blue);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.home-copy h2 {
  margin: 0;
  color: var(--ref-ink);
  font-size: 48px;
  font-weight: 850;
  line-height: 1.12;
}

.hero-title-base,
.hero-title-accent {
  display: block;
}

.hero-title-accent {
  color: var(--ref-blue);
}

.home-copy > span {
  color: var(--ref-muted);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.55;
}

.home-panel {
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: var(--ref-panel);
  padding: 22px;
  box-shadow: var(--ref-shadow-strong);
}

.home-form-tabs {
  gap: 8px;
  border-radius: var(--radius-control);
  background: var(--ref-bg);
  padding: 5px;
}

.home-mode-tab {
  height: 42px;
  border-radius: var(--radius-small);
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

.home-mode-tab.active {
  background: var(--ref-blue);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 94, 232, 0.18);
}

.home-field,
.home-section,
.home-advanced {
  border-color: var(--ref-line-soft);
  border-radius: var(--radius-control);
  background: #ffffff;
  box-shadow: none;
}

.home-field label,
.home-field > label,
.field-label,
.advanced-label {
  color: var(--ref-muted);
  font-size: 12px;
  font-weight: 800;
}

.cash-row,
.amount-input,
.select-wrap,
.stacked-control input,
.home-direct-input {
  border-color: var(--ref-line);
  border-radius: var(--radius-control);
  background: var(--ref-panel-soft);
  color: var(--ref-ink);
}

.mode-options label {
  border-color: var(--ref-line);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ref-text);
}

.mode-options input {
  accent-color: var(--ref-blue);
}

.home-detail-toggle,
.advanced-option,
.advanced-direct-panel button {
  border-radius: var(--radius-control);
}

.advanced-option.active {
  border-color: var(--ref-blue);
  background: var(--ref-blue-soft);
  color: var(--ref-blue);
}

#showResultsButton,
#advancedDirectApplyButton {
  height: 50px;
  border-radius: var(--radius-control);
  background: var(--ref-blue);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(11, 94, 232, 0.2);
}

#showResultsButton:hover,
#advancedDirectApplyButton:hover {
  background: var(--ref-blue-dark);
}

.footer {
  border-top: 1px solid var(--ref-line);
  background: #ffffff;
}

.results-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  background: var(--ref-bg);
  padding: 18px clamp(24px, 3.8vw, 48px) 28px;
}

.results-view[data-active-tab="explore"] .explore-summary,
.results-view[data-active-tab="watchlist"] .explore-summary {
  display: none;
}

.result-toolbar {
  position: sticky;
  top: 126px;
  z-index: 20;
  justify-self: center;
  width: min(1180px, 100%);
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: var(--ref-panel);
  padding: 0;
  box-shadow: var(--ref-shadow);
  backdrop-filter: none;
}

.controls {
  display: grid;
  grid-template-columns: minmax(168px, 0.9fr) minmax(142px, 0.7fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto auto;
  gap: 0;
  align-items: stretch;
  padding: 0;
}

.controls label {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 78px;
  border-right: 1px solid var(--ref-line-soft);
  padding: 14px 20px;
}

.controls label > span:first-child,
.result-field > span:first-child {
  color: var(--ref-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.toggle-box {
  height: auto;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ref-blue);
  padding: 0;
  font-size: 18px;
  font-weight: 850;
  box-shadow: none;
}

.toggle-box input {
  accent-color: var(--ref-blue);
}

.controls input,
.controls select {
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ref-blue);
  padding: 0;
  font-size: 20px;
  font-weight: 850;
  box-shadow: none;
}

.controls input::placeholder {
  color: var(--ref-blue);
  opacity: 0.55;
}

#detailSearchButton,
#rerunSearchButton,
#detailApplyButton {
  align-self: center;
  height: 44px;
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-control);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 850;
}

#detailSearchButton {
  margin-left: 20px;
  background: #ffffff;
  color: var(--ref-ink);
  box-shadow: none;
}

#rerunSearchButton,
#detailApplyButton {
  margin: 0 20px 0 12px;
  border-color: var(--ref-blue);
  background: var(--ref-blue);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(11, 94, 232, 0.18);
}

#rerunSearchButton:hover,
#detailApplyButton:hover {
  background: var(--ref-blue-dark);
}

.result-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--ref-line-soft);
  padding: 0 22px;
}

.result-tab {
  height: 50px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #475569;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
}

.result-tab.active {
  border-color: var(--ref-blue);
  background: transparent;
  color: var(--ref-blue);
}

.result-status {
  grid-column: 1 / -1;
  min-height: 0;
  border-top: 1px solid var(--ref-line-soft);
  border-radius: 0;
  background: #ffffff;
  color: var(--ref-muted);
  padding: 10px 22px 14px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.result-views {
  justify-self: center;
  width: min(1180px, 100%);
  min-height: 0;
}

.result-panel.active {
  display: grid;
  min-height: 0;
}

.result-panel[data-view-panel="table"].active,
.result-panel[data-view-panel="cards"].active,
.result-panel[data-view-panel="map"].active {
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: var(--ref-panel);
  box-shadow: var(--ref-shadow);
  overflow: hidden;
}

.table-paywall {
  margin: 0;
  border-bottom: 1px solid var(--ref-line-soft);
  border-radius: 0;
  background: #ffffff;
  color: var(--ref-muted);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.sheet-shell {
  margin: 0;
  min-height: 0;
  max-height: calc(100vh - 310px);
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: auto;
}

table {
  min-width: 1180px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  color: var(--ref-text);
  font-size: 13.5px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--ref-line);
  background: #f8fafc;
  color: #334155;
  padding: 15px 14px;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  border-bottom: 1px solid var(--ref-line-soft);
  color: var(--ref-text);
  padding: 13px 14px;
  font-weight: 650;
  vertical-align: middle;
  white-space: nowrap;
}

tbody tr:hover td {
  background: #f8fbff;
}

tbody td.money,
tbody td.positive {
  color: var(--ref-green);
  font-weight: 850;
}

tbody td.name-cell {
  color: var(--ref-ink);
  font-weight: 850;
}

tbody td.date {
  color: var(--ref-muted);
  font-size: 13px;
  font-weight: 650;
}

tbody td.investment-cell {
  color: var(--ref-green);
}

tbody td.warning {
  color: var(--ref-orange);
  font-weight: 850;
}

tbody td.risk {
  color: var(--ref-red);
  font-weight: 850;
}

.card-view-heading {
  border-bottom: 1px solid var(--ref-line-soft);
  background: #ffffff;
  padding: 18px 20px;
}

.card-view-heading span,
.card-view-heading small {
  color: var(--ref-muted);
  font-size: 13px;
  font-weight: 750;
}

.card-view-heading strong {
  color: var(--ref-ink);
  font-size: 20px;
  font-weight: 850;
}

.card-list {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.result-card {
  border: 1px solid var(--ref-line-soft);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: none;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ref-shadow);
}

.card-photo {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.card-photo-badge {
  border-radius: var(--radius-small);
  color: var(--ref-blue);
  box-shadow: none;
}

.card-content {
  gap: 13px;
  padding: 16px;
}

.result-card strong,
.result-card dd {
  color: var(--ref-ink);
  font-weight: 850;
}

.card-metrics div,
.card-judgment {
  border-radius: var(--radius-control);
  background: #f8fafc;
}

.card-metrics div.is-primary {
  background: var(--ref-blue-soft);
}

.map-placeholder {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.map-list {
  background: #ffffff;
}

.map-region {
  border: 1px solid var(--ref-line-soft);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: none;
}

.map-region.is-high {
  background: var(--ref-blue);
  color: #ffffff;
}

.map-region.is-mid {
  background: var(--ref-blue-soft);
  color: var(--ref-blue);
}

.map-region.is-low {
  background: #f8fafc;
  color: var(--ref-text);
}

.detail-dialog-panel,
.advanced-direct-panel {
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: var(--ref-shadow-strong);
}

.detail-dialog-panel header,
.advanced-direct-panel header {
  border-bottom: 1px solid var(--ref-line-soft);
}

.detail-dialog-panel input,
.detail-dialog-panel select {
  border-color: var(--ref-line);
  border-radius: var(--radius-control);
}

.results-view[data-active-tab="report"] {
  background: var(--ref-bg);
  gap: 16px;
  padding: 18px clamp(24px, 3.8vw, 48px) 28px;
}

.results-view[data-active-tab="report"] .result-toolbar {
  top: 126px;
  width: min(1180px, 100%);
  border-color: var(--ref-line);
  border-radius: var(--radius-card);
  background: #ffffff;
  padding: 0;
  box-shadow: var(--ref-shadow);
}

.results-view[data-active-tab="report"] .controls {
  grid-template-columns: minmax(168px, 0.9fr) minmax(142px, 0.7fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto;
}

.results-view[data-active-tab="report"] .result-status {
  display: block;
}

.results-view[data-active-tab="report"] .result-views {
  width: min(1180px, 100%);
}

.results-view[data-active-tab="report"] .report-content {
  background: transparent;
  padding: 0;
}

.report-dashboard {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
}

.report-hero,
.report-metrics article,
.report-section,
.report-condition-card,
.report-side-card {
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: var(--ref-shadow);
}

.report-hero {
  min-height: auto;
  padding: 20px 22px;
}

.report-hero span {
  color: var(--ref-muted);
  font-size: 13px;
  font-weight: 800;
}

.report-hero h2 {
  color: var(--ref-ink);
  font-size: 26px;
  font-weight: 850;
}

.report-hero p {
  color: var(--ref-muted);
}

.report-metrics {
  gap: 12px;
}

.report-metrics article {
  min-height: 112px;
  padding: 18px;
}

.report-metrics article::before {
  width: 30px;
  height: 30px;
  box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.04);
}

.report-metrics article.is-success::before {
  background: var(--ref-green);
}

.report-metrics article.is-near::before {
  background: var(--ref-orange);
}

.report-metrics article.is-over::before {
  background: var(--ref-red);
}

.report-metrics strong {
  color: var(--ref-ink);
  font-size: 25px;
  font-weight: 850;
}

.report-region-tabs {
  gap: 8px;
}

.report-region-tabs span {
  border-color: var(--ref-line);
  border-radius: var(--radius-card);
  background: #ffffff;
}

.report-region-tabs span.active {
  border-color: var(--ref-blue);
  background: var(--ref-blue-soft);
  color: var(--ref-blue);
}

.report-section header {
  border-bottom: 1px solid var(--ref-line-soft);
  padding: 18px 20px;
}

.report-section header strong {
  color: var(--ref-ink);
  font-size: 18px;
  font-weight: 850;
}

.report-section header span {
  color: var(--ref-muted);
}

.report-section header > span {
  border-color: var(--ref-line);
  border-radius: var(--radius-control);
  background: #ffffff;
}

.report-candidates {
  border: 0;
  border-radius: 0;
}

.report-candidates article {
  grid-template-columns: 24px minmax(150px, 1fr) minmax(124px, 0.85fr) 70px minmax(330px, 1.7fr);
  border-bottom: 1px solid var(--ref-line-soft);
  background: #ffffff;
}

.report-candidates article:hover {
  background: #f8fbff;
}

.report-candidates dl div:nth-child(3) dd {
  color: var(--ref-green);
}

.report-condition-card {
  background: #ffffff;
}

.report-condition-card button,
.report-side-card button {
  border-color: var(--ref-line);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ref-ink);
}

.report-alert-card {
  border-color: #bfd7ff;
  background: var(--ref-panel-soft);
}

.report-alert-card button {
  border-color: var(--ref-blue);
  background: var(--ref-blue);
  color: #ffffff;
}

.report-source-card {
  background: var(--ref-panel-soft);
}

@media (max-width: 1180px) {
  .brand-home {
    max-width: none;
  }

  .brand-tagline {
    display: none;
  }

  .auth-actions {
    gap: 14px;
  }

  .main-tabs {
    gap: 8px;
  }

  .main-tabs button {
    padding: 0 18px;
  }

  .controls,
  .results-view[data-active-tab="report"] .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .controls label {
    border-bottom: 1px solid var(--ref-line-soft);
  }

  #detailSearchButton,
  #rerunSearchButton,
  #detailApplyButton {
    margin: 14px 12px;
  }

  .sheet-shell {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .auth-actions {
    display: none;
  }

  .home-view {
    width: min(680px, calc(100% - 32px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0 48px;
  }

  .home-copy h2 {
    font-size: 38px;
  }

  .result-toolbar,
  .results-view[data-active-tab="report"] .result-toolbar {
    top: 116px;
  }

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

  .report-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .brand-home {
    padding: 14px 16px 12px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .brand-title {
    font-size: 25px;
  }

  .main-tabs {
    padding: 8px 16px;
  }

  .main-tabs button {
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .results-view {
    padding: 14px 12px 22px;
  }

  .result-toolbar,
  .results-view[data-active-tab="report"] .result-toolbar {
    top: 103px;
  }

  .controls,
  .results-view[data-active-tab="report"] .controls {
    grid-template-columns: 1fr;
  }

  .controls label {
    min-height: 70px;
    border-right: 0;
    padding: 12px 16px;
  }

  #detailSearchButton,
  #rerunSearchButton,
  #detailApplyButton {
    width: auto;
    margin: 10px 16px;
  }

  .result-tabs {
    overflow-x: auto;
    padding: 0 16px;
  }

  .home-copy h2 {
    font-size: 32px;
  }

  .home-copy > span {
    font-size: 16px;
  }

  .home-panel {
    padding: 16px;
  }

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

  .report-candidates article {
    grid-template-columns: 24px 1fr;
  }

  .report-candidates article > span:not(.report-star),
  .report-candidates dl,
  .report-candidates p {
    grid-column: 2 / -1;
  }
}

/* Centered diagnosis and expandable apartment filter flow */
.home-view {
  min-height: calc(100vh - 182px);
  width: min(720px, calc(100% - 48px));
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 44px 0 64px;
}

.home-copy {
  justify-items: center;
  text-align: center;
}

.hero-kicker {
  justify-self: center;
}

.home-copy h2 {
  font-size: clamp(36px, 4.6vw, 56px);
}

.home-copy > span {
  max-width: 560px;
}

.home-panel {
  width: min(520px, 100%);
}

.home-report-preview {
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  box-shadow: var(--ref-shadow);
}

.home-report-preview header {
  display: grid;
  gap: 5px;
  justify-items: center;
  text-align: center;
}

.home-report-preview header strong {
  color: var(--ref-ink);
  font-size: 17px;
  font-weight: 850;
}

.home-report-preview header span {
  color: var(--ref-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

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

.home-preview-metrics article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--ref-line-soft);
  border-radius: var(--radius-control);
  background: #ffffff;
  padding: 14px;
  text-align: left;
}

.home-preview-metrics span {
  color: var(--ref-blue);
  font-size: 12px;
  font-weight: 850;
}

.home-preview-metrics strong {
  color: var(--ref-ink);
  font-size: 16px;
  font-weight: 850;
}

.home-preview-metrics small {
  color: var(--ref-muted);
  font-size: 12px;
  font-weight: 650;
}

@media (max-width: 980px) {
  .home-view {
    min-height: auto;
    width: min(620px, calc(100% - 32px));
    padding: 36px 0 52px;
  }
}

@media (max-width: 720px) {
  .home-view {
    width: min(100% - 24px, 520px);
    gap: 22px;
    padding: 28px 0 42px;
  }

  .home-copy h2 {
    font-size: 32px;
  }

  .home-preview-metrics {
    grid-template-columns: 1fr;
  }
}

/* Apartment-all result layout with side summary */
.explore-results-layout {
  justify-self: center;
  width: min(1490px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 16px;
  align-items: start;
}

.explore-results-layout .result-views {
  width: 100%;
}

.explore-side-column {
  position: sticky;
  top: 344px;
  display: grid;
  gap: 16px;
}

.explore-side-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-card);
  background: #ffffff;
  padding: 18px;
  box-shadow: var(--ref-shadow);
}

.explore-side-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.explore-side-card strong {
  color: var(--ref-ink);
  font-size: 16px;
  font-weight: 850;
}

.explore-side-card button {
  height: 32px;
  border: 1px solid var(--ref-line);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ref-blue);
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.explore-side-card dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.explore-side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.explore-side-card dt {
  color: var(--ref-muted);
  font-size: 13px;
  font-weight: 650;
}

.explore-side-card dd {
  margin: 0;
  color: var(--ref-ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.explore-side-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.explore-side-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.explore-side-card li {
  position: relative;
  padding-left: 24px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.explore-side-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  border: 1px solid #8bb8ff;
  border-radius: 4px;
  background: var(--ref-blue-soft);
}

.explore-alert-card,
.explore-source-card {
  background: var(--ref-panel-soft);
}

.explore-alert-card {
  border-color: #bfd7ff;
}

.explore-alert-card strong,
.explore-source-card strong {
  color: var(--ref-blue);
}

.explore-alert-card button {
  border-color: var(--ref-blue);
  background: var(--ref-blue);
  color: #ffffff;
}

.results-view[data-active-tab="report"] .explore-results-layout {
  display: block;
  width: min(1180px, 100%);
}

.results-view[data-active-tab="report"] .explore-side-column,
.results-view[data-active-tab="watchlist"] .explore-side-column {
  display: none;
}

.results-view[data-active-tab="watchlist"] .explore-results-layout {
  display: block;
  width: min(1180px, 100%);
}

@media (max-width: 1180px) {
  .explore-results-layout {
    grid-template-columns: 1fr;
  }

  .explore-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .explore-side-column {
    grid-template-columns: 1fr;
  }
}

/* Hybrid list view layer */
:root {
  --hybrid-bg: #f6f8fc;
  --hybrid-panel: #ffffff;
  --hybrid-ink: #172033;
  --hybrid-text: #223047;
  --hybrid-muted: #667085;
  --hybrid-subtle: #8994a5;
  --hybrid-line: #dfe6ef;
  --hybrid-line-soft: #e8edf5;
  --hybrid-blue: #1463e6;
  --hybrid-blue-dark: #0b53c7;
  --hybrid-blue-soft: #eaf2ff;
  --hybrid-green: #16a465;
  --hybrid-orange: #f59e0b;
  --hybrid-red: #ef4444;
  --hybrid-shadow: 0 12px 32px rgba(25, 52, 91, 0.08);
}

body,
.app,
.results-view,
.result-views,
.mvp-view,
.mvp-frame {
  background: var(--hybrid-bg);
  color: var(--hybrid-text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 62px;
  padding: 0 clamp(24px, 3.8vw, 48px);
  border-bottom: 1px solid var(--hybrid-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(12px);
}

.brand-group {
  flex: 1;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand-home {
  width: auto;
  max-width: none;
  display: inline-grid;
  grid-template-columns: 28px auto auto;
  align-items: center;
  gap: 0 10px;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--hybrid-blue);
}

.brand-title,
.topbar h1 {
  color: var(--hybrid-blue);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.brand-tagline {
  display: inline-block;
  margin-left: 10px;
  color: #5e6b7d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.main-tabs {
  flex: 1;
  width: auto;
  height: 62px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  border-top: 0;
  padding: 0;
  scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.main-tabs button {
  flex: 0 0 auto;
  height: 100%;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #5e6b7d;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  border-color: var(--hybrid-blue);
  background: transparent;
  color: var(--hybrid-blue);
  box-shadow: none;
}

.main-tabs button.active::after {
  display: none;
}

.main-tabs button:not(.active):hover {
  background: var(--hybrid-blue-soft);
  color: var(--hybrid-blue);
  transform: none;
}

.auth-actions {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  gap: 18px;
  align-items: center;
}

.auth-actions button {
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #344054;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.top-link-button.has-count span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--hybrid-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
}

.source-pill,
.menu-button {
  display: none;
}

.results-view {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px clamp(24px, 3.8vw, 48px) 28px;
}

.results-view[data-active-tab="explore"] .explore-summary,
.results-view[data-active-tab="watchlist"] .explore-summary {
  display: none;
}

.result-toolbar {
  position: sticky;
  top: 76px;
  z-index: 20;
  justify-self: center;
  width: min(1490px, 100%);
  border: 1px solid var(--hybrid-line);
  border-radius: 12px;
  background: var(--hybrid-panel);
  padding: 0 16px;
  box-shadow: 0 4px 14px rgba(31, 47, 78, 0.04);
  backdrop-filter: none;
}

.controls {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 0.68fr) minmax(170px, 0.82fr) minmax(170px, 0.82fr) auto auto;
  gap: 0;
  align-items: center;
  min-height: 78px;
  padding: 0;
}

.controls label {
  min-width: 0;
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 7px;
  border-right: 1px solid var(--hybrid-line-soft);
  padding: 0 20px;
}

.controls label:first-child {
  padding-left: 0;
}

.controls label > span:first-child,
.result-field > span:first-child {
  color: #7a8798;
  font-size: 11px;
  font-weight: 850;
}

.toggle-box,
.controls input,
.controls select {
  min-height: 0;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hybrid-blue);
  padding: 0;
  font-size: 18px;
  font-weight: 950;
  box-shadow: none;
}

.toggle-box {
  gap: 8px;
}

.toggle-box input {
  width: 16px;
  height: 16px;
  accent-color: var(--hybrid-blue);
}

.controls input::placeholder {
  color: var(--hybrid-blue);
  opacity: 0.56;
}

#detailSearchButton,
#rerunSearchButton,
#detailApplyButton {
  align-self: center;
  height: 44px;
  min-height: 44px;
  border-radius: 9px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
}

#detailSearchButton {
  margin-left: 18px;
  border: 1px solid #cfd8e5;
  background: #ffffff;
  color: #475467;
  box-shadow: none;
}

#rerunSearchButton,
#detailApplyButton {
  margin-left: 9px;
  border: 1px solid var(--hybrid-blue);
  background: var(--hybrid-blue);
  color: #ffffff;
  box-shadow: none;
}

#rerunSearchButton:hover,
#detailApplyButton:hover {
  background: var(--hybrid-blue-dark);
}

.results-view[data-active-tab="explore"] .core-controls > .result-tabs,
.results-view[data-active-tab="explore"] .result-status {
  display: none;
}

.explore-diagnosis-strip {
  justify-self: center;
  width: min(1490px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.results-view[data-active-tab="report"] .explore-diagnosis-strip,
.results-view[data-active-tab="watchlist"] .explore-diagnosis-strip {
  display: none;
}

.explore-diagnosis-strip article {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid var(--hybrid-line);
  border-radius: 12px;
  background: var(--hybrid-panel);
  padding: 14px;
  box-shadow: none;
}

.explore-diagnosis-strip span {
  color: #69778a;
  font-size: 12px;
  font-weight: 800;
}

.explore-diagnosis-strip strong {
  color: var(--hybrid-ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.12;
}

.explore-diagnosis-strip small {
  color: var(--hybrid-subtle);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.explore-diagnosis-strip .good strong {
  color: var(--hybrid-green);
}

.explore-diagnosis-strip .near strong {
  color: var(--hybrid-orange);
}

.explore-diagnosis-strip .bad strong {
  color: var(--hybrid-red);
}

.explore-results-layout {
  width: min(1490px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 286px);
  gap: 17px;
}

.explore-results-layout .result-views {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  border: 1px solid var(--hybrid-line);
  border-radius: 13px;
  background: var(--hybrid-panel);
  box-shadow: var(--hybrid-shadow);
  overflow: hidden;
}

.hybrid-content-top {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--hybrid-line-soft);
  background: #ffffff;
  padding: 0 16px;
}

.results-view[data-active-tab="report"] .hybrid-content-top,
.results-view[data-active-tab="watchlist"] .hybrid-content-top {
  display: none;
}

.hybrid-content-top > strong {
  flex: 0 0 auto;
  color: var(--hybrid-ink);
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.hybrid-status-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.hybrid-status-tabs::-webkit-scrollbar {
  display: none;
}

.hybrid-status-tabs span {
  flex: 0 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 2px solid transparent;
  color: #6d798a;
  font-size: 12px;
  font-weight: 850;
}

.hybrid-status-tabs span.active {
  border-color: var(--hybrid-blue);
  color: var(--hybrid-blue);
}

.hybrid-status-tabs b {
  font: inherit;
}

.hybrid-view-switch {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 8px;
  background: #f2f5f9;
  padding: 3px;
}

.hybrid-switch-tab {
  height: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6d798a;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .hybrid-view-switch .hybrid-switch-tab {
  display: inline-flex;
}

.hybrid-switch-tab.active {
  border: 0;
  background: #ffffff;
  color: var(--hybrid-blue);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08) !important;
}

.explore-results-layout .result-panel[data-view-panel="table"].active,
.explore-results-layout .result-panel[data-view-panel="cards"].active,
.explore-results-layout .result-panel[data-view-panel="map"].active {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.table-paywall {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--hybrid-line-soft);
  border-radius: 0;
  background: #ffffff;
  color: var(--hybrid-subtle);
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
}

.sheet-shell {
  margin: 0;
  max-height: calc(100vh - 332px);
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: auto;
}

table {
  min-width: 1120px;
  width: 100%;
  color: var(--hybrid-text);
  font-size: 12px;
}

thead th {
  border-bottom: 1px solid var(--hybrid-line);
  background: #f8fafc;
  color: #667085;
  padding: 11px 9px;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}

tbody td {
  height: 42px;
  border-bottom: 1px solid #edf0f5;
  color: var(--hybrid-text);
  padding: 10px 9px;
  font-size: 12px;
  font-weight: 650;
}

tbody td:first-child,
tbody tr:nth-child(even) td:first-child,
tbody tr:hover td:first-child {
  background: #ffffff;
}

tbody tr:hover td {
  background: #f8fbff;
}

.positive,
tbody td.money,
tbody td.positive,
tbody td.investment-cell {
  color: var(--hybrid-green);
  font-weight: 900;
}

.warning,
tbody td.warning {
  color: var(--hybrid-orange);
  font-weight: 900;
}

.risk,
tbody td.risk {
  color: var(--hybrid-red);
  font-weight: 900;
}

.card-view-heading {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hybrid-line-soft);
  background: #ffffff;
  padding: 0 16px;
}

.card-list {
  background: #ffffff;
  padding: 16px;
}

.map-placeholder {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.explore-side-column {
  position: sticky;
  top: 170px;
  gap: 12px;
}

.explore-side-card {
  gap: 12px;
  border: 1px solid var(--hybrid-line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  box-shadow: none;
}

.explore-side-card strong {
  color: var(--hybrid-ink);
  font-size: 14px;
  font-weight: 900;
}

.explore-side-card dt,
.explore-side-card p,
.explore-side-card li {
  color: #617084;
  font-size: 12px;
}

.explore-side-card dd {
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
}

.explore-alert-card,
.explore-source-card {
  border-color: #cde0ff;
  background: #edf5ff;
}

.explore-alert-card strong,
.explore-source-card strong {
  color: var(--hybrid-blue);
}

.explore-alert-card button {
  border-color: var(--hybrid-blue);
  background: #ffffff;
  color: var(--hybrid-blue);
}

@media (max-width: 1180px) {
  .topbar {
    gap: 18px;
  }

  .brand-group {
    gap: 18px;
  }

  .brand-tagline,
  .auth-actions {
    display: none;
  }

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

  .controls label {
    min-height: 68px;
  }

  .controls label:nth-of-type(2) {
    border-right: 0;
  }

  #detailSearchButton,
  #rerunSearchButton {
    margin: 12px 0;
  }

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

  .explore-results-layout {
    grid-template-columns: 1fr;
  }

  .explore-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 0;
  }

  .brand-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .brand-home {
    grid-template-columns: 26px auto;
    padding: 13px 16px 11px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .brand-title {
    font-size: 24px;
  }

  .main-tabs {
    width: 100%;
    height: 46px;
    border-top: 1px solid var(--hybrid-line-soft);
    padding: 0 16px;
  }

  .main-tabs button {
    height: 46px;
    padding: 0 14px;
    font-size: 13px;
  }

  .results-view {
    gap: 12px;
    padding: 12px;
  }

  .result-toolbar {
    position: static;
    width: 100%;
    padding: 0;
  }

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

  .controls label,
  .controls label:nth-of-type(2) {
    min-height: 66px;
    border-right: 0;
    border-bottom: 1px solid var(--hybrid-line-soft);
    padding: 12px 16px;
  }

  #detailSearchButton,
  #rerunSearchButton {
    width: auto;
    margin: 10px 16px;
  }

  .explore-diagnosis-strip {
    grid-template-columns: 1fr;
  }

  .hybrid-content-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 14px;
  }

  .hybrid-status-tabs {
    width: 100%;
    gap: 14px;
  }

  .hybrid-status-tabs span {
    height: 38px;
    font-size: 11px;
  }

  .hybrid-view-switch {
    justify-self: start;
  }

  .sheet-shell {
    max-height: none;
  }

  .explore-side-column {
    grid-template-columns: 1fr;
  }
}

/* Apartment explore entry state: large hook above live results */
.home-view:not(.is-hidden) {
  min-height: auto;
  width: min(1490px, calc(100% - 96px));
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--hybrid-line);
  border-radius: 12px;
  background: var(--hybrid-panel);
  padding: 18px 28px 20px;
  box-shadow: 0 4px 14px rgba(31, 47, 78, 0.04);
}

.home-view:not(.is-hidden) .home-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(860px, 100%);
  text-align: center;
}

.home-view:not(.is-hidden) .hero-kicker {
  justify-self: center;
}

.home-view:not(.is-hidden) .home-copy h2 {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.12;
}

.home-view:not(.is-hidden) .home-copy > span {
  margin-top: 0;
  font-size: 14px;
  line-height: 1.42;
}

.home-view:not(.is-hidden) .home-panel {
  width: min(980px, 100%);
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  gap: 10px;
}

.home-view:not(.is-hidden) .home-form-tabs {
  width: min(430px, 100%);
  margin-bottom: 0;
}

.home-view:not(.is-hidden) .compact-fields {
  width: 100%;
}

.home-view:not(.is-hidden) .home-mode-panel.active .compact-fields {
  grid-template-columns: minmax(210px, 1fr) minmax(250px, 1.1fr) minmax(260px, 1.2fr);
  align-items: end;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

.home-view:not(.is-hidden) .home-section,
.home-view:not(.is-hidden) .location-field {
  grid-column: auto;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
}

.home-view:not(.is-hidden) .home-field label,
.home-view:not(.is-hidden) .field-label {
  text-align: left;
}

.home-view:not(.is-hidden) .home-advanced {
  width: min(520px, 100%);
}

.home-view:not(.is-hidden) #showResultsButton {
  margin-top: 2px;
  min-height: 46px;
}

.home-view:not(.is-hidden) .home-report-preview {
  display: none;
}

.results-view.is-previewing {
  padding-top: 0;
}

.results-view.is-previewing .result-toolbar {
  display: block;
  margin-bottom: 12px;
}

.results-view.is-previewing .explore-diagnosis-strip {
  margin-top: 0;
}

.results-view.is-previewing .explore-results-layout {
  margin-bottom: 28px;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    width: min(100% - 24px, 520px);
    grid-template-columns: 1fr;
    padding: 18px 14px;
  }

  .home-view:not(.is-hidden) .home-mode-panel.active .compact-fields,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
    grid-template-columns: 1fr;
  }

  .home-view:not(.is-hidden) .home-preview-metrics {
    grid-template-columns: 1fr;
  }
}

/* Topbar rectangular buttons */
.main-tabs {
  gap: 8px;
}

.main-tabs button {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #516176;
  padding: 0 14px;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  border-color: var(--hybrid-blue);
  background: var(--hybrid-blue);
  color: #ffffff;
}

.main-tabs button.active::after {
  display: none;
}

.main-tabs button:not(.active):hover {
  border-color: #cfe0f7;
  background: var(--hybrid-blue-soft);
  color: var(--hybrid-blue);
}

.auth-actions button {
  height: 34px;
  border: 1px solid var(--hybrid-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
}

.auth-actions button:hover {
  border-color: #cfe0f7;
  background: var(--hybrid-blue-soft);
  color: var(--hybrid-blue);
}

@media (max-width: 720px) {
  .main-tabs {
    gap: 8px;
  }

  .main-tabs button {
    height: 34px;
    border-radius: 8px;
    padding: 0 12px;
  }
}

/* Apartment explore tab polish */
.results-view[data-active-tab="explore"] {
  gap: 12px;
  padding-top: 14px;
}

.results-view[data-active-tab="explore"] .result-toolbar {
  top: 74px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 44, 74, 0.06);
  overflow: hidden;
}

.results-view[data-active-tab="explore"] .controls {
  min-height: 74px;
}

.results-view[data-active-tab="explore"] .controls label {
  min-height: 74px;
  padding: 0 18px;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .controls label:hover {
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .controls label > span:first-child,
.results-view[data-active-tab="explore"] .result-field > span:first-child {
  color: #758196;
  font-size: 11px;
  letter-spacing: 0;
}

.results-view[data-active-tab="explore"] .toggle-box,
.results-view[data-active-tab="explore"] .controls input,
.results-view[data-active-tab="explore"] .controls select {
  height: 32px;
  color: #125bcf;
  font-size: 17px;
  line-height: 1.1;
}

.results-view[data-active-tab="explore"] #detailSearchButton,
.results-view[data-active-tab="explore"] #rerunSearchButton {
  height: 42px;
  min-height: 42px;
  border-radius: 7px;
}

.results-view[data-active-tab="explore"] #detailSearchButton {
  background: #f9fbfe;
}

.results-view[data-active-tab="explore"] #detailSearchButton:hover {
  border-color: #b9c9dd;
  background: #f3f7fc;
  color: #1e365b;
}

.explore-diagnosis-strip {
  gap: 8px;
}

.explore-diagnosis-strip article {
  position: relative;
  min-height: 84px;
  border-radius: 8px;
  padding: 13px 14px 13px 18px;
  box-shadow: 0 6px 16px rgba(28, 44, 74, 0.04);
  overflow: hidden;
}

.explore-diagnosis-strip article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #9aa8ba;
}

.explore-diagnosis-strip article.good::before {
  background: var(--hybrid-green);
}

.explore-diagnosis-strip article.near::before {
  background: var(--hybrid-orange);
}

.explore-diagnosis-strip article.bad::before {
  background: var(--hybrid-red);
}

.explore-diagnosis-strip span {
  color: #5d697a;
  font-size: 11px;
}

.explore-diagnosis-strip strong {
  font-size: 24px;
}

.explore-diagnosis-strip small {
  color: #7b8798;
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  gap: 14px;
}

.results-view[data-active-tab="explore"] .result-views {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(28, 44, 74, 0.07);
}

.results-view[data-active-tab="explore"] .hybrid-content-top {
  min-height: 56px;
  gap: 18px;
  padding: 0 14px 0 16px;
}

.results-view[data-active-tab="explore"] .hybrid-content-top > strong {
  font-size: 16px;
  letter-spacing: 0;
}

.results-view[data-active-tab="explore"] .hybrid-status-tabs {
  gap: 14px;
}

.results-view[data-active-tab="explore"] .hybrid-status-tabs span {
  height: 56px;
  gap: 4px;
  color: #69778b;
}

.results-view[data-active-tab="explore"] .hybrid-status-tabs span.active {
  border-bottom-width: 3px;
}

.results-view[data-active-tab="explore"] .hybrid-status-tabs b {
  color: inherit;
  font-weight: 950;
}

.results-view[data-active-tab="explore"] .hybrid-view-switch {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f6f8fb;
}

.results-view[data-active-tab="explore"] .hybrid-switch-tab {
  min-width: 44px;
  border-radius: 5px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .table-paywall {
  min-height: 36px;
  display: flex;
  align-items: center;
  background: #fbfcff;
  color: #6b7789;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  max-height: calc(100vh - 320px);
  scrollbar-color: #bac7d7 transparent;
}

.results-view[data-active-tab="explore"] table {
  font-size: 12px;
}

.results-view[data-active-tab="explore"] thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 43px;
  background: #f6f8fc;
  color: #5f6d80;
  padding: 10px 9px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] thead th:first-child {
  left: 0;
  z-index: 4;
}

.results-view[data-active-tab="explore"] tbody td {
  height: 43px;
  padding: 10px 9px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.results-view[data-active-tab="explore"] tbody tr:hover td {
  background: #f4f8ff;
}

.results-view[data-active-tab="explore"] tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid #edf2f7;
  color: #111827;
  font-weight: 900;
}

.results-view[data-active-tab="explore"] tbody tr:nth-child(even) td:first-child {
  background: #fcfdff;
}

.results-view[data-active-tab="explore"] tbody tr:hover td:first-child {
  background: #f4f8ff;
}

.results-view[data-active-tab="explore"] .explore-side-column {
  top: 158px;
  gap: 10px;
}

.results-view[data-active-tab="explore"] .explore-side-card {
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(28, 44, 74, 0.04);
}

.results-view[data-active-tab="explore"] .explore-side-card header {
  align-items: start;
}

.results-view[data-active-tab="explore"] .explore-side-card button {
  height: 30px;
  border-radius: 6px;
}

.results-view[data-active-tab="explore"] .explore-side-card dl {
  gap: 10px;
}

.results-view[data-active-tab="explore"] .explore-side-card dl div {
  align-items: baseline;
}

.results-view[data-active-tab="explore"] .explore-alert-card,
.results-view[data-active-tab="explore"] .explore-source-card {
  background: #f2f7ff;
}

@media (max-width: 1320px) {
  .results-view[data-active-tab="explore"] .explore-results-layout {
    grid-template-columns: 1fr;
  }

  .results-view[data-active-tab="explore"] .explore-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"] .result-toolbar {
    top: 72px;
  }

  .results-view[data-active-tab="explore"] .controls label {
    min-height: 66px;
  }

  .results-view[data-active-tab="explore"] .explore-side-column {
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] {
    padding: 10px;
  }

  .results-view[data-active-tab="explore"] .result-toolbar {
    border-radius: 8px;
  }

  .results-view[data-active-tab="explore"] .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .controls label,
  .results-view[data-active-tab="explore"] .controls label:nth-of-type(2) {
    min-height: 64px;
    padding: 10px 12px;
  }

  .results-view[data-active-tab="explore"] .controls label:nth-of-type(odd) {
    border-right: 1px solid var(--hybrid-line-soft);
  }

  .results-view[data-active-tab="explore"] .controls label:nth-of-type(even) {
    border-right: 0;
  }

  .results-view[data-active-tab="explore"] .toggle-box,
  .results-view[data-active-tab="explore"] .controls input,
  .results-view[data-active-tab="explore"] .controls select {
    font-size: 15px;
  }

  .results-view[data-active-tab="explore"] #detailSearchButton,
  .results-view[data-active-tab="explore"] #rerunSearchButton {
    width: auto;
    justify-self: stretch;
    margin: 10px 0 12px;
  }

  .results-view[data-active-tab="explore"] #detailSearchButton {
    margin-left: 12px;
    margin-right: 4px;
  }

  .results-view[data-active-tab="explore"] #rerunSearchButton {
    margin-left: 4px;
    margin-right: 12px;
  }

  .results-view[data-active-tab="explore"] .explore-diagnosis-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .explore-diagnosis-strip article {
    min-height: 90px;
  }

  .results-view[data-active-tab="explore"] .hybrid-content-top {
    gap: 8px;
  }

  .results-view[data-active-tab="explore"] .hybrid-switch-tab {
    min-width: 54px;
  }

  .results-view[data-active-tab="explore"] .sheet-shell {
    max-height: none;
  }

  .results-view[data-active-tab="explore"] .explore-side-column {
    grid-template-columns: 1fr;
  }
}

/* Home hook search panel polish */
.home-view:not(.is-hidden) {
  gap: 20px;
  border: 0;
  background: transparent;
  padding: 26px 34px 18px;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-copy {
  width: min(760px, 100%);
  gap: 5px;
}

.home-view:not(.is-hidden) .hero-kicker {
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(27, 107, 230, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  color: #1857a8;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  box-shadow: 0 9px 22px rgba(19, 92, 174, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.home-view:not(.is-hidden) .hero-kicker::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d72ff 0%, #15c7d9 100%);
  box-shadow: 0 0 0 4px rgba(30, 122, 255, 0.11);
}

.home-view:not(.is-hidden) .home-copy h2 {
  max-width: 680px;
  margin: -1px 0 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.14;
}

.home-view:not(.is-hidden) .hero-title-base,
.home-view:not(.is-hidden) .hero-title-accent {
  display: block;
}

.home-view:not(.is-hidden) .hero-region-rotator {
  display: inline-block;
  min-width: 0;
  text-align: left;
  background: linear-gradient(95deg, #0b5ee8 8%, #2587ff 46%, #14c8d8 92%);
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 18px rgba(11, 94, 232, 0.12));
  transition: opacity 110ms ease, transform 110ms ease, filter 110ms ease;
}

.home-view:not(.is-hidden) .hero-region-rotator.is-changing {
  opacity: 0;
  transform: translateY(-5px);
  filter: drop-shadow(0 4px 10px rgba(11, 94, 232, 0.08));
}

.home-view:not(.is-hidden) .home-copy > span {
  max-width: 520px;
  color: #526071;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.home-view:not(.is-hidden) .home-panel {
  width: min(900px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--hybrid-line);
  border-radius: 10px;
  background: #f7f9fc;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.home-view:not(.is-hidden) .home-form-tabs {
  width: min(420px, 100%);
  height: 48px;
  justify-self: center;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.home-view:not(.is-hidden) .home-panel .home-mode-tab {
  min-height: 38px;
  border-radius: 6px;
  font-size: 13px;
}

.home-view:not(.is-hidden) .home-panel .home-mode-tab.active {
  background: var(--hybrid-blue);
  color: #ffffff;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel.active .compact-fields {
  grid-template-columns: minmax(190px, 0.78fr) minmax(270px, 1fr) minmax(310px, 1.18fr);
  gap: 10px;
  align-items: stretch;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-view:not(.is-hidden) .home-section,
.home-view:not(.is-hidden) .location-field {
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.home-view:not(.is-hidden) .home-section:hover,
.home-view:not(.is-hidden) .location-field:hover {
  border-color: #c9d8eb;
}

.home-view:not(.is-hidden) .home-field label,
.home-view:not(.is-hidden) .field-label {
  color: #758196;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-view:not(.is-hidden) .cash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.home-view:not(.is-hidden) .amount-input {
  min-width: 0;
}

.home-view:not(.is-hidden) .home-panel input,
.home-view:not(.is-hidden) .home-panel select {
  height: 38px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #ffffff;
  color: #1e365b;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 850;
}

.home-view:not(.is-hidden) .cash-row > span {
  min-width: 28px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #f8fbff;
  color: #125bcf;
  font-size: 13px;
  font-weight: 900;
}

.home-view:not(.is-hidden) .mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-view:not(.is-hidden) .mode-options label {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #ffffff;
  color: #344054;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.home-view:not(.is-hidden) .mode-options label:has(input:checked) {
  border-color: #84b7f4;
  background: #eaf4ff;
  color: #125bcf;
}

.home-view:not(.is-hidden) .mode-options input:checked + span {
  border: 0;
  background: transparent;
  color: inherit;
  outline: 0;
  padding: 0;
  box-shadow: none;
}

.home-view:not(.is-hidden) .mode-options input {
  width: 15px;
  height: 15px;
  accent-color: var(--hybrid-blue);
}

.home-view:not(.is-hidden) .location-selects {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 8px;
}

.home-view:not(.is-hidden) .home-advanced {
  width: 100%;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
  min-height: 42px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.home-view:not(.is-hidden) #showResultsButton {
  justify-self: center;
  width: min(260px, 100%);
  min-height: 48px;
  margin-top: 0;
  border-radius: 8px;
  box-shadow: 0 12px 22px rgba(11, 94, 232, 0.18);
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden) {
    width: min(100% - 32px, 760px);
    padding: 22px 18px;
  }

  .home-view:not(.is-hidden) .home-mode-panel.active .compact-fields,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
    grid-template-columns: 1fr;
  }

  .home-view:not(.is-hidden) .home-section,
  .home-view:not(.is-hidden) .location-field {
    min-height: 78px;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    width: min(100% - 20px, 520px);
    gap: 16px;
    padding: 18px 0;
  }

  .home-view:not(.is-hidden) .home-copy {
    gap: 4px;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    height: auto;
    padding: 6px 10px;
    font-size: 11px;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    max-width: 340px;
    font-size: 28px;
  }

  .home-view:not(.is-hidden) .hero-title-base,
  .home-view:not(.is-hidden) .hero-title-accent {
    display: block;
  }

  .home-view:not(.is-hidden) .home-copy > span {
    font-size: 13px;
  }

  .home-view:not(.is-hidden) .home-panel {
    padding: 9px;
  }

  .home-view:not(.is-hidden) .home-form-tabs {
    width: 100%;
  }

  .home-view:not(.is-hidden) .mode-options,
  .home-view:not(.is-hidden) .location-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-view:not(.is-hidden) .home-section,
  .home-view:not(.is-hidden) .location-field {
    min-height: 76px;
    padding: 10px;
  }

  .home-view:not(.is-hidden) .home-panel input,
  .home-view:not(.is-hidden) .home-panel select,
  .home-view:not(.is-hidden) .cash-row > span {
    height: 36px;
  }

  .home-view:not(.is-hidden) .mode-options label {
    min-height: 36px;
    padding: 0 6px;
    font-size: 12px;
  }

  .home-view:not(.is-hidden) #showResultsButton {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .home-view:not(.is-hidden) .mode-options,
  .home-view:not(.is-hidden) .location-selects {
    grid-template-columns: 1fr;
  }
}

/* Minimal topbar logo refinement */
.brand-home {
  grid-template-columns: 24px auto auto;
  align-items: center;
  gap: 0 8px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.brand-mark {
  width: 24px;
  height: 24px;
}

.brand-title,
.topbar h1 {
  font-size: 23px;
  font-weight: 720;
  line-height: 1;
}

.brand-tagline {
  margin-left: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 520;
}

@media (max-width: 720px) {
  .brand-home {
    grid-template-columns: 22px auto;
    padding: 12px 16px 10px;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .brand-title {
    font-size: 22px;
    font-weight: 720;
  }
}


/* Final unified home UI layer */
html,
body,
button,
input,
select,
textarea {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

body,
body * {
  letter-spacing: 0 !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 0 clamp(24px, 3.8vw, 48px);
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(12px);
}

.brand-group {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-home {
  display: inline-grid;
  grid-template-columns: 24px auto auto;
  align-items: center;
  gap: 0 8px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--hybrid-blue, #256ef4);
}

.brand-title,
.topbar h1 {
  color: var(--hybrid-blue, #256ef4);
  font-size: 23px;
  font-weight: 760;
  line-height: 1;
}

.brand-tagline {
  margin-left: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 520;
}

.main-tabs {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-top: 0;
  padding: 0;
  scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar {
  display: none;
}

.main-tabs button {
  flex: 0 0 auto;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #516176;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 820;
  white-space: nowrap;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  border-color: var(--hybrid-blue, #256ef4);
  background: var(--hybrid-blue, #256ef4);
  color: #ffffff;
  box-shadow: none;
}

.main-tabs button.active::after {
  display: none;
}

.main-tabs button:not(.active):hover {
  border-color: #cfe0f7;
  background: var(--hybrid-blue-soft, #eef5ff);
  color: var(--hybrid-blue, #256ef4);
}

.auth-actions {
  position: static;
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.auth-actions button {
  height: 34px;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.auth-actions button:hover {
  border-color: #cfe0f7;
  background: var(--hybrid-blue-soft, #eef5ff);
  color: var(--hybrid-blue, #256ef4);
}

.source-pill,
.menu-button {
  display: none;
}

.home-view:not(.is-hidden) .home-copy {
  width: min(760px, 100%);
  gap: 7px;
}

.home-view:not(.is-hidden) .hero-kicker {
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(37, 110, 244, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #174ea6;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.home-view:not(.is-hidden) .hero-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #256ef4;
  box-shadow: 0 0 0 4px rgba(37, 110, 244, 0.1);
}

.home-view:not(.is-hidden) .home-copy h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 3.45vw, 48px);
  line-height: 1.1;
}

.home-view:not(.is-hidden) .hero-title-base,
.home-view:not(.is-hidden) .hero-title-accent {
  display: block;
}

.home-view:not(.is-hidden) .home-copy > span {
  max-width: 560px;
  margin-top: 8px;
  color: #58616a;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.38;
}

.home-view:not(.is-hidden) {
  position: relative;
  padding-bottom: 8px;
}

.home-view:not(.is-hidden)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  z-index: 3;
  width: 2px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 110, 244, 0.36), rgba(37, 110, 244, 0));
  transform: translateX(-50%);
  pointer-events: none;
}

.home-view:not(.is-hidden) .home-panel {
  width: min(780px, calc(100% - 40px));
  justify-self: center;
  display: grid;
  gap: 18px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  padding: 28px clamp(24px, 4vw, 40px) 30px;
  box-shadow: 0 22px 56px rgba(31, 70, 132, 0.12);
}

.home-view:not(.is-hidden) .home-form-tabs {
  width: min(430px, 100%);
  justify-self: center;
  margin: 0 0 6px;
}

.home-view:not(.is-hidden) .home-mode-panel.active .compact-fields {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px 18px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  grid-column: 1 / -1;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  min-height: 48px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 0;
  background: transparent;
  padding: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field {
  grid-template-columns: 92px minmax(112px, 0.56fr) minmax(220px, 1.44fr);
  gap: 12px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
  justify-content: flex-start;
  color: #5f6b80;
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field label::after,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label::after {
  display: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #eef4fb;
  padding: 0 16px 0 18px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .amount-input {
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
  height: 48px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #0f1f3a;
  font-size: 16px;
  font-weight: 760;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
  min-width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: #0f1f3a;
  font-size: 16px;
  font-weight: 850;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field .mode-options {
  gap: 8px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #eef4fb;
  color: #0f1f3a;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 760;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label:has(input:checked) {
  background: #174f9f;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 79, 159, 0.14);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  height: 48px;
  border: 0;
  border-radius: 8px;
  background-color: #eef4fb;
  color: #0f1f3a;
  padding: 0 38px 0 18px;
  font-size: 15px;
  font-weight: 760;
}

.home-view:not(.is-hidden) .home-advanced {
  width: 100%;
  margin-top: 2px;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
  width: min(360px, 100%);
  justify-self: center;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #5f6b80;
  font-size: 14px;
  font-weight: 760;
}

.home-view:not(.is-hidden) #showResultsButton {
  width: min(360px, 100%);
  justify-self: center;
  min-height: 50px;
  border-radius: 8px;
}

.results-view.is-previewing {
  position: relative;
  gap: 0;
  margin-top: -12px;
  padding-top: 24px;
}

.results-view.is-previewing::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: min(860px, calc(100% - 48px));
  height: 14px;
  border: 1px solid #d9e5f4;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, 0.62);
  transform: translateX(-50%);
  pointer-events: none;
}

.results-view.is-previewing .result-toolbar {
  display: block;
  margin-bottom: 12px;
}

.results-view.is-previewing .explore-diagnosis-strip {
  width: min(1180px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  overflow: hidden;
}

.results-view.is-previewing .explore-diagnosis-strip article {
  min-height: 68px;
  align-content: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--hybrid-line-soft, #edf2f7);
  border-radius: 0;
  background: transparent;
  padding: 9px 14px;
  box-shadow: none;
}

.results-view.is-previewing .explore-diagnosis-strip article:last-child {
  border-right: 0;
}

.results-view.is-previewing .explore-diagnosis-strip article::before {
  display: none;
}

.results-view.is-previewing .explore-diagnosis-strip strong {
  font-size: 19px;
}

.results-view.is-previewing .explore-diagnosis-strip small {
  display: block;
  font-size: 10.5px;
  line-height: 1.25;
}

.results-view.is-previewing .explore-results-layout {
  width: min(1180px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 286px);
  gap: 17px;
  margin-top: 0;
}

.results-view.is-previewing .explore-results-layout .result-views {
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(31, 70, 132, 0.1);
}

.results-view.is-previewing .explore-side-column {
  display: grid;
}

.results-view.is-previewing .hybrid-content-top {
  display: flex;
  min-height: 42px;
  padding: 0 12px;
}

.results-view.is-previewing .hybrid-status-tabs span {
  height: 42px;
  font-size: 11px;
}

.results-view.is-previewing .hybrid-content-top > strong {
  font-size: 13px;
}

.results-view.is-previewing .hybrid-view-switch {
  padding: 2px;
}

.results-view.is-previewing .hybrid-switch-tab {
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  font-size: 10.5px;
}

.results-view.is-previewing .table-paywall {
  display: flex;
  min-height: 30px;
  align-items: center;
  padding: 7px 12px;
  font-size: 10.5px;
  line-height: 1.3;
}

.explore-alert-card.is-pulsing {
  border-color: #256ef4;
  box-shadow: 0 0 0 4px rgba(37, 110, 244, 0.12), 0 18px 36px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1180px) {
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    min-height: 0;
    padding: 9px 0 0;
    overflow: hidden;
  }

  .brand-group {
    display: block;
    width: 100%;
  }

  .brand-home {
    grid-template-columns: 22px minmax(0, max-content);
    max-width: calc(100% - 92px);
    height: 32px;
    margin: 0 12px;
    gap: 8px;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .brand-title {
    min-width: 0;
    overflow: hidden;
    font-size: 21px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-actions {
    position: absolute;
    top: 8px;
    right: 12px;
    display: inline-flex !important;
    margin: 0;
  }

  .auth-actions .top-link-button {
    display: none;
  }

  .auth-actions .login-button {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .main-tabs {
    width: 100%;
    height: 42px;
    padding: 0 12px;
  }

  .main-tabs button {
    height: 34px;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13.5px;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    font-size: 12px;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    font-size: 31px;
    line-height: 1.12;
  }

  .home-view:not(.is-hidden) .home-copy > span {
    font-size: 14.5px;
    line-height: 1.34;
  }

  .home-view:not(.is-hidden)::after {
    bottom: -18px;
    height: 28px;
  }

  .home-view:not(.is-hidden) .home-panel {
    width: calc(100% - 32px);
    padding: 22px 18px 24px;
    border-radius: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field {
    grid-template-columns: 54px minmax(92px, 0.7fr) minmax(0, 1.3fr);
    gap: 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    grid-column: 1 / -1;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
    font-size: 13px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field .mode-options {
    gap: 6px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
    gap: 4px;
    padding: 0 8px 0 10px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
    padding: 0 5px;
    font-size: 11.5px;
    line-height: 1.18;
    white-space: nowrap;
   }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
    min-height: 49px;
  }

  .results-view.is-previewing {
    padding: 22px 16px 24px;
  }

  .results-view.is-previewing::before {
    top: 8px;
    width: calc(100% - 48px);
  }

  .results-view.is-previewing .explore-diagnosis-strip {
    grid-template-columns: repeat(4, minmax(128px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .results-view.is-previewing .explore-diagnosis-strip::-webkit-scrollbar {
    display: none;
  }

  .results-view.is-previewing .explore-diagnosis-strip article {
    min-height: 58px;
    padding: 10px 12px;
  }

  .results-view.is-previewing .explore-diagnosis-strip article:nth-child(2n) {
    border-right: 1px solid var(--hybrid-line-soft, #edf2f7);
  }

  .results-view.is-previewing .explore-diagnosis-strip article:nth-child(n + 3) {
    border-top: 0;
  }

  .results-view.is-previewing .explore-diagnosis-strip article:last-child {
    border-right: 0;
  }
}

/* Restore PC hybrid list result layout from the option board reference */
@media (min-width: 721px) {
  .home-view:not(.is-hidden)::after,
  .results-view.is-previewing::before {
    display: none;
  }

  .results-view.is-previewing {
    gap: 14px;
    margin-top: 0;
    padding-top: 14px;
  }

  .results-view.is-previewing .result-toolbar {
    display: block;
    width: min(1490px, 100%);
    margin-bottom: 0;
  }

  .results-view.is-previewing .explore-diagnosis-strip {
    width: min(1490px, 100%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .results-view.is-previewing .explore-diagnosis-strip article {
    min-height: 78px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--hybrid-line, #dfe6ef);
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
    box-shadow: none;
  }

  .results-view.is-previewing .explore-diagnosis-strip article::before {
    display: none;
  }

  .results-view.is-previewing .explore-diagnosis-strip span {
    color: #69778a;
    font-size: 12px;
    font-weight: 800;
  }

  .results-view.is-previewing .explore-diagnosis-strip strong {
    font-size: 22px;
    line-height: 1.12;
  }

  .results-view.is-previewing .explore-diagnosis-strip small {
    display: block;
    color: var(--hybrid-subtle, #8994a5);
    font-size: 11px;
    line-height: 1.35;
  }

  .results-view.is-previewing .explore-results-layout {
    width: min(1490px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 286px);
    gap: 17px;
    margin-top: 0;
  }

  .results-view.is-previewing .explore-results-layout .result-views {
    border: 1px solid var(--hybrid-line, #dfe6ef);
    border-radius: 13px;
    background: var(--hybrid-panel, #ffffff);
    box-shadow: var(--hybrid-shadow, 0 12px 32px rgba(25, 52, 91, 0.1));
    overflow: hidden;
  }

  .results-view.is-previewing .explore-side-column {
    display: grid;
    grid-template-columns: 1fr;
    align-self: start;
  }

  .results-view.is-previewing .hybrid-content-top {
    display: flex;
    min-height: 58px;
    padding: 0 16px;
  }

  .results-view.is-previewing .hybrid-content-top > strong {
    font-size: 15px;
  }

  .results-view.is-previewing .hybrid-status-tabs {
    gap: 18px;
  }

  .results-view.is-previewing .hybrid-status-tabs span {
    height: 58px;
    font-size: 12px;
  }

  .results-view.is-previewing .hybrid-view-switch {
    border-radius: 8px;
    background: #f2f5f9;
    padding: 3px;
  }

  .results-view.is-previewing .hybrid-switch-tab {
    height: 30px;
    min-height: 30px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 11px;
  }

  .results-view.is-previewing .table-paywall {
    display: block;
    min-height: 0;
    border-bottom: 1px solid var(--hybrid-line-soft, #edf2f7);
    padding: 10px 16px;
    font-size: 11px;
    line-height: 1.35;
  }
}

/* White top-attached condition entry */
.home-view:not(.is-hidden) {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(760px, 1.42fr);
  align-items: center;
  justify-items: stretch;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 0;
  background: #ffffff;
  padding: 16px clamp(28px, 3.6vw, 48px);
  box-shadow: 0 8px 22px rgba(31, 70, 132, 0.05);
}

.home-view:not(.is-hidden)::after,
.results-view.is-previewing::before {
  display: none;
}

.home-view:not(.is-hidden) .home-copy {
  width: 100%;
  justify-items: start;
  gap: 6px;
  text-align: left;
}

.home-view:not(.is-hidden) .hero-kicker {
  justify-self: start;
  padding: 7px 12px;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-copy h2 {
  max-width: 560px;
  font-size: clamp(29px, 2.65vw, 40px);
  line-height: 1.08;
}

.home-view:not(.is-hidden) .home-copy > span {
  max-width: 520px;
  margin-top: 2px;
  font-size: 15.5px;
  line-height: 1.32;
}

.home-view:not(.is-hidden) .home-panel {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 150px;
  align-items: stretch;
  gap: 8px;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  box-shadow: none;
  box-sizing: border-box;
}

.home-view:not(.is-hidden) .home-mode-panel.active {
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
  display: grid;
  grid-template-columns: minmax(290px, 0.98fr) minmax(230px, 0.82fr);
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  grid-column: auto;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  min-height: 46px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field {
  grid-template-columns: 52px minmax(76px, 0.58fr) minmax(140px, 1.12fr);
  gap: 8px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
  color: #5f6b80;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  min-height: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eef4fb;
  box-sizing: border-box;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
  padding: 0 12px;
  width: 100%;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
  height: 42px;
  font-size: 16px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options {
  gap: 7px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
  padding: 0 10px;
  font-size: 12.5px;
  justify-content: center;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
  gap: 7px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  padding: 0 34px 0 12px;
  font-size: 13px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-advanced {
  width: auto;
  margin-top: 0;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
  width: auto;
  min-width: 96px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d7e0ec;
  background: #ffffff;
  font-size: 12.5px;
}

.home-view:not(.is-hidden) #showResultsButton {
  width: auto;
  min-width: 150px;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  box-shadow: none;
}

.results-view.is-previewing {
  padding-top: 14px;
}

@media (max-width: 1180px) {
  .home-view:not(.is-hidden) {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-right: clamp(24px, 4vw, 44px);
    padding-left: clamp(24px, 4vw, 44px);
  }

  .home-view:not(.is-hidden) .home-copy {
    justify-items: center;
    text-align: center;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    width: 100%;
    gap: 12px;
    padding: 14px 18px 16px;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    font-size: 30px;
  }

  .home-view:not(.is-hidden) .home-panel {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field > label {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding-top: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
    grid-column: 2;
    width: 100%;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
    width: 100%;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field .mode-options {
    grid-column: 2;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field .field-label {
    padding-top: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    grid-column: 2;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    width: 100%;
  }

  .home-view:not(.is-hidden) .home-advanced,
  .home-view:not(.is-hidden) #showResultsButton {
    width: 100%;
  }

  .home-view:not(.is-hidden) .home-panel .home-detail-toggle,
  .home-view:not(.is-hidden) #showResultsButton {
    width: 100%;
  }

  .results-view.is-previewing {
    padding: 12px 16px 24px;
  }

  .results-view.is-previewing .result-toolbar,
  .results-view.is-previewing .explore-diagnosis-strip,
  .results-view.is-previewing .explore-results-layout {
    width: 100%;
  }

  .results-view.is-previewing .explore-results-layout,
  .results-view[data-active-tab="explore"] .explore-results-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .results-view.is-previewing .explore-results-layout .result-views,
  .results-view[data-active-tab="explore"] .result-views,
  .results-view.is-previewing .explore-side-column,
  .results-view[data-active-tab="explore"] .explore-side-column {
    width: 100%;
    min-width: 0;
  }

  .results-view.is-previewing .explore-results-layout .result-views,
  .results-view[data-active-tab="explore"] .result-views {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view.is-previewing .explore-side-column,
  .results-view[data-active-tab="explore"] .explore-side-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view.is-previewing .sheet-shell,
  .results-view[data-active-tab="explore"] .sheet-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .results-view.is-previewing .sheet-shell table,
  .results-view[data-active-tab="explore"] .sheet-shell table {
    min-width: 720px;
  }
}

/* Promote the actual condition filter and remove the duplicate home CTA panel */
.home-view:not(.is-hidden) {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  padding-top: 18px;
  padding-bottom: 12px;
}

.home-view:not(.is-hidden) .home-copy {
  max-width: 760px;
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}

.home-view:not(.is-hidden) .home-copy h2 {
  max-width: 720px;
}

.home-view:not(.is-hidden) .home-copy > span {
  max-width: 560px;
}

.home-view:not(.is-hidden) .home-panel {
  display: none;
}

.results-view.is-previewing {
  padding-top: 12px;
}

.results-view.is-previewing .result-toolbar,
.results-view[data-active-tab="explore"] .result-toolbar {
  order: -1;
  width: min(1184px, calc(100% - 32px));
  margin-top: 0;
  margin-bottom: 4px;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 70, 132, 0.05);
}

.results-view.is-previewing .core-controls,
.results-view[data-active-tab="explore"] .core-controls {
  display: grid;
  grid-template-columns: minmax(116px, 0.72fr) minmax(132px, 0.76fr) minmax(150px, 0.9fr) minmax(130px, 0.78fr) auto auto;
  align-items: end;
  gap: 8px;
}

.results-view.is-previewing .result-tabs,
.results-view.is-previewing .result-status,
.results-view[data-active-tab="explore"] .result-tabs,
.results-view[data-active-tab="explore"] .result-status {
  display: none;
}

.results-view.is-previewing #detailSearchButton,
.results-view.is-previewing #rerunSearchButton,
.results-view[data-active-tab="explore"] #detailSearchButton,
.results-view[data-active-tab="explore"] #rerunSearchButton {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .results-view.is-previewing .core-controls,
  .results-view[data-active-tab="explore"] .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view.is-previewing #detailSearchButton,
  .results-view.is-previewing #rerunSearchButton,
  .results-view[data-active-tab="explore"] #detailSearchButton,
  .results-view[data-active-tab="explore"] #rerunSearchButton {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    padding: 14px 18px 10px;
  }

  .home-view:not(.is-hidden) .home-copy {
    width: 100%;
  }

  .results-view.is-previewing {
    padding-top: 10px;
  }

  .results-view.is-previewing .result-toolbar,
  .results-view[data-active-tab="explore"] .result-toolbar {
    width: 100%;
    border-radius: 10px;
  }

  .results-view.is-previewing .core-controls,
  .results-view[data-active-tab="explore"] .core-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .results-view.is-previewing .result-field:first-child,
  .results-view[data-active-tab="explore"] .result-field:first-child {
    grid-column: auto;
  }
}

/* Embed the condition filter inside the hook copy band */
.home-view:not(.is-hidden) {
  gap: 14px;
  padding-bottom: 16px;
}

.home-view:not(.is-hidden) .result-toolbar {
  display: block;
  width: min(1184px, 100%);
  margin: 2px auto 0;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 70, 132, 0.05);
  overflow: hidden;
}

.home-view:not(.is-hidden) .core-controls {
  display: grid;
  grid-template-columns: minmax(116px, 0.72fr) minmax(132px, 0.76fr) minmax(150px, 0.9fr) minmax(130px, 0.78fr) auto auto;
  align-items: end;
  gap: 8px;
}

.home-view:not(.is-hidden) .result-tabs,
.home-view:not(.is-hidden) .result-status {
  display: none;
}

.home-view:not(.is-hidden) #detailSearchButton,
.home-view:not(.is-hidden) #rerunSearchButton {
  min-height: 42px;
  white-space: nowrap;
}

.results-view.is-previewing {
  padding-top: 14px;
}

.results-view.is-previewing .explore-diagnosis-strip {
  margin-top: 0;
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-view:not(.is-hidden) #detailSearchButton,
  .home-view:not(.is-hidden) #rerunSearchButton {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    gap: 12px;
    padding: 14px 16px 14px;
  }

  .home-view:not(.is-hidden) .result-toolbar {
    width: 100%;
    border-radius: 10px;
  }

  .home-view:not(.is-hidden) .core-controls {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .home-view:not(.is-hidden) .result-field:first-child {
    grid-column: auto;
  }
}

/* Restore the original home-card feel for the embedded condition filter */
.home-view:not(.is-hidden) {
  gap: 18px;
  padding-bottom: 20px;
}

.home-view:not(.is-hidden) .result-toolbar {
  width: min(640px, 100%);
  margin: 0 auto;
  border: 0;
  border-radius: var(--radius-shell, 24px);
  background: #ffffff;
  padding: 18px 20px 20px;
  box-shadow:
    0 30px 78px rgba(42, 126, 180, 0.08),
    0 6px 18px rgba(17, 24, 39, 0.035);
  overflow: visible;
}

.home-view:not(.is-hidden) .core-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  padding: 0;
}

.home-view:not(.is-hidden) .result-field,
.home-view:not(.is-hidden) .toggle-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  box-sizing: border-box;
}

.home-view:not(.is-hidden) .result-field > span,
.home-view:not(.is-hidden) .toggle-control > span:first-child {
  color: var(--muted, #6d7a8c);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .result-field input,
.home-view:not(.is-hidden) .result-field select,
.home-view:not(.is-hidden) .toggle-box {
  width: 100%;
  height: 46px;
  min-height: 46px;
  min-width: 0;
  border: 0;
  border-radius: var(--radius-control, 14px);
  background: #edf4fc;
  color: var(--text, #1b2430);
  box-shadow: none;
  box-sizing: border-box;
}

.home-view:not(.is-hidden) .result-field input,
.home-view:not(.is-hidden) .result-field select {
  padding: 0 14px;
  font-size: 14px;
  font-weight: 650;
}

.home-view:not(.is-hidden) .toggle-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.home-view:not(.is-hidden) .toggle-box:has(input:checked) {
  background: #46b8f4;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(35, 167, 238, 0.2);
}

.home-view:not(.is-hidden) .toggle-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.home-view:not(.is-hidden) #detailSearchButton,
.home-view:not(.is-hidden) #rerunSearchButton {
  grid-column: auto;
  width: 100%;
  min-height: 46px;
  min-width: 0;
  border-radius: var(--radius-control, 14px);
  font-size: 14px;
  font-weight: 750;
  box-sizing: border-box;
}

.home-view:not(.is-hidden) #detailSearchButton {
  border: 0;
  background: #edf4fc;
  color: #526173;
}

.home-view:not(.is-hidden) #rerunSearchButton {
  background: #0b5ee8;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(11, 94, 232, 0.18);
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    gap: 14px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-view:not(.is-hidden) .result-toolbar {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
  }

  .home-view:not(.is-hidden) .core-controls {
    gap: 10px;
  }

  .home-view:not(.is-hidden) .result-field,
  .home-view:not(.is-hidden) .toggle-control {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
  }
}

/* Keep the filter inside the hook band, but use the existing filter design */
.home-view:not(.is-hidden) {
  gap: 14px;
  padding-bottom: 16px;
}

.home-view:not(.is-hidden) .result-toolbar {
  width: min(1184px, 100%);
  margin: 2px auto 0;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 12px;
  background: var(--hybrid-panel, #ffffff);
  padding: 0 16px;
  box-shadow: 0 4px 14px rgba(31, 47, 78, 0.04);
  overflow: hidden;
}

.home-view:not(.is-hidden) .core-controls {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 0.68fr) minmax(170px, 0.82fr) minmax(170px, 0.82fr) auto auto;
  align-items: center;
  gap: 0;
  min-height: 78px;
  padding: 0;
}

.home-view:not(.is-hidden) .result-field,
.home-view:not(.is-hidden) .toggle-control {
  grid-column: auto;
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 7px;
  border-right: 1px solid var(--hybrid-line-soft, #edf2f7);
  padding: 0 20px;
}

.home-view:not(.is-hidden) .result-field:first-child {
  padding-left: 0;
}

.home-view:not(.is-hidden) .result-field > span:first-child,
.home-view:not(.is-hidden) .toggle-control > span:first-child {
  color: #7a8798;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.home-view:not(.is-hidden) .toggle-box,
.home-view:not(.is-hidden) .controls input,
.home-view:not(.is-hidden) .controls select {
  width: 100%;
  min-height: 0;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hybrid-blue, #0b5ee8);
  padding: 0;
  font-size: 18px;
  font-weight: 950;
  box-shadow: none;
}

.home-view:not(.is-hidden) .toggle-box {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.home-view:not(.is-hidden) .toggle-box:has(input:checked) {
  background: transparent;
  color: var(--hybrid-blue, #0b5ee8);
  box-shadow: none;
}

.home-view:not(.is-hidden) .toggle-box input {
  position: static;
  width: 16px;
  height: 16px;
  opacity: 1;
  pointer-events: auto;
  accent-color: var(--hybrid-blue, #0b5ee8);
}

.home-view:not(.is-hidden) #detailSearchButton,
.home-view:not(.is-hidden) #rerunSearchButton {
  align-self: center;
  width: auto;
  height: 44px;
  min-height: 44px;
  min-width: 0;
  border-radius: 9px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.home-view:not(.is-hidden) #detailSearchButton {
  margin-left: 18px;
  border: 1px solid #cfd8e5;
  background: #ffffff;
  color: #475467;
}

.home-view:not(.is-hidden) #rerunSearchButton {
  margin-left: 9px;
  border: 1px solid var(--hybrid-blue, #0b5ee8);
  background: var(--hybrid-blue, #0b5ee8);
  color: #ffffff;
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    padding: 8px 0;
  }

  .home-view:not(.is-hidden) .result-field,
  .home-view:not(.is-hidden) .toggle-control {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--hybrid-line-soft, #edf2f7);
    padding: 0 12px;
  }

  .home-view:not(.is-hidden) #detailSearchButton,
  .home-view:not(.is-hidden) #rerunSearchButton {
    width: auto;
    margin: 8px 8px 0;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-view:not(.is-hidden) .result-toolbar {
    width: 100%;
    border-radius: 10px;
  }

  .home-view:not(.is-hidden) .core-controls {
    grid-template-columns: 1fr 1fr;
  }

  .home-view:not(.is-hidden) .toggle-box,
  .home-view:not(.is-hidden) .controls input,
  .home-view:not(.is-hidden) .controls select {
    font-size: 16px;
  }

  .home-view:not(.is-hidden) #detailSearchButton,
  .home-view:not(.is-hidden) #rerunSearchButton {
    width: calc(100% - 16px);
  }
}

/* Keep the hero question on one line */
.home-view:not(.is-hidden) .home-copy h2 {
  max-width: min(960px, 100%);
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-base,
.home-view:not(.is-hidden) .hero-title-accent,
.home-view:not(.is-hidden) .home-copy h2 span {
  display: inline;
}

.home-view:not(.is-hidden) .hero-title-base::after {
  content: " ";
}

.home-view:not(.is-hidden) .hero-region-rotator {
  display: inline;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .home-copy h2 {
    font-size: clamp(24px, 6.5vw, 30px);
    line-height: 1.16;
    white-space: nowrap;
  }
}

/* Move the investment hook into a thin top banner */
.top-promo-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid #084bbb;
  background: #0b5ee8;
  color: #ffffff;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 620;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(11, 94, 232, 0.18);
}

.top-promo-banner::before {
  content: "";
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.top-promo-copy,
.top-promo-action {
  white-space: nowrap;
}

.top-promo-action {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  box-shadow: none;
}

.top-promo-action::after {
  content: "›";
  margin-left: 5px;
  font-size: 14px;
  font-weight: 680;
}

.topbar {
  top: 48px;
}

.home-view:not(.is-hidden) .hero-kicker {
  display: none !important;
}

.home-view:not(.is-hidden) .home-copy {
  gap: 8px;
}

@media (max-width: 720px) {
  .top-promo-banner {
    min-height: 44px;
    gap: 8px;
    padding: 0 12px;
    font-size: 12px;
  }

  .top-promo-banner::before {
    width: 20px;
    height: 20px;
  }

  .topbar {
    top: 44px;
  }

  .top-promo-action {
    min-height: 22px;
    padding: 0 8px;
    font-size: 11.5px;
  }
}

/* Mobile compact condition summary */
.mobile-filter-summary {
  display: none;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .result-toolbar {
    border-radius: 10px;
    overflow: hidden;
  }

  .home-view:not(.is-hidden) .mobile-filter-summary {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 49px;
    border: 0;
    background: #ffffff;
    color: #172033;
    padding: 0 10px;
    font-family: inherit;
    cursor: pointer;
  }

  .home-view:not(.is-hidden) .summary-chip {
    min-width: 0;
    max-width: 108px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e4f2;
    border-radius: 7px;
    background: #f5f8fc;
    color: #1f3557;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 780;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-view:not(.is-hidden) .summary-chip:first-of-type {
    background: #eef5ff;
    border-color: #cfe0f7;
    color: var(--hybrid-blue, #0b5ee8);
  }

  .home-view:not(.is-hidden) .summary-chevron {
    flex: 0 0 auto;
    margin-left: auto;
    color: #667085;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 0.16s ease;
  }

  .home-view:not(.is-hidden) .result-toolbar.is-mobile-open .summary-chevron {
    transform: rotate(180deg) translateY(1px);
  }

  .home-view:not(.is-hidden) .result-toolbar:not(.is-mobile-open) .core-controls {
    display: none;
  }

  .home-view:not(.is-hidden) .result-toolbar.is-mobile-open .core-controls {
    display: grid;
    border-top: 1px solid var(--hybrid-line-soft, #edf2f7);
    padding-top: 4px;
  }

  .home-view:not(.is-hidden) .result-toolbar.is-mobile-open .result-field,
  .home-view:not(.is-hidden) .result-toolbar.is-mobile-open .toggle-control {
    min-height: 54px;
  }
}

@media (max-width: 380px) {
  .home-view:not(.is-hidden) .mobile-filter-summary {
    gap: 5px;
    padding: 0 8px;
  }

  .home-view:not(.is-hidden) .summary-chip {
    max-width: 88px;
    padding: 0 6px;
    font-size: 12px;
  }
}

/* Roll back the mobile condition summary to the original open filter form */
@media (max-width: 720px) {
  .home-view:not(.is-hidden) .result-toolbar:not(.is-mobile-open) .core-controls,
  .home-view:not(.is-hidden) .result-toolbar.is-mobile-open .core-controls {
    display: grid;
    border-top: 0;
    padding-top: 0;
  }
}

/* Mobile filter rows: keep budget and transaction type compact */
@media (max-width: 720px) {
  .home-view:not(.is-hidden) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0;
    column-gap: 8px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child,
  .home-view:not(.is-hidden) .core-controls > .toggle-control {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border-bottom: 1px solid var(--hybrid-line-soft, #edf2f7);
    padding: 0 4px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child > span:first-child,
  .home-view:not(.is-hidden) .core-controls > .toggle-control > span:first-child {
    color: #667085;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child input {
    height: 38px;
    border-radius: 9px;
    background: #f3f7fc;
    padding: 0 12px;
    color: #0b5ee8;
    font-size: 17px;
    font-weight: 900;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box {
    height: 38px;
    min-height: 38px;
    justify-content: center;
    border: 1px solid #cfdcf0;
    border-radius: 9px;
    background: #f3f7fc;
    color: #315177;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 850;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked) {
    border-color: var(--hybrid-blue, #0b5ee8);
    background: var(--hybrid-blue, #0b5ee8);
    color: #ffffff;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:not(:first-child) {
    min-height: 54px;
    border-bottom: 1px solid var(--hybrid-line-soft, #edf2f7);
    padding: 0 4px;
  }
}

/* Mobile first row: budget and mode side by side */
@media (max-width: 720px) {
  .home-view:not(.is-hidden) .core-controls > .result-field:first-child {
    grid-column: auto;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 6px;
    min-height: 50px;
    padding: 0 2px 0 4px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child > span:first-child {
    font-size: 12px;
    white-space: nowrap;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child input {
    height: 38px;
    padding: 0 10px;
    font-size: 16px;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control {
    grid-column: auto;
    display: block;
    min-height: 50px;
    padding: 6px 4px 6px 2px;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control > span:first-child {
    display: none;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box {
    width: 100%;
    height: 38px;
    min-height: 38px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:not(:first-child) {
    padding-top: 4px;
  }
}

/* Mobile budget unit and quieter segment treatment */
@media (max-width: 720px) {
  .home-view:not(.is-hidden) .core-controls > .result-field:first-child {
    grid-template-columns: 54px minmax(0, 1fr) 18px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child::after {
    content: "억";
    color: #667085;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:first-child input {
    padding-right: 8px;
    text-align: right;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box {
    border-color: #d8e3f2;
    background: #f6f9fd;
    color: #344e70;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked) {
    border-color: #bdd3f5;
    background: #eef5ff;
    color: var(--hybrid-blue, #0b5ee8);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  }
}

/* Mobile budget input cleanup and checkbox-like segment */
.home-view:not(.is-hidden) #budgetInput::-webkit-outer-spin-button,
.home-view:not(.is-hidden) #budgetInput::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.home-view:not(.is-hidden) #budgetInput {
  appearance: textfield;
  -moz-appearance: textfield;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box {
    justify-content: flex-start;
    gap: 7px;
    border-color: #d8e3ef;
    background: #ffffff;
    color: #3d4d63;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border: 1px solid #b8c7dc;
    border-radius: 4px;
    background: #ffffff;
    box-sizing: border-box;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked) {
    border-color: #cbd9ef;
    background: #ffffff;
    color: #27486e;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked)::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--hybrid-blue, #0b5ee8);
    background: var(--hybrid-blue, #0b5ee8);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
  }
}

/* Mobile: inline mode text and paired region selects */
@media (max-width: 720px) {
  .home-view:not(.is-hidden) .core-controls > .toggle-control {
    display: flex;
    align-items: center;
    padding: 0 4px 0 2px;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box,
  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked) {
    width: auto;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #405066;
    padding: 0;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box::before,
  .home-view:not(.is-hidden) .core-controls > .toggle-control .toggle-box:has(input:checked)::before {
    width: 14px;
    height: 14px;
    border-radius: 4px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:not(:first-child) {
    min-height: 60px;
    align-content: center;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:not(:first-child) > span:first-child {
    font-size: 11px;
    font-weight: 850;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:not(:first-child) select {
    height: 34px;
    font-size: 15px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:nth-child(3) {
    padding-right: 4px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:nth-child(4) {
    padding-left: 4px;
  }

  .home-view:not(.is-hidden) .core-controls > .result-field:nth-child(4) > span:first-child {
    visibility: hidden;
  }
}

/* Roll back diagnosis/explore ownership */
.main-tabs button {
  position: relative;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  border-color: var(--hybrid-blue, #256ef4);
  background: var(--hybrid-blue, #256ef4);
  color: #ffffff;
}

.main-tabs button.active {
  padding-right: 24px;
}

.main-tabs button.active::after {
  content: "";
  display: block;
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.home-view:not(.is-hidden) {
  gap: 16px;
}

.home-view:not(.is-hidden) .home-panel {
  display: grid;
}

.home-view:not(.is-hidden) > .result-toolbar,
.results-view.is-previewing .result-toolbar {
  display: none;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  display: block;
  width: min(1184px, calc(100% - 32px));
  margin: 0 auto 10px;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 70, 132, 0.05);
}

@media (max-width: 720px) {
  .main-tabs button.active {
    padding-right: 22px;
  }

  .main-tabs button.active::after {
    top: 6px;
    right: 7px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: 100%;
    margin-bottom: 8px;
    border-radius: 8px;
  }
}

/* Restore the hero badge above the hook copy */
.main-tabs button.active {
  padding-right: 14px;
}

.main-tabs button.active::after {
  content: none;
  display: none;
}

.home-view:not(.is-hidden) .hero-kicker {
  display: inline-flex !important;
  align-items: center;
  justify-self: center;
  gap: 8px;
  border: 1px solid rgba(37, 110, 244, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: #174ea6;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.home-view:not(.is-hidden) .hero-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--hybrid-blue, #256ef4);
  box-shadow: 0 0 0 4px rgba(37, 110, 244, 0.1);
}

@media (max-width: 720px) {
  .main-tabs button.active {
    padding-right: 12px;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    font-size: 12.5px;
    padding: 7px 11px;
  }
}

/* Mobile top tab sizing */
@media (max-width: 720px) {
  .main-tabs {
    height: auto;
    min-height: 48px;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .main-tabs button {
    height: auto;
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12.5px;
    font-weight: 690;
    line-height: 1.15;
  }

  .main-tabs button.active {
    padding-right: 11px;
    font-weight: 720;
  }
}

/* Topbar typography and logo scale */
.brand-home {
  grid-template-columns: 24px minmax(0, auto);
  gap: 8px;
}

.brand-mark {
  width: 24px;
  height: 24px;
}

.brand-title {
  font-size: 23px;
  font-weight: 740;
}

.main-tabs button {
  font-size: 13.5px;
  font-weight: 680;
}

.main-tabs button.active,
.main-tabs button.active:hover {
  font-weight: 720;
}

.auth-actions button {
  font-size: 12.5px;
  font-weight: 650;
}

.auth-actions .login-button {
  font-weight: 680;
}

@media (max-width: 720px) {
  .brand-home {
    grid-template-columns: 20px minmax(0, max-content);
    height: 30px;
    gap: 7px;
  }

  .brand-mark {
    width: 20px;
    height: 20px;
  }

  .brand-title {
    font-size: 19.5px;
    font-weight: 720;
  }

  .main-tabs button {
    font-size: 12.25px;
    font-weight: 660;
  }

  .main-tabs button.active {
    font-weight: 700;
  }
}

/* Kakao-style ad slot above the top tabs */
.top-promo-banner {
  display: none;
}

.topbar {
  top: 0;
  min-height: 82px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand-group {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 6px;
}

.brand-home {
  grid-column: 1;
  grid-row: 1 / 3;
}

.top-tab-ad-banner {
  grid-column: 2;
  grid-row: 1;
  width: min(520px, 100%);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: #f6f9fd;
  color: #415168;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 560;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  white-space: nowrap;
  overflow: hidden;
}

.top-tab-ad-banner::before {
  content: "AD";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 26px;
  border-radius: 5px;
  background: #e8f0fb;
  color: #5d718d;
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
}

.top-tab-ad-banner strong {
  color: var(--hybrid-blue, #256ef4);
  font-size: 12px;
  font-weight: 680;
}

.main-tabs {
  grid-column: 2;
  grid-row: 2;
}

@media (max-width: 720px) {
  .topbar {
    top: 0;
    min-height: 0;
    padding-top: 8px;
  }

  .brand-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    row-gap: 7px;
    width: 100%;
  }

  .brand-home {
    grid-column: 1;
    grid-row: 1;
  }

  .top-tab-ad-banner {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    min-height: 32px;
    margin: 0 12px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .top-tab-ad-banner strong {
    font-size: 11.5px;
  }

  .main-tabs {
    grid-column: 1;
    grid-row: 3;
  }
}

/* Mobile header stack: topbar, ad, sticky three-tab rail */
.mobile-top-stack {
  display: none;
}

@media (max-width: 720px) {
  html,
  body,
  .app {
    max-width: 100%;
    overflow-x: clip;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    min-height: 49px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px 0;
    overflow: visible;
  }

  .brand-group {
    display: block;
    width: 100%;
  }

  .brand-group > .top-tab-ad-banner,
  .brand-group > .main-tabs {
    display: none;
  }

  .mobile-top-stack {
    display: contents;
  }

  .mobile-ad-banner {
    position: relative;
    isolation: isolate;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 12px 0;
    border: 1px solid rgba(12, 35, 73, 0.16);
    border-radius: 12px;
    background: #123f89;
    color: #ffffff;
    padding: 16px 18px;
    line-height: 1.15;
    overflow: hidden;
    box-shadow:
      0 0 0 12px var(--mobile-header-bg),
      0 12px 26px rgba(15, 23, 42, 0.12);
    text-align: left;
  }

  .mobile-ad-banner img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 56%;
  }

  .mobile-ad-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(10, 33, 74, 0.56);
  }

  .mobile-ad-banner span {
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-ad-banner strong {
    width: 100%;
    color: #ffffff;
    font-size: 20px;
    font-weight: 720;
  }

  .mobile-main-tabs {
    position: sticky;
    top: 49px;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 52px;
    border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
    background: rgba(255, 255, 255, 0.98);
    padding: 6px 10px;
    backdrop-filter: blur(12px);
  }

  .mobile-main-tabs button {
    min-width: 0;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #526176;
    padding: 0 2px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 660;
    line-height: 1.15;
    white-space: nowrap;
  }

  .mobile-main-tabs button.active,
  .mobile-main-tabs button[aria-expanded="true"] {
    border-color: var(--hybrid-blue, #256ef4);
    background: var(--hybrid-blue, #256ef4);
    color: #ffffff;
    font-weight: 700;
  }
}

/* 가능성진단 기준 폼 레이아웃 */
.home-view:not(.is-hidden) .home-panel {
  width: min(820px, calc(100vw - 80px));
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 18px 18px;
  box-shadow: 0 14px 34px rgba(18, 38, 68, 0.055);
  box-sizing: border-box;
}

.home-view:not(.is-hidden) .home-mode-panel.active {
  width: 100%;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  display: contents;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
  grid-column: 1;
  display: flex;
  align-items: center;
  min-height: 50px;
  color: var(--hybrid-muted, #667085);
  font-size: 14.5px;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label::after,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label::after {
  display: none;
  content: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #f3f7fc;
  padding: 0 15px;
  box-shadow: 0 6px 16px rgba(25, 52, 91, 0.035);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .amount-input {
  height: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
  width: 100%;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--hybrid-ink, #172033);
  padding: 0;
  font-size: 17px;
  font-weight: 740;
  line-height: 1;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input::placeholder {
  color: #6b7280;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
  min-width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--hybrid-ink, #172033);
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 50px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #f3f7fc;
  color: var(--hybrid-ink, #172033);
  padding: 0 15px;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.12;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(25, 52, 91, 0.035);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label:has(input:checked) {
  border-color: transparent;
  background: var(--hybrid-blue, #1463e6);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(20, 99, 230, 0.14);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap::after {
  content: none;
  display: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  justify-content: flex-start;
  width: 100%;
  appearance: none;
  background-color: #f3f7fc;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7788 50%),
    linear-gradient(135deg, #6b7788 50%, transparent 50%);
  background-position:
    calc(100% - 25px) 50%,
    calc(100% - 17px) 50%;
  background-size:
    8px 8px,
    8px 8px;
  background-repeat: no-repeat;
  color: var(--hybrid-ink, #172033);
  text-align: left;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select:disabled {
  color: #9aa5b4;
  opacity: 1;
  background-color: #f2f6fb;
  background-image:
    linear-gradient(45deg, transparent 50%, #d6e0ec 50%),
    linear-gradient(135deg, #d6e0ec 50%, transparent 50%);
}

.home-view:not(.is-hidden) .home-advanced {
  width: 100%;
  margin: 0;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 28px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hybrid-muted, #667085);
  padding: 0;
  font-size: 14.5px;
  font-weight: 760;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle::before {
  content: "";
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle::after {
  content: "";
  justify-self: end;
  width: 8px;
  height: 8px;
  border-right: 2px solid #7b8796;
  border-bottom: 2px solid #7b8796;
  transform: rotate(45deg);
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.home-view:not(.is-hidden) #showResultsButton {
  width: min(300px, 100%);
  min-height: 50px;
  justify-self: center;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: var(--hybrid-blue, #1463e6);
  color: #ffffff;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(20, 99, 230, 0.18);
}

.home-view:not(.is-hidden) #showResultsButton .button-logo {
  display: none;
}

.home-view:not(.is-hidden) .home-copy h2 {
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-base,
.home-view:not(.is-hidden) .hero-title-accent,
.home-view:not(.is-hidden) .home-copy h2 span.hero-title-base,
.home-view:not(.is-hidden) .home-copy h2 span.hero-title-accent {
  display: block;
}

.home-view:not(.is-hidden) .hero-title-base::after {
  content: none;
}

@media (min-width: 960px) {
  .home-view:not(.is-hidden) {
    width: min(1180px, calc(100vw - 72px));
    grid-template-columns: minmax(320px, 0.9fr) minmax(540px, 620px);
    column-gap: clamp(32px, 4.4vw, 64px);
    row-gap: 18px;
    align-items: center;
    padding-top: clamp(36px, 5.4vw, 72px);
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .home-view:not(.is-hidden)::after {
    content: none;
    display: none;
  }

  .home-view:not(.is-hidden) .home-copy {
    grid-column: 1;
    width: min(440px, 100%);
    justify-self: start;
    align-self: center;
    text-align: left;
    gap: 10px;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    justify-self: start;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    margin: 0;
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.08;
  }

  .home-view:not(.is-hidden) .home-copy > span {
    max-width: 390px;
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.5;
  }

  .home-view:not(.is-hidden) .home-panel {
    grid-column: 2;
    width: min(620px, 100%);
    justify-self: end;
  }

  .home-view:not(.is-hidden) .home-report-preview {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(760px, 100%);
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .home-panel {
    width: 100%;
    gap: 14px;
    padding: 12px 16px 14px;
    border-radius: 12px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
    grid-template-columns: 68px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
    min-height: 48px;
    font-size: 13px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
    padding-inline: 14px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
    height: 46px;
    font-size: 15px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
    font-size: 15px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    gap: 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
    padding-inline: 8px;
    font-size: 11.5px;
    white-space: nowrap;
    text-align: center;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    padding: 0 28px 0 12px;
    font-size: 12.5px;
    background-position:
      calc(100% - 20px) 50%,
      calc(100% - 14px) 50%;
    background-size:
      6px 6px,
      6px 6px;
  }

  .home-view:not(.is-hidden) .home-panel .home-detail-toggle {
    min-height: 36px;
    grid-template-columns: 68px minmax(0, 1fr) 24px;
    font-size: 13px;
  }

  .home-view:not(.is-hidden) .home-panel .home-detail-toggle::after {
    width: 9px;
    height: 9px;
    border-width: 2px;
  }

  .home-view:not(.is-hidden) #showResultsButton {
    width: min(240px, 100%);
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
  }
}

@media (min-width: 981px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: min(1490px, 100%);
    margin-bottom: 12px;
    box-sizing: border-box;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(170px, 1.05fr)
      minmax(170px, 0.95fr)
      minmax(220px, 1.2fr)
      minmax(200px, 1.08fr)
      132px
      132px;
    gap: 10px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .controls label {
    padding-inline: 20px;
  }
}

.results-view[data-active-tab="explore"] .explore-diagnosis-strip {
  display: none;
}

.results-view[data-active-tab="explore"] > .explore-side-column {
  order: -1;
  width: min(1490px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(240px, 0.85fr) minmax(280px, 1fr);
  gap: 10px;
  margin: -2px auto 8px;
}

.results-view[data-active-tab="explore"] > .explore-side-column .explore-source-card {
  display: none;
}

.results-view[data-active-tab="explore"] > .explore-side-column .explore-side-card {
  min-height: 0;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(28, 44, 74, 0.045);
}

.results-view[data-active-tab="explore"] > .explore-side-column .explore-condition-card dl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.results-view[data-active-tab="explore"] > .explore-side-column .explore-condition-card dl div {
  padding: 8px 9px;
}

.results-view[data-active-tab="explore"] > .explore-side-column .explore-side-card ul {
  gap: 5px;
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"] > .explore-side-column {
    width: min(100%, calc(100% - 20px));
    grid-template-columns: 1fr;
  }

  .results-view[data-active-tab="explore"] > .explore-side-column .explore-condition-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 721px) {
  .topbar {
    min-height: 62px;
    padding-top: 0;
    padding-bottom: 0;
  }

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

  .brand-home,
  .main-tabs {
    grid-column: auto;
    grid-row: auto;
  }

  .top-tab-ad-banner {
    display: none;
  }
}

.results-view[data-active-tab="explore"] .result-views,
.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active,
.results-view[data-active-tab="explore"] .sheet-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-views {
  width: 100%;
  max-width: none;
  overflow: visible;
}

.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  padding: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  width: 100%;
  max-width: none;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0;
}

.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  overflow: visible;
}

.results-view[data-active-tab="explore"] .sheet-shell table {
  width: max-content;
  min-width: 1440px;
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

/* Apartment explore: filter-first controls and table-header-first listing */
.results-view[data-active-tab="explore"] .hybrid-content-top,
.results-view[data-active-tab="explore"] .explore-summary {
  display: none;
}

.results-view[data-active-tab="explore"] .explore-results-layout .result-views {
  grid-template-rows: minmax(0, 1fr);
}

.results-view[data-active-tab="explore"] .core-controls > .result-tabs {
  grid-column: auto;
  display: inline-flex;
  align-self: center;
  justify-self: end;
  gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border-radius: 8px;
  background: #eef4fb;
  padding: 4px;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-tab {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526176;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-tab.active {
  background: #ffffff;
  color: var(--hybrid-blue, #1463e6);
  box-shadow: 0 1px 5px rgba(15, 35, 63, 0.08) !important;
}

.results-view[data-active-tab="explore"] .budget-input-shell {
  min-width: 0;
  height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput {
  width: 100%;
  min-width: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput::-webkit-outer-spin-button,
.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.results-view[data-active-tab="explore"] .budget-unit {
  color: #125bcf;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  order: 1;
}

.results-view[data-active-tab="explore"] .table-paywall {
  order: 2;
  border-top: 1px solid rgba(223, 230, 239, 0.9);
}

@media (min-width: 981px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(132px, 0.74fr)
      minmax(132px, 0.7fr)
      minmax(174px, 0.96fr)
      minmax(160px, 0.88fr)
      104px
      104px
      118px;
    gap: 8px;
  }
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"] .core-controls > .result-tabs {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
  }

  .results-view[data-active-tab="explore"] .result-tab {
    flex: 1 1 0;
  }
}

/* Apartment explore: keep the spreadsheet locked to the viewport width */
.results-view[data-active-tab="explore"] .explore-results-layout {
  width: min(1490px, 100%);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.results-view[data-active-tab="explore"] .explore-results-layout .result-views,
.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  min-width: 0;
  overflow-x: hidden;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.results-view[data-active-tab="explore"] .sheet-shell table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.results-view[data-active-tab="explore"] .sheet-shell th,
.results-view[data-active-tab="explore"] .sheet-shell td {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell th.favorite-column,
.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  padding: 0;
  text-align: center;
}

.results-view[data-active-tab="explore"] .favorite-column {
  color: #94a3b8;
  cursor: default;
}

.results-view[data-active-tab="explore"] .favorite-cell {
  background: #ffffff;
}

.favorite-toggle {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b7c0cc;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
}

.favorite-toggle:hover,
.favorite-toggle.is-active {
  color: #f2b400;
  background: #fff7d6;
}

.results-view[data-active-tab="explore"] .empty-table-cell {
  height: 128px;
  color: #7a8798;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell th {
  padding-inline: 8px;
  font-size: 11px;
}

.results-view[data-active-tab="explore"] .sheet-shell td {
  padding-inline: 8px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .results-view[data-active-tab="explore"] .sheet-shell th {
    padding-inline: 4px;
    font-size: 9px;
  }

  .results-view[data-active-tab="explore"] .sheet-shell td {
    padding-inline: 4px;
    font-size: 10px;
  }
}

/* Apartment explore: full-bleed spreadsheet without the footer note */
.results-view[data-active-tab="explore"] .explore-results-layout {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

.results-view[data-active-tab="explore"] .explore-results-layout .result-views,
.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active,
.results-view[data-active-tab="explore"] .sheet-shell {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  border-radius: 0;
}

.results-view[data-active-tab="explore"] .table-paywall {
  display: none;
}

@supports (width: 100dvw) {
  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: 100dvw;
    max-width: 100dvw;
    margin-left: calc(50% - 50dvw);
    margin-right: calc(50% - 50dvw);
  }
}

@media (max-width: 700px) {
  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: calc(100% + 20px);
    max-width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
  }
}

/* Apartment explore: let spreadsheet columns keep their natural width */
.results-view[data-active-tab="explore"] .explore-results-layout .result-views,
.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  overflow-x: visible;
}

.results-view[data-active-tab="explore"] .sheet-shell {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: auto;
}

.results-view[data-active-tab="explore"] .sheet-shell table {
  width: max-content;
  min-width: max-content;
  max-width: none;
  table-layout: fixed;
}

.results-view[data-active-tab="explore"] .sheet-shell th,
.results-view[data-active-tab="explore"] .sheet-shell td {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-view[data-active-tab="explore"] .sheet-shell th.name-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.name-cell {
  width: 156px;
  min-width: 154px;
  max-width: 156px;
}

.results-view[data-active-tab="explore"] .sheet-shell th.saleRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell th.jeonseRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell th.dualRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell th.elementaryDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell td.positive,
.results-view[data-active-tab="explore"] .sheet-shell td.risk {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

.results-view[data-active-tab="explore"] .sheet-shell th.favorite-column,
.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  box-sizing: border-box;
  overflow: visible;
  padding-right: 4px;
  padding-left: 4px;
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell {
  background: #ffffff;
}

/* Apartment explore: blue sortable spreadsheet header */
.results-view[data-active-tab="explore"] .sheet-shell thead th {
  position: relative;
  top: auto;
  z-index: 1;
  height: 46px;
  border-right: 1px solid rgba(151, 195, 255, 0.46);
  border-bottom: 1px solid #074aa5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #1377e6 0%, #0b63ce 49%, #0758bd 50%, #003f9e 100%);
  color: #ffffff;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0, 28, 78, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 25, 78, 0.42),
    inset 0 -10px 18px rgba(0, 47, 133, 0.2),
    0 1px 0 rgba(0, 43, 114, 0.22),
    0 8px 18px rgba(10, 68, 154, 0.14);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:first-child {
  border-left: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:last-child {
  border-right: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:not(.favorite-column) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.name-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.city-column,
.results-view[data-active-tab="explore"] .sheet-shell th.city-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(2) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.district-column,
.results-view[data-active-tab="explore"] .sheet-shell th.district-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(3) {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.dong-column,
.results-view[data-active-tab="explore"] .sheet-shell th.dong-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(4) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.name-cell,
.results-view[data-active-tab="explore"] .sheet-shell th.name-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.name-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.size-column,
.results-view[data-active-tab="explore"] .sheet-shell th.size-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(6),
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonseRatio-column,
.results-view[data-active-tab="explore"] .sheet-shell th.jeonseRatio-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(9) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.salePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell th.salePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(7),
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonsePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell th.jeonsePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell td:nth-child(8) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.investment-column,
.results-view[data-active-tab="explore"] .sheet-shell th.investment-column,
.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}

.results-view[data-active-tab="explore"] .sheet-shell td.region-cell,
.results-view[data-active-tab="explore"] .sheet-shell th.city-column,
.results-view[data-active-tab="explore"] .sheet-shell th.district-column,
.results-view[data-active-tab="explore"] .sheet-shell th.dong-column {
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.saleRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonseRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.dualRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.elementaryDistance-column {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.1) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #1b82f0 0%, #0c68d6 49%, #075cc6 50%, #004aae 100%);
  outline: 0;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 34, 98, 0.44),
    inset 0 -10px 18px rgba(0, 47, 133, 0.22),
    0 10px 22px rgba(10, 68, 154, 0.2);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #0b63ce 0%, #0055bd 49%, #0049ad 50%, #003784 100%);
  color: #ffffff;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 20px);
  color: inherit;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted .sort-indicator {
  background: #ffffff;
  color: #0047ad;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #0d64cf 0%, #094fa9 49%, #064796 50%, #003677 100%);
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
}

.sticky-sheet-header {
  position: fixed;
  top: var(--explore-table-header-top, 187px);
  left: 0;
  display: none;
  overflow: hidden;
  z-index: 17;
  pointer-events: auto;
}

.sticky-sheet-header.is-visible {
  display: block;
}

.sticky-sheet-header table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  max-width: none;
  transform-origin: top left;
}

.sticky-sheet-header thead th {
  position: relative;
  top: auto;
  z-index: 1;
  height: 46px;
  border-right: 1px solid rgba(151, 195, 255, 0.46);
  border-bottom: 1px solid #074aa5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #1377e6 0%, #0b63ce 49%, #0758bd 50%, #003f9e 100%);
  color: #ffffff;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0, 28, 78, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 25, 78, 0.42),
    inset 0 -10px 18px rgba(0, 47, 133, 0.2),
    0 1px 0 rgba(0, 43, 114, 0.22),
    0 8px 18px rgba(10, 68, 154, 0.14);
}

.sticky-sheet-header thead th:first-child {
  border-left: 0;
}

.sticky-sheet-header thead th:last-child {
  border-right: 0;
}

.sticky-sheet-header thead th:hover,
.sticky-sheet-header thead th:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.1) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #1b82f0 0%, #0c68d6 49%, #075cc6 50%, #004aae 100%);
  outline: 0;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 34, 98, 0.44),
    inset 0 -10px 18px rgba(0, 47, 133, 0.22),
    0 10px 22px rgba(10, 68, 154, 0.2);
}

.sticky-sheet-header thead th.is-sorted {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 44%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #0b63ce 0%, #0055bd 49%, #0049ad 50%, #003784 100%);
  color: #ffffff;
}

.sticky-sheet-header thead th .filter-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 20px);
  color: inherit;
  line-height: 1.2;
}

.sticky-sheet-header thead th .sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.sticky-sheet-header thead th.is-sorted .sort-indicator {
  background: #ffffff;
  color: #0047ad;
}

.sticky-sheet-header thead th.favorite-column {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 47%),
    linear-gradient(180deg, #0d64cf 0%, #094fa9 49%, #064796 50%, #003677 100%);
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
}

/* Apartment explore: keep apartment rows aligned, expand same-size deal history inline */
.results-view[data-active-tab="explore"] .apartment-list-row.has-deal-history {
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .apartment-list-row.has-deal-history:hover td {
  background: #f7fbff;
}

.results-view[data-active-tab="explore"] .deal-history-toggle {
  max-width: 100%;
  min-width: 0;
  height: 30px;
  display: inline-grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .deal-history-toggle:hover,
.results-view[data-active-tab="explore"] .deal-history-toggle:focus-visible {
  color: #0756b9;
  outline: 0;
}

.results-view[data-active-tab="explore"] .deal-history-caret {
  color: #0b63ce;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .deal-history-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .deal-history-row td {
  background: #fbfdff;
  color: #526176;
  border-bottom-color: #e7edf5;
}

.results-view[data-active-tab="explore"] .deal-history-row .name-cell {
  color: #334155;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .apartment-list-row.is-history-selected td {
  background: #eef6ff;
}

.results-view[data-active-tab="explore"] .deal-history-more-button,
.deal-history-dialog #dealHistoryDialogCloseButton {
  min-height: 24px;
  border: 1px solid #cbd8e8;
  border-radius: 4px;
  background: #ffffff;
  color: #23415f;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .deal-history-more-button:hover,
.deal-history-dialog #dealHistoryDialogCloseButton:hover {
  border-color: #94afd0;
  background: #f5f9fe;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row .deal-history-more-button {
  min-height: 22px;
  padding: 0 9px;
  font-size: 11px;
}

.results-view[data-active-tab="explore"] .deal-history-table-wrap {
  overflow-x: auto;
}

.results-view[data-active-tab="explore"] .deal-history-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.results-view[data-active-tab="explore"] .deal-history-table th,
.results-view[data-active-tab="explore"] .deal-history-table td {
  border-right: 1px solid #e8eef6;
  border-bottom: 1px solid #edf2f8;
  padding: 7px 8px;
  text-align: right;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .deal-history-table th:first-child,
.results-view[data-active-tab="explore"] .deal-history-table td:first-child,
.results-view[data-active-tab="explore"] .deal-history-table th:nth-child(2),
.results-view[data-active-tab="explore"] .deal-history-table td:nth-child(2),
.results-view[data-active-tab="explore"] .deal-history-table th:nth-child(3),
.results-view[data-active-tab="explore"] .deal-history-table td:nth-child(3),
.results-view[data-active-tab="explore"] .deal-history-table th:nth-child(4),
.results-view[data-active-tab="explore"] .deal-history-table td:nth-child(4),
.results-view[data-active-tab="explore"] .deal-history-table th:last-child,
.results-view[data-active-tab="explore"] .deal-history-table td:last-child {
  text-align: left;
}

.results-view[data-active-tab="explore"] .deal-history-table th {
  background: #f1f5fa;
  color: #516176;
  font-size: 11px;
  font-weight: 900;
}

.results-view[data-active-tab="explore"] .deal-history-table td {
  background: #ffffff;
  color: #263347;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .deal-history-table td.money {
  color: #0b5fce;
  font-weight: 900;
}

.results-view[data-active-tab="explore"] .deal-history-loading,
.results-view[data-active-tab="explore"] .deal-history-empty,
.results-view[data-active-tab="explore"] .deal-history-error {
  padding: 12px 10px;
  color: #66768b;
  font-size: 12px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .deal-history-error {
  color: #c0473b;
}

.deal-history-dialog {
  width: min(1220px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.deal-history-dialog::backdrop {
  background: rgba(11, 24, 43, 0.34);
}

.deal-history-dialog-panel {
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d6e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(12, 35, 66, 0.2);
}

.deal-history-dialog-panel header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e0e8f3;
  background: #f8fbff;
  padding: 12px 14px;
}

.deal-history-dialog-panel header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.deal-history-dialog-panel header strong {
  min-width: 0;
  color: #1d2a3d;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-history-dialog-panel header span {
  color: #66768b;
  font-size: 12px;
  font-weight: 820;
}

.deal-history-dialog-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.deal-history-dialog .deal-history-table {
  min-width: 980px;
}

.deal-history-dialog .deal-history-excel-table {
  min-width: 2320px;
  table-layout: fixed;
}

.deal-history-dialog .deal-history-excel-table th,
.deal-history-dialog .deal-history-excel-table td {
  height: 30px;
  padding: 4px 8px;
  white-space: nowrap;
}

.deal-history-dialog .deal-history-excel-table th {
  text-align: center;
}

.deal-history-dialog .deal-history-excel-table td {
  text-align: center;
}

.deal-history-dialog .deal-history-excel-table td.name-cell {
  text-align: left;
}

@media (max-width: 720px) {
  .deal-history-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 24px);
  }

  .deal-history-dialog-panel {
    max-height: calc(100vh - 24px);
  }

}

/* Apartment explore: filter bar docks into the sticky topbar while scrolling */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  position: sticky;
  top: 92px;
  z-index: 18;
  width: min(1490px, calc(100% - 32px));
  margin: 0 auto 12px;
  box-sizing: border-box;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(31, 70, 132, 0.05);
  backdrop-filter: blur(14px);
  transition:
    width 180ms ease,
    max-width 180ms ease,
    margin 180ms ease,
    border-radius 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 12px;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.985);
  box-shadow:
    0 1px 0 rgba(223, 230, 239, 0.92),
    0 14px 30px rgba(31, 70, 132, 0.11);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked .core-controls {
  width: min(1490px, calc(100% - 32px));
  margin: 0 auto;
}

body.is-explore-filter-docked .topbar {
  box-shadow:
    0 1px 0 rgba(223, 230, 239, 0.92),
    0 8px 18px rgba(15, 23, 42, 0.04);
}

@supports (width: 100dvw) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: 100dvw;
    max-width: 100dvw;
    margin-left: calc(50% - 50dvw);
    margin-right: calc(50% - 50dvw);
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    top: 120px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 8px;
    padding: 8px 10px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    padding-right: 10px;
    padding-left: 10px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked .core-controls {
    width: 100%;
    margin: 0;
  }
}

/* Keep the docked filter aligned to the document width, not scrollbar-inclusive vw */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: calc(100% + 20px);
    max-width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
  }
}

body.is-explore-filter-docked,
body.is-explore-filter-docked .app {
  overflow-x: clip;
}

.explore-menu-toggle,
.explore-side-menu,
.explore-menu-backdrop {
  display: none;
}

.explore-side-menu[hidden],
.explore-menu-backdrop[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"] {
  --explore-side-menu-width: 238px;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  transition: padding-left 190ms ease;
}

body.is-explore-menu-open .results-view[data-active-tab="explore"] {
  padding-left: var(--explore-side-menu-width);
}

body.is-explore-menu-open .results-view[data-active-tab="explore"] .explore-results-layout {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.is-explore-menu-open .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  width: calc(100% - 16px);
  max-width: none;
  margin-left: 8px;
  margin-right: 8px;
}

body.is-explore-menu-available .explore-side-menu {
  position: fixed;
  top: 92px;
  bottom: 0;
  left: 0;
  z-index: 19;
  display: block;
  width: 0;
  overflow: visible;
  pointer-events: auto;
}

body.is-explore-menu-open .explore-side-menu {
  width: var(--explore-side-menu-width);
  pointer-events: auto;
}

.explore-side-menu-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  width: var(--explore-side-menu-width);
  height: 100%;
  border-right: 1px solid rgba(218, 228, 241, 0.98);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.92) inset,
    14px 0 34px rgba(31, 70, 132, 0.1);
  backdrop-filter: blur(18px);
  transform: translateX(-100%);
  transition: transform 190ms ease;
  pointer-events: none;
}

body.is-explore-menu-open .explore-side-menu-panel {
  transform: translateX(0);
  pointer-events: auto;
}

body.is-explore-menu-available .explore-menu-toggle {
  position: absolute;
  top: 12px;
  left: 100%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  border: 1px solid rgba(206, 220, 239, 0.92);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.96);
  color: #182334;
  padding: 0 12px 0 11px;
  font-family: inherit;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    8px 8px 22px rgba(31, 70, 132, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

body.is-explore-menu-available .explore-menu-toggle:hover,
body.is-explore-menu-available .explore-menu-toggle:focus-visible {
  border-color: rgba(37, 110, 244, 0.38);
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    10px 10px 26px rgba(31, 70, 132, 0.16);
  outline: 0;
}

.explore-menu-toggle > span {
  position: relative;
  width: 16px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: #256ef4;
}

.explore-menu-toggle > span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 16px;
  border-top: 2px solid currentColor;
}

.explore-menu-toggle strong {
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1;
}

body.is-explore-menu-open .explore-menu-toggle {
  display: none;
}

.explore-side-menu header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  border-bottom: 1px solid #e6edf6;
  padding: 0 14px 0 16px;
}

.explore-side-menu header strong {
  color: #101827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.explore-side-menu header button {
  height: 30px;
  border: 1px solid #d8e2ef;
  border-radius: 7px;
  background: #f7f9fc;
  color: #526274;
  padding: 0 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.explore-side-menu nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px 10px;
}

.explore-side-menu nav button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263244;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.explore-side-menu nav button:hover,
.explore-side-menu nav button:focus-visible {
  background: #f2f6fb;
  color: #0f4fb8;
  outline: 0;
}

.explore-side-menu nav button.active {
  background: #eaf2ff;
  color: #064db8;
  box-shadow: inset 3px 0 0 #256ef4;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] {
    --explore-side-menu-width: min(46vw, 180px);
  }

  body.is-explore-menu-available .explore-menu-toggle {
    top: 10px;
    height: 34px;
    padding: 0 10px;
  }

  .explore-menu-toggle strong {
    font-size: 11.5px;
  }

  body.is-explore-menu-available .explore-side-menu {
    top: 120px;
  }

  body.is-explore-menu-open .explore-side-menu {
    width: var(--explore-side-menu-width);
  }

  body.is-explore-menu-open .explore-side-menu-panel {
    box-shadow:
      1px 0 0 rgba(255, 255, 255, 0.92) inset,
      18px 0 36px rgba(15, 23, 42, 0.18);
  }
}

/* Apartment explore: compact fixed rail menu */
.results-view[data-active-tab="explore"] {
  --explore-menu-collapsed-width: 52px;
  --explore-menu-expanded-width: 168px;
  --explore-menu-rail-width: var(--explore-menu-collapsed-width);
}

body.is-explore-menu-expanded .results-view[data-active-tab="explore"] {
  --explore-menu-rail-width: var(--explore-menu-expanded-width);
}

body.is-explore-menu-available .results-view[data-active-tab="explore"],
body.is-explore-menu-open .results-view[data-active-tab="explore"] {
  padding-left: var(--explore-menu-rail-width);
}

body.is-explore-menu-available .explore-side-menu,
body.is-explore-menu-open .explore-side-menu {
  position: fixed;
  top: 92px;
  bottom: 0;
  left: 0;
  z-index: 19;
  display: block;
  width: var(--explore-menu-rail-width);
  overflow: hidden;
  border-right: 1px solid rgba(220, 230, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    1px 0 0 rgba(255, 255, 255, 0.9) inset,
    10px 0 24px rgba(31, 70, 132, 0.08);
  pointer-events: auto;
}

body.is-explore-menu-available .explore-side-menu-panel,
body.is-explore-menu-open .explore-side-menu-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  height: 100%;
  border-right: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  pointer-events: auto;
}

body.is-explore-menu-available .explore-menu-toggle,
body.is-explore-menu-open .explore-menu-toggle,
.explore-side-menu header button:not(.explore-rail-toggle) {
  display: none;
}

.explore-side-menu .explore-menu-title {
  display: grid;
  grid-template-columns: 34px 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 50px;
  border-bottom: 1px solid #e7eef7;
  padding: 0 8px;
}

.explore-rail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef4ff;
  color: #1459c8;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.explore-rail-toggle:hover,
.explore-rail-toggle:focus-visible {
  background: #dfeaff;
  outline: 0;
}

.explore-menu-title-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    #256ef4;
  box-shadow: inset 0 -1px 0 rgba(0, 35, 112, 0.2);
}

.explore-side-menu .explore-menu-title strong {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.explore-side-menu nav {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px 6px;
}

.explore-side-menu nav button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #354258;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.explore-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5fb;
  color: #256ef4;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.explore-menu-label {
  display: block;
  width: 100%;
  color: inherit;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

body:not(.is-explore-menu-expanded) .explore-side-menu .explore-menu-title {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0 6px;
}

body:not(.is-explore-menu-expanded) .explore-menu-title-icon,
body:not(.is-explore-menu-expanded) .explore-side-menu .explore-menu-title strong,
body:not(.is-explore-menu-expanded) .explore-menu-label {
  display: none;
}

body:not(.is-explore-menu-expanded) .explore-side-menu nav {
  padding: 8px 6px;
}

body:not(.is-explore-menu-expanded) .explore-side-menu nav button {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 42px;
  padding: 5px 0;
  text-align: center;
}

.explore-side-menu nav button:hover,
.explore-side-menu nav button:focus-visible {
  background: #f3f7fd;
  color: #0f4fb8;
  outline: 0;
}

.explore-side-menu nav button.active {
  background: #eaf2ff;
  color: #064db8;
  box-shadow: inset 3px 0 0 #256ef4;
}

.explore-side-menu nav button.active .explore-menu-icon {
  background: #256ef4;
  color: #ffffff;
}

body.is-explore-menu-available .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked,
body.is-explore-menu-open .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  width: calc(100vw - var(--explore-menu-rail-width));
  max-width: calc(100vw - var(--explore-menu-rail-width));
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
}

@supports (width: 100dvw) {
  body.is-explore-menu-available .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked,
  body.is-explore-menu-open .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: calc(100dvw - var(--explore-menu-rail-width));
    max-width: calc(100dvw - var(--explore-menu-rail-width));
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] {
    --explore-menu-collapsed-width: 48px;
    --explore-menu-expanded-width: 136px;
  }

  body.is-explore-menu-available .explore-side-menu,
  body.is-explore-menu-open .explore-side-menu {
    top: 120px;
  }

  .explore-side-menu .explore-menu-title {
    grid-template-columns: 34px 20px minmax(0, 1fr);
    gap: 6px;
    min-height: 48px;
    padding: 0 6px;
  }

  .explore-side-menu nav {
    padding: 6px 5px;
  }

  .explore-side-menu nav button {
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 6px;
    min-height: 36px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.1;
  }

  .explore-menu-icon {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .explore-menu-label {
    font-size: 11px;
  }
}

@media (min-width: 721px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

body.is-explore-menu-available .results-view[data-active-tab="explore"] .explore-results-layout,
body.is-explore-menu-open .results-view[data-active-tab="explore"] .explore-results-layout {
  width: calc(100vw - var(--explore-menu-rail-width));
  max-width: calc(100vw - var(--explore-menu-rail-width));
  margin-left: 0;
  margin-right: 0;
}

@supports (width: 100dvw) {
  body.is-explore-menu-available .results-view[data-active-tab="explore"] .explore-results-layout,
  body.is-explore-menu-open .results-view[data-active-tab="explore"] .explore-results-layout {
    width: calc(100dvw - var(--explore-menu-rail-width));
    max-width: calc(100dvw - var(--explore-menu-rail-width));
  }
}

/* Internal admin link for DB setup; remove before public landing */
.auth-actions .admin-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 1px dashed #b8c4d4;
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.auth-actions .admin-page-button:hover,
.auth-actions .admin-page-button:focus-visible {
  border-color: #98a8bb;
  background: #eef2f7;
  color: #1d2939;
  outline: none;
}

@media (max-width: 980px) {
  .auth-actions .admin-page-button {
    display: none;
  }
}

/* Corporate footer */
.footer {
  width: 100%;
  margin: clamp(34px, 5vw, 60px) 0 0;
  border-top: 1px solid #d9e1ea;
  background: #f5f7fa;
  color: #6b7583;
  padding: 0;
}

.footer.is-hidden {
  display: none;
}

.footer .footer-inner {
  display: grid;
  gap: 0;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 28px;
}

.footer .footer-head {
  display: grid;
  gap: 18px;
  align-items: start;
  justify-content: stretch;
  min-width: 0;
  padding: 0 0 18px;
}

.footer-logo {
  display: block;
  flex: 0 0 auto;
  color: #1a2433;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.footer-policy {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 20px;
  min-width: 0;
}

.footer-policy a {
  color: #4e5968;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.footer-policy a:hover,
.footer-policy a:focus-visible {
  color: #0b8fcf;
  outline: 0;
}

.footer .footer-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0 20px;
}

.footer .footer-company,
.footer .footer-notice {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.footer-company p,
.footer-notice p,
.footer-foot span {
  margin: 0;
  color: #6f7b89;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.78;
  letter-spacing: 0;
  word-break: keep-all;
}

.footer-notice {
  max-width: 820px;
  border-left: 0;
  padding-top: 2px;
}

.footer .footer-foot {
  padding-top: 2px;
}

@media (max-width: 860px) {
  .footer {
    margin-top: 34px;
  }

  .footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 0;
    width: min(100% - 28px, 640px);
    padding: 28px 0 26px;
  }

  .footer .footer-head {
    display: grid;
    justify-content: stretch;
    gap: 14px;
    padding-bottom: 16px;
  }

  .footer-policy {
    justify-content: start;
  }

  .footer .footer-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0 22px;
  }

  .footer .footer-notice {
    border: 0;
    padding: 0;
  }
}

@media (max-width: 430px) {
  .footer .footer-inner {
    width: calc(100% - 28px);
  }

  .footer-policy {
    gap: 9px 14px;
  }

  .footer-policy a,
  .footer-company p,
  .footer-notice p,
  .footer-foot span {
    font-size: 11.5px;
  }
}

/* PC diagnosis layout repair */
@media (min-width: 981px) {
  .home-view:not(.is-hidden) {
    width: min(1080px, calc(100vw - 88px));
    grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 560px);
    align-items: center;
    gap: clamp(42px, 5vw, 72px);
    padding: clamp(42px, 5vw, 64px) 0 26px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .home-copy {
    width: min(440px, 100%);
    display: grid;
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  .home-view:not(.is-hidden) .hero-kicker {
    justify-self: start;
    margin-bottom: 14px;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    max-width: 460px;
    margin: 0;
    color: #07111f;
    font-size: clamp(39px, 3.8vw, 52px);
    font-weight: 780;
    line-height: 1.1;
    white-space: normal;
    word-break: keep-all;
  }

  .home-view:not(.is-hidden) .hero-title-base,
  .home-view:not(.is-hidden) .hero-title-accent,
  .home-view:not(.is-hidden) .home-copy h2 span.hero-title-base,
  .home-view:not(.is-hidden) .home-copy h2 span.hero-title-accent {
    display: block;
  }

  .home-view:not(.is-hidden) .hero-title-accent {
    color: #07111f;
    white-space: nowrap;
  }

  .home-view:not(.is-hidden) .home-copy > span {
    justify-self: start;
    max-width: 430px;
    margin: 14px 0 0;
    color: #586b78;
    font-size: 16px;
    line-height: 1.48;
    text-align: left;
  }

  .home-view:not(.is-hidden) .home-panel {
    width: min(560px, 100%);
    justify-self: end;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    padding: 22px 30px 24px;
    box-shadow:
      0 22px 52px rgba(31, 70, 132, 0.09),
      0 2px 8px rgba(17, 24, 39, 0.03);
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-field,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 44px;
    padding: 0;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
    grid-column: auto;
    min-height: 44px;
    color: #5f6b80;
    font-size: 13.5px;
    font-weight: 760;
    line-height: 1.2;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    grid-column: auto;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
    min-height: 44px;
    height: 44px;
    border-radius: 11px;
    background: #f2f7fc;
    padding: 0 14px 0 16px;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
    height: 42px;
    font-size: 16px;
    line-height: 1;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
    font-size: 16px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    min-height: 44px;
    height: 44px;
    border-radius: 11px;
    background: #f2f7fc;
    padding: 0 13px;
    font-size: 13.5px;
    font-weight: 740;
    box-shadow: none;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
    justify-content: center;
    white-space: nowrap;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    width: 100%;
    min-width: 0;
    padding-right: 34px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
    min-height: 44px;
    height: 44px;
  }

  .home-view:not(.is-hidden) .home-panel .home-detail-toggle {
    height: 34px;
    min-height: 34px;
    grid-template-columns: 92px minmax(0, 1fr) 24px;
    color: #647083;
    font-size: 13.5px;
  }

  .home-view:not(.is-hidden) #showResultsButton {
    width: min(280px, 100%);
    height: 46px;
    min-height: 46px;
    border-radius: 13px;
    font-size: 15.5px;
  }
}

.home-view:not(.is-hidden) .hero-region-rotator {
  position: relative;
  display: inline-block;
  width: 2.15em;
  height: 1.08em;
  overflow: hidden;
  vertical-align: -0.08em;
  white-space: nowrap;
  color: #129be7;
}

.home-view:not(.is-hidden) .home-copy h2 span.hero-region-rotator {
  display: inline-block;
}

.home-view:not(.is-hidden) .hero-region-value {
  color: #129be7;
}

.home-view:not(.is-hidden) .hero-region-current,
.home-view:not(.is-hidden) .hero-region-next {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 1.08em;
  line-height: 1.08;
  will-change: transform;
}

.home-view:not(.is-hidden) .hero-region-next {
  transform: translateY(105%);
}

.home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-current {
  animation: heroRegionRollOut 360ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-next {
  animation: heroRegionRollIn 360ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heroRegionRollOut {
  to {
    transform: translateY(-105%);
  }
}

@keyframes heroRegionRollIn {
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-current,
  .home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-next {
    animation: none;
  }
}

/* Diagnosis final corrections */
.home-view:not(.is-hidden) .home-copy h2 span.hero-title-accent {
  color: #07111f;
}

.home-view:not(.is-hidden) .hero-region-rotator,
.home-view:not(.is-hidden) .hero-region-value {
  color: #129be7;
}

.home-view:not(.is-hidden) .location-selects,
.home-view:not(.is-hidden) .location-selects .select-wrap,
.home-view:not(.is-hidden) .location-selects select {
  min-width: 0;
  max-width: 100%;
}

.home-view:not(.is-hidden) .location-selects .select-wrap {
  width: 100%;
}

.home-view:not(.is-hidden) .location-selects select {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 981px) {
  .home-view:not(.is-hidden) .home-panel .home-detail-toggle {
    grid-template-columns: 92px minmax(0, 1fr) 24px;
  }
}

/* Diagnosis rollback baseline */
.home-view:not(.is-hidden) {
  width: min(680px, calc(100% - 44px));
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  justify-items: center;
  border: 0;
  background: transparent;
  padding: clamp(26px, 4.2vw, 44px) 0 18px;
  box-shadow: none;
}

.home-view:not(.is-hidden)::after {
  display: none;
}

.home-view:not(.is-hidden) .home-copy {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
}

.home-view:not(.is-hidden) .hero-kicker {
  justify-self: center;
  margin: 0 0 12px;
}

.home-view:not(.is-hidden) .home-copy h2 {
  max-width: 680px;
  margin: 0 auto;
  color: #07111f;
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}

.home-view:not(.is-hidden) .home-copy h2 > span.hero-title-base,
.home-view:not(.is-hidden) .home-copy h2 > span.hero-title-accent {
  display: block;
}

.home-view:not(.is-hidden) .home-copy h2 > span.hero-title-accent {
  color: #07111f;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-region-rotator,
.home-view:not(.is-hidden) .hero-region-value {
  color: #129be7;
}

.home-view:not(.is-hidden) .home-copy > span {
  max-width: 430px;
  margin: 12px auto 0;
  color: #586b78;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.42;
  text-align: center;
  word-break: keep-all;
}

.home-view:not(.is-hidden) .home-panel {
  grid-column: 1 / -1;
  width: min(600px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  padding: 20px 28px 22px;
  box-shadow:
    0 22px 52px rgba(31, 70, 132, 0.08),
    0 2px 8px rgba(17, 24, 39, 0.025);
}

.home-view:not(.is-hidden) .home-mode-panel.active,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
  width: 100%;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
  grid-column: auto;
  min-height: 44px;
  color: #5f6b80;
  font-size: 13.5px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
  grid-column: auto;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border-radius: 11px;
  background: #f2f7fc;
  padding: 0 14px 0 16px;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
  height: 42px;
  font-size: 16px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
  font-size: 16px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  border-radius: 11px;
  background-color: #f2f7fc;
  padding: 0 13px;
  font-size: 13.5px;
  font-weight: 740;
  line-height: 1.12;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label {
  justify-content: center;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap {
  width: 100%;
  min-width: 0;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  padding-right: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
  width: 100%;
  height: 34px;
  min-height: 34px;
  grid-template-columns: 88px minmax(0, 1fr) 24px;
  color: #647083;
  font-size: 13.5px;
}

.home-view:not(.is-hidden) #showResultsButton {
  width: min(280px, 100%);
  height: 46px;
  min-height: 46px;
  justify-self: center;
  border-radius: 13px;
  font-size: 15.5px;
}

.footer .footer-inner {
  width: min(1120px, calc(100% - 28px));
  padding: 28px 0 26px;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    width: 100%;
    gap: 14px;
    padding: 18px 16px;
  }

  .home-view:not(.is-hidden) .home-copy h2 {
    font-size: clamp(27px, 7vw, 32px);
    line-height: 1.14;
  }

  .home-view:not(.is-hidden) .home-panel {
    width: 100%;
    padding: 14px 16px 16px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-field,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects {
    gap: 7px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select {
  padding-inline: 10px;
    font-size: 12.5px;
  }
}

/* Apartment explore: lighter spreadsheet header tone */
.results-view[data-active-tab="explore"] .sheet-shell thead th,
.sticky-sheet-header thead th {
  border-right-color: rgba(171, 211, 255, 0.56);
  border-bottom-color: #2f7fd1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0.02) 47%),
    linear-gradient(180deg, #2d8ff0 0%, #237edf 49%, #1a70d2 50%, #115db8 100%);
  text-shadow: 0 1px 0 rgba(0, 45, 112, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(18, 85, 172, 0.28),
    inset 0 -10px 18px rgba(32, 119, 213, 0.12),
    0 1px 0 rgba(28, 101, 188, 0.16),
    0 8px 18px rgba(39, 121, 214, 0.1);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th:focus-visible,
.sticky-sheet-header thead th:hover,
.sticky-sheet-header thead th:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.14) 46%, rgba(255, 255, 255, 0.03) 47%),
    linear-gradient(180deg, #3b9af5 0%, #2b88e8 49%, #217add 50%, #1767c7 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(18, 85, 172, 0.3),
    inset 0 -10px 18px rgba(32, 119, 213, 0.14),
    0 10px 22px rgba(39, 121, 214, 0.14);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted,
.sticky-sheet-header thead th.is-sorted {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 44%, rgba(255, 255, 255, 0.02) 45%),
    linear-gradient(180deg, #237edf 0%, #1b70cf 49%, #1464c0 50%, #0d52a3 100%);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column,
.sticky-sheet-header thead th.favorite-column {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.1) 46%, rgba(255, 255, 255, 0.02) 47%),
    linear-gradient(180deg, #267fdc 0%, #1c6dc4 49%, #165fb4 50%, #0d4d98 100%);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted .sort-indicator,
.sticky-sheet-header thead th.is-sorted .sort-indicator {
  color: #1762bf;
}

/* Landing hero region roll + clean native select arrows */
.home-view:not(.is-hidden) .hero-region-rotator {
  position: relative;
  display: inline-grid;
  grid-template-areas: "region";
  width: max-content;
  min-width: 0;
  height: 1.08em;
  overflow: hidden;
  vertical-align: -0.08em;
  white-space: nowrap;
  color: #129be7;
}

.home-view:not(.is-hidden) .home-copy h2 span.hero-region-rotator {
  display: inline-grid;
}

.home-view:not(.is-hidden) .hero-region-value,
.home-view:not(.is-hidden) .hero-region-current,
.home-view:not(.is-hidden) .hero-region-next {
  grid-area: region;
  position: relative;
  left: auto;
  top: auto;
  display: block;
  width: max-content;
  height: 1.08em;
  line-height: 1.08;
  color: #129be7;
  will-change: transform;
}

.home-view:not(.is-hidden) .hero-region-current {
  transform: translateY(0);
}

.home-view:not(.is-hidden) .hero-region-next {
  transform: translateY(105%);
}

.home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-current {
  animation: heroRegionRollOut 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-view:not(.is-hidden) .hero-region-rotator.is-rolling .hero-region-next {
  animation: heroRegionRollIn 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap {
  position: relative;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap::after {
  content: "";
  display: block;
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #6b7788;
  border-bottom: 1.5px solid #6b7788;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .select-wrap:has(select:disabled)::after {
  border-color: #aeb9c7;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects select:disabled {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  padding-right: 34px;
}

/* Apartment explore: compact header filter controls */
.results-view[data-active-tab="explore"] .sheet-shell thead th,
.sticky-sheet-header thead th {
  height: 52px;
  padding: 4px 5px;
  font-size: 11.8px;
  font-weight: 760;
  line-height: 1.12;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-location,
.sticky-sheet-header thead th.column-group-location {
  --sheet-head-top: #3f82c6;
  --sheet-head-mid: #2f72b7;
  --sheet-head-low: #2567ad;
  --sheet-head-bottom: #1b5593;
  --sheet-head-line: rgba(199, 224, 255, 0.5);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-identity,
.sticky-sheet-header thead th.column-group-identity {
  --sheet-head-top: #347dd2;
  --sheet-head-mid: #286fc4;
  --sheet-head-low: #1f63b7;
  --sheet-head-bottom: #154f99;
  --sheet-head-line: rgba(190, 220, 255, 0.5);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-price,
.sticky-sheet-header thead th.column-group-price {
  --sheet-head-top: #2d8ff0;
  --sheet-head-mid: #237edf;
  --sheet-head-low: #1a70d2;
  --sheet-head-bottom: #115db8;
  --sheet-head-line: rgba(188, 223, 255, 0.54);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-gap,
.sticky-sheet-header thead th.column-group-gap {
  --sheet-head-top: #1e9fc0;
  --sheet-head-mid: #168aab;
  --sheet-head-low: #117d9f;
  --sheet-head-bottom: #0b6686;
  --sheet-head-line: rgba(192, 239, 248, 0.52);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-upside,
.sticky-sheet-header thead th.column-group-upside {
  --sheet-head-top: #25a172;
  --sheet-head-mid: #1b8d64;
  --sheet-head-low: #147e58;
  --sheet-head-bottom: #0d6949;
  --sheet-head-line: rgba(199, 239, 219, 0.5);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-risk,
.sticky-sheet-header thead th.column-group-risk {
  --sheet-head-top: #cf735b;
  --sheet-head-mid: #bd604d;
  --sheet-head-low: #a94f41;
  --sheet-head-bottom: #8f3f35;
  --sheet-head-line: rgba(255, 220, 204, 0.52);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.column-group-quality,
.sticky-sheet-header thead th.column-group-quality {
  --sheet-head-top: #6c809d;
  --sheet-head-mid: #5b7190;
  --sheet-head-low: #4e6484;
  --sheet-head-bottom: #3d5474;
  --sheet-head-line: rgba(218, 229, 244, 0.45);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th[class*="column-group-"],
.sticky-sheet-header thead th[class*="column-group-"] {
  border-right-color: var(--sheet-head-line);
  border-bottom-color: rgba(10, 62, 119, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0.02) 47%),
    linear-gradient(180deg, var(--sheet-head-top) 0%, var(--sheet-head-mid) 49%, var(--sheet-head-low) 50%, var(--sheet-head-bottom) 100%);
  text-shadow: 0 1px 0 rgba(0, 25, 78, 0.24);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted,
.sticky-sheet-header thead th.is-sorted {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(18, 85, 172, 0.26),
    0 8px 18px rgba(16, 61, 124, 0.12);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-header-content,
.sticky-sheet-header thead th .column-header-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label,
.sticky-sheet-header thead th .filter-label {
  display: inline-flex;
  max-width: calc(100% - 22px);
  min-height: 0;
  margin: 0;
  overflow: visible;
  color: inherit;
  line-height: 1.12;
  text-align: center;
  text-wrap: nowrap;
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-indicator,
.sticky-sheet-header thead th .sort-indicator {
  display: none;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-top: 0;
  margin-left: 3px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  padding: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-icon,
.sticky-sheet-header thead th .column-filter-icon {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-icon::before,
.sticky-sheet-header thead th .column-filter-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 9px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 62% 46%, 62% 100%, 38% 100%, 38% 46%);
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button:focus-visible,
.sticky-sheet-header thead th .column-filter-button:hover,
.sticky-sheet-header thead th .column-filter-button:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.has-column-filter .column-filter-button,
.sticky-sheet-header thead th.has-column-filter .column-filter-button {
  background: #ffffff;
  color: #1762bf;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.has-column-filter,
.sticky-sheet-header thead th.has-column-filter {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(18, 85, 172, 0.28),
    inset 0 -10px 18px rgba(32, 119, 213, 0.12),
    0 1px 0 rgba(28, 101, 188, 0.16),
    0 8px 18px rgba(39, 121, 214, 0.1);
}

.column-filter-popover {
  position: fixed;
  z-index: 80;
  display: none;
  width: 304px;
  border: 1px solid #c9d9ec;
  border-radius: 8px;
  background: #ffffff;
  color: #17243a;
  box-shadow: 0 18px 42px rgba(18, 45, 82, 0.18);
}

.column-filter-popover.is-open {
  display: block;
}

.column-filter-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.column-filter-form header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.column-filter-form header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-form header span {
  flex: 0 0 auto;
  color: #68778c;
  font-size: 12px;
  font-weight: 700;
}

.column-filter-options {
  display: grid;
  gap: 4px;
  max-height: 216px;
  overflow: auto;
  padding-right: 2px;
}

.column-filter-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #26374d;
  font-size: 13px;
  font-weight: 650;
}

.column-filter-option:hover {
  background: #f2f7fc;
}

.column-filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.column-filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-text,
.column-filter-range label {
  display: grid;
  gap: 6px;
  color: #657386;
  font-size: 12px;
  font-weight: 750;
}

.column-filter-text input,
.column-filter-range input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid #cbd8e7;
  border-radius: 7px;
  background: #ffffff;
  color: #17243a;
  font-size: 13px;
  font-weight: 650;
  padding: 0 10px;
}

.column-filter-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.column-filter-hint,
.column-filter-empty {
  margin: 0;
  color: #718197;
  font-size: 12px;
  font-weight: 650;
}

.column-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.column-filter-actions button {
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

.column-filter-reset {
  border: 1px solid #cbd8e7;
  background: #ffffff;
  color: #4e5f75;
}

.column-filter-apply {
  border: 1px solid #2c7dd2;
  background: #2f86dd;
  color: #ffffff;
}

@media (max-width: 720px) {
  .column-filter-popover {
    width: calc(100vw - 16px) !important;
  }
}

/* Card view: restore apartment image as full-width card media */
.result-panel[data-view-panel="cards"].active .result-card {
  padding: 0;
  overflow: hidden;
}

.result-panel[data-view-panel="cards"].active .card-photo {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background:
    linear-gradient(180deg, rgba(6, 21, 42, 0) 42%, rgba(6, 21, 42, 0.34) 100%),
    url("./assets/apartment-card-mockup.png") center / cover no-repeat;
}

.result-panel[data-view-panel="cards"].active .card-photo::after {
  display: none;
}

.result-panel[data-view-panel="cards"].active .card-photo-badge {
  left: auto;
  right: 12px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #12345c;
}

@media (max-width: 720px) {
  .result-panel[data-view-panel="cards"].active .card-photo {
    aspect-ratio: 16 / 9;
  }
}

/* Results page: filter card above, menu card left, data card right */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  width: min(1184px, calc(100% - 32px));
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(124px, 0.78fr)
    minmax(132px, 0.74fr)
    minmax(152px, 0.9fr)
    minmax(142px, 0.84fr)
    minmax(104px, auto)
    minmax(104px, auto);
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  width: min(1184px, calc(100% - 32px));
  max-width: min(1184px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.results-view[data-active-tab="explore"] .result-menu-card {
  min-width: 0;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(22, 43, 77, 0.05);
}

.results-view[data-active-tab="explore"] .result-menu-card-header {
  display: grid;
  gap: 3px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid #edf2f7;
}

.results-view[data-active-tab="explore"] .result-menu-card-header span {
  color: #7a8798;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .result-menu-card-header strong {
  color: #16243a;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tabs {
  display: grid;
  width: 100%;
  margin-top: 10px;
  gap: 6px;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab,
.results-view[data-active-tab="explore"] .result-menu-card .result-tab[data-result-view="map"] {
  width: 100%;
  min-height: 48px;
  height: auto;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f7fafc;
  color: #415168;
  padding: 8px 10px;
  text-align: left;
  text-wrap: nowrap;
  white-space: nowrap;
  word-break: normal;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab span {
  color: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab small {
  color: #8793a5;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab:hover {
  border-color: #d4e0ee;
  background: #f2f6fb;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab.active {
  border-color: #b9d3f4;
  background: #eaf3ff;
  color: #145bb5;
  box-shadow: inset 3px 0 0 #2f7ed8 !important;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-tab.active small {
  color: #4773a7;
}

.results-view[data-active-tab="explore"] .result-menu-card .result-status {
  min-height: 0;
  display: flex;
  margin-top: 12px;
  border: 1px solid #e4ecf5;
  border-radius: 7px;
  background: #fbfdff;
  color: #5f6e82;
  padding: 10px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-data-card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(22, 43, 77, 0.05);
}

.results-view[data-active-tab="explore"] .result-data-card .result-panel[data-view-panel="table"].active,
.results-view[data-active-tab="explore"] .result-data-card .result-panel[data-view-panel="cards"].active,
.results-view[data-active-tab="explore"] .result-data-card .result-panel[data-view-panel="map"].active {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .card-view-heading,
.results-view[data-active-tab="explore"] .result-data-card .map-placeholder {
  border-radius: 0;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 22px;
  }

  .results-view[data-active-tab="explore"] .result-menu-card {
    padding: 10px;
  }

  .results-view[data-active-tab="explore"] .result-menu-card-header {
    padding-bottom: 9px;
  }

  .results-view[data-active-tab="explore"] .result-menu-card .result-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .result-menu-card .result-tab {
    min-height: 46px;
    padding: 8px;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: calc(100% - 20px);
  }

  .results-view[data-active-tab="explore"] .result-menu-card .result-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Home hero: single-label region roll to prevent double text during transitions. */
.home-view:not(.is-hidden) .hero-title-accent .hero-region-rotator.is-rolling-out .hero-region-value {
  animation: heroRegionSingleRollOut 180ms cubic-bezier(0.4, 0, 1, 1) both !important;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-rotator.is-rolling-in .hero-region-value {
  animation: heroRegionSingleRollIn 240ms cubic-bezier(0, 0, 0.2, 1) both !important;
}

@keyframes heroRegionSingleRollOut {
  from { transform: translateY(0); }
  to { transform: translateY(-110%); }
}

@keyframes heroRegionSingleRollIn {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}

@media (max-width: 320px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Results table: light enterprise spreadsheet treatment */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  width: min(1490px, calc(100% - 32px));
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  width: min(1490px, calc(100% - 32px));
  max-width: min(1490px, calc(100% - 32px));
  grid-template-columns: minmax(210px, 232px) minmax(0, 1fr);
  gap: 12px;
}

.results-view[data-active-tab="explore"] .result-data-card {
  border-color: #dce6f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 54, 96, 0.05);
}

.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  display: block;
  background: #ffffff;
}

.excel-analysis-strip {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8f3;
  background: #ffffff;
}

.excel-analysis-label {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.excel-analysis-label strong {
  color: #14233a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.excel-analysis-label span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.excel-analysis-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  border: 1px solid #dce6f2;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbff;
}

.excel-analysis-tabs,
.excel-state-pills {
  scrollbar-width: none;
}

.excel-analysis-tabs::-webkit-scrollbar,
.excel-state-pills::-webkit-scrollbar {
  display: none;
}

.excel-analysis-tab {
  min-width: 0;
  min-height: 56px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  border: 0;
  border-right: 1px solid #dce6f2;
  border-radius: 0;
  background: #ffffff;
  color: #17243a;
  padding: 9px 12px;
  text-align: left;
  box-shadow: none !important;
}

.excel-analysis-tab:last-child {
  border-right: 0;
}

.excel-analysis-tab span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-analysis-tab small {
  overflow: hidden;
  max-width: 100%;
  color: #7c8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-analysis-tab:hover {
  background: #f6f9ff;
}

.excel-analysis-tab.active {
  background: #1262e3;
  color: #ffffff;
}

.excel-analysis-tab.active small {
  color: rgba(255, 255, 255, 0.82);
}

.excel-state-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8f3;
  background: #fbfdff;
}

.excel-state-label {
  color: #17243a;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.excel-state-pills {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.excel-state-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce6f2;
  border-radius: 7px;
  background: #ffffff;
  color: #526176;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.excel-state-pill strong {
  color: #1262e3;
  font-size: 12px;
  font-weight: 850;
}

.excel-state-pill.active {
  border-color: #a9c9f4;
  background: #eef6ff;
  color: #1258c8;
}

.excel-table-tools {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.excel-table-tools button {
  height: 32px;
  border: 1px solid #d4dfed;
  border-radius: 7px;
  background: #ffffff;
  color: #43536b;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 780;
  box-shadow: none !important;
}

.excel-table-tools button:hover {
  border-color: #b8cbe4;
  background: #f7faff;
  color: #115ccf;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  border-top: 0;
  background: #ffffff;
  max-height: clamp(360px, calc(100vh - 390px), 640px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@supports (height: 100dvh) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: clamp(360px, calc(100dvh - 390px), 640px);
  }
}

.results-view[data-active-tab="explore"] .sheet-shell table {
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th,
.sticky-sheet-header thead th,
.results-view[data-active-tab="explore"] .sheet-shell thead th[class*="column-group-"],
.sticky-sheet-header thead th[class*="column-group-"] {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 48px;
  border-right: 1px solid #dfe8f3;
  border-bottom: 1px solid #ccd9e8;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  color: #16243a;
  padding: 5px 6px;
  font-size: 11.6px;
  font-weight: 760;
  line-height: 1.14;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th:focus-visible,
.sticky-sheet-header thead th:hover,
.sticky-sheet-header thead th:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  color: #115ccf;
  outline: 0;
  box-shadow: inset 0 0 0 1px #bcd5f6;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted,
.sticky-sheet-header thead th.is-sorted {
  background: linear-gradient(180deg, #e9f3ff 0%, #dcecff 100%);
  color: #0f58c7;
  box-shadow: inset 0 -2px 0 #1262e3;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column,
.sticky-sheet-header thead th.favorite-column {
  z-index: 5;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  color: #6b778a;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-header-content,
.sticky-sheet-header thead th .column-header-content {
  gap: 5px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label,
.sticky-sheet-header thead th .filter-label {
  color: inherit;
  font-weight: inherit;
  line-height: 1.14;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  border: 1px solid #c9d6e7;
  background: #ffffff;
  color: #6f7d91;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button:focus-visible,
.sticky-sheet-header thead th .column-filter-button:hover,
.sticky-sheet-header thead th .column-filter-button:focus-visible {
  border-color: #94b7e8;
  background: #eef6ff;
  color: #1262e3;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.has-column-filter .column-filter-button,
.sticky-sheet-header thead th.has-column-filter .column-filter-button {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody td {
  height: 50px;
  border-right: 1px solid #e3ebf5;
  border-bottom: 1px solid #e3ebf5;
  background: #ffffff;
  color: #18263c;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:hover td,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.has-deal-history:hover td {
  background: #edf6ff;
}

.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell {
  background: inherit;
}

.results-view[data-active-tab="explore"] .sheet-shell td.name-cell {
  color: #132039;
  font-weight: 820;
}

.results-view[data-active-tab="explore"] .sheet-shell td.money,
.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell {
  color: #132039;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.positive {
  font-weight: 850;
}

.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell {
  color: #1262e3;
}

.results-view[data-active-tab="explore"] .sheet-shell td.positive {
  color: #0a9f69;
}

.results-view[data-active-tab="explore"] .sheet-shell td.risk {
  color: #d45545;
  font-weight: 820;
}

td.peak-comparison-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.peak-comparison-cell {
  font-weight: 850;
  letter-spacing: -0.01em;
}

td.peak-comparison-cell.is-up,
.results-view[data-active-tab="explore"] .sheet-shell td.peak-comparison-cell.is-up {
  color: #d45545;
}

td.peak-comparison-cell.is-down,
.results-view[data-active-tab="explore"] .sheet-shell td.peak-comparison-cell.is-down {
  color: #1262e3;
}

td.peak-comparison-cell.is-flat,
.results-view[data-active-tab="explore"] .sheet-shell td.peak-comparison-cell.is-flat {
  color: #7b8798;
}

.results-view[data-active-tab="explore"] .favorite-toggle {
  color: #b4c0cf;
}

.results-view[data-active-tab="explore"] .favorite-toggle:hover,
.results-view[data-active-tab="explore"] .favorite-toggle.is-active {
  background: #fff7de;
  color: #f3b200;
}

.results-view[data-active-tab="explore"] .deal-history-toggle {
  color: inherit;
}

.results-view[data-active-tab="explore"] .table-paywall {
  display: block;
  border-top: 1px solid #dfe8f3;
  background: #fbfdff;
  color: #617188;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
    grid-template-columns: minmax(0, 1fr);
  }

  .excel-analysis-strip,
  .excel-state-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .excel-analysis-tabs {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .excel-analysis-tab {
    min-width: 136px;
  }

  .excel-table-tools {
    justify-content: flex-start;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: min(54vh, 460px);
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
      max-height: min(54dvh, 460px);
    }
  }
}

@media (max-width: 560px) {
  .excel-analysis-strip,
  .excel-state-strip {
    padding: 9px 10px;
  }

  .excel-state-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .excel-state-pill {
    flex: 0 0 auto;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: min(48vh, 390px);
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
      max-height: min(48dvh, 390px);
    }
  }
}

/* Reference Excel work surface: full-width table, bounded scroll, compare drawer */
.results-view[data-active-tab="explore"]:not(.is-previewing) {
  background: #f6f9fd;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-diagnosis-strip {
  display: none;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  width: min(1490px, calc(100% - 32px));
  max-width: min(1490px, calc(100% - 32px));
  margin: 12px auto 10px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(19, 43, 75, 0.04);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(130px, 0.8fr)
    minmax(160px, 0.9fr)
    minmax(170px, 1fr)
    minmax(230px, 1.35fr)
    minmax(112px, auto)
    minmax(128px, auto)
    minmax(104px, auto)
    minmax(142px, auto);
  gap: 0;
  padding: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 70px;
  border-right: 1px solid #e1e9f3;
  border-radius: 0;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:first-child {
  border-radius: 8px 0 0 8px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button:last-child {
  border-right: 0;
  border-radius: 0 8px 8px 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
  background: #1262e3;
  color: #ffffff;
  font-weight: 760;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .excel-toolbar-secondary,
.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
  background: #ffffff;
  color: #243247;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .excel-toolbar-secondary:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton:hover {
  background: #f6faff;
  color: #115ccf;
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  width: min(1490px, calc(100% - 32px)) !important;
  max-width: min(1490px, calc(100% - 32px)) !important;
  margin: 0 auto 28px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.results-view[data-active-tab="explore"] .result-data-card {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 45, 78, 0.055);
}

.results-view[data-active-tab="explore"] .excel-hidden-view-tabs,
.results-view[data-active-tab="explore"] .excel-result-status {
  display: none !important;
}

.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-analysis-strip {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8f3;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-analysis-label {
  align-content: center;
  min-width: 0;
  padding-left: 8px;
}

.results-view[data-active-tab="explore"] .excel-analysis-label strong {
  color: #14233a;
  font-size: 14px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-analysis-label span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .excel-analysis-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  min-width: 0;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbff;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
  border: 0;
  border-right: 1px solid #dce6f2;
  border-radius: 0;
  background: #ffffff;
  color: #17243a;
  padding: 9px 13px;
  text-align: left;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab:last-child {
  border-right: 0;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab span,
.results-view[data-active-tab="explore"] .excel-analysis-tab small {
  overflow: visible;
  max-width: 100%;
  text-overflow: clip;
  white-space: normal;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab span {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.18;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab small {
  color: #6f7d91;
  font-size: 11.3px;
  font-weight: 560;
  line-height: 1.22;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab:hover {
  background: #f6f9ff;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab.active {
  background: #1262e3;
  color: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab.active small {
  color: rgba(255, 255, 255, 0.84);
}

.results-view[data-active-tab="explore"] .excel-state-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8f3;
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .excel-state-label {
  padding-left: 8px;
  color: #17243a;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .excel-state-pills {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.results-view[data-active-tab="explore"] .excel-state-pill {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dce6f2;
  border-radius: 7px;
  background: #ffffff;
  color: #526176;
  padding: 0 13px;
  font-size: 12.2px;
  font-weight: 650;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .excel-state-pill strong {
  color: #1262e3;
  font-size: 12.4px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-state-pill.active {
  border-color: #9fc4f5;
  background: #eef6ff;
  color: #1258c8;
}

.results-view[data-active-tab="explore"] .excel-table-tools {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.results-view[data-active-tab="explore"] .excel-table-tools button {
  height: 32px;
  border: 1px solid #d4dfed;
  border-radius: 7px;
  background: #ffffff;
  color: #43536b;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  width: 100%;
  max-width: 100%;
  max-height: clamp(430px, calc(100vh - 450px), 640px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

@supports (height: 100dvh) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: clamp(430px, calc(100dvh - 450px), 640px);
  }
}

.results-view[data-active-tab="explore"] .sheet-shell table {
  min-width: 2320px;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  table-layout: fixed;
}

.results-view[data-active-tab="explore"] .sheet-shell th,
.results-view[data-active-tab="explore"] .sheet-shell td {
  box-sizing: border-box;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th,
.sticky-sheet-header thead th,
.results-view[data-active-tab="explore"] .sheet-shell thead th[class*="column-group-"],
.sticky-sheet-header thead th[class*="column-group-"] {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 50px;
  min-height: 50px;
  border-right: 1px solid #dfe8f3;
  border-bottom: 1px solid #ccd9e8;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  color: #16243a;
  padding: 6px 7px;
  font-size: 12.4px;
  font-weight: 680;
  line-height: 1.18;
  text-align: center;
  white-space: nowrap;
  text-shadow: none;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-header-content,
.sticky-sheet-header thead th .column-header-content {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label,
.sticky-sheet-header thead th .filter-label {
  overflow: visible;
  color: inherit;
  font-weight: inherit;
  line-height: 1.18;
  text-overflow: clip;
  text-wrap: nowrap;
  white-space: nowrap;
  word-break: normal;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-indicator,
.sticky-sheet-header thead th .sort-indicator {
  color: #93a1b4;
  font-size: 12px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-left: 1px;
  border: 1px solid #c9d6e7;
  border-radius: 4px;
  background: #ffffff;
  color: #6f7d91;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th:hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th:focus-visible,
.sticky-sheet-header thead th:hover,
.sticky-sheet-header thead th:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  color: #115ccf;
  outline: 0;
  box-shadow: inset 0 0 0 1px #bcd5f6;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted,
.sticky-sheet-header thead th.is-sorted {
  background: linear-gradient(180deg, #e9f3ff 0%, #dcecff 100%);
  color: #0f58c7;
  box-shadow: inset 0 -2px 0 #1262e3;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.rank-column,
.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.rank-cell {
  position: sticky;
  background: inherit;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column,
.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell {
  left: 0;
  z-index: 8;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.rank-column,
.results-view[data-active-tab="explore"] .sheet-shell td.rank-cell {
  left: 42px;
  z-index: 8;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.favorite-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.rank-column {
  z-index: 12;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
}

.results-view[data-active-tab="explore"] .sheet-shell .city-column,
.results-view[data-active-tab="explore"] .sheet-shell .district-column,
.results-view[data-active-tab="explore"] .sheet-shell .dong-column {
  width: 96px;
  min-width: 96px;
}

.results-view[data-active-tab="explore"] .sheet-shell .name-column,
.results-view[data-active-tab="explore"] .sheet-shell .name-cell {
  width: 156px;
  min-width: 156px;
  text-align: left;
}

.results-view[data-active-tab="explore"] .sheet-shell .size-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonseRatio-column {
  width: 88px;
  min-width: 88px;
}

.results-view[data-active-tab="explore"] .sheet-shell .salePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonsePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell .investment-column,
.results-view[data-active-tab="explore"] .sheet-shell .salePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell .saleRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonsePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonseRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell .dualRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell .saleLow-column,
.results-view[data-active-tab="explore"] .sheet-shell .saleRisk-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonseLow-column,
.results-view[data-active-tab="explore"] .sheet-shell .jeonseRisk-column {
  width: 104px;
  min-width: 104px;
}

.results-view[data-active-tab="explore"] .sheet-shell .traffic-column,
.results-view[data-active-tab="explore"] .sheet-shell .environment-column,
.results-view[data-active-tab="explore"] .sheet-shell .schoolDistrict-column,
.results-view[data-active-tab="explore"] .sheet-shell .age-column {
  width: 82px;
  min-width: 82px;
}

.results-view[data-active-tab="explore"] .sheet-shell .elementaryDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell .households-column,
.results-view[data-active-tab="explore"] .sheet-shell .saleDealDate-column {
  width: 108px;
  min-width: 108px;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody td {
  height: 50px;
  border-right: 1px solid #e3ebf5;
  border-bottom: 1px solid #e3ebf5;
  background: #ffffff;
  color: #18263c;
  padding: 8px 9px;
  font-size: 12.5px;
  font-weight: 610;
  line-height: 1.35;
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:hover td,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.has-deal-history:hover td {
  background: #edf6ff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr td.rank-cell {
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:nth-child(even) td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr:nth-child(even) td.rank-cell {
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr:hover td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr:hover td.rank-cell {
  background: #edf6ff;
}

.results-view[data-active-tab="explore"] .sheet-shell td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.rank-cell {
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.results-view[data-active-tab="explore"] .sheet-shell td.rank-cell {
  color: #18263c;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .sheet-shell td.name-cell {
  color: #132039;
  font-weight: 740;
}

.results-view[data-active-tab="explore"] .sheet-shell td.money,
.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell {
  color: #132039;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .sheet-shell td.investment-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.positive {
  color: #1262e3;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .sheet-shell td.positive {
  color: #0a9f69;
}

.results-view[data-active-tab="explore"] .sheet-shell td.risk {
  color: #d45545;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row td {
  height: 30px;
  border-bottom-color: #e7eef8;
  background: #f7fbff;
  color: #526176;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.15;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row td.rank-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row:hover td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row:hover td.rank-cell {
  background: #f7fbff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row:hover td {
  background: #eef6ff;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-state-row td {
  color: #66768b;
  font-weight: 760;
  text-align: left;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-state-row.is-error td {
  color: #c0473b;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row td.name-cell {
  color: #334155;
  font-weight: 760;
  text-align: left;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row td.money {
  color: #526176;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-sale td.deal-history-salePrice-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-sale td.deal-history-investment-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-sale td.positive {
  color: #0b5fce;
  font-weight: 850;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-sale td.risk {
  color: #d45545;
  font-weight: 780;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row td {
  height: 30px;
  border-bottom-color: #dbe6f4;
  background: #f2f6fb;
  padding: 3px 12px;
  text-align: right;
}

.results-view[data-active-tab="explore"] .favorite-toggle {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #b4c0cf;
  font-size: 18px;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .favorite-toggle:hover,
.results-view[data-active-tab="explore"] .favorite-toggle.is-active {
  background: #fff7de;
  color: #f3b200;
}

.results-view[data-active-tab="explore"] .table-paywall {
  display: block;
  border-top: 1px solid #dfe8f3;
  background: #fbfdff;
  color: #617188;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .excel-selection-bar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(480px, 0.9fr);
  align-items: stretch;
  border-top: 1px solid #c77cff;
  border-bottom: 1px solid #c77cff;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-selection-main {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
}

.results-view[data-active-tab="explore"] .excel-selection-main strong {
  color: #1262e3;
  font-size: 13px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-selection-main span {
  color: #657386;
  font-size: 12px;
  font-weight: 560;
}

.results-view[data-active-tab="explore"] .excel-selection-main button {
  height: 34px;
  margin-left: auto;
  border: 1px solid #1262e3;
  border-radius: 6px;
  background: #1262e3;
  color: #ffffff;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-selection-main button:disabled {
  border-color: #d7e2ef;
  background: #f3f6fa;
  color: #9aa7b8;
}

.results-view[data-active-tab="explore"] .excel-selection-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-left: 1px solid #e3ebf5;
}

.results-view[data-active-tab="explore"] .excel-selection-metrics div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 8px 16px;
  border-right: 1px solid #e3ebf5;
}

.results-view[data-active-tab="explore"] .excel-selection-metrics div:last-child {
  border-right: 0;
}

.results-view[data-active-tab="explore"] .excel-selection-metrics dt {
  color: #6f7d91;
  font-size: 11px;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .excel-selection-metrics dd {
  margin: 0;
  color: #10294c;
  font-size: 14px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-risk-summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-risk-summary header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.results-view[data-active-tab="explore"] .excel-risk-summary header strong {
  color: #1262e3;
  font-size: 13px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-risk-summary header span {
  color: #657386;
  font-size: 12px;
  font-weight: 560;
}

.results-view[data-active-tab="explore"] .excel-risk-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.results-view[data-active-tab="explore"] .excel-risk-cards article {
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 10px;
  border: 1px solid #e1e9f3;
  border-radius: 7px;
  background: #fbfdff;
  padding: 12px;
}

.results-view[data-active-tab="explore"] .excel-risk-cards .risk-dot {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.results-view[data-active-tab="explore"] .excel-risk-cards .risk-dot.is-red {
  background: #f05267;
}

.results-view[data-active-tab="explore"] .excel-risk-cards .risk-dot.is-orange {
  background: #f59f1a;
}

.results-view[data-active-tab="explore"] .excel-risk-cards .risk-dot.is-blue {
  background: #2f7ed8;
}

.results-view[data-active-tab="explore"] .excel-risk-cards .risk-dot.is-green {
  background: #16a36a;
}

.results-view[data-active-tab="explore"] .excel-risk-cards strong {
  color: #17243a;
  font-size: 12.4px;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .excel-risk-cards span:last-child {
  color: #5f6e82;
  font-size: 12px;
  font-weight: 560;
}

.excel-compare-panel[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"] .excel-compare-panel {
  position: fixed;
  top: 114px;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(540px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid #cfdbea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(20, 45, 78, 0.16);
  overflow: hidden;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e9f3;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > header div {
  display: grid;
  gap: 2px;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > header strong {
  color: #17243a;
  font-size: 15px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > header span {
  color: #6f7d91;
  font-size: 12px;
  font-weight: 560;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > header button {
  width: 32px;
  height: 32px;
  border: 1px solid #d4dfed;
  border-radius: 6px;
  background: #ffffff;
  color: #6f7d91;
  font-size: 20px;
  line-height: 1;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-compare-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #e1e9f3;
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .excel-compare-cards article {
  min-height: 86px;
  display: grid;
  align-content: end;
  gap: 4px;
  border: 1px solid #d8e3f0;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(10, 31, 68, 0.74)),
    linear-gradient(135deg, #dde8f5, #f8fbff);
  padding: 12px;
}

.results-view[data-active-tab="explore"] .excel-compare-cards strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .excel-compare-cards span,
.results-view[data-active-tab="explore"] .excel-compare-cards small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 560;
}

.results-view[data-active-tab="explore"] .excel-compare-matrix {
  min-height: 0;
  overflow: auto;
}

.results-view[data-active-tab="explore"] .excel-compare-matrix table {
  width: 100%;
  border-collapse: collapse;
}

.results-view[data-active-tab="explore"] .excel-compare-matrix th,
.results-view[data-active-tab="explore"] .excel-compare-matrix td {
  border-bottom: 1px solid #e4ebf4;
  border-right: 1px solid #e4ebf4;
  padding: 10px 9px;
  color: #17243a;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.results-view[data-active-tab="explore"] .excel-compare-matrix th:first-child,
.results-view[data-active-tab="explore"] .excel-compare-matrix td:first-child {
  background: #f7faff;
  color: #1262e3;
  font-weight: 700;
  text-align: left;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #e1e9f3;
  background: #fbfdff;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > footer button {
  height: 34px;
  border: 1px solid #d4dfed;
  border-radius: 6px;
  background: #ffffff;
  color: #43536b;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-compare-panel > footer button:last-child {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    border-bottom: 1px solid #e1e9f3;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-tabs {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-tab {
    flex: 0 0 150px;
  }
}

@media (max-width: 900px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: min(100%, calc(100vw - 20px)) !important;
    max-width: min(100%, calc(100vw - 20px)) !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .excel-analysis-strip,
  .results-view[data-active-tab="explore"] .excel-state-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .results-view[data-active-tab="explore"] .excel-state-pills,
  .results-view[data-active-tab="explore"] .excel-table-tools {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: min(56vh, 500px);
  }

  .results-view[data-active-tab="explore"] .excel-selection-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view[data-active-tab="explore"] .excel-selection-metrics {
    border-top: 1px solid #e3ebf5;
    border-left: 0;
  }

  .results-view[data-active-tab="explore"] .excel-risk-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .excel-compare-panel {
    inset: 72px 10px 10px;
    width: auto;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    min-height: 60px;
    border-right: 0;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-strip,
  .results-view[data-active-tab="explore"] .excel-state-strip {
    padding: 9px 10px;
  }

  .results-view[data-active-tab="explore"] .excel-selection-main {
    display: grid;
    gap: 8px;
  }

  .results-view[data-active-tab="explore"] .excel-selection-main button {
    width: 100%;
    margin-left: 0;
  }

  .results-view[data-active-tab="explore"] .excel-selection-metrics,
  .results-view[data-active-tab="explore"] .excel-risk-cards,
  .results-view[data-active-tab="explore"] .excel-compare-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    max-height: min(50vh, 420px);
  }
}

/* Keep analysis tabs attached to the condition/filter surface */
.results-view[data-active-tab="explore"]:not(.is-previewing) {
  row-gap: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-bottom-color: #e6edf6;
  border-radius: 8px 8px 0 0;
}

.results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  position: sticky;
  top: var(--explore-analysis-top, 187px);
  z-index: 17;
  width: min(1490px, calc(100% - 32px));
  max-width: min(1490px, calc(100% - 32px));
  margin: 0 auto 10px !important;
  border: 1px solid #d7e2ef;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 22px rgba(20, 45, 78, 0.04);
}

body.is-explore-filter-docked .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  width: 100%;
  max-width: 100%;
  margin-right: 0 !important;
  margin-left: 0 !important;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.985);
  box-shadow:
    0 1px 0 rgba(223, 230, 239, 0.92),
    0 12px 24px rgba(31, 70, 132, 0.08);
}

.results-view[data-active-tab="explore"] .result-data-card .excel-state-strip {
  border-top: 0;
}

@media (max-width: 900px) {
  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
    margin-bottom: 10px;
  }
}

/* Keep the rolling home hero region visible across cached override layers */
.home-view:not(.is-hidden) .hero-title-accent .hero-region-rotator {
  position: relative;
  display: inline-grid !important;
  grid-template-areas: "region";
  width: max-content;
  min-width: 2em;
  height: 1.08em;
  overflow: hidden;
  color: #0b5ee8;
  filter: drop-shadow(0 8px 18px rgba(11, 94, 232, 0.12));
  vertical-align: -0.08em;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-value,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-current,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
  grid-area: region;
  display: block !important;
  width: max-content;
  min-width: 2em;
  height: 1.08em;
  background: linear-gradient(95deg, #0b5ee8 8%, #2587ff 46%, #14c8d8 92%);
  background-clip: text;
  color: #0b5ee8 !important;
  -webkit-background-clip: text;
  line-height: 1.08;
  opacity: 1;
  visibility: visible;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .home-view:not(.is-hidden) .hero-title-accent .hero-region-value,
  .home-view:not(.is-hidden) .hero-title-accent .hero-region-current,
  .home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
    color: transparent !important;
    -webkit-text-fill-color: transparent;
  }
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-value {
  position: relative;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-current,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
  position: absolute;
  top: 0;
  left: 0;
}

/* Apartment explore: compact condition bar and tag-style analysis selector */
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(126px, 0.78fr)
    minmax(146px, 0.82fr)
    minmax(154px, 0.9fr)
    minmax(190px, 1.1fr)
    minmax(104px, auto)
    minmax(108px, auto);
  min-height: 0 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 44px !important;
  padding: 5px 12px !important;
  gap: 3px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .toggle-control > span:first-child {
  font-size: 11px;
  line-height: 1.1;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .toggle-box,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 26px !important;
  height: 26px !important;
  font-size: 12px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  padding: 6px 10px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  min-height: 26px;
}

.results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-color: #e2e8f0;
  background: #ffffff;
  box-shadow: none !important;
}

body.is-explore-filter-docked .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-analysis-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding-left: 0;
}

.results-view[data-active-tab="explore"] .excel-analysis-label strong {
  color: #334155;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .excel-analysis-label span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .excel-analysis-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab {
  min-width: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  background: #ffffff;
  color: #42526a;
  padding: 0 11px;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab span {
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab small {
  display: none;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab:hover {
  border-color: #bfd0e4;
  background: #f8fafc;
}

.results-view[data-active-tab="explore"] .excel-analysis-tab.active {
  border-color: #94bdf2;
  background: #edf6ff;
  color: #1258c8;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .results-view[data-active-tab="explore"] .excel-analysis-tab {
    flex: 0 0 auto;
  }
}

@media (max-width: 900px) {
  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Apartment explore: lightweight multi-select district picker */
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(130px, 0.8fr)
    minmax(154px, 0.86fr)
    minmax(164px, 0.92fr)
    minmax(210px, 1.18fr)
    minmax(112px, auto)
    minmax(128px, auto);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field {
  min-height: 44px !important;
  padding: 5px 12px !important;
  gap: 3px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  border-right: 1px solid #e1e9f3;
  border-radius: 0;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:first-child {
  border-radius: 8px 0 0 8px;
}

.district-multi-field {
  position: relative;
  min-width: 0;
}

.district-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  text-align: left;
  font-weight: 680;
}

.district-multi-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-multi-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}

.district-multi-popover {
  position: fixed;
  top: var(--district-popover-top, 194px);
  left: var(--district-popover-left, 16px);
  z-index: 90;
  width: var(--district-popover-width, min(430px, calc(100vw - 32px)));
  max-height: min(64vh, 440px);
  display: grid;
  gap: 10px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
  overflow: auto;
  box-shadow: 0 18px 38px rgba(21, 38, 66, 0.16);
}

.district-multi-popover[hidden] {
  display: none !important;
}

body.is-district-popover-open .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  z-index: 36;
}

.district-multi-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.district-multi-head strong {
  color: #142033;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.district-multi-head span,
.district-multi-selected span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.district-multi-head span.is-warning {
  color: #d33c2f;
  font-weight: 780;
}

.district-multi-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.district-multi-popover .district-option {
  min-width: 0;
  min-height: 32px;
  height: auto !important;
  border: 1px solid #dce5f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: none !important;
}

.district-multi-popover .district-option:hover {
  border-color: #b9cbe2;
  background: #f2f7fd;
}

.district-multi-popover .district-option.is-active {
  border-color: #2d72df;
  background: #edf5ff;
  color: #1258c8;
}

.district-multi-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border-top: 1px solid #edf2f7;
  padding-top: 9px;
}

.district-multi-selected strong {
  min-width: 0;
  overflow: hidden;
  color: #142033;
  font-size: 12px;
  font-weight: 730;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-multi-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.district-multi-popover .district-multi-actions button {
  min-height: 32px;
  height: 32px !important;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #ffffff;
  color: #243247;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none !important;
}

.district-multi-popover .district-multi-actions button:last-child {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .district-multi-popover {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    top: auto;
    width: auto;
    max-height: min(72dvh, 560px);
    border-radius: 14px;
    padding: 14px;
    overflow: auto;
  }

  .district-multi-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(46dvh, 360px);
    overflow: auto;
  }
}

@media (max-width: 440px) {
  .district-multi-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Apartment explore: make the required maximum-budget amount visually primary. */
.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput {
  color: var(--hybrid-blue, #1463e6);
  -webkit-text-fill-color: var(--hybrid-blue, #1463e6);
  caret-color: var(--hybrid-blue, #1463e6);
}

.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput::placeholder {
  color: #8b98aa;
  -webkit-text-fill-color: #8b98aa;
  opacity: 1;
}

.results-view[data-active-tab="explore"] .budget-required-message {
  position: absolute;
  top: calc(100% + 6px);
  left: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(24, 41, 244, 0.28);
  border-radius: 7px;
  background: #ffffff;
  color: #1829f4;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(24, 41, 244, 0.1);
}

.results-view[data-active-tab="explore"] .budget-required-message::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #1829f4;
  content: "";
}

.results-view[data-active-tab="explore"] .budget-required-message[hidden] {
  display: none !important;
}

/* Apartment explore: polished compact top filter bar */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  padding: 10px;
  border: 1px solid #dbe6f2;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(20, 45, 78, 0.035);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(220, 230, 242, 0.9);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(324px, 1.2fr)
    220px
    minmax(204px, 0.62fr)
    minmax(128px, 0.42fr)
    minmax(120px, 0.4fr)
    minmax(86px, auto)
    minmax(78px, auto);
  gap: 8px;
  min-height: 0 !important;
  padding: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 52px !important;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  padding: 4px 0 !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:hover {
  background: transparent;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .toggle-control > span:first-child {
  color: #68778d;
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .toggle-box,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  min-height: 30px !important;
  height: 30px !important;
  border: 0;
  background: transparent;
  color: #17243a;
  padding: 0 !important;
  font-size: 13px;
  font-weight: 720;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
  height: 28px !important;
  font-weight: 760;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
  color: #5f6f86;
  font-size: 12px;
  font-weight: 750;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .toggle-box {
  justify-content: flex-start;
  gap: 7px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
  min-width: 0;
  overflow: hidden;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
  border: 0;
  border-radius: 7px;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  background: #eef4fb;
  padding: 0 8px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle {
  background: #eef8f3;
  color: #176145;
  padding: 0 9px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  background: #edf5ff;
  color: #164b8f;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select {
  background: #f1f5ff;
  color: #263f89;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select {
  background: #f0f7f1;
  color: #235b38;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select {
  background: #fff4e6;
  color: #8a4b12;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  align-items: center;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select {
  padding: 0 9px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .toggle-box input {
  width: 14px;
  height: 14px !important;
  min-height: 14px !important;
  accent-color: #1262e3;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  justify-content: flex-start;
  gap: 8px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-chevron {
  margin-left: auto;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton,
.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
  min-height: 52px !important;
  height: 52px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px !important;
  font-size: 12.5px;
  font-weight: 780;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
  border: 0;
  background: #eef2f7;
  color: #334155;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton:hover {
  background: #e5ebf3;
  color: #1258c8;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
  border: 0;
  background: #1262e3;
  color: #ffffff;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton:hover {
  border-color: #0f55c7;
  background: #0f55c7;
}

@media (min-width: 981px) and (max-width: 1180px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(270px, 1.08fr)
      212px
      minmax(178px, 0.58fr)
      minmax(112px, 0.42fr)
      minmax(108px, 0.4fr)
      minmax(80px, auto)
      minmax(78px, auto);
    gap: 7px;
  }
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    padding: 7px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
}

@media (max-width: 440px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Home hero: stable rolling region spacing */
.home-view:not(.is-hidden) .home-copy h2 {
  height: 2.2em !important;
  min-height: 2.2em !important;
  max-height: 2.2em !important;
  line-height: 1.1 !important;
  overflow: visible;
}

.home-view:not(.is-hidden) .home-copy h2 .hero-title-accent {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.23em;
  width: 100%;
  height: 1.1em !important;
  min-height: 1.1em !important;
  color: #07111f !important;
  line-height: 1.1 !important;
  overflow: visible;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-rotator {
  position: relative;
  display: inline-grid !important;
  grid-template-areas: "region";
  contain: paint;
  isolation: isolate;
  flex: 0 0 2.12em;
  width: 2.12em !important;
  min-width: 2.12em !important;
  height: 1.1em !important;
  overflow: hidden;
  color: #0b5ee8 !important;
  filter: none !important;
  text-shadow: none !important;
  line-height: 1.1 !important;
  text-align: right;
  vertical-align: baseline !important;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-value,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-current,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
  grid-area: region;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 1.1em !important;
  background: linear-gradient(95deg, #075eea 0%, #1688ff 48%, #14bfd0 100%) !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-size: 1em !important;
  font-weight: inherit !important;
  line-height: 1.1 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  text-align: right;
  visibility: visible !important;
  will-change: transform;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-value {
  position: relative !important;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-current,
.home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
  position: absolute !important;
  top: 0;
  left: 0;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-current {
  transform: translateY(0);
}

.home-view:not(.is-hidden) .hero-title-accent .hero-region-next {
  transform: translateY(110%);
}

.home-view:not(.is-hidden) .hero-title-accent .hero-title-suffix {
  display: inline-block !important;
  color: #07111f !important;
  font-size: 1em !important;
  font-weight: inherit !important;
  height: 1.1em !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .hero-title-accent .hero-title-suffix::before {
  content: " ";
  white-space: pre;
}

@media (max-width: 520px) {
  .home-view:not(.is-hidden) .home-copy h2 .hero-title-accent {
    gap: 0.23em;
  }

  .home-view:not(.is-hidden) .hero-title-accent .hero-region-rotator {
    flex-basis: 2.08em;
    width: 2.08em !important;
    min-width: 2.08em !important;
  }
}

/* Home hero: ambient result generation layer */
.home-view:not(.is-hidden) {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(620px, calc(100dvh - 118px), 760px);
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: clamp(30px, 4.8vw, 56px) max(22px, calc((100vw - 1160px) / 2)) clamp(66px, 8vw, 96px);
  overflow: hidden;
}

.home-view:not(.is-hidden)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(31, 88, 150, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 88, 150, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 30%, rgba(37, 110, 244, 0.08), transparent 24%),
    radial-gradient(circle at 82% 34%, rgba(24, 154, 114, 0.075), transparent 22%),
    linear-gradient(180deg, rgba(250, 253, 255, 0.92), rgba(244, 248, 252, 0.72));
  background-size:
    42px 42px,
    42px 42px,
    auto,
    auto,
    auto;
  pointer-events: none;
}

.home-view:not(.is-hidden)::after {
  content: "";
  display: block;
  position: absolute;
  inset: clamp(34px, 4vw, 54px) max(18px, calc((100vw - 1080px) / 2)) clamp(52px, 6vw, 80px);
  z-index: -1;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(115deg, transparent 0 24%, rgba(37, 110, 244, 0.08) 24.2% 24.45%, transparent 24.7% 52%, rgba(24, 154, 114, 0.075) 52.2% 52.45%, transparent 52.7%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72) 36%, rgba(255, 255, 255, 0.72) 64%, transparent);
  pointer-events: none;
}

.home-view:not(.is-hidden) .home-copy,
.home-view:not(.is-hidden) .home-panel {
  position: relative;
  z-index: 3;
}

.home-ambient-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ambient-card {
  position: absolute;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(220, 230, 241, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  color: #17243a;
  box-shadow:
    0 18px 42px rgba(33, 55, 88, 0.065),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(12px);
}

.ambient-eyebrow,
.ambient-card-head span {
  color: #66758c;
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
}

.ambient-card strong {
  color: #17243a;
  font-size: 15px;
  font-weight: 820;
  line-height: 1.15;
}

.ambient-region-card {
  top: clamp(74px, 13vh, 122px);
  left: clamp(18px, 5vw, 70px);
  width: 226px;
}

.ambient-map-grid {
  position: relative;
  height: 92px;
  overflow: hidden;
  border: 1px solid rgba(217, 226, 238, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 85, 122, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 85, 122, 0.08) 1px, transparent 1px),
    rgba(246, 250, 253, 0.94);
  background-size: 22px 22px;
}

.ambient-map-grid::before {
  content: "";
  position: absolute;
  inset: 22px 18px 20px 20px;
  border-top: 2px solid rgba(37, 110, 244, 0.28);
  border-right: 2px solid rgba(24, 154, 114, 0.28);
  border-bottom: 2px solid rgba(225, 136, 35, 0.24);
  border-radius: 34% 46% 38% 44%;
  transform: rotate(-7deg);
}

.map-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #256ef4;
  box-shadow: 0 0 0 5px rgba(37, 110, 244, 0.1);
}

.map-pin.pin-a {
  top: 22px;
  left: 48px;
}

.map-pin.pin-b {
  top: 52px;
  right: 46px;
  background: #189a72;
  box-shadow: 0 0 0 5px rgba(24, 154, 114, 0.1);
}

.map-pin.pin-c {
  right: 82px;
  bottom: 18px;
  background: #d68224;
  box-shadow: 0 0 0 5px rgba(214, 130, 36, 0.12);
}

.ambient-budget-card {
  top: clamp(126px, 21vh, 196px);
  right: clamp(16px, 5vw, 72px);
  width: 254px;
}

.ambient-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ambient-budget-bars {
  display: grid;
  gap: 7px;
}

.ambient-budget-bars span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.ambient-budget-bars span::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
}

.ambient-budget-bars .bar-fit::before {
  width: 76%;
  background: #256ef4;
}

.ambient-budget-bars .bar-near::before {
  width: 58%;
  background: #189a72;
}

.ambient-budget-bars .bar-over::before {
  width: 34%;
  background: #d68224;
}

.ambient-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(220, 228, 238, 0.84);
  padding-top: 10px;
}

.ambient-status-row span {
  color: #176145;
  font-size: 12px;
  font-weight: 800;
}

.ambient-stack-card {
  bottom: clamp(68px, 9vh, 112px);
  left: clamp(42px, 10vw, 150px);
  width: 250px;
}

.ambient-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  border-radius: 7px;
  background: rgba(244, 248, 252, 0.9);
  padding: 0 9px;
}

.ambient-rank-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ambient-rank-row span {
  color: #1258c8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-report-preview {
  position: absolute;
  left: 50%;
  top: clamp(486px, 67vh, 548px);
  bottom: auto;
  z-index: 2;
  width: min(720px, calc(100% - 72px));
  display: grid !important;
  grid-template-columns: minmax(144px, 0.66fr) minmax(230px, 1fr) minmax(246px, 0.92fr);
  align-items: stretch;
  gap: 10px;
  border: 1px solid rgba(205, 218, 234, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
  box-shadow:
    0 20px 46px rgba(31, 55, 88, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.78) inset;
  backdrop-filter: blur(14px);
  opacity: 0.96;
  transform: translateX(-50%);
  pointer-events: none;
}

.home-view:not(.is-hidden) .home-report-preview header {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 5px;
  text-align: left;
}

.home-view:not(.is-hidden) .home-report-preview header strong {
  color: #17243a;
  font-size: 13.5px;
  font-weight: 820;
  line-height: 1.2;
}

.home-view:not(.is-hidden) .home-report-preview header span {
  color: #6b7788;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.home-preview-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.home-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  min-height: 42px;
  border-radius: 7px;
  background: #f4f8fc;
  padding: 7px 9px;
}

.home-preview-row strong {
  min-width: 0;
  overflow: hidden;
  color: #17243a;
  font-size: 12px;
  font-weight: 790;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-preview-row span {
  border-radius: 999px;
  background: #e8f2ff;
  color: #1258c8;
  padding: 4px 7px;
  font-size: 10.5px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.home-preview-row small {
  grid-column: 1 / -1;
  color: #7b8798;
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1;
}

.home-preview-row.is-near span {
  background: #fff2df;
  color: #a85c12;
}

.home-view:not(.is-hidden) .home-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.home-view:not(.is-hidden) .home-preview-metrics article {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 70px;
  border: 0;
  border-radius: 7px;
  background: #f6f9fc;
  padding: 9px;
}

.home-view:not(.is-hidden) .home-preview-metrics span {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
}

.home-view:not(.is-hidden) .home-preview-metrics strong {
  overflow: hidden;
  color: #17243a;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-preview-metrics small {
  overflow: hidden;
  color: #7b8798;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden) {
    width: min(680px, calc(100% - 28px));
    min-height: auto;
    padding: 24px 0 32px;
    overflow: visible;
  }

  .home-view:not(.is-hidden)::before {
    inset: 0;
  }

  .home-view:not(.is-hidden)::after,
  .home-ambient-layer {
    display: none;
  }

  .home-view:not(.is-hidden) .home-report-preview {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: min(600px, 100%);
    grid-template-columns: 1fr;
    margin-top: -2px;
    transform: none;
  }
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) {
    width: 100%;
    gap: 14px;
    padding: 18px 14px 24px;
  }

  .home-view:not(.is-hidden)::before {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background:
      linear-gradient(90deg, rgba(31, 88, 150, 0.04) 1px, transparent 1px),
      linear-gradient(0deg, rgba(31, 88, 150, 0.035) 1px, transparent 1px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 252, 0.88));
    background-size:
      34px 34px,
      34px 34px,
      auto;
  }

  .home-view:not(.is-hidden) .home-report-preview {
    width: 100%;
    gap: 8px;
    padding: 9px;
  }

  .home-view:not(.is-hidden) .home-report-preview header {
    display: none;
  }

  .home-preview-row {
    min-height: 38px;
  }

  .home-view:not(.is-hidden) .home-preview-metrics article {
    min-height: 58px;
    padding: 8px 6px;
  }

  .home-view:not(.is-hidden) .home-preview-metrics strong {
    font-size: 13px;
  }
}

/* Home hero: distributed ambient result motion */
.home-view:not(.is-hidden)::before {
  animation: homeGridDrift 16s ease-in-out infinite alternate;
}

.home-view:not(.is-hidden)::after {
  display: block;
  inset: clamp(38px, 5.2vw, 76px) max(18px, calc((100vw - 1180px) / 2)) clamp(56px, 7.8vw, 106px);
  background:
    linear-gradient(112deg, transparent 0 17%, rgba(37, 110, 244, 0.12) 17.15% 17.35%, transparent 17.55% 47%, rgba(24, 154, 114, 0.1) 47.15% 47.35%, transparent 47.55% 77%, rgba(214, 130, 36, 0.09) 77.15% 77.35%, transparent 77.55%),
    radial-gradient(circle at 14% 18%, rgba(37, 110, 244, 0.12), transparent 22%),
    radial-gradient(circle at 88% 76%, rgba(24, 154, 114, 0.1), transparent 23%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58) 35%, rgba(255, 255, 255, 0.58) 65%, transparent);
  opacity: 0.8;
  animation: homeSignalSweep 18s ease-in-out infinite alternate;
}

.home-ambient-layer {
  z-index: 1;
}

.home-view:not(.is-hidden) .ambient-card {
  border-color: rgba(207, 219, 233, 0.72);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 18px 46px rgba(31, 55, 88, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.84) inset;
  animation: homeAmbientFloat 8.5s ease-in-out infinite;
}

.home-view:not(.is-hidden) .ambient-region-card {
  top: clamp(58px, 9.5vh, 108px);
  left: max(18px, calc((100vw - 1230px) / 2));
  width: clamp(184px, 17vw, 214px);
  transform-origin: 22% 50%;
}

.home-view:not(.is-hidden) .ambient-budget-card {
  top: clamp(72px, 12vh, 132px);
  right: max(18px, calc((100vw - 1230px) / 2));
  width: clamp(204px, 18vw, 238px);
  animation-delay: -2.8s;
}

.home-view:not(.is-hidden) .ambient-stack-card {
  top: clamp(514px, 74vh, 610px);
  bottom: auto;
  left: max(22px, calc((100vw - 1210px) / 2));
  width: clamp(198px, 18vw, 230px);
  animation-delay: -5.4s;
}

.home-view:not(.is-hidden) .home-report-preview {
  left: auto;
  right: max(22px, calc((100vw - 1210px) / 2));
  top: clamp(520px, 73vh, 604px);
  width: clamp(328px, 32vw, 430px);
  grid-template-columns: 1fr;
  transform: none;
  animation: homePreviewRise 9.5s ease-in-out infinite;
}

.home-view:not(.is-hidden) .map-pin {
  animation: homePinPulse 2.8s ease-in-out infinite;
}

.home-view:not(.is-hidden) .map-pin.pin-b {
  animation-delay: 0.45s;
}

.home-view:not(.is-hidden) .map-pin.pin-c {
  animation-delay: 0.9s;
}

.home-view:not(.is-hidden) .ambient-budget-bars span::before {
  animation: homeBarBreathe 4.8s ease-in-out infinite;
}

.home-view:not(.is-hidden) .ambient-budget-bars .bar-near::before {
  animation-delay: 0.35s;
}

.home-view:not(.is-hidden) .ambient-budget-bars .bar-over::before {
  animation-delay: 0.7s;
}

@keyframes homeAmbientFloat {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

@keyframes homePreviewRise {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes homePinPulse {
  0%, 100% {
    box-shadow: 0 0 0 5px rgba(37, 110, 244, 0.1);
    scale: 1;
  }

  50% {
    box-shadow: 0 0 0 9px rgba(37, 110, 244, 0.04);
    scale: 1.08;
  }
}

@keyframes homeBarBreathe {
  0%, 100% {
    transform: scaleX(0.94);
    transform-origin: left center;
  }

  50% {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

@keyframes homeGridDrift {
  0% {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0,
      0 0;
  }

  100% {
    background-position:
      18px 10px,
      10px 18px,
      0 0,
      0 0,
      0 0;
  }
}

@keyframes homeSignalSweep {
  0% {
    opacity: 0.66;
    transform: translate3d(-8px, 0, 0);
  }

  100% {
    opacity: 0.9;
    transform: translate3d(8px, -4px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-view:not(.is-hidden)::before,
  .home-view:not(.is-hidden)::after,
  .home-view:not(.is-hidden) .ambient-card,
  .home-view:not(.is-hidden) .home-report-preview,
  .home-view:not(.is-hidden) .map-pin,
  .home-view:not(.is-hidden) .ambient-budget-bars span::before {
    animation: none;
  }
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden)::after {
    display: none;
  }

  .home-view:not(.is-hidden) .home-report-preview {
    animation: none;
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    margin-top: -2px;
    transform: none;
    width: min(600px, 100%);
  }
}

/* Apartment explore: spreadsheet scroll polish */
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  position: relative;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b7c6d8 #f5f8fb;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(90deg, rgba(238, 244, 250, 0.98), rgba(255, 255, 255, 0) 18px) left top / 18px 100% no-repeat,
    linear-gradient(270deg, rgba(238, 244, 250, 0.98), rgba(255, 255, 255, 0) 18px) right top / 18px 100% no-repeat,
    #ffffff;
  box-shadow:
    inset 0 1px 0 #dce7f3,
    inset 0 -1px 0 #dce7f3;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-track {
  background: #f5f8fb;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(220, 230, 242, 0.78);
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb {
  min-width: 48px;
  min-height: 48px;
  border: 3px solid #f5f8fb;
  border-radius: 999px;
  background: linear-gradient(180deg, #c8d4e2 0%, #aebed0 100%);
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #aebfd2 0%, #8fa5bd 100%);
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-corner {
  background: #f5f8fb;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell thead th.rank-column,
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell td.rank-cell {
  box-shadow: 1px 0 0 #dfe8f3, 10px 0 14px -13px rgba(34, 54, 86, 0.42);
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    scrollbar-width: auto;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar {
    width: 9px;
    height: 9px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb {
    border-width: 2px;
  }
}

/* Apartment explore: usable top filter controls */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  width: min(1490px, calc(100% - 32px));
  max-width: min(1490px, calc(100% - 32px));
  margin: 0 auto 0 !important;
  border: 1px solid #dbe5f0;
  border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, 0.98);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(21, 45, 78, 0.045);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
  width: 100%;
  max-width: 100%;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(314px, 1.22fr)
    minmax(216px, 0.82fr)
    minmax(112px, 0.42fr)
    minmax(112px, 0.42fr)
    minmax(112px, 0.42fr)
    minmax(116px, auto)
    minmax(108px, auto);
  gap: 10px;
  align-items: stretch;
  min-height: 0 !important;
  padding: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
  min-height: 64px !important;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #e2ebf5;
  border-radius: 12px !important;
  background: #ffffff;
  padding: 9px 10px !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:hover {
  border-color: #cddbeb;
  background: #fbfdff;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
  color: #526176;
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1.05;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .toggle-box,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  min-height: 36px !important;
  height: 36px !important;
  border: 0;
  border-radius: 9px;
  color: #17243a;
  padding: 0 11px !important;
  font-size: 14px;
  font-weight: 730;
  line-height: 1;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  display: grid;
  grid-template-columns: minmax(112px, 0.46fr) minmax(0, 0.74fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  background: #eef4fb;
  padding: 0 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  background: transparent;
  font-size: 15px;
  font-weight: 780;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
  color: #526176;
  font-size: 12.5px;
  font-weight: 760;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle {
  min-width: 0;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
  background: #edf8f3;
  color: #176145;
  padding: 0 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input {
  width: 15px;
  height: 15px !important;
  min-height: 15px !important;
  padding: 0 !important;
  accent-color: #147d58;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.86fr) minmax(98px, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  min-width: 0;
  background: #edf5ff;
  color: #164b8f;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  display: inline-flex;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-chevron {
  margin-left: auto;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select {
  background: #f1f5ff;
  color: #263f89;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select {
  background: #eff7f2;
  color: #235b38;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select {
  background: #fff4e6;
  color: #8a4b12;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 64px !important;
  height: 64px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px !important;
  padding: 0 15px !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
  background: #edf2f7;
  color: #334155;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton:hover {
  background: #e2eaf3;
  color: #1258c8;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
  background: #1262e3;
  color: #ffffff;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton:hover {
  background: #0f55c7;
}

@media (min-width: 981px) and (max-width: 1220px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(292px, 1.16fr)
      minmax(204px, 0.82fr)
      minmax(104px, 0.4fr)
      minmax(104px, 0.4fr)
      minmax(104px, 0.4fr)
      minmax(106px, auto)
      minmax(102px, auto);
    gap: 8px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
    padding: 8px 9px !important;
  }
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: min(100%, calc(100vw - 20px));
    max-width: min(100%, calc(100vw - 20px));
    padding: 10px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: min(100%, calc(100vw - 16px));
    max-width: min(100%, calc(100vw - 16px));
    padding: 8px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Apartment explore: continuous padding-based filter bar */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  padding: 13px 14px;
  border-color: #dce6f1;
  background: rgba(255, 255, 255, 0.99);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
  grid-template-columns:
    minmax(310px, 1.18fr)
    minmax(214px, 0.8fr)
    minmax(108px, 0.38fr)
    minmax(108px, 0.38fr)
    minmax(108px, 0.38fr)
    minmax(112px, auto)
    minmax(106px, auto);
  gap: 12px;
  align-items: end;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
  min-height: 0 !important;
  align-content: end;
  gap: 7px;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  padding: 0 !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:hover {
  background: transparent;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
  padding-left: 2px;
  color: #5f6d80;
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .toggle-box,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button {
  min-height: 38px !important;
  height: 38px !important;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  background: #f5f8fc;
  color: #17243a;
  padding: 0 12px !important;
  font-size: 14px;
  font-weight: 720;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell:focus-within,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select:focus,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button:focus-visible,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .toggle-box:focus-within {
  border-color: #a9c8ee;
  background: #ffffff;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(108px, 0.44fr) minmax(0, 0.78fr);
  gap: 8px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  background: #f5f8fc;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
  border: 0;
  background: transparent;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle {
  background: #f5f8fc;
  color: #17243a;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input {
  border: 0;
  accent-color: #1262e3;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
  color: #2f3b4c;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
  grid-template-columns: minmax(88px, 0.82fr) minmax(100px, 1fr);
  gap: 8px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select {
  background: #f5f8fc;
  color: #17243a;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
  min-height: 38px !important;
  height: 38px !important;
  align-self: end;
  border-radius: 9px !important;
  padding: 0 16px !important;
  font-size: 14px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
  background: #eef2f7;
  color: #334155;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
  background: #1262e3;
  color: #ffffff;
}

@media (min-width: 981px) and (max-width: 1220px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(288px, 1.12fr)
      minmax(204px, 0.8fr)
      minmax(102px, 0.36fr)
      minmax(102px, 0.36fr)
      minmax(102px, 0.36fr)
      minmax(104px, auto)
      minmax(100px, auto);
    gap: 9px;
  }
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    align-self: stretch;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Apartment explore: plain tenant-needed checkbox */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
  width: auto;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  align-self: center;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #344256;
  padding: 0 !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle:focus-within,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle:focus-within {
  border: 0;
  background: transparent;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle input {
  width: 15px;
  height: 15px !important;
  min-height: 15px !important;
  flex: 0 0 auto;
  border: 1px solid #9eb1c6;
  background: #ffffff;
  padding: 0 !important;
  accent-color: #1262e3;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
  min-width: 0;
  overflow: visible;
  color: #344256;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.15;
  text-overflow: clip;
  white-space: nowrap;
}

/* Apartment explore: prevent compact filter dropdown overflow */
@media (min-width: 1221px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(252px, max-content)
      minmax(214px, 0.86fr)
      minmax(132px, 0.46fr)
      minmax(132px, 0.46fr)
      minmax(116px, 0.4fr)
      minmax(112px, auto)
      minmax(106px, auto);
    gap: 9px;
  }
}

@media (min-width: 981px) and (max-width: 1220px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(252px, max-content)
      minmax(214px, 0.88fr)
      minmax(132px, 0.55fr)
      minmax(132px, 0.55fr);
    gap: 9px;
  }
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field,
.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field {
  min-width: 0;
  overflow: hidden;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field select,
.results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field select {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: 106px max-content;
  justify-content: start;
  gap: 5px;
}

/* Apartment explore: size picker popover */
.size-picker-field {
  position: relative;
  min-width: 0;
}

.size-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button {
  width: 100%;
  min-width: 0;
  min-height: 38px !important;
  height: 38px !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  background: #f5f8fc;
  color: #17243a;
  padding: 0 12px !important;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-align: left;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button:focus-visible {
  border-color: #a9c8ee;
  background: #ffffff;
  outline: none;
}

.size-picker-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size-picker-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}

.size-picker-popover {
  position: fixed;
  top: var(--size-popover-top, 194px);
  left: var(--size-popover-left, 16px);
  z-index: 92;
  width: var(--size-popover-width, min(520px, calc(100vw - 32px)));
  max-height: min(68vh, 560px);
  display: grid;
  gap: 11px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px;
  overflow: auto;
  box-shadow: 0 18px 38px rgba(21, 38, 66, 0.16);
}

.size-picker-popover[hidden] {
  display: none !important;
}

body.is-size-popover-open .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  z-index: 36;
}

.size-picker-head,
.size-picker-selected {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.size-picker-head strong {
  color: #142033;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.size-picker-head span,
.size-picker-section > span,
.size-picker-selected span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.size-picker-section {
  display: grid;
  gap: 6px;
}

.size-picker-list {
  display: grid;
  gap: 6px;
}

.size-picker-range-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.size-picker-exact-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-height: 162px;
  overflow: auto;
  padding-right: 2px;
}

.size-picker-popover .size-option {
  min-width: 0;
  min-height: 34px;
  height: auto !important;
  border: 1px solid #dce5f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.18;
  text-align: left;
  white-space: normal;
  box-shadow: none !important;
}

.size-picker-popover .size-option:hover {
  border-color: #b9cbe2;
  background: #f2f7fd;
}

.size-picker-popover .size-option.is-active {
  border-color: #2d72df;
  background: #edf5ff;
  color: #1258c8;
}

.size-picker-popover .size-option.is-national-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: #c8daf8;
  background: #f5f8ff;
  color: #174fbc;
}

.size-picker-popover .size-option.is-national-size .size-national-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #1262e3;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(18, 98, 227, 0.16);
}

.size-picker-selected {
  border-top: 1px solid #edf2f7;
  padding-top: 9px;
}

.size-picker-selected strong {
  min-width: 0;
  overflow: hidden;
  color: #142033;
  font-size: 12px;
  font-weight: 730;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size-picker-empty {
  color: #7b8798;
  font-size: 12px;
  font-weight: 650;
}

.size-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.size-picker-popover .size-picker-actions button {
  min-height: 32px;
  height: 32px !important;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #ffffff;
  color: #243247;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none !important;
}

.size-picker-popover .size-picker-actions button:last-child {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

/* Apartment explore: compact mobile filter rail */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto 5px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 6px 10px 7px !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    display: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:not(.is-mobile-open) .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 40px !important;
    border-top: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls::-webkit-scrollbar {
    display: none;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    flex: 0 0 auto !important;
    grid-column: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    scroll-snap-align: start;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
    width: 250px !important;
    flex-basis: 250px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    width: 214px !important;
    flex-basis: 214px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field {
    width: 152px !important;
    flex-basis: 152px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field {
    width: 132px !important;
    flex-basis: 132px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
    width: 92px !important;
    flex-basis: 92px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    width: 92px !important;
    flex-basis: 92px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #eef4fb !important;
    color: #1e3047 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
    display: flex !important;
    align-items: center !important;
    padding: 0 9px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
    min-height: 0 !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #11213a !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
    color: #34445a !important;
    font-size: 11.5px !important;
    font-weight: 760 !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 8px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle input {
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
    min-height: 14px !important;
    accent-color: #1262e3;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #26364d !important;
    font-size: 11px !important;
    font-weight: 760 !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button span:first-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    justify-content: center !important;
    border-radius: 9px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
    border: 0 !important;
    background: #eef4fb !important;
    color: #243247 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    border: 0 !important;
    background: #1262e3 !important;
    color: #ffffff !important;
  }

  html,
  body,
  .app,
  .results-view[data-active-tab="explore"]:not(.is-previewing) {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing) {
    box-sizing: border-box !important;
    justify-items: stretch !important;
    gap: 0 !important;
    padding: 0 0 12px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-diagnosis-strip,
  .results-view[data-active-tab="explore"] .explore-results-layout,
  .results-view[data-active-tab="explore"] .result-data-card,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active,
  .results-view[data-active-tab="explore"] .sheet-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    justify-self: stretch !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle {
    box-sizing: border-box !important;
    max-height: 38px !important;
    margin: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  .results-view[data-active-tab="explore"] .explore-diagnosis-strip {
    margin-top: 0 !important;
    padding-inline: 10px !important;
  }

  .results-view[data-active-tab="explore"] .explore-results-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 0 10px 16px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card {
    border-radius: 10px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    overflow: auto !important;
    overscroll-behavior: contain;
  }
}

@media (max-width: 720px) {
  .size-picker-popover {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    top: auto;
    width: auto;
    max-height: min(74dvh, 620px);
    border-radius: 14px;
    padding: 14px;
    overflow: auto;
  }

  .size-picker-range-list,
  .size-picker-exact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .size-picker-exact-list {
    max-height: min(34dvh, 320px);
  }
}

/* Home story: result-led explanation below diagnosis */
.home-story-section {
  width: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 52%, #ffffff 100%);
  color: #17243a;
  padding: clamp(44px, 6vw, 72px) 0 clamp(54px, 7vw, 86px);
}

.home-story-section.is-hidden {
  display: none;
}

.home-story-inner {
  display: grid;
  gap: clamp(28px, 4vw, 46px);
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.home-story-head {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.home-story-head span,
.home-story-copy span {
  color: #1262e3;
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
}

.home-story-head h3,
.home-story-copy h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(27px, 3.2vw, 38px);
  font-weight: 820;
  line-height: 1.16;
  letter-spacing: 0;
  word-break: keep-all;
}

.home-story-head p,
.home-story-copy p,
.home-scenario-card p,
.home-step-strip p {
  margin: 0;
  color: #607084;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.58;
  letter-spacing: 0;
  word-break: keep-all;
}

.home-scenario-board {
  display: grid;
  grid-template-columns: minmax(280px, 1.18fr) repeat(2, minmax(220px, 0.91fr));
  gap: 12px;
  align-items: stretch;
}

.home-scenario-card {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  min-height: 228px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(31, 55, 88, 0.055);
}

.home-scenario-card.is-primary {
  background:
    linear-gradient(135deg, rgba(18, 98, 227, 0.08), rgba(24, 154, 114, 0.06)),
    #ffffff;
}

.home-scenario-card > span {
  color: #5f6d80;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.1;
}

.home-scenario-card strong {
  color: #111827;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: 0;
  word-break: keep-all;
}

.home-scenario-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.home-scenario-card dl div {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 11px 12px;
}

.home-scenario-card dt {
  color: #68778b;
  font-size: 11.5px;
  font-weight: 760;
}

.home-scenario-card dd {
  margin: 0;
  color: #1262e3;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
}

.scenario-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.scenario-meter span {
  display: block;
  width: var(--meter);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1262e3, #1ba783);
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.scenario-tags span {
  border-radius: 999px;
  background: #f0f5fb;
  color: #324156;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.scenario-tags span:first-child {
  background: #e8f2ff;
  color: #1258c8;
}

.scenario-tags span:nth-child(2) {
  background: #ecf8f3;
  color: #176145;
}

.scenario-tags span:last-child {
  background: #fff2df;
  color: #a85c12;
}

.home-result-story {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(420px, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  border-top: 1px solid #e4ebf3;
  border-bottom: 1px solid #e4ebf3;
  padding: clamp(30px, 5vw, 52px) 0;
}

.home-story-copy {
  display: grid;
  gap: 12px;
}

.home-result-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(31, 55, 88, 0.07);
}

.home-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 94px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-top: 1px solid #edf2f7;
  padding: 0 16px;
}

.home-result-row:first-child {
  border-top: 0;
}

.home-result-head {
  min-height: 42px;
  background: #f5f8fc;
}

.home-result-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
}

.home-result-row strong {
  overflow: hidden;
  color: #17243a;
  font-size: 14.5px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-result-row em {
  color: #17243a;
  font-size: 14px;
  font-style: normal;
  font-weight: 820;
  text-align: right;
  white-space: nowrap;
}

.result-chip {
  justify-self: start;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.result-chip.is-fit {
  background: #e8f2ff;
  color: #1258c8;
}

.result-chip.is-near {
  background: #ecf8f3;
  color: #176145;
}

.home-step-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.home-step-strip article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 178px;
  border-left: 1px solid #e6edf5;
  padding: 20px;
}

.home-step-strip article:first-child {
  border-left: 0;
}

.home-step-strip article span {
  color: #1262e3;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.home-step-strip article strong {
  color: #17243a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.18;
  word-break: keep-all;
}

@media (max-width: 900px) {
  .home-scenario-board,
  .home-result-story,
  .home-step-strip {
    grid-template-columns: 1fr;
  }

  .home-step-strip article {
    min-height: 0;
    border-top: 1px solid #e6edf5;
    border-left: 0;
  }

  .home-step-strip article:first-child {
    border-top: 0;
  }
}

@media (max-width: 560px) {
  .home-story-section {
    padding: 38px 0 54px;
  }

  .home-story-inner {
    width: calc(100% - 28px);
    gap: 24px;
  }

  .home-scenario-card,
  .home-step-strip article {
    padding: 17px;
  }

  .home-scenario-card {
    min-height: 0;
  }

  .home-scenario-card strong {
    font-size: 20px;
  }

  .home-result-row {
    grid-template-columns: minmax(0, 1fr) 64px 78px;
    gap: 8px;
    padding: 0 12px;
  }

  .home-result-row strong,
  .home-result-row em {
    font-size: 13px;
  }

  .result-chip {
    padding: 6px 8px;
    font-size: 11.5px;
  }
}

/* Home story: centered finished layout */
.home-story-section {
  border-top: 1px solid rgba(220, 230, 241, 0.72);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fafc 54%, #ffffff 100%);
}

.home-story-inner {
  justify-items: center;
}

.home-story-head,
.home-story-copy {
  justify-items: center;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.home-story-head p,
.home-story-copy p {
  max-width: 600px;
}

.home-story-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.home-story-proof span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid #dce7f3;
  border-radius: 999px;
  background: #ffffff;
  color: #4f5d70;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 740;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(31, 55, 88, 0.045);
}

.home-story-proof strong {
  color: #1262e3;
  font-weight: 860;
}

.home-scenario-board {
  width: min(980px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
}

.home-scenario-card {
  justify-items: center;
  align-content: start;
  min-height: 236px;
  text-align: center;
}

.home-scenario-card dl {
  width: 100%;
  max-width: 260px;
}

.scenario-tags {
  justify-content: center;
  margin-top: 0;
}

.scenario-meter {
  width: min(220px, 100%);
  margin-top: 4px;
}

.home-result-story {
  width: min(860px, 100%);
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.home-result-table {
  width: min(680px, 100%);
}

.home-step-strip {
  width: min(920px, 100%);
}

.home-step-strip article {
  justify-items: center;
  text-align: center;
}

.home-step-strip p {
  max-width: 230px;
}

@media (max-width: 980px) {
  .home-view:not(.is-hidden) .home-report-preview {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .home-scenario-board {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
  }

  .home-result-story,
  .home-step-strip {
    width: min(620px, 100%);
  }
}

@media (max-width: 560px) {
  .home-story-head,
  .home-story-copy {
    max-width: 100%;
  }

  .home-story-proof {
    gap: 7px;
  }

  .home-story-proof span {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12.5px;
  }

  .home-result-head span {
    font-size: 11.5px;
  }
}

/* Home hero: mirror the PC ambient backdrop on mobile */
@media (max-width: 980px) {
  .home-view:not(.is-hidden) {
    isolation: isolate;
    background: transparent;
  }

  .home-view:not(.is-hidden)::before {
    display: block;
    inset: 0;
    z-index: -2;
    background:
      linear-gradient(90deg, rgba(31, 88, 150, 0.045) 1px, transparent 1px),
      linear-gradient(0deg, rgba(31, 88, 150, 0.04) 1px, transparent 1px),
      radial-gradient(circle at 18% 30%, rgba(37, 110, 244, 0.08), transparent 24%),
      radial-gradient(circle at 82% 34%, rgba(24, 154, 114, 0.075), transparent 22%),
      linear-gradient(180deg, rgba(250, 253, 255, 0.92), rgba(244, 248, 252, 0.72));
    background-size:
      34px 34px,
      34px 34px,
      auto,
      auto,
      auto;
    opacity: 1;
  }

  .home-view:not(.is-hidden)::after {
    display: block;
    inset: 18px 14px 24px;
    z-index: -1;
    background:
      linear-gradient(112deg, transparent 0 17%, rgba(37, 110, 244, 0.12) 17.15% 17.35%, transparent 17.55% 47%, rgba(24, 154, 114, 0.1) 47.15% 47.35%, transparent 47.55% 77%, rgba(214, 130, 36, 0.09) 77.15% 77.35%, transparent 77.55%),
      radial-gradient(circle at 14% 18%, rgba(37, 110, 244, 0.12), transparent 22%),
      radial-gradient(circle at 88% 76%, rgba(24, 154, 114, 0.1), transparent 23%),
      linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58) 35%, rgba(255, 255, 255, 0.58) 65%, transparent);
    opacity: 0.72;
    pointer-events: none;
  }
}

@media (max-width: 560px) {
  .home-view:not(.is-hidden)::before {
    background-size:
      30px 30px,
      30px 30px,
      auto,
      auto,
      auto;
  }

  .home-view:not(.is-hidden)::after {
    inset: 14px 10px 20px;
    opacity: 0.7;
  }
}

/* Apartment explore: low-profile spreadsheet scrollbars */
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  scrollbar-width: thin;
  scrollbar-color: #aebfd1 transparent;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-track {
  background: transparent;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb {
  min-width: 56px;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: #aebfd1;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb:hover {
  background: #8fa7bf;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell::-webkit-scrollbar-corner {
  background: transparent;
}

/* Apartment explore: table-native empty spreadsheet states */
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field > span:first-child {
  color: #5f6b7d;
  font-size: 12px;
  font-weight: 780 !important;
  line-height: 1.1;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  height: clamp(520px, 62vh, 760px);
  max-height: none;
}

@supports (height: 100dvh) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    height: clamp(520px, 62dvh, 760px);
  }
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.table-empty-row td.empty-table-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 100%;
  min-width: 100%;
  height: 430px !important;
  overflow: visible;
  padding: 0 !important;
  border-right: 0;
  background: #ffffff;
  background-image:
    linear-gradient(#edf2f7 1px, transparent 1px),
    linear-gradient(90deg, #edf2f7 1px, transparent 1px);
  background-size: 50px 50px, 92px 50px;
  color: #17243a;
  text-align: center;
  vertical-align: middle;
}

.results-view[data-active-tab="explore"] .table-empty-state {
  position: sticky;
  left: max(24px, calc((100vw - min(460px, calc(100vw - 86px))) / 2 - 16px));
  box-sizing: border-box;
  width: min(460px, calc(100vw - 86px));
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 22px 24px;
  box-shadow: 0 10px 24px rgba(28, 44, 74, 0.06);
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}

.results-view[data-active-tab="explore"] .table-empty-state strong {
  color: #17243a;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}

.results-view[data-active-tab="explore"] .table-empty-state p {
  margin: 0;
  color: #657386;
  font-size: 12.5px;
  font-weight: 680;
  line-height: 1.5;
  white-space: normal;
}

.results-view[data-active-tab="explore"] .table-empty-state ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.results-view[data-active-tab="explore"] .table-empty-state li {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dfe8f3;
  border-radius: 7px;
  background: #ffffff;
  color: #4b5c73;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    height: clamp(440px, 66vh, 620px);
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
      height: clamp(440px, 66dvh, 620px);
    }
  }

  .results-view[data-active-tab="explore"] .sheet-shell tbody tr.table-empty-row td.empty-table-cell {
    width: 100%;
    min-width: 100%;
  }

  .results-view[data-active-tab="explore"] .table-empty-state {
    left: max(18px, calc((100vw - min(440px, calc(100vw - 54px))) / 2 - 14px));
    width: min(440px, calc(100vw - 54px));
    padding: 20px 18px;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    height: clamp(400px, 68vh, 540px);
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
      height: clamp(400px, 68dvh, 540px);
    }
  }

  .results-view[data-active-tab="explore"] .table-empty-state strong {
    font-size: 15px;
  }

  .results-view[data-active-tab="explore"] .table-empty-state p {
    font-size: 12px;
  }
}

/* Desktop top tabs: match the mobile filled active state */
@media (min-width: 721px) {
  .main-tabs {
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .main-tabs button {
    border-color: transparent;
    border-radius: 8px;
    background: transparent;
    padding: 0 13px;
    box-shadow: none;
  }

  .main-tabs button.active,
  .main-tabs button.active:hover {
    border-color: var(--hybrid-blue, #256ef4);
    background: var(--hybrid-blue, #256ef4);
    color: #ffffff;
    box-shadow: none;
  }

  .main-tabs button.active {
    padding: 0 13px;
    font-weight: 700;
  }

  .main-tabs button.active::after {
    content: none;
    display: none;
  }
}

/* Top navigation: four primary modes */
.main-tabs button,
.mobile-main-tabs button {
  white-space: nowrap;
}

@media (min-width: 721px) {
  .main-tabs {
    gap: 4px;
  }

  .main-tabs button {
    min-width: max-content;
    padding: 0 11px;
  }

  .main-tabs button.active {
    padding: 0 11px;
  }
}

@media (max-width: 720px) {
  .mobile-main-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-main-tabs button {
    min-width: 0;
    padding-inline: 5px;
    font-size: clamp(11px, 3vw, 12px);
  }
}

/* Property compare workspace */
.compare-view {
  width: min(1480px, calc(100% - 44px));
  display: grid;
  gap: 16px;
  margin: 28px auto 36px;
  color: #142033;
}

.compare-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.compare-page-head h2 {
  margin: 0 0 8px;
  color: #07162f;
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 860;
  line-height: 1.1;
}

.compare-page-head span {
  color: #51627a;
  font-size: 14px;
  font-weight: 650;
}

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

.compare-page-actions button,
.compare-next-panel button,
.compare-table-note button,
.compare-criteria-nav button,
.compare-count-card button,
.compare-candidate-body button {
  font: inherit;
}

.compare-page-actions button,
.compare-table-note button,
.compare-criteria-summary,
.compare-condition-card button {
  min-height: 40px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #ffffff;
  color: #183454;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 740;
}

.compare-page-actions button.primary {
  border-color: #1463e6;
  background: #1463e6;
  color: #ffffff;
}

.compare-candidate-section {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.compare-count-card,
.compare-candidate-card,
.compare-add-card,
.compare-insight-card,
.compare-matrix-card,
.compare-next-panel section {
  border: 1px solid #dce6f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(31, 49, 80, 0.06);
}

.compare-count-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 148px;
  padding: 18px;
}

.compare-count-card button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4e617a;
  font-size: 18px;
}

.compare-count-card span {
  color: #17243a;
  font-size: 13px;
  font-weight: 820;
}

.compare-count-card strong {
  color: #1463e6;
  font-size: 25px;
  font-weight: 860;
  line-height: 1;
}

.compare-count-card small {
  color: #61708a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.compare-candidate-tray {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compare-candidate-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 14px 13px;
}

.compare-candidate-card.is-selected {
  border-color: #1463e6;
  box-shadow: 0 0 0 1px rgba(20, 99, 230, 0.18), 0 12px 26px rgba(20, 99, 230, 0.08);
}

.compare-candidate-rank {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 1;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.compare-candidate-rank.tone-blue { background: #1463e6; }
.compare-candidate-rank.tone-green { background: #0a9b72; }
.compare-candidate-rank.tone-orange { background: #df7600; }
.compare-candidate-rank.tone-purple { background: #7a4be3; }

.compare-candidate-card img {
  width: 104px;
  height: 92px;
  align-self: center;
  border-radius: 6px;
  object-fit: cover;
}

.compare-candidate-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}

.compare-candidate-body button {
  justify-self: end;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #34435b;
  font-size: 18px;
  line-height: 1;
}

.compare-candidate-body strong,
.compare-insight-card strong,
.compare-next-panel strong {
  overflow: hidden;
  color: #081a35;
  font-size: 15px;
  font-weight: 840;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-candidate-body span,
.compare-candidate-body small {
  overflow: hidden;
  color: #54657f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-status {
  width: max-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
}

.compare-status.green {
  border: 1px solid #bde9d9;
  background: #e8f8f1;
  color: #087a59;
}

.compare-status.orange {
  border: 1px solid #ffd7a8;
  background: #fff3df;
  color: #d06800;
}

.compare-status.red {
  border: 1px solid #ffc5c5;
  background: #fff0f0;
  color: #ca3232;
}

.compare-status.neutral {
  border: 1px solid #d8e3f1;
  background: #f4f7fb;
  color: #526176;
}

.compare-candidate-body dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 5px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e7edf5;
}

.compare-candidate-body div {
  display: inline-flex;
  gap: 4px;
  min-width: 0;
}

.compare-candidate-body dt {
  color: #61708a;
  font-size: 11px;
  font-weight: 700;
}

.compare-candidate-body dd {
  margin: 0;
  color: #142033;
  font-size: 12px;
  font-weight: 830;
}

.compare-add-card {
  min-height: 148px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.68);
  color: #1463e6;
  text-align: center;
}

.compare-add-card span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #8db5ff;
  border-radius: 999px;
  font-size: 26px;
  font-weight: 520;
}

.compare-add-card strong {
  font-size: 15px;
  font-weight: 850;
}

.compare-add-card small {
  max-width: 160px;
  color: #5d6f88;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.compare-picker-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #dce6f3;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 14px 28px rgba(31, 49, 80, 0.08);
}

.compare-picker-panel[hidden] {
  display: none !important;
}

.compare-picker-panel header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.compare-picker-panel header div {
  display: grid;
  gap: 4px;
}

.compare-picker-panel header strong {
  color: #0d213d;
  font-size: 16px;
  font-weight: 850;
}

.compare-picker-panel header span {
  color: #62728a;
  font-size: 12.5px;
  font-weight: 650;
}

.compare-picker-panel header button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: #f3f7fc;
  color: #34445b;
  font-size: 18px;
}

.compare-picker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.compare-picker-search input {
  min-width: 0;
  height: 42px;
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: #fbfdff;
  color: #12243e;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.compare-picker-search input:focus {
  border-color: #1463e6;
  box-shadow: 0 0 0 3px rgba(20, 99, 230, 0.12);
}

.compare-picker-search button,
.compare-picker-item button {
  min-height: 42px;
  border: 1px solid #1463e6;
  border-radius: 8px;
  background: #1463e6;
  color: #ffffff;
  font-size: 13px;
  font-weight: 820;
}

.compare-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compare-picker-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e9f4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.compare-picker-item img {
  width: 62px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.compare-picker-item div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.compare-picker-item strong,
.compare-picker-item span,
.compare-picker-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-picker-item strong {
  color: #0d213d;
  font-size: 13.5px;
  font-weight: 840;
}

.compare-picker-item span,
.compare-picker-item small {
  color: #607089;
  font-size: 12px;
  font-weight: 650;
}

.compare-picker-item button {
  width: 58px;
  min-height: 34px;
}

.compare-picker-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed #bfd0e5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 18px;
  color: #5f6f87;
  text-align: center;
  font-size: 13px;
  font-weight: 720;
}

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

.compare-insight-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.compare-insight-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.compare-insight-card.blue .compare-insight-icon { background: #e8f1ff; color: #1463e6; }
.compare-insight-card.green .compare-insight-icon { background: #e8f8f1; color: #07956d; }
.compare-insight-card.purple .compare-insight-icon { background: #f1ebff; color: #7445dc; }
.compare-insight-card.orange .compare-insight-icon { background: #fff2dc; color: #d66b00; }

.compare-insight-card span:not(.compare-insight-icon) {
  color: #1463e6;
  font-size: 12px;
  font-weight: 850;
}

.compare-insight-card.green span:not(.compare-insight-icon) { color: #078660; }
.compare-insight-card.purple span:not(.compare-insight-icon) { color: #7445dc; }
.compare-insight-card.orange span:not(.compare-insight-icon) { color: #d66b00; }

.compare-insight-card div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.compare-insight-card small {
  color: #586982;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.compare-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed #b8c9df;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
  color: #5f6d82;
  text-align: center;
  font-size: 14px;
  font-weight: 720;
}

.compare-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.compare-matrix-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
}

.compare-criteria-nav {
  display: grid;
  align-content: start;
  gap: 10px;
  border-right: 1px solid #dfe7f2;
  background: #fbfdff;
  padding: 18px 14px;
}

.compare-criteria-nav header {
  display: grid;
  gap: 4px;
}

.compare-criteria-nav header strong {
  color: #10233f;
  font-size: 14px;
  font-weight: 850;
}

.compare-criteria-nav header button {
  min-height: 32px;
  border: 1px solid #d7e3f1;
  border-radius: 7px;
  background: #ffffff;
  color: #315172;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
}

.compare-criteria-nav nav {
  display: grid;
  gap: 4px;
}

.compare-criteria-nav nav button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #2f4058;
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 760;
}

.compare-criteria-nav nav button.active {
  background: #eef5ff;
  color: #1463e6;
}

.compare-criteria-summary {
  display: grid;
  gap: 4px;
  align-content: center;
  margin-top: 12px;
  padding: 11px 12px;
}

.compare-criteria-summary span {
  color: #1463e6;
  font-size: 12px;
  font-weight: 800;
}

.compare-criteria-summary strong {
  overflow-wrap: anywhere;
  color: #233750;
  font-size: 12.5px;
  font-weight: 760;
}

.compare-table-wrap {
  min-width: 0;
  overflow: auto;
}

.compare-matrix-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.compare-matrix-table th,
.compare-matrix-table td {
  border-bottom: 1px solid #e4ebf4;
  border-left: 1px solid #edf2f8;
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

.compare-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbff;
  color: #152943;
  font-size: 13px;
  font-weight: 840;
}

.compare-matrix-table thead th:first-child,
.compare-matrix-table tbody th {
  width: 180px;
  border-left: 0;
  color: #233750;
  font-size: 13px;
  font-weight: 800;
}

.compare-matrix-table thead th strong,
.compare-matrix-table thead th small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-matrix-table thead th small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.compare-column-rank {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  border-radius: 999px;
  background: #1463e6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.compare-section-row th {
  background: #f2f6fb;
  color: #1d3553;
  font-size: 13px;
  font-weight: 860;
}

.compare-cell-value {
  color: #0e2039;
  font-size: 14px;
  font-weight: 780;
}

.compare-cell-delta {
  display: inline-flex;
  margin-left: 10px;
  font-size: 12px;
  font-weight: 760;
}

.compare-cell-delta.up { color: #e35220; }
.compare-cell-delta.down { color: #07905f; }

.compare-rank-badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border-radius: 999px;
  background: #e9f2ff;
  color: #1463e6;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.compare-table-empty {
  padding: 34px !important;
  color: #607089;
  text-align: center !important;
  font-size: 14px;
  font-weight: 760;
}

.compare-table-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #dfe7f2;
  padding: 12px 16px;
}

.compare-table-note span {
  color: #5d6d84;
  font-size: 12px;
  font-weight: 650;
}

.compare-next-panel {
  display: grid;
  gap: 12px;
}

.compare-next-panel section {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.compare-next-panel button {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #ffffff;
  color: #183454;
  padding: 9px 12px;
  text-align: left;
}

.compare-next-panel button span {
  color: #152943;
  font-size: 13px;
  font-weight: 830;
}

.compare-next-panel button small {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: #60708a;
  font-size: 12px;
  font-weight: 640;
}

.compare-tip-card {
  background: linear-gradient(135deg, #eef5ff, #f7fbff) !important;
}

.compare-tip-card p {
  margin: 0;
  color: #3f526c;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.6;
}

.compare-condition-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.compare-condition-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compare-condition-card dt,
.compare-condition-card dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 720;
}

.compare-condition-card dt { color: #61708a; }
.compare-condition-card dd { color: #12243e; text-align: right; }

@media (max-width: 1180px) {
  .compare-candidate-section,
  .compare-main-layout,
  .compare-matrix-card {
    grid-template-columns: 1fr;
  }

  .compare-candidate-tray,
  .compare-insight-grid,
  .compare-picker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-criteria-nav {
    border-right: 0;
    border-bottom: 1px solid #dfe7f2;
  }

  .compare-criteria-nav nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .compare-view {
    width: min(100% - 24px, 680px);
    gap: 12px;
    margin-top: 18px;
  }

  .compare-page-head {
    display: grid;
    gap: 12px;
  }

  .compare-page-head h2 {
    font-size: 28px;
  }

  .compare-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .compare-page-actions button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 12px;
  }

  .compare-candidate-tray,
  .compare-insight-grid,
  .compare-picker-list,
  .compare-criteria-nav nav {
    grid-template-columns: 1fr;
  }

  .compare-picker-item {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .compare-picker-item .compare-status {
    display: none;
  }

  .compare-candidate-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .compare-candidate-card img {
    width: 92px;
    height: 84px;
  }

  .compare-table-note,
  .compare-condition-card div {
    display: grid;
  }
}

@media print {
  .topbar,
  .mobile-top-stack,
  .compare-page-actions,
  .compare-next-panel,
  .compare-count-card button,
  .compare-candidate-body button,
  .compare-add-card {
    display: none !important;
  }

  .compare-view {
    width: 100%;
    margin: 0;
  }

  .compare-main-layout,
  .compare-matrix-card {
    grid-template-columns: 1fr;
  }
}

/* Compare usability hardening */
.compare-page-actions button:disabled,
.compare-next-panel button:disabled,
.compare-table-note button:disabled,
.compare-count-card button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@media (max-width: 720px) {
  .compare-count-card {
    min-height: 92px;
    padding: 14px 46px 14px 16px;
  }

  .compare-candidate-tray,
  .compare-insight-grid {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }

  .compare-candidate-card,
  .compare-add-card {
    flex: 0 0 min(310px, calc(100vw - 48px));
    scroll-snap-align: start;
  }

  .compare-insight-card {
    flex: 0 0 min(280px, calc(100vw - 64px));
    scroll-snap-align: start;
  }

  .compare-picker-list {
    max-height: min(390px, 52vh);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-right: 2px;
  }

  .compare-criteria-nav {
    gap: 8px;
    padding: 14px 12px;
  }

  .compare-criteria-nav nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .compare-criteria-nav nav::-webkit-scrollbar {
    display: none;
  }

  .compare-criteria-nav nav button {
    flex: 0 0 auto;
    min-width: max-content;
    padding-inline: 13px;
  }

  .compare-criteria-summary {
    margin-top: 0;
  }
}

.compare-pro-badge {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd4fb;
  border-radius: 999px;
  background: var(--hybrid-blue-soft, #eef5ff);
  color: var(--hybrid-blue, #1463e6);
  padding: 0 7px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.compare-pro-card {
  min-height: 148px;
  display: grid;
  grid-column: span 2;
  justify-items: start;
  align-content: center;
  gap: 7px;
  border: 1px dashed #9dbce9;
  border-radius: 8px;
  background: #f6f9ff;
  color: var(--hybrid-text, #223047);
  padding: 16px 18px;
  text-align: left;
  box-shadow: none;
}

.compare-pro-card strong {
  color: var(--hybrid-ink, #172033);
  font-size: 15px;
  font-weight: 850;
}

.compare-pro-card small {
  color: var(--hybrid-muted, #667085);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.compare-pro-card em {
  color: var(--hybrid-blue, #1463e6);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 820;
}

.compare-view[data-compare-count="0"] .compare-candidate-tray .compare-add-card {
  grid-column: 1 / -1;
}

.compare-view[data-compare-count="0"] .compare-candidate-tray,
.compare-view[data-compare-count="1"] .compare-candidate-tray {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-result-preview-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  color: var(--hybrid-muted, #667085);
}

.compare-result-preview-label[hidden] {
  display: none;
}

.compare-result-preview-label > span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c9dcfa;
  border-radius: 999px;
  background: var(--hybrid-blue-soft, #eef5ff);
  color: var(--hybrid-blue, #1463e6);
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.compare-result-preview-label > strong {
  font-size: 12px;
  font-weight: 720;
}

.compare-price-chart {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--hybrid-line, #dce6f3);
  border-radius: 8px;
  background: var(--hybrid-panel, #ffffff);
  box-shadow: 0 10px 24px rgba(31, 49, 80, 0.06);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.compare-price-chart > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 16px 18px 14px;
}

.compare-price-chart > header > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.compare-price-chart > header > div:first-child > span {
  color: var(--hybrid-blue, #1463e6);
  font-size: 11px;
  font-weight: 830;
}

.compare-price-chart > header > div:first-child > strong {
  color: var(--hybrid-ink, #172033);
  font-size: 16px;
  font-weight: 850;
}

.compare-price-chart > header > div:first-child > small {
  color: var(--hybrid-muted, #667085);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.compare-price-legend {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hybrid-muted, #667085);
  font-size: 11px;
  font-weight: 720;
}

.compare-price-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.compare-price-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 2px;
  background: var(--hybrid-blue, #1463e6);
}

.compare-price-legend i.jeonse {
  background: #9dbfeb;
}

.compare-price-legend i.median {
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: #5d718f;
}

.compare-price-chart-body {
  display: grid;
}

.compare-price-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(340px, 1.8fr);
  grid-template-areas:
    "heading sale"
    "heading jeonse"
    "heading position";
  align-items: center;
  gap: 6px 22px;
  min-height: 122px;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 13px 18px;
}

.compare-price-row:last-child {
  border-bottom: 0;
}

.compare-price-row > header {
  grid-area: heading;
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
}

.compare-price-row > header > span {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--hybrid-blue, #1463e6);
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
}

.compare-price-row > header strong,
.compare-price-row > header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-price-row > header strong {
  color: var(--hybrid-ink, #172033);
  font-size: 13px;
  font-weight: 830;
}

.compare-price-row > header small {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 620;
}

.compare-price-bar-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(90px, 1fr) 76px;
  align-items: center;
  gap: 9px;
}

.compare-price-bar-row.sale { grid-area: sale; }
.compare-price-bar-row.jeonse { grid-area: jeonse; }

.compare-price-bar-row > span {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 730;
}

.compare-price-track {
  min-width: 0;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.compare-price-track i {
  width: var(--compare-price-width, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--hybrid-blue, #1463e6);
}

.compare-price-bar-row.jeonse .compare-price-track i {
  background: #9dbfeb;
}

.compare-price-bar-row > strong {
  color: var(--hybrid-text, #223047);
  font-size: 11.5px;
  font-weight: 820;
  text-align: right;
  white-space: nowrap;
}

.compare-price-position {
  grid-area: position;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(90px, 1fr);
  align-items: center;
  gap: 4px 9px;
}

.compare-price-position > span {
  grid-row: 1 / span 2;
  align-self: start;
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 730;
}

.compare-price-position-rail {
  position: relative;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dfeaf9 0%, #b8d1f4 52%, #7fa9e8 100%);
}

.compare-price-position-rail i,
.compare-price-position-rail b {
  position: absolute;
  top: 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.compare-price-position-rail i {
  left: var(--compare-current-position, 50%);
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--hybrid-blue, #1463e6);
  box-shadow: 0 0 0 1px rgba(20, 99, 230, 0.24), 0 2px 5px rgba(20, 99, 230, 0.22);
}

.compare-price-position-rail b {
  left: var(--compare-median-position, 50%);
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: #5d718f;
  opacity: 0.62;
}

.compare-price-position > small {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--hybrid-muted, #667085);
  font-size: 9px;
  font-weight: 650;
}

.compare-price-position > small span:last-child {
  text-align: right;
}

.compare-price-position > small strong {
  color: var(--hybrid-blue, #1463e6);
  font-size: 9.5px;
  font-weight: 830;
  white-space: nowrap;
}

.compare-price-chart-note {
  margin: 0;
  border-top: 1px solid var(--hybrid-line-soft, #e8edf5);
  background: #fbfdff;
  color: var(--hybrid-muted, #667085);
  padding: 10px 18px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .compare-view[data-compare-count="0"] .compare-candidate-tray .compare-add-card {
    flex-basis: 100%;
  }

  .compare-result-preview-label {
    align-items: flex-start;
    gap: 7px;
  }

  .compare-result-preview-label > strong {
    padding-top: 3px;
    font-size: 11px;
    line-height: 1.4;
  }

  .compare-pro-card {
    flex: 0 0 min(310px, calc(100vw - 48px));
    min-height: 148px;
    scroll-snap-align: start;
  }

  .compare-price-chart > header {
    display: grid;
    gap: 10px;
    padding: 14px;
  }

  .compare-price-legend {
    justify-content: flex-start;
  }

  .compare-price-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "sale"
      "jeonse"
      "position";
    gap: 8px;
    min-height: 166px;
    padding: 13px 14px;
  }

  .compare-price-bar-row {
    grid-template-columns: 31px minmax(72px, 1fr) 66px;
    gap: 7px;
  }

  .compare-price-chart-note {
    padding: 10px 14px;
  }

  .compare-price-position > small {
    font-size: 10px;
  }

  .compare-price-position > small span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .compare-price-position > small strong {
    font-size: 10px;
  }

  .compare-count-card button,
  .compare-candidate-body button,
  .compare-picker-panel header button,
  .compare-picker-item button {
    min-width: 44px;
    min-height: 44px;
  }

  .compare-view[data-compare-count="1"] .compare-matrix-table {
    min-width: 500px;
  }

  .compare-view[data-compare-count="2"] .compare-matrix-table {
    min-width: 620px;
  }

  .compare-view[data-compare-count="3"] .compare-matrix-table {
    min-width: 820px;
  }

  .compare-view[data-compare-count="4"] .compare-matrix-table {
    min-width: 1020px;
  }

  .compare-view.is-result-preview .compare-matrix-table {
    min-width: 620px;
  }

  .compare-matrix-table thead th:first-child,
  .compare-matrix-table tbody tr:not(.compare-section-row) > th {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 1px 0 0 #e4ebf4;
  }

  .compare-matrix-table thead th:first-child {
    z-index: 3;
    background: #f7fbff;
  }
}

@media print {
  .compare-pro-card {
    display: none !important;
  }
}

/* Apartment explore: move state controls into the sticky analysis bar */
.results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "analysis-label analysis-tabs"
    "analysis-state analysis-state";
  align-items: center;
  gap: 7px 10px;
  margin-bottom: 0 !important;
  padding: 8px 10px 9px;
}

.results-view[data-active-tab="explore"] .excel-analysis-label {
  grid-area: analysis-label;
}

.results-view[data-active-tab="explore"] .excel-analysis-tabs {
  grid-area: analysis-tabs;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip {
  grid-area: analysis-state;
  min-width: 0;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid #edf3f8;
  background: transparent;
  padding: 7px 0 0;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-label {
  padding-left: 0;
  color: #526176;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-pills {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-pill {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 680;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-pill strong {
  font-size: 11.5px;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-table-tools {
  justify-content: flex-end;
}

.results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-table-tools button {
  height: 27px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 11.5px;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  border-top: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .table-paywall {
  display: none !important;
}

.sticky-sheet-header {
  z-index: 16;
}

body.is-explore-filter-docked .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  z-index: 18;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "analysis-label"
      "analysis-tabs"
      "analysis-state";
    align-items: stretch;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 1px;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-state-strip {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-table-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-pills,
  .results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-table-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-state-pill,
  .results-view[data-active-tab="explore"] .excel-analysis-state-strip .excel-table-tools button {
    flex: 0 0 auto;
  }
}

/* Apartment explore: align area label weight and simplify size options */
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field > span:first-child {
  color: #58677b;
  font-size: 11.5px;
  font-weight: 760 !important;
  line-height: 1;
}

/* Apartment explore: mobile condition menu */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: calc(100% - 12px);
    margin: 8px auto 10px !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    padding: 0 !important;
    overflow: visible;
    z-index: 80;
    box-shadow: 0 10px 26px rgba(23, 54, 96, 0.08) !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    min-width: 0;
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    color: #17243a;
    padding: 0 10px;
    font-family: inherit;
    box-shadow: none;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-chip {
    min-width: 0;
    max-width: 82px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e4f2;
    border-radius: 8px;
    background: #f5f8fc;
    color: #26364d;
    padding: 0 8px;
    font-size: 12.5px;
    font-weight: 780;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-chip:first-of-type {
    max-width: 74px;
    border-color: #cfe0f7;
    background: #eef5ff;
    color: #1262e3;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-action {
    flex: 0 0 auto;
    margin-left: auto;
    color: #1262e3;
    font-size: 12px;
    font-weight: 820;
    line-height: 1;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-left: 2px;
    border-right: 1.6px solid #718096;
    border-bottom: 1.6px solid #718096;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.16s ease;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .summary-chevron {
    transform: translateY(2px) rotate(225deg);
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:not(.is-mobile-open) .core-controls {
    display: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .core-controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    border-top: 1px solid #e4edf7;
    padding: 10px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
    min-width: 0;
    min-height: 0 !important;
    display: grid !important;
    gap: 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    grid-column: 1 / -1;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
    color: #58677b;
    font-size: 11.5px;
    font-weight: 760 !important;
    line-height: 1;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    display: grid !important;
    grid-template-columns: minmax(98px, 0.58fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button {
    width: 100%;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 9px !important;
    background: #f5f8fc !important;
    color: #17243a;
    padding: 0 12px !important;
    font-size: 13.5px;
    font-weight: 740;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
    display: flex;
    align-items: center;
    padding: 0 10px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
    min-height: 0 !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 820;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
    color: #26364d;
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    min-width: 0;
    min-height: 42px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    border: 1px solid #dce6f1 !important;
    border-radius: 9px !important;
    background: #f5f8fc !important;
    padding: 0 11px !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input {
    width: 16px;
    min-width: 16px;
    height: 16px !important;
    min-height: 16px !important;
    accent-color: #1262e3;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
    min-width: 0;
    overflow: hidden;
    color: #26364d;
    font-size: 12.5px;
    font-weight: 760;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    min-width: 0;
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 9px !important;
    padding: 0 12px !important;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
    border: 1px solid #dce6f1 !important;
    background: #f2f6fb !important;
    color: #243247 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    grid-column: 1 / -1;
    border: 1px solid #1262e3 !important;
    background: #1262e3 !important;
    color: #ffffff !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-diagnosis-strip {
    margin-top: 0;
  }
}

@media (max-width: 380px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-chip {
    max-width: 72px;
    padding: 0 6px;
    font-size: 12px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-chip:first-of-type {
    max-width: 66px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .summary-action {
    font-size: 11.5px;
  }
}

.size-picker-popover .size-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding-right: 8px;
}

.size-picker-popover .size-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size-picker-popover .size-option.is-national-size {
  justify-content: stretch;
}

.size-picker-popover .size-option.is-national-size .size-national-badge {
  justify-self: end;
  min-height: 18px;
  border-radius: 5px;
  background: #ffffff;
  color: #1262e3;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 820;
}

@media (max-width: 720px) {
  .size-picker-popover .size-option {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 5px;
  }

  .size-picker-popover .size-option.is-national-size .size-national-badge {
    justify-self: center;
  }
}

/* Mobile top navigation: content-sized tabs that can grow horizontally */
@media (max-width: 720px) {
  .mobile-main-tabs {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    padding: 10px 16px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .mobile-main-tabs button {
    width: auto;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    padding-inline: 15px !important;
    font-size: 14px !important;
    letter-spacing: 0;
    white-space: nowrap;
  }
}

/* Apartment explore: keep scrolling inside the spreadsheet work area */
@supports selector(body:has(*)) {
  @media (min-width: 901px) {
    body:has(.results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing)) {
      overflow: hidden;
    }
  }
}

@media (min-width: 901px) {
  .results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing) {
    height: calc(100vh - 92px);
    max-height: calc(100vh - 92px);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 16px;
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing) {
      height: calc(100dvh - 92px);
      max-height: calc(100dvh - 92px);
    }
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    flex: 0 0 auto;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    position: relative;
    top: auto;
    z-index: 4;
  }

  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    position: relative;
    top: auto;
    z-index: 3;
  }

  .results-view[data-active-tab="explore"] .explore-results-layout {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    align-items: stretch;
  }

  .results-view[data-active-tab="explore"] .result-data-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="favorites"].active {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
  }

  .results-view[data-active-tab="explore"] .sheet-shell thead th {
    position: sticky;
    top: 0;
    z-index: 5;
  }
}

@media (max-width: 900px) {
  .results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing) {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    height: min(58vh, 520px) !important;
    max-height: min(58vh, 520px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
  }

  @supports (height: 100dvh) {
    .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
      height: min(58dvh, 520px) !important;
      max-height: min(58dvh, 520px) !important;
    }
  }
}

/* Apartment explore: split analysis controls from table state controls */
.results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas: "analysis-label analysis-tabs" !important;
  align-items: stretch;
  gap: 10px;
  border-bottom-color: #dfe8f3;
  padding: 8px 10px;
}

.results-view[data-active-tab="explore"] .excel-analysis-strip-filter .excel-analysis-label {
  grid-area: analysis-label;
}

.results-view[data-active-tab="explore"] .excel-analysis-strip-filter .excel-analysis-tabs {
  grid-area: analysis-tabs;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 0;
  border-bottom: 1px solid #dfe8f3;
  background: #fbfdff;
  padding: 9px 10px;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-label {
  padding-left: 0;
  color: #526176;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-pills {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-pill {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 680;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-pill strong {
  font-size: 11.5px;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-table-tools {
  justify-content: flex-end;
}

.results-view[data-active-tab="explore"] .excel-table-state-strip .excel-table-tools button {
  height: 27px;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 11.5px;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"] .excel-analysis-strip-filter {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "analysis-label"
      "analysis-tabs" !important;
  }

  .results-view[data-active-tab="explore"] .excel-table-state-strip {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .results-view[data-active-tab="explore"] .excel-table-state-strip .excel-table-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-pills,
  .results-view[data-active-tab="explore"] .excel-table-state-strip .excel-table-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .results-view[data-active-tab="explore"] .excel-table-state-strip .excel-state-pill,
  .results-view[data-active-tab="explore"] .excel-table-state-strip .excel-table-tools button {
    flex: 0 0 auto;
  }
}

/* Apartment explore: reference-style spreadsheet surface */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 14px 32px rgba(23, 54, 96, 0.08);
}

.results-view[data-active-tab="explore"] .explore-results-layout {
  margin-top: 18px;
}

.results-view[data-active-tab="explore"] .result-data-card {
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(23, 54, 96, 0.08);
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-strip-filter {
  position: relative;
  top: auto;
  z-index: 3;
  width: 100%;
  max-width: 100%;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas: "analysis-tabs table-tools" !important;
  align-items: center;
  gap: 16px;
  margin: 0 !important;
  border: 0;
  border-bottom: 1px solid #dfe8f3;
  border-radius: 0;
  background: #ffffff;
  padding: 0 18px;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-label {
  display: none;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
  grid-area: analysis-tabs;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab {
  position: relative;
  min-width: max-content;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #243247;
  padding: 0;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab span {
  color: inherit;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab small {
  display: none;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab:hover,
.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab.active {
  background: transparent;
  color: #1262e3;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab.active::after {
  background: #1262e3;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-table-tools {
  grid-area: table-tools;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-table-tools button {
  height: 34px;
  border: 1px solid #d4dfed;
  border-radius: 7px;
  background: #ffffff;
  color: #43536b;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-data-card .excel-table-tools button:hover {
  border-color: #b8cbe4;
  background: #f7faff;
  color: #115ccf;
}

.results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
  border-top: 0;
}

.results-view[data-active-tab="explore"] .result-data-card .table-paywall {
  display: none !important;
}

.results-view[data-active-tab="explore"] .excel-table-footer {
  order: 2;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  border-top: 1px solid #dfe8f3;
  background: #fbfdff;
  padding: 0 16px;
  color: #43536b;
  font-size: 12px;
  font-weight: 680;
}

.results-view[data-active-tab="explore"] .excel-table-summary,
.results-view[data-active-tab="explore"] .excel-table-evidence {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.results-view[data-active-tab="explore"] .excel-table-summary span + span {
  border-left: 1px solid #d9e3ef;
  padding-left: 14px;
}

.results-view[data-active-tab="explore"] .excel-table-footer strong {
  color: #17243a;
  font-weight: 780;
}

.results-view[data-active-tab="explore"] .excel-table-coverage strong {
  color: #1670e8;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.results-view[data-active-tab="explore"] .excel-table-coverage .excel-table-count-suffix {
  margin-left: -3px;
}

.results-view[data-active-tab="explore"] .excel-table-evidence {
  color: #66758a;
  font-weight: 630;
}

.results-view[data-active-tab="explore"] .excel-table-evidence > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .excel-table-evidence > span + span {
  border-left: 1px solid #d9e3ef;
  padding-left: 14px;
}

.results-view[data-active-tab="explore"] .excel-table-evidence small {
  color: #8a97a9;
  font-size: 10px;
  font-weight: 600;
}

.results-view[data-active-tab="explore"] .excel-table-evidence time {
  color: inherit;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .excel-table-evidence .excel-table-update {
  color: #96a1b1;
  font-size: 12px;
  font-weight: 630;
}

@media (max-width: 1180px) {
  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-strip-filter {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "analysis-tabs"
      "table-tools" !important;
    align-items: stretch;
    padding: 10px 12px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
    gap: 18px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab {
    min-height: 38px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-table-tools {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    border-radius: 10px;
    padding: 10px;
  }

  .results-view[data-active-tab="explore"] .result-data-card {
    border-radius: 10px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
    gap: 16px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tab span {
    font-size: 13px;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-table-tools button {
    flex: 0 0 auto;
  }

  .results-view[data-active-tab="explore"] .excel-table-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 9px 12px;
  }

  .results-view[data-active-tab="explore"] .excel-table-evidence {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 10px;
  }

  .results-view[data-active-tab="explore"] .excel-table-evidence span {
    flex: 0 0 auto;
  }

  .results-view[data-active-tab="explore"] .excel-table-evidence > span + span {
    padding-left: 10px;
  }
}

/* Apartment explore: compact segmented top filter toolbar */
@media (min-width: 1181px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: min(1490px, calc(100% - 32px));
    max-width: min(1490px, calc(100% - 32px));
    margin: 16px auto 12px !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    padding: 0 !important;
    box-shadow: 0 10px 26px rgba(23, 54, 96, 0.07) !important;
    overflow: visible;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    display: grid !important;
    grid-template-columns:
      minmax(236px, 1.12fr)
      minmax(258px, 1.32fr)
      minmax(126px, 0.68fr)
      minmax(118px, 0.6fr)
      minmax(118px, 0.6fr)
      128px
      116px !important;
    align-items: stretch !important;
    gap: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
    min-width: 0;
    min-height: 76px !important;
    display: grid !important;
    align-content: center !important;
    gap: 8px !important;
    border: 0 !important;
    border-right: 1px solid #e3ebf5 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:first-child {
    border-radius: 12px 0 0 12px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field:hover,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label:hover {
    background: #fbfdff !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
    padding-left: 1px;
    color: #58677b;
    font-size: 11.5px;
    font-weight: 760;
    line-height: 1;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    display: flex !important;
    min-width: 0;
    align-items: center;
    gap: 9px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
    width: 102px;
    min-width: 102px;
    min-height: 36px !important;
    height: 36px !important;
    border: 1px solid #d9e4f0;
    border-radius: 7px;
    background: #f8fbff;
    padding: 0 10px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
    min-height: 0 !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
    color: #11213a;
    padding: 0 !important;
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
    color: #2f3f56;
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    width: auto;
    min-width: 0;
    min-height: 0 !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle input {
    width: 15px;
    min-width: 15px;
    height: 15px !important;
    min-height: 15px !important;
    border: 1px solid #9fb1c8;
    border-radius: 4px;
    background: #ffffff;
    padding: 0 !important;
    accent-color: #1262e3;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
    min-width: 0;
    overflow: hidden;
    color: #26364d;
    font-size: 12px;
    font-weight: 740;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    display: grid !important;
    grid-template-columns: minmax(100px, 0.85fr) minmax(118px, 1fr);
    gap: 8px;
    min-width: 0;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button {
    width: 100%;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    border: 1px solid #d9e4f0 !important;
    border-radius: 7px !important;
    background: #f8fbff !important;
    color: #14233a;
    padding: 0 11px !important;
    font-size: 13px;
    font-weight: 730;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button {
    justify-content: flex-start;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select:focus,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell:focus-within,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button:focus-visible,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button:focus-visible {
    border-color: #a9c8ee !important;
    background: #ffffff !important;
    outline: none;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    min-width: 0;
    min-height: 40px !important;
    height: 40px !important;
    align-self: center;
    justify-self: stretch;
    border-radius: 8px !important;
    padding: 0 13px !important;
    font-size: 13px;
    font-weight: 780;
    line-height: 1;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton {
    margin-left: 12px;
    border: 1px solid #d6e1ee !important;
    background: #f2f6fb !important;
    color: #243247 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    border: 1px solid #d6e1ee !important;
    background: #f2f6fb !important;
    color: #243247 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton:hover {
    border-color: #bfd0e6 !important;
    background: #eaf2fb !important;
    color: #115ccf !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton:hover {
    border-color: #bfd0e6 !important;
    background: #eaf2fb !important;
    color: #115ccf !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    margin-right: 12px;
    border: 1px solid #1262e3 !important;
    background: #1262e3 !important;
    color: #ffffff !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton:hover {
    background: #0d56c9 !important;
  }
}

/* Apartment explore: compact area-size picker menu */
.size-picker-popover {
  gap: 0;
  border-color: #cfdaea;
  border-radius: 9px;
  padding: 6px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(21, 38, 66, 0.14);
}

.size-picker-head,
.size-picker-selected,
.size-picker-actions,
.size-picker-section > span {
  display: none !important;
}

.size-picker-list,
.size-picker-range-list,
.size-picker-exact-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.size-picker-popover .size-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #243247;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.size-picker-popover .size-option:hover {
  background: #f3f7fc;
  color: #1262e3;
}

.size-picker-popover .size-option.is-active {
  background: #edf5ff;
  color: #1258c8;
}

.size-picker-popover .size-option.is-national-size {
  justify-content: flex-start;
  border: 0;
  background: transparent;
}

.size-picker-popover .size-option.is-national-size:hover,
.size-picker-popover .size-option.is-national-size.is-active {
  background: #edf5ff;
}

.size-picker-popover .size-option.is-national-size .size-national-badge {
  min-height: 18px;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 10.5px;
}

@media (max-width: 720px) {
  .size-picker-popover {
    gap: 10px;
    border-radius: 14px;
    padding: 12px;
    overflow: auto;
  }

  .size-picker-head {
    display: flex !important;
  }

  .size-picker-head span {
    display: none;
  }

  .size-picker-range-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .size-picker-popover .size-option {
    min-height: 42px;
    justify-content: center;
    border: 1px solid #dce5f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0 8px;
    font-size: 12.5px;
    white-space: normal;
  }

  .size-picker-popover .size-option.is-active {
    border-color: #2d72df;
    background: #edf5ff;
  }
}

/* Apartment explore: native select replacement popovers */
.select-picker-field,
.district-multi-field {
  position: relative;
}

.select-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .select-picker-button,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button {
  width: 100%;
  min-width: 0;
  min-height: 38px !important;
  height: 38px !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  background: #f5f8fc;
  color: #17243a;
  padding: 0 12px !important;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-align: left;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .select-picker-button:focus-visible {
  border-color: #a9c8ee;
  background: #ffffff;
  outline: none;
}

.select-picker-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-picker-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}

.select-picker-popover {
  position: fixed;
  top: var(--select-popover-top, 194px);
  left: var(--select-popover-left, 16px);
  z-index: 94;
  width: var(--select-popover-width, 224px);
  max-height: min(52vh, 360px);
  display: grid;
  border: 1px solid #cfdaea;
  border-radius: 9px;
  background: #ffffff;
  padding: 6px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(21, 38, 66, 0.14);
}

.select-picker-popover[hidden] {
  display: none !important;
}

.select-picker-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  max-height: calc(min(52vh, 360px) - 12px);
  overflow: auto;
}

.select-picker-option {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #243247;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  box-shadow: none !important;
}

.select-picker-option:hover {
  background: #f3f7fc;
  color: #1262e3;
}

.select-picker-option.is-active {
  background: #edf5ff;
  color: #1258c8;
}

@media (min-width: 1181px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button {
    min-height: 36px !important;
    height: 36px !important;
    border-color: #d9e4f0;
    border-radius: 7px;
    background: #f8fbff;
    color: #14233a;
    padding: 0 11px !important;
    font-size: 13px;
    font-weight: 730;
  }
}

@media (max-width: 720px) {
  .select-picker-popover {
    right: 10px;
    bottom: 10px;
    left: 10px;
    top: auto;
    width: auto;
    max-height: min(58dvh, 460px);
    border-radius: 14px;
    padding: 12px;
    overflow: auto;
  }

  .select-picker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: none;
    overflow: visible;
  }

  .city-picker-popover .select-picker-list {
    max-height: min(48dvh, 380px);
    overflow: auto;
  }

  .select-picker-option {
    min-height: 42px;
    justify-content: center;
    border: 1px solid #dce5f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0 8px;
    font-size: 12.5px;
    white-space: normal;
  }

  .select-picker-option.is-active {
    border-color: #2d72df;
    background: #edf5ff;
  }
}

/* Home diagnosis: use the same popover-select grammar as explore filters */
.home-view:not(.is-hidden) .location-selects .home-select-picker-field {
  position: relative;
  min-width: 0;
}

.home-view:not(.is-hidden) .location-selects .home-select-picker-field::after {
  content: none !important;
  display: none !important;
}

.home-view:not(.is-hidden) .location-selects .home-select-picker-button {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #f3f7fc;
  color: var(--hybrid-ink, #172033);
  padding: 0 15px;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.12;
  text-align: left;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(25, 52, 91, 0.035);
}

.home-view:not(.is-hidden) .location-selects .home-select-picker-button:focus-visible {
  outline: 2px solid rgba(20, 99, 230, 0.2);
  outline-offset: 2px;
}

.home-view:not(.is-hidden) .location-selects .home-select-picker-button:disabled {
  background: #f2f6fb;
  color: #9aa5b4;
  cursor: default;
  opacity: 1;
}

.home-view:not(.is-hidden) .location-selects .home-select-picker-button .select-picker-chevron {
  color: #6b7788;
}

.home-select-picker-popover {
  z-index: 96;
}

.home-select-picker-popover .select-picker-list {
  max-height: min(46vh, 340px);
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .location-selects .home-select-picker-button {
    min-height: 46px;
    height: 46px;
    border-radius: 10px;
    padding: 0 13px;
    font-size: 14px;
  }

  .home-select-picker-popover .select-picker-list {
    max-height: min(48dvh, 380px);
    overflow: auto;
  }
}

/* Home diagnosis: compact advanced-condition popovers */
.home-view:not(.is-hidden) .home-detail-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.home-view:not(.is-hidden) .advanced-choice-group {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 0;
  box-shadow: none;
}

.home-view:not(.is-hidden) .advanced-choice-group + .advanced-choice-group {
  box-shadow: none;
}

.home-view:not(.is-hidden) .advanced-label {
  color: #6b7788;
  font-size: 12px;
  font-weight: 730;
  line-height: 1;
}

.home-view:not(.is-hidden) .advanced-picker-button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: #f3f7fc;
  color: var(--hybrid-ink, #172033);
  padding: 0 13px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  text-align: left;
  box-shadow: 0 6px 16px rgba(25, 52, 91, 0.035);
}

.home-view:not(.is-hidden) .advanced-picker-button:focus-visible {
  outline: 2px solid rgba(20, 99, 230, 0.2);
  outline-offset: 2px;
}

.home-view:not(.is-hidden) .advanced-picker-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .advanced-choice-group .choice-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 98;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  width: 100%;
  min-width: 180px;
  border: 1px solid #cfdaea;
  border-radius: 9px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(21, 38, 66, 0.14);
}

.home-view:not(.is-hidden) .advanced-choice-group.is-picker-open .choice-options {
  display: grid;
}

.home-view:not(.is-hidden) .home-panel .home-detail-toggle:focus-visible {
  outline: 2px solid rgba(18, 98, 227, 0.18);
  outline-offset: 2px;
}

@media (min-width: 721px) {
  .home-view:not(.is-hidden) .home-advanced {
    transition: padding-bottom 0.16s ease;
  }

  .home-view:not(.is-hidden) .home-advanced:has(.advanced-choice-group.is-picker-open) {
    padding-bottom: 198px;
  }
}

.home-view:not(.is-hidden) .advanced-option {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #243247;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  box-shadow: none !important;
}

.home-view:not(.is-hidden) .advanced-option:hover {
  background: #f3f7fc;
  color: #1262e3;
}

.home-view:not(.is-hidden) .advanced-option.active {
  background: #edf5ff;
  color: #1258c8;
  box-shadow: none;
}

.home-view:not(.is-hidden) .advanced-option.active::after {
  content: none;
}

.home-view:not(.is-hidden) .advanced-direct-button {
  color: #43536b;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .home-detail-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .home-view:not(.is-hidden) .advanced-picker-button {
    min-height: 44px;
    height: 44px;
  }

  .home-view:not(.is-hidden) .advanced-choice-group .choice-options {
    position: static;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 2px;
    border-radius: 12px;
    padding: 8px;
    overflow-x: visible;
  }

  .home-view:not(.is-hidden) .advanced-option {
    min-height: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid #dce5f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0 8px;
    font-size: 12.5px;
  }
}

/* Apartment explore: final size picker alignment */
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child,
.results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field > span:first-child {
  color: #58677b;
  font-size: 11.5px;
  font-weight: 760 !important;
  line-height: 1;
}

.size-picker-popover .size-option {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-right: 8px !important;
}

.size-picker-popover .size-option.is-national-size .size-national-badge {
  justify-self: end;
  margin-left: auto;
}

.size-picker-popover .size-pyeong-badge {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: 20px;
  border-radius: 6px;
  background: #eef3f9;
  color: #52657e;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.size-picker-popover .size-option.is-active .size-pyeong-badge {
  background: #ffffff;
  color: #1258c8;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active {
  display: grid;
  gap: 12px;
  width: 100%;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
  width: 100%;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px minmax(0, 1fr);
  gap: 10px 10px;
  align-items: center;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .home-section,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .home-field,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-field {
  display: contents;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .home-field > label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .field-label {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: #58677b;
  font-size: 13.5px;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .search-field > label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-field > .field-label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-timing-field > .field-label {
  grid-column: 1;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .search-field .stacked-control,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-field .location-selects,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-timing-field .trade-timing-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-field:not(.trade-timing-field) .mode-options {
  grid-column: 2 / 5;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .stacked-control {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .stacked-control input,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .cash-row,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options label,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-selects .home-select-picker-button {
  min-width: 0;
  min-height: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #f3f7fc;
  color: #172033;
  box-shadow: 0 6px 16px rgba(25, 52, 91, 0.035);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .stacked-control input {
  width: 100%;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 720;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .stacked-control small {
  min-height: 15px;
  color: #6b7788;
  font-size: 11.5px;
  font-weight: 620;
  line-height: 1.2;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .cash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 13px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .amount-input {
  min-width: 0;
  height: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .cash-row input {
  width: 100%;
  height: 46px;
  border: 0;
  background: transparent;
  color: #172033;
  padding: 0;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .cash-row > span {
  color: #172033;
  font-size: 14.5px;
  font-weight: 820;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options,
.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-timing-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options label {
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options label:has(input:checked) {
  background: var(--hybrid-blue, #256ef4);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(20, 99, 230, 0.14);
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-selects .select-wrap {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-brief-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe6f4;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.trade-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-brief-head span {
  color: #66758c;
  font-size: 12px;
  font-weight: 760;
}

.trade-brief-head strong {
  color: #1258c8;
  font-size: 13px;
  font-weight: 820;
}

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

.trade-metric-grid article {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid #e1eaf5;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.trade-metric-grid span,
.trade-metric-grid small {
  min-width: 0;
  color: #6b7788;
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.2;
}

.trade-metric-grid strong {
  min-width: 0;
  color: #172033;
  font-size: 18px;
  font-weight: 840;
  line-height: 1.1;
}

.trade-brief-panel p {
  margin: 0;
  color: #43536b;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .compact-fields {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 9px 8px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .search-field .stacked-control,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-field .location-selects,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-timing-field .trade-timing-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-field:not(.trade-timing-field) .mode-options {
    grid-column: 2;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .home-field > label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .field-label {
    min-height: 46px;
    font-size: 12.5px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .stacked-control input,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .cash-row,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options label,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-selects .home-select-picker-button {
    min-height: 46px;
    height: 46px;
    border-radius: 10px;
    font-size: 12.5px;
  }

  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .mode-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .trade-timing-options,
  .home-view:not(.is-hidden) .home-mode-panel[data-home-panel="move"].active .location-selects {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

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

.home-view:not(.is-hidden) .hero-title-accent .hero-title-suffix::before {
  content: none !important;
}

/* Apartment explore: mobile filters should be visible, not a condition-edit toggle */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    width: calc(100% - 12px);
    display: block;
    border-radius: 12px !important;
    padding: 10px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    display: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:not(.is-mobile-open) .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    border-top: 0 !important;
    padding: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    grid-column: 1 / -1;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label {
    min-height: 0 !important;
    display: grid !important;
    gap: 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    min-height: 42px !important;
    height: 42px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    grid-column: 1 / -1;
  }
}

/* Apartment explore: multi-select size picker */
.size-picker-popover .size-picker-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid #edf2f7;
}

.size-picker-popover .size-picker-head strong {
  color: #142033;
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1;
}

.size-picker-popover .size-picker-head span {
  display: inline-flex !important;
  color: #7b8798;
  font-size: 11px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}

.size-picker-popover .size-picker-head span.is-warning {
  color: #d45545;
}

.size-picker-popover .size-picker-actions {
  display: flex !important;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.size-picker-popover .size-picker-actions button {
  min-height: 30px;
  height: 30px !important;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #ffffff;
  color: #243247;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 720;
  box-shadow: none !important;
}

.size-picker-popover .size-picker-actions button:last-child {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

/* Apartment explore: mobile viewport containment */
@media (max-width: 720px) {
  html,
  body,
  .app,
  .results-view[data-active-tab="explore"]:not(.is-previewing) {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-hidden):not(.is-previewing) {
    box-sizing: border-box !important;
    justify-items: stretch !important;
    gap: 0 !important;
    padding: 0 0 12px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-diagnosis-strip,
  .results-view[data-active-tab="explore"] .explore-results-layout,
  .results-view[data-active-tab="explore"] .result-data-card,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active,
  .results-view[data-active-tab="explore"] .sheet-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar {
    justify-self: stretch !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle {
    box-sizing: border-box !important;
    max-height: 38px !important;
    margin: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  .results-view[data-active-tab="explore"] .explore-diagnosis-strip {
    margin-top: 0 !important;
    padding-inline: 10px !important;
  }

  .results-view[data-active-tab="explore"] .explore-results-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 0 10px 16px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card {
    border-radius: 10px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card .sheet-shell {
    overflow: auto !important;
    overscroll-behavior: contain;
  }
}

/* Apartment explore: mobile action buttons stay inside the filter rail */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 10px !important;
  }
}

/* Apartment explore: final compact mobile filter rail */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    margin: 0 auto 5px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 6px 10px 7px !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    display: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:not(.is-mobile-open) .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 38px !important;
    border-top: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls::-webkit-scrollbar {
    display: none;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    flex: 0 0 auto !important;
    grid-column: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    scroll-snap-align: start;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
    width: 250px !important;
    flex-basis: 250px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    width: 214px !important;
    flex-basis: 214px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field {
    width: 152px !important;
    flex-basis: 152px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field {
    width: 132px !important;
    flex-basis: 132px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    width: 92px !important;
    flex-basis: 92px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    width: 92px !important;
    flex-basis: 92px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls select,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    min-width: 0 !important;
    min-height: 38px !important;
    height: 38px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #eef4fb !important;
    color: #1e3047 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
    display: flex !important;
    align-items: center !important;
    padding: 0 9px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
    min-height: 0 !important;
    height: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #11213a !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-unit {
    color: #34445a !important;
    font-size: 11.5px !important;
    font-weight: 760 !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 8px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle input,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .budget-trade-toggle input {
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
    min-height: 14px !important;
    accent-color: #1262e3;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-toggle span {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #26364d !important;
    font-size: 11px !important;
    font-weight: 760 !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .size-picker-button {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button span:first-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    justify-content: center !important;
    border-radius: 9px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #detailSearchButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    border: 0 !important;
    background: #eef4fb !important;
    color: #243247 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    border: 0 !important;
    background: #1262e3 !important;
    color: #ffffff !important;
  }
}

/* Apartment explore: stabilize size filter popover text wrapping */
.size-picker-popover {
  width: min(var(--size-popover-width, 300px), calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  overflow-x: hidden !important;
}

.size-picker-popover .size-picker-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
}

.size-picker-popover .size-picker-head strong,
.size-picker-popover .size-picker-head span {
  display: block !important;
  min-width: 0;
  max-width: 100%;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.size-picker-popover .size-option {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: 7px;
  padding: 7px 10px !important;
  line-height: 1.22 !important;
}

.size-picker-popover .size-option-text {
  max-width: 100%;
  line-height: 1.22;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.size-picker-popover .size-option.is-national-size .size-national-badge {
  justify-self: end;
  margin-left: 0;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .size-picker-popover {
    inset-inline: 10px auto !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(74dvh, 560px) !important;
    padding: 10px !important;
  }

  .size-picker-range-list,
  .size-picker-exact-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .size-picker-popover .size-option {
    min-height: 44px;
    justify-items: stretch;
    padding: 7px 6px !important;
    text-align: left;
  }

  .size-picker-popover .size-option.is-national-size {
    min-height: 44px;
  }

  .size-picker-popover .size-option.is-national-size .size-national-badge {
    justify-self: end;
  }
}

/* Condition alert page */
.size-picker-popover .size-option {
  grid-template-columns: max-content max-content max-content;
  justify-content: start;
}

/* Match the area picker popover to the district picker layout. */
.size-picker-popover {
  max-height: min(64vh, 440px);
  gap: 10px;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  box-shadow: 0 18px 38px rgba(21, 38, 66, 0.16);
}

.size-picker-popover .size-picker-head,
.size-picker-popover .size-picker-selected,
.size-picker-popover .size-picker-actions {
  display: flex !important;
}

.size-picker-popover .size-picker-head {
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
}

.size-picker-popover .size-picker-head strong {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: baseline;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
  white-space: nowrap !important;
}

.size-picker-popover .size-picker-head strong .field-label-secondary {
  display: inline !important;
  font-size: inherit !important;
  font-weight: 480 !important;
  white-space: nowrap !important;
}

.size-picker-popover .size-picker-head span {
  color: #7b8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.size-picker-popover .size-picker-range-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.size-picker-popover .size-option {
  min-height: 32px;
  border: 1px solid #dce5f0;
  border-radius: 7px;
  background: #f8fafc;
  padding: 6px 8px !important;
  font-size: 12px;
  font-weight: 680;
}

.size-picker-popover .size-option:hover {
  border-color: #b9cbe2;
  background: #f2f7fd;
}

.size-picker-popover .size-option.is-active,
.size-picker-popover .size-option.is-national-size.is-active {
  border-color: #2d72df;
  background: #edf5ff;
  color: #1258c8;
}

.size-picker-popover .size-option.is-national-size {
  grid-column: auto;
}

.size-picker-popover .size-pyeong-badge,
.size-picker-popover .size-option.is-active .size-pyeong-badge {
  border: 1px solid #dce5f0;
  background: #ffffff;
  color: #52657e;
}

.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  border: 1px solid #dce5f0;
  background: #ffffff;
  color: #1262e3;
}

.size-picker-popover .size-picker-selected {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf2f7;
  padding-top: 9px;
}

.size-picker-popover .size-picker-actions {
  justify-content: flex-end;
  gap: 7px;
  padding: 0;
  border: 0;
}

.size-picker-popover .size-picker-actions button {
  min-height: 32px;
  height: 32px !important;
  border-radius: 7px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 720;
}

.top-link-button.active {
  background: #0f766e;
  color: #ffffff;
  font-weight: 760;
}

.condition-alert-view {
  width: min(1180px, calc(100vw - 48px));
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  margin: 22px auto 56px;
  color: #172033;
}

.condition-alert-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 18px;
  align-items: end;
  border-bottom: 1px solid #dfe7f1;
  padding: 4px 0 18px;
}

.condition-alert-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.condition-alert-title > span,
.alert-panel-head span,
.alert-delivery-head span,
.alert-section-head span,
.alert-active-list header span,
.alert-summary-panel > span,
.alert-rule-band header span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 840;
  line-height: 1;
}

/* Match every area option to the plain households and move-in-year menu items. */
.size-picker-popover .size-option,
.size-picker-popover .size-option.is-national-size {
  min-height: 34px;
  height: auto !important;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: #243247;
  padding: 0 10px !important;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

.size-picker-popover .size-option:hover,
.size-picker-popover .size-option.is-national-size:hover {
  border: 0 !important;
  background: #f3f7fc !important;
  color: #1262e3;
}

.size-picker-popover .size-option.is-active,
.size-picker-popover .size-option.is-national-size.is-active {
  border: 0 !important;
  background: #edf5ff !important;
  color: #1258c8 !important;
}

.condition-alert-title h2 {
  margin: 0;
  color: #101827;
  font-size: 34px;
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1.12;
}

.condition-alert-title p {
  max-width: 620px;
  margin: 0;
  color: #5f6f85;
  font-size: 14.5px;
  font-weight: 620;
  line-height: 1.45;
}

.condition-alert-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.condition-alert-metrics article {
  min-width: 0;
  display: grid;
  gap: 7px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 13px 14px;
}

.condition-alert-metrics span {
  color: #6c788a;
  font-size: 11.5px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.condition-alert-metrics strong {
  color: #132238;
  font-size: 22px;
  font-weight: 860;
  line-height: 1;
}

.condition-alert-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.alert-builder-panel,
.alert-control-panel > section,
.alert-matches-section {
  min-width: 0;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #ffffff;
}

.alert-builder-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.alert-panel-head,
.alert-section-head,
.alert-active-list header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.alert-panel-head > div,
.alert-section-head > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.alert-panel-head strong,
.alert-section-head strong,
.alert-active-list header strong {
  min-width: 0;
  color: #142033;
  font-size: 18px;
  font-weight: 830;
  line-height: 1.15;
}

/* Keep the secondary investment analysis mode visually muted. */
.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="investment"] {
  color: #929dac;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="investment"]:hover {
  color: #748195;
}

.results-view[data-active-tab="explore"] .analysis-mode-group [data-explore-analysis-mode="investment"] .analysis-pro-badge {
  background: #eef1f4;
  color: #7f8a99;
}

/* Mirror the district popover's header, selection summary, and actions. */
.size-picker-popover .size-picker-head {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
}

.size-picker-popover .size-picker-head strong {
  display: block !important;
  color: #142033;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.size-picker-popover .size-picker-head > span,
.size-picker-popover .size-picker-selected > span {
  display: block !important;
  color: #7b8798;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.size-picker-popover .size-picker-selected {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border-top: 1px solid #edf2f7;
  padding-top: 9px;
}

.size-picker-popover .size-picker-selected strong {
  min-width: 0;
  overflow: hidden;
  color: #142033;
  font-size: 12px;
  font-weight: 730;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size-picker-popover .size-picker-actions {
  display: flex !important;
  justify-content: flex-end;
  gap: 7px;
  padding: 0;
  border: 0;
}

.size-picker-popover .size-picker-actions button {
  min-height: 32px;
  height: 32px !important;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  background: #ffffff;
  color: #243247;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 720;
  box-shadow: none !important;
}

.size-picker-popover .size-picker-actions button:last-child {
  border-color: #1262e3;
  background: #1262e3;
  color: #ffffff;
}

.alert-condition-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-condition-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  background: #f7fafc;
  color: #2d425c;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

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

.alert-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.alert-field > span:first-child {
  color: #65758b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.alert-field input,
.alert-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid #ced9e7;
  border-radius: 8px;
  background: #ffffff;
  color: #12243b;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 760;
  outline: none;
}

.alert-field input:focus,
.alert-field select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.alert-input-unit {
  position: relative;
  display: block;
}

.alert-input-unit input {
  padding-right: 48px;
}

.alert-input-unit small {
  position: absolute;
  right: 12px;
  top: 50%;
  color: #7a8797;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  transform: translateY(-50%);
}

.alert-rule-band {
  display: grid;
  gap: 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  padding: 15px 0;
}

.alert-rule-band header {
  display: grid;
  gap: 6px;
}

.alert-rule-band header strong,
.alert-delivery-head strong,
.alert-summary-panel > strong {
  color: #172033;
  font-size: 14px;
  font-weight: 820;
  line-height: 1.25;
}

.alert-rule-list,
.alert-channel-list {
  display: grid;
  gap: 8px;
}

.alert-rule-list label,
.alert-channel-list label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #33465f;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.25;
}

.alert-rule-list input,
.alert-channel-list input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0f766e;
  flex: 0 0 auto;
}

.alert-delivery-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.alert-delivery-head {
  display: grid;
  gap: 6px;
}

.alert-channel-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alert-channel-list label {
  min-height: 42px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 12px;
}

.alert-builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.alert-primary-action,
.alert-secondary-action,
.alert-match-item button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
}

.alert-primary-action {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.alert-secondary-action {
  border: 1px solid #d6e1ee;
  background: #ffffff;
  color: #1f344d;
}

.alert-control-panel {
  display: grid;
  gap: 12px;
}

.alert-active-list,
.alert-summary-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.alert-active-item {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 11px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.alert-active-item.active {
  border-color: #0f766e;
  background: #effaf7;
}

.alert-active-item span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.alert-active-item strong {
  min-width: 0;
  color: #16243a;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-active-item small {
  min-width: 0;
  color: #708096;
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.15;
}

/* Final compact width and softer national-size badge. */
.size-picker-popover {
  width: min(284px, calc(100vw - 24px)) !important;
}

.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  min-height: 18px;
  border: 0 !important;
  border-radius: 999px;
  background: #e8f1ff !important;
  color: #1763c6 !important;
  padding: 0 7px;
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: -0.01em;
  box-shadow: none !important;
}

.alert-active-item em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  background: #e7f6f2;
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

.alert-summary-panel {
  background: #172033;
  color: #ffffff;
}

.alert-control-panel > .alert-summary-panel {
  border-color: #172033;
  background: #172033;
  color: #ffffff;
}

.alert-summary-panel > span {
  color: #83e2d1;
}

.alert-summary-panel > strong {
  color: #ffffff;
}

.alert-summary-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.alert-summary-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 8px;
}

.alert-summary-panel dt,
.alert-summary-panel dd {
  margin: 0;
  font-size: 12px;
  line-height: 1;
}

.alert-summary-panel dt {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 650;
}

.alert-summary-panel dd {
  color: #ffffff;
  font-weight: 820;
}

.alert-matches-section {
  display: grid;
  gap: 0;
  padding: 16px;
}

.alert-section-head {
  padding-bottom: 13px;
}

.alert-match-list {
  display: grid;
  gap: 8px;
}

.alert-match-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 140px minmax(160px, 0.6fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.alert-match-main,
.alert-match-price,
.alert-match-reason {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.alert-match-main strong,
.alert-match-price strong {
  min-width: 0;
  color: #142033;
  font-size: 15px;
  font-weight: 840;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-match-main small,
.alert-match-price span,
.alert-match-reason small {
  min-width: 0;
  color: #6d7c90;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.alert-match-badge,
.alert-match-reason span {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: #e9f7f2;
  color: #0f766e;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.alert-match-badge.muted {
  background: #fff6e6;
  color: #b45309;
}

.alert-match-reason span {
  background: #edf4ff;
  color: #1d4ed8;
}

.alert-match-item button {
  border: 1px solid #cfdbea;
  background: #ffffff;
  color: #243650;
}

@media (max-width: 980px) {
  .condition-alert-head,
  .condition-alert-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .condition-alert-metrics {
    max-width: 620px;
  }

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

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

  .alert-match-item {
    grid-template-columns: minmax(0, 1fr) 120px auto;
  }

  .alert-match-reason {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .condition-alert-view {
    width: 100%;
    max-width: 100vw;
    min-height: 0;
    gap: 14px;
    margin: 0 auto 36px;
    padding: 16px 12px 0;
    box-sizing: border-box;
  }

  .condition-alert-head {
    gap: 14px;
    padding-bottom: 14px;
  }

  .condition-alert-title h2 {
    font-size: 25px;
  }

  .condition-alert-title p {
    font-size: 13px;
  }

  .condition-alert-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    gap: 6px;
  }

  .condition-alert-metrics article {
    padding: 10px 8px;
  }

  .condition-alert-metrics span {
    font-size: 10.5px;
  }

  .condition-alert-metrics strong {
    font-size: 18px;
  }

  .alert-builder-panel,
  .alert-matches-section {
    padding: 13px;
  }

  .alert-panel-head,
  .alert-section-head {
    align-items: start;
  }

  .alert-panel-head strong,
  .alert-section-head strong {
    font-size: 16px;
  }

  .alert-panel-head .alert-secondary-action,
  .alert-section-head .alert-secondary-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .alert-condition-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .alert-condition-strip::-webkit-scrollbar {
    display: none;
  }

  .alert-form-grid,
  .alert-control-panel,
  .alert-channel-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .alert-field input,
  .alert-field select {
    height: 42px;
    font-size: 12.5px;
  }

  .alert-delivery-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .alert-builder-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  }

  .alert-primary-action,
  .alert-secondary-action {
    width: 100%;
  }

  .alert-active-list,
  .alert-summary-panel {
    padding: 13px;
  }

  .alert-match-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .alert-match-price,
  .alert-match-reason {
    grid-column: 1 / -1;
  }

  .alert-match-item button {
    grid-column: 2;
    grid-row: 1;
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }
}

/* Condition alert: saved conditions and match-centered page */
.condition-alert-view {
  width: min(1180px, calc(100vw - 56px));
  gap: 24px;
  margin: 28px auto 30px;
  background: transparent;
}

.condition-alert-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 0;
  padding: 0;
}

.condition-alert-title h2 {
  font-size: 32px;
  font-weight: 840;
  line-height: 1.12;
}

.condition-alert-title p {
  color: #5d5550;
  font-size: 14px;
  font-weight: 620;
}

.alert-create-button {
  min-width: 150px;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: #0f4ad8;
  color: #ffffff;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 820;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 74, 216, 0.18);
}

.condition-alert-stats {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e2ddd7;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.condition-alert-stats article {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
}

.condition-alert-stats article + article {
  border-left: 1px solid #e9e3dc;
}

.alert-stat-icon {
  display: none;
}

.alert-stat-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  border: 2px solid #7d716c;
  border-radius: 50% 50% 45% 45%;
}

.alert-stat-icon.trend::before {
  border-radius: 4px;
  transform: skew(-7deg);
}

.alert-stat-icon.inbox::before {
  border-radius: 4px;
}

.condition-alert-stats span:not(.alert-stat-icon) {
  display: block;
  color: #716862;
  font-size: 12.5px;
  font-weight: 680;
  line-height: 1;
}

.condition-alert-stats strong {
  display: block;
  margin-top: 6px;
  color: #171313;
  font-size: 24px;
  font-weight: 860;
  line-height: 1;
}

.condition-alert-workspace {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  border: 1px solid #e2ddd7;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.saved-condition-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  border-right: 1px solid #e5e0da;
  padding: 28px 24px;
}

.saved-condition-panel > header,
.condition-match-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-condition-panel > header strong,
.condition-match-section > header strong,
.condition-summary-table h4 {
  margin: 0;
  color: #211b18;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.2;
}

.saved-condition-panel > header button,
.condition-match-section > header button,
.condition-detail-actions button,
.condition-match-card footer button,
.saved-condition-more {
  min-height: 38px;
  border: 1px solid #ddd8d2;
  border-radius: 7px;
  background: #ffffff;
  color: #332c28;
  padding: 0 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.saved-condition-list {
  display: grid;
  gap: 20px;
}

.saved-condition-item {
  position: relative;
  min-width: 0;
  min-height: 126px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid #e0dbd6;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px 14px 18px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.saved-condition-item.active {
  border-color: #2354d6;
  box-shadow: inset 0 0 0 1px #2354d6;
}

.saved-condition-item.muted {
  color: #8d8781;
}

.saved-condition-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: #b7b6b3;
}

.saved-condition-dot.active,
.saved-condition-item.active .saved-condition-dot {
  background: #164bc5;
}

.saved-condition-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.saved-condition-copy strong {
  color: #221d1a;
  font-size: 17px;
  font-weight: 820;
  line-height: 1.25;
}

.saved-condition-copy small {
  color: #6e665f;
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1.35;
}

.saved-condition-copy em {
  min-width: 0;
  height: auto;
  display: block;
  justify-content: start;
  border-radius: 0;
  background: transparent;
  color: #1f55c9;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.alert-switch {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #d0d0d0;
}

.alert-switch::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 2px;
  border-radius: 50%;
  background: #ffffff;
}

.alert-switch.is-on {
  background: #1f55d5;
}

.alert-switch.is-on::after {
  margin-left: 16px;
}

.saved-condition-more {
  width: 100%;
  justify-self: stretch;
  font-size: 14px;
}

.saved-condition-panel > p {
  margin: -2px 0 0;
  color: #7b746e;
  font-size: 12.5px;
  font-weight: 620;
  text-align: center;
}

.condition-detail-panel {
  min-width: 0;
  display: grid;
  align-content: start;
}

.condition-detail-head {
  position: relative;
  display: grid;
  gap: 16px;
  border-bottom: 1px solid #e7e1dc;
  padding: 28px 26px 26px;
}

.condition-detail-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.condition-detail-head h3 {
  margin: 0;
  color: #211b18;
  font-size: 24px;
  font-weight: 840;
  line-height: 1.15;
}

.condition-on-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #e5f8ea;
  color: #159246;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.condition-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #6d655f;
  font-size: 13px;
  font-weight: 650;
}

.condition-detail-actions {
  position: absolute;
  right: 24px;
  top: 28px;
  display: flex;
  gap: 10px;
}

.condition-summary-table {
  display: grid;
  gap: 14px;
  padding: 22px 24px 14px;
}

.condition-summary-table dl {
  display: grid;
  margin: 0;
  border: 1px solid #e8e2dd;
  border-radius: 8px;
  overflow: hidden;
}

.condition-summary-table div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px minmax(0, 1fr);
  min-height: 42px;
  border-bottom: 1px solid #eee8e3;
}

.condition-summary-table div:last-child {
  border-bottom: 0;
}

.condition-summary-table dt,
.condition-summary-table dd {
  min-width: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1.25;
}

.condition-summary-table dt {
  background: #faf8f6;
  color: #6d655f;
  font-weight: 700;
}

.condition-summary-table dd {
  color: #332c28;
  font-weight: 680;
}

.condition-summary-table dd span {
  margin-left: 10px;
  border: 1px solid #e5ded8;
  border-radius: 999px;
  color: #8a817a;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 720;
}

.condition-summary-table div:nth-child(2),
.condition-summary-table div:nth-child(4),
.condition-summary-table div:nth-child(5),
.condition-summary-table div:nth-child(6) {
  grid-template-columns: 120px minmax(0, 1fr);
}

.condition-match-section {
  display: grid;
  gap: 14px;
  padding: 14px 24px 26px;
}

.condition-match-list {
  display: grid;
  gap: 8px;
}

.condition-match-card {
  min-width: 0;
  display: grid;
  border: 1px solid #e4ded9;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.condition-match-card header {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) minmax(120px, auto) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.condition-match-card header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 5px;
  background: #0f4ad8;
  color: #ffffff;
  font-size: 12px;
  font-weight: 820;
}

.condition-match-card header small,
.condition-match-card header em,
.condition-match-card header b {
  min-width: 0;
  color: #746b65;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.25;
}

.condition-match-card header strong {
  min-width: 0;
  color: #211b18;
  font-size: 16px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.condition-match-card header b {
  justify-self: end;
  font-weight: 720;
}

.condition-price-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #eee8e3;
  border-bottom: 1px solid #eee8e3;
}

.condition-price-row span {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #eee8e3;
  color: #332c28;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
}

.condition-price-row span:nth-child(2),
.condition-price-row span:nth-child(5) {
  color: #079369;
}

.condition-price-row span:nth-child(3) {
  color: #164bc5;
}

.condition-price-row span:last-child {
  border-right: 0;
}

.condition-match-card footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.condition-match-card footer span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #dff7ea;
  color: #139c5c;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 820;
}

.condition-match-card footer small {
  color: #4f4741;
  font-size: 13px;
  font-weight: 680;
}

.condition-match-section > p {
  margin: 10px 0 0;
  color: #7a726c;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.condition-alert-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 28px;
  border-top: 1px solid #e4ded8;
  margin-top: 4px;
  padding: 22px 8px 6px;
}

.condition-alert-footer strong {
  color: #2a211d;
  font-size: 18px;
  font-weight: 840;
  line-height: 1;
}

.condition-alert-footer span {
  grid-column: 1;
  color: #817870;
  font-size: 12px;
  font-weight: 620;
  line-height: 1;
}

.condition-alert-footer nav {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 24px;
}

.condition-alert-footer a {
  color: #625a54;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

@media (max-width: 1020px) {
  .condition-alert-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .saved-condition-panel {
    border-right: 0;
    border-bottom: 1px solid #e5e0da;
  }
}

@media (max-width: 720px) {
  .condition-alert-view {
    width: 100%;
    max-width: 100vw;
    gap: 16px;
    margin: 0 auto 24px;
    padding: 16px 12px 0;
    box-sizing: border-box;
  }

  .condition-alert-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .condition-alert-title h2 {
    font-size: 26px;
  }

  .alert-create-button {
    width: 100%;
    min-height: 44px;
  }

  .condition-alert-stats {
    width: 100%;
  }

  .condition-alert-stats article {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 6px;
    padding: 12px 7px;
    text-align: center;
  }

  .alert-stat-icon {
    display: none;
  }

  .condition-alert-stats strong {
    font-size: 20px;
  }

  .condition-alert-workspace {
    border-radius: 8px;
  }

  .saved-condition-panel,
  .condition-detail-head,
  .condition-summary-table,
  .condition-match-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .saved-condition-list {
    gap: 10px;
  }

  .saved-condition-item {
    min-height: 104px;
    padding: 15px 12px;
  }

  .saved-condition-copy strong {
    font-size: 15px;
  }

  .condition-detail-head {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .condition-detail-head h3 {
    font-size: 20px;
    padding-right: 88px;
  }

  .condition-detail-head > div:first-child {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .condition-detail-actions {
    right: 14px;
    top: 18px;
  }

  .condition-detail-actions button {
    min-height: 34px;
    padding: 0 10px;
  }

  .condition-summary-table div,
  .condition-summary-table div:nth-child(2),
  .condition-summary-table div:nth-child(4),
  .condition-summary-table div:nth-child(5),
  .condition-summary-table div:nth-child(6) {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .condition-summary-table div:first-child,
  .condition-summary-table div:nth-child(3) {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .condition-summary-table div:first-child dt:nth-of-type(2),
  .condition-summary-table div:first-child dd:nth-of-type(2),
  .condition-summary-table div:nth-child(3) dt:nth-of-type(2),
  .condition-summary-table div:nth-child(3) dd:nth-of-type(2) {
    border-top: 1px solid #eee8e3;
  }

  .condition-summary-table dt,
  .condition-summary-table dd {
    min-height: 39px;
    font-size: 12px;
    padding: 0 10px;
  }

  .condition-match-card header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .condition-match-card header small {
    grid-column: 2;
  }

  .condition-match-card header strong {
    grid-column: 1 / -1;
  }

  .condition-match-card header em {
    grid-column: 1 / 3;
  }

  .condition-match-card header b {
    grid-column: 3;
    justify-self: end;
    font-size: 11.5px;
  }

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

  .condition-price-row span {
    justify-content: flex-start;
    border-bottom: 1px solid #eee8e3;
    font-size: 12px;
  }

  .condition-price-row span:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .condition-match-card footer {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .condition-match-card footer span {
    justify-self: start;
  }

  .condition-match-card footer button {
    width: 100%;
  }

  .condition-alert-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 20px 2px 2px;
  }

  .condition-alert-footer span,
  .condition-alert-footer nav {
    grid-column: 1;
    grid-row: auto;
  }

  .condition-alert-footer nav {
    justify-content: flex-start;
    gap: 14px;
  }
}

/* Apartment explore: keep expanded sale-history actions inside the visible table viewport */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row td {
  padding: 5px 12px !important;
  text-align: left !important;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row .deal-history-more-button {
  position: sticky;
  left: calc(42px + 42px + 54px + 12px);
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 190px);
  min-height: 26px;
  border-color: #aebfd4;
  background: #ffffff;
  color: #18304a;
  padding: 0 10px;
  box-shadow: 0 1px 3px rgba(18, 40, 70, 0.08) !important;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row .deal-history-more-button:hover,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row .deal-history-more-button:focus-visible {
  border-color: #7e9cc2;
  background: #f8fbff;
  color: #0d58c4;
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-more-row .deal-history-more-button {
    left: calc(42px + 42px + 54px + 8px);
    max-width: calc(100vw - 170px);
    padding: 0 8px;
    font-size: 10.5px;
  }
}

/* Topbar complex search: sits between the main tabs and saved-apartment actions */
.top-complex-search {
  position: relative;
  flex: 0 0 226px;
  min-width: 190px;
  max-width: 226px;
  height: 34px;
  display: flex;
  align-items: center;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: var(--ref-blue-soft, #eaf2ff);
  box-shadow: none;
}

.top-complex-search:focus-within {
  background: #e3edff;
  box-shadow: none;
}

.top-complex-search input {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ref-blue, #0b5ee8);
  padding: 0 6px 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 740;
  outline: 0;
}

.top-complex-search input::placeholder {
  color: #57708f;
  font-weight: 740;
  opacity: 0.78;
}

.top-complex-search > button[type="submit"] {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ref-blue, #0b5ee8);
  padding: 0;
  box-shadow: none;
  cursor: pointer;
}

.top-complex-search > button[type="submit"]:hover,
.top-complex-search > button[type="submit"]:focus-visible {
  background: rgba(11, 94, 232, 0.08);
  color: var(--ref-blue-dark, #084fc5);
  outline: 0;
}

.top-complex-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-complex-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 4px;
  max-height: min(320px, calc(100vh - 96px));
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(15, 117, 185, 0.16);
  border-radius: 10px;
  background: #ffffff;
  box-shadow:
    0 18px 42px rgba(12, 48, 84, 0.14),
    0 4px 14px rgba(12, 48, 84, 0.08);
}

.top-complex-suggestions[hidden] {
  display: none !important;
}

.top-complex-suggestion {
  width: 100%;
  min-height: 44px;
  display: grid;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #172033;
  padding: 8px 10px;
  text-align: left;
  box-shadow: none;
}

.top-complex-suggestion:hover,
.top-complex-suggestion:focus-visible,
.top-complex-suggestion[aria-selected="true"] {
  background: #e8f7ff;
  color: #0a6fa6;
}

.top-complex-suggestion-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-complex-suggestion-meta {
  min-width: 0;
  overflow: hidden;
  color: #60748a;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-complex-suggestions-empty {
  padding: 12px 10px;
  color: #60748a;
  font-size: 12px;
  font-weight: 650;
}

@media (max-width: 960px) {
  .top-complex-search {
    flex-basis: 210px;
    min-width: 170px;
  }
}

@media (max-width: 720px) {
  .top-complex-search {
    display: none;
  }
}

/* Apartment explore: inline sale/rent history controls and apartment info */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-control-row td {
  background: #f6faff;
  border-top: 1px solid #dce8f6;
  border-bottom-color: #dce8f6;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-control-row td.deal-history-control-cell {
  padding: 7px 8px !important;
  text-align: left !important;
  vertical-align: top;
}

.results-view[data-active-tab="explore"] .deal-history-control-panel {
  position: sticky;
  left: 8px;
  z-index: 10;
  width: 128px;
  display: grid;
  gap: 6px;
}

.results-view[data-active-tab="explore"] .deal-history-control-label {
  color: #596d83;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .deal-history-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #b9c9dc;
  border-radius: 5px;
  background: #ffffff;
}

.results-view[data-active-tab="explore"] .deal-history-mode-button,
.results-view[data-active-tab="explore"] .deal-history-action-button {
  min-width: 0;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #31465d;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none !important;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .deal-history-mode-button + .deal-history-mode-button {
  border-left: 1px solid #d8e2ee;
}

.results-view[data-active-tab="explore"] .deal-history-mode-button.is-active {
  background: #105cc6;
  color: #ffffff;
}

.results-view[data-active-tab="explore"] .deal-history-mode-button:disabled,
.results-view[data-active-tab="explore"] .deal-history-action-button:disabled {
  color: #9aa8b7;
  cursor: default;
}

.results-view[data-active-tab="explore"] .deal-history-action-buttons {
  display: grid;
  gap: 4px;
}

.results-view[data-active-tab="explore"] .deal-history-action-button {
  border: 1px solid #c8d6e8;
  border-radius: 5px;
  background: #ffffff;
  text-align: center;
}

.results-view[data-active-tab="explore"] .deal-history-action-button:not(:disabled):hover,
.results-view[data-active-tab="explore"] .deal-history-action-button:not(:disabled):focus-visible,
.results-view[data-active-tab="explore"] .deal-history-mode-button:not(:disabled):focus-visible {
  border-color: #86a4c9;
  background: #eef6ff;
  color: #0d58c4;
  outline: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-control-row td.deal-history-summary-cell {
  padding: 8px 10px !important;
  text-align: left !important;
  vertical-align: top;
}

.results-view[data-active-tab="explore"] .deal-history-summary-cell strong,
.results-view[data-active-tab="explore"] .deal-history-summary-cell span {
  display: block;
  line-height: 1.35;
}

.results-view[data-active-tab="explore"] .deal-history-summary-cell strong {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.results-view[data-active-tab="explore"] .deal-history-summary-cell span {
  color: #65788f;
  font-size: 11px;
  font-weight: 720;
}

.apartment-info-panel {
  display: grid;
  gap: 12px;
}

.deal-history-dialog.is-info {
  width: min(720px, calc(100vw - 32px));
}

.apartment-info-summary {
  display: grid;
  gap: 4px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid #e1e9f3;
}

.apartment-info-summary strong {
  color: #172033;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
}

.apartment-info-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
}

.apartment-info-grid {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) minmax(160px, 1.3fr);
  overflow: hidden;
  border: 1px solid #dce6f2;
  border-radius: 7px;
  background: #ffffff;
}

.apartment-info-grid dt,
.apartment-info-grid dd {
  min-height: 34px;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid #e7edf5;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.25;
}

.apartment-info-grid dt {
  background: #f6f9fd;
  color: #5c7088;
  font-weight: 850;
}

.apartment-info-grid dd {
  color: #223047;
  font-weight: 780;
}

.apartment-info-grid dt:last-of-type,
.apartment-info-grid dd:last-of-type {
  border-bottom: 0;
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .deal-history-control-panel {
    width: 118px;
  }

  .results-view[data-active-tab="explore"] .deal-history-mode-button,
  .results-view[data-active-tab="explore"] .deal-history-action-button {
    min-height: 23px;
    padding: 0 4px;
    font-size: 10px;
  }

  .apartment-info-grid {
    grid-template-columns: 94px minmax(0, 1fr);
  }
}

/* Apartment explore: keep filter action buttons aligned after legacy toolbar overrides */
@media (min-width: 721px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    box-sizing: border-box !important;
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    justify-self: stretch !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    margin-left: 3px !important;
    margin-right: 12px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    margin-left: 12px !important;
    margin-right: 3px !important;
  }
}

@media (min-width: 1181px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      260px
      minmax(258px, 1fr)
      minmax(126px, 0.55fr)
      minmax(118px, 0.45fr)
      minmax(118px, 0.45fr)
      128px
      128px !important;
  }
}

/* Apartment explore: compact inline deal-history controls without a tall blank summary area */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-control-row td.deal-history-control-cell {
  padding: 6px 8px !important;
  vertical-align: middle !important;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-control-panel {
  position: sticky;
  left: 8px;
  z-index: 10;
  width: min(880px, calc(100vw - 74px));
  display: grid;
  grid-template-columns: auto auto minmax(170px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-control-label {
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-summary-cell {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-summary-cell strong,
.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-summary-cell span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-action-button {
  min-height: 24px;
  padding: 0 7px;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-control-panel {
    width: min(560px, calc(100vw - 28px));
    grid-template-columns: auto auto minmax(132px, 1fr);
    gap: 6px;
  }

  .results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-action-buttons {
    grid-column: 1 / -1;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .deal-history-control-row .deal-history-action-buttons::-webkit-scrollbar {
    display: none;
  }
}

/* Apartment explore: show sale previews first, then detail/list actions */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-action-row td {
  background: #f6faff;
  border-top: 1px solid #dce8f6;
  border-bottom-color: #dce8f6;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-action-row td.deal-history-action-cell {
  padding: 7px 8px !important;
  text-align: left !important;
  vertical-align: middle !important;
}

.results-view[data-active-tab="explore"] .deal-history-action-panel {
  position: sticky;
  left: 8px;
  z-index: 10;
  width: min(820px, calc(100vw - 74px));
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.results-view[data-active-tab="explore"] .deal-history-action-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.results-view[data-active-tab="explore"] .deal-history-action-copy strong,
.results-view[data-active-tab="explore"] .deal-history-action-copy span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .deal-history-action-copy strong {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.results-view[data-active-tab="explore"] .deal-history-action-copy span {
  color: #65788f;
  font-size: 11px;
  font-weight: 720;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button {
  min-height: 24px;
  padding: 0 7px;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .deal-history-action-panel {
    width: min(560px, calc(100vw - 28px));
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-buttons {
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-buttons::-webkit-scrollbar {
    display: none;
  }
}

/* Apartment explore: polished apartment-name loading and popup-like detail menu */
@keyframes dealHistorySpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dealHistorySoftPulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(15, 57, 102, 0.08);
  }

  50% {
    box-shadow: 0 14px 30px rgba(15, 57, 102, 0.14);
  }
}

.results-view[data-active-tab="explore"] .apartment-list-row.is-history-loading td {
  background: #f3f8ff;
}

.results-view[data-active-tab="explore"] .deal-history-toggle.is-loading {
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  color: #0756b9;
}

.results-view[data-active-tab="explore"] .deal-history-toggle.is-loading::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(7, 86, 185, 0.18);
  border-top-color: #0756b9;
  border-radius: 999px;
  animation: dealHistorySpin 0.8s linear infinite;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-state-row.is-loading td.deal-history-state-cell {
  padding: 8px !important;
  background: #f3f8ff;
  border-top: 1px solid #d9e7f7;
  border-bottom-color: #d9e7f7;
  text-align: left !important;
}

.results-view[data-active-tab="explore"] .deal-history-inline-state {
  position: sticky;
  left: 8px;
  z-index: 10;
  width: min(460px, calc(100vw - 74px));
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #c9dbf0;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 11px;
  color: #26384f;
}

.results-view[data-active-tab="explore"] .deal-history-inline-state.is-loading {
  animation: dealHistorySoftPulse 1.4s ease-in-out infinite;
}

.results-view[data-active-tab="explore"] .deal-history-state-spinner {
  display: none;
}

.results-view[data-active-tab="explore"] .deal-history-inline-state.is-loading .deal-history-state-spinner {
  flex: 0 0 auto;
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 86, 185, 0.18);
  border-top-color: #0756b9;
  border-radius: 999px;
  animation: dealHistorySpin 0.8s linear infinite;
}

.results-view[data-active-tab="explore"] .deal-history-state-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.results-view[data-active-tab="explore"] .deal-history-state-copy strong {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .deal-history-state-copy small {
  color: #61748c;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-action-row td {
  background: #f3f8ff;
}

.results-view[data-active-tab="explore"] .deal-history-action-panel {
  position: sticky;
  left: 8px;
  z-index: 10;
  width: min(720px, calc(100vw - 74px));
  grid-template-columns: minmax(128px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid #c9dbf0;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  box-shadow: 0 14px 34px rgba(15, 57, 102, 0.13);
}

.results-view[data-active-tab="explore"] .deal-history-action-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 22px;
  width: 10px;
  height: 10px;
  border-top: 1px solid #c9dbf0;
  border-left: 1px solid #c9dbf0;
  background: #ffffff;
  transform: rotate(45deg);
}

.results-view[data-active-tab="explore"] .deal-history-action-copy {
  align-self: center;
}

.results-view[data-active-tab="explore"] .deal-history-action-copy strong {
  font-size: 12px;
}

.results-view[data-active-tab="explore"] .deal-history-action-menu {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.results-view[data-active-tab="explore"] .deal-history-menu-trigger {
  flex: 0 0 auto;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  background: #eaf3ff;
  color: #0756b9;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .deal-history-menu-trigger::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-buttons {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #c8d8ec;
  border-radius: 7px;
  background: #ffffff;
  gap: 0;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px;
  color: #26384f;
  font-size: 11px;
  font-weight: 850;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button + .deal-history-action-button {
  border-left: 1px solid #e0e8f2;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button:not(:disabled):hover,
.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button:not(:disabled):focus-visible {
  background: #f1f7ff;
  color: #0756b9;
  outline: 0;
}

.results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-button:disabled {
  background: #f8fafc;
  color: #a6b2c0;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .deal-history-inline-state {
    width: min(420px, calc(100vw - 28px));
  }

  .results-view[data-active-tab="explore"] .deal-history-action-panel {
    width: min(520px, calc(100vw - 28px));
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .results-view[data-active-tab="explore"] .deal-history-action-menu {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .deal-history-action-menu::-webkit-scrollbar {
    display: none;
  }

  .results-view[data-active-tab="explore"] .deal-history-action-row .deal-history-action-buttons {
    flex: 0 0 auto;
  }
}

/* Apartment explore: front metric column order with readable long headers */
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonseRatio-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.jeonseRatio-column,
.sticky-sheet-header thead th.jeonseRatio-column {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.investment-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.investment-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.salePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.salePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonsePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.jeonsePeak-column,
.sticky-sheet-header thead th.investment-column,
.sticky-sheet-header thead th.salePeak-column,
.sticky-sheet-header thead th.jeonsePeak-column {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.saleRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.saleRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.jeonseRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.jeonseRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell thead th.dualRecoveryProfit-column,
.results-view[data-active-tab="explore"] .sheet-shell tbody td.dualRecoveryProfit-column,
.sticky-sheet-header thead th.saleRecoveryProfit-column,
.sticky-sheet-header thead th.jeonseRecoveryProfit-column,
.sticky-sheet-header thead th.dualRecoveryProfit-column {
  width: 146px;
  min-width: 146px;
  max-width: 146px;
}

/* Diagnosis report */
.report-hero-actions button,
.report-export-card button {
  min-height: 38px;
  border: 1px solid #cbd7e8;
  border-radius: 8px;
  background: #ffffff;
  color: #0f2852;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.results-view[data-active-tab="report"] .report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.report-hero-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.report-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.report-hero-actions .report-primary-action {
  border-color: #0b5ee8;
  background: #0b5ee8;
  color: #ffffff;
}

.report-export-card button {
  border-color: #0b5ee8;
  color: #0b5ee8;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="report"] .report-hero {
    grid-template-columns: 1fr;
  }

  .report-hero-actions,
  .report-hero-actions button {
    width: 100%;
  }

  .report-hero-actions {
    justify-content: stretch;
  }
}

/* Diagnosis report: remove explore chrome from the report-first result screen */
.results-view[data-active-tab="report"] .result-toolbar,
.results-view[data-active-tab="report"] .explore-diagnosis-strip,
.results-view[data-active-tab="report"] .excel-analysis-strip,
.results-view[data-active-tab="report"] .result-tabs,
.results-view[data-active-tab="report"] .result-status {
  display: none !important;
}

.results-view[data-active-tab="report"] {
  align-content: start;
  gap: 0;
  padding-top: clamp(18px, 3vw, 28px);
}

.results-view[data-active-tab="report"] .explore-results-layout,
.results-view[data-active-tab="report"] .result-views,
.results-view[data-active-tab="report"] #reportViewPanel {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.results-view[data-active-tab="report"] .explore-results-layout {
  display: block;
}

.results-view[data-active-tab="report"] .result-views {
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.results-view[data-active-tab="report"] #reportViewPanel {
  padding: 0;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="report"] {
    padding: 14px 14px 28px;
  }

  .results-view[data-active-tab="report"] .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .results-view[data-active-tab="report"] .report-metrics article {
    min-height: 124px;
    padding: 14px;
  }

.results-view[data-active-tab="report"] .report-metrics strong {
    font-size: 24px;
  }

  .results-view[data-active-tab="report"] .explore-results-layout,
  .results-view[data-active-tab="report"] .result-views,
  .results-view[data-active-tab="report"] #reportViewPanel {
    width: 100%;
  }
}

/* Diagnosis report: make the first result feel like an actual diagnosis */
.results-view[data-active-tab="report"] .report-hero {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  align-items: stretch;
  gap: 22px;
}

.results-view[data-active-tab="report"] .report-hero-copy {
  align-content: start;
}

.report-hero-board {
  display: grid;
  align-content: start;
  gap: 14px;
  border-left: 1px solid #dbe5f2;
  padding-left: 20px;
}

.report-board-head {
  display: grid;
  gap: 5px;
}

.report-board-head span,
.report-focus-strip span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.report-board-head strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.report-board-head small {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.report-board-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
}

.report-board-track span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-right: 1px solid #e1e8f2;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.report-board-track span:last-child {
  border-right: 0;
}

.report-board-track span.is-active {
  background: #edf7f0;
  color: #16723a;
}

.report-board-candidates {
  display: grid;
  gap: 0;
  border-top: 1px solid #e5eaf2;
}

.report-board-candidates article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 10px;
  border-bottom: 1px solid #e5eaf2;
  padding: 12px 0;
}

.report-board-candidates article > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.report-board-candidates strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-board-candidates small {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.report-focus-strip article {
  display: grid;
  gap: 7px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.report-focus-strip strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.report-focus-strip small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.report-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="report"] .report-hero,
  .report-focus-strip {
    grid-template-columns: 1fr;
  }

  .report-hero-board {
    border-top: 1px solid #dbe5f2;
    border-left: 0;
    padding-top: 18px;
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="report"] .report-hero {
    gap: 18px;
    padding: 18px;
  }

  .report-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-hero-actions .report-primary-action {
    grid-column: 1 / -1;
  }

  .report-board-track span {
    min-height: 32px;
  }

  .report-focus-strip {
    gap: 8px;
  }

  .report-focus-strip article {
    padding: 12px 14px;
  }
}

/* Apartment explore intro modal */
.explore-intro-dialog {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 8px;
  margin: auto;
  padding: 0;
  background: transparent;
}

.explore-intro-dialog::backdrop {
  background: rgba(7, 17, 31, 0.38);
}

.explore-intro-panel {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 0;
  border-radius: 8px;
  background: #f7fafd;
  padding: 0;
  box-shadow: 0 24px 64px rgba(12, 35, 66, 0.24);
}

.explore-intro-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 34px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  color: #526176;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
}

.explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) {
  width: 100%;
  min-height: min(600px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(22px, 3.4vw, 38px) clamp(24px, 4.4vw, 56px) clamp(58px, 6vw, 82px);
  overflow: hidden;
}

.explore-intro-dialog .home-mode-panel[data-home-panel="move"],
.explore-intro-dialog .home-mode-panel[data-home-panel="move"].active {
  display: none;
}

.explore-intro-skip {
  display: none;
}

body.is-explore-intro-open {
  overflow: hidden;
}

@media (min-width: 981px) {
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) {
    grid-template-columns: minmax(260px, 0.86fr) minmax(390px, 480px);
    gap: clamp(26px, 3.2vw, 44px);
    height: min(600px, calc(100dvh - 24px));
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy {
    width: min(360px, 100%);
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy h2 {
    font-size: clamp(34px, 3.2vw, 44px);
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy > span {
    font-size: 15px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-panel {
    width: min(480px, 100%);
    padding: 18px 24px 20px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-region-card {
    top: 28px;
    left: 24px;
    width: 176px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-budget-card {
    top: 34px;
    right: 24px;
    width: 198px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-stack-card {
    top: auto;
    bottom: 28px;
    left: 26px;
    width: 190px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-report-preview {
    top: auto;
    right: 24px;
    bottom: 22px;
    width: 330px;
  }
}

@media (max-width: 720px) {
  .explore-intro-dialog {
    width: min(404px, calc(100% - 8px));
    max-width: calc(100% - 8px);
    max-height: calc(100dvh - 32px);
    border-radius: 12px;
  }

  .explore-intro-panel {
    max-height: calc(100dvh - 32px);
    border-radius: 12px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) {
    min-height: min(512px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    gap: 9px;
    align-content: start;
    padding: 15px 12px 18px;
    overflow: auto;
  }

  .explore-intro-close {
    top: 8px;
    right: 8px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy h2 {
    font-size: clamp(24px, 6.6vw, 29px);
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy > span {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.38;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-panel {
    width: min(324px, 100%);
    padding: 10px 12px 12px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .compact-fields {
    gap: 7px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-section,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-field,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-field,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-field {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 8px;
    min-height: 40px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .home-field > label,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .field-label {
    min-height: 40px;
    font-size: 12.2px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .mode-options label,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .location-selects .home-select-picker-button {
    min-height: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 12.2px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row input {
    height: 38px;
    font-size: 15px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-mode-panel[data-home-panel="cash"].active .cash-row > span {
    font-size: 15px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-panel .home-detail-toggle {
    height: 30px;
    min-height: 30px;
    grid-template-columns: 60px minmax(0, 1fr) 22px;
    font-size: 12.5px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) #showResultsButton,
  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) #introShowResultsButton {
    width: min(252px, 100%);
    height: 42px;
    min-height: 42px;
    border-radius: 12px;
    font-size: 14.5px;
  }
}

/* Apartment explore intro modal: PC layout correction */
@media (min-width: 981px) {
  .explore-intro-dialog {
    width: min(1080px, calc(100vw - 40px));
    max-height: min(640px, calc(100dvh - 40px));
    border-radius: 12px;
  }

  .explore-intro-panel {
    max-height: min(640px, calc(100dvh - 40px));
    overflow: hidden;
    border-radius: 12px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) {
    grid-template-columns: minmax(320px, 1fr) minmax(390px, 440px);
    grid-template-rows: 1fr;
    align-items: center;
    gap: clamp(34px, 4vw, 54px);
    height: min(640px, calc(100dvh - 40px));
    min-height: 0;
    max-height: min(640px, calc(100dvh - 40px));
    padding: clamp(34px, 4vw, 50px) clamp(38px, 4vw, 56px);
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    width: min(390px, 100%);
    max-width: 390px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .home-panel {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    width: min(440px, 100%);
    padding: 20px 24px 22px;
  }

  #exploreIntroDialog #exploreIntroMount .home-report-preview,
  #exploreIntroDialog #exploreIntroMount.home-view:not(.is-hidden) .home-report-preview {
    display: none !important;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-region-card {
    top: 30px;
    left: 30px;
    width: 164px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-budget-card {
    top: 30px;
    right: auto;
    left: clamp(270px, 32%, 350px);
    width: 182px;
  }

  .explore-intro-dialog .explore-intro-mount.home-view:not(.is-hidden) .ambient-stack-card {
    right: auto;
    bottom: 30px;
    left: 34px;
    width: 176px;
  }
}

/* Possibility report: shareable test-style result */
.report-persona-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.report-persona-header span {
  color: #526176;
  font-size: 13px;
  font-weight: 850;
}

.report-persona-header strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #b7d7c4;
  border-radius: 999px;
  background: #f0fbf4;
  color: #136c36;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.report-hero-copy .report-persona-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d1ddeb;
  border-radius: 999px;
  background: #f8fafc;
  color: #243b58;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.25;
}

.report-hero-copy .report-persona-badge.tone-open,
.report-hero-copy .report-persona-badge.tone-found {
  border-color: #bad5ff;
  background: #f3f8ff;
  color: #0b4cb4;
}

.report-hero-copy .report-persona-badge.tone-leverage {
  border-color: #c4e0cc;
  background: #f2fbf5;
  color: #166534;
}

.report-hero-copy .report-persona-badge.tone-near {
  border-color: #ead7a5;
  background: #fff9e8;
  color: #8a5a08;
}

.report-hero-copy .report-persona-badge.tone-reset {
  border-color: #e4c4c4;
  background: #fff5f5;
  color: #9f1d1d;
}

.report-hero-actions button[data-report-action="share"] {
  border-color: #9fb6d6;
  color: #12345f;
}

.report-share-card {
  border-color: #c9d9ef;
  background: #f8fbff;
}

.report-share-card p {
  color: #334155;
}

.report-share-card a {
  display: block;
  overflow: hidden;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  color: #0b5ee8;
  padding: 10px 11px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-share-card button {
  border-color: #0b5ee8;
  background: #0b5ee8;
  color: #ffffff;
}

.report-explore-preview {
  display: grid;
  gap: 14px;
  border: 1px solid #d7e3f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.report-explore-preview-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.report-explore-preview-header div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-explore-preview-header span,
.report-preview-stats span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.report-explore-preview-header strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.report-explore-preview-header small,
.report-preview-stats small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.report-explore-preview-header button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid #0b5ee8;
  border-radius: 8px;
  background: #0b5ee8;
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.report-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-preview-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.report-preview-stats article {
  display: grid;
  gap: 4px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.report-preview-stats strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.report-preview-table {
  overflow: auto;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #ffffff;
}

.report-preview-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1.25fr) minmax(150px, 0.95fr) minmax(96px, 0.62fr) minmax(96px, 0.62fr) minmax(82px, 0.52fr);
  min-width: 760px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e6edf6;
  padding: 11px 12px;
  color: #334155;
  font-size: 12px;
}

.report-preview-row:last-child {
  border-bottom: 0;
}

.report-preview-head {
  background: #f4f7fb;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.report-preview-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4fb;
  color: #0f172a;
  font-weight: 900;
}

.report-preview-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-preview-name strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-preview-name small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-preview-location {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-preview-need {
  color: #166534;
  font-weight: 900;
}

@media (max-width: 720px) {
  .mobile-main-tabs #mobileExploreTabButton {
    min-width: 104px;
  }

  .report-persona-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .report-persona-header strong,
  .report-hero-copy .report-persona-badge {
    white-space: normal;
  }

  .report-hero-actions button {
    min-height: 44px;
    white-space: normal;
  }

  .report-share-card a {
    overflow: visible;
    word-break: break-all;
    white-space: normal;
  }

  .report-explore-preview {
    padding: 14px;
  }

  .report-explore-preview-header {
    display: grid;
  }

  .report-explore-preview-header button {
    width: 100%;
    min-height: 44px;
    white-space: normal;
  }

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

  .report-preview-table {
    margin-right: -2px;
  }
}

.home-view:not(.is-hidden) .hero-kicker,
#exploreIntroDialog .hero-kicker {
  font-weight: 600;
}

.home-view:not(.is-hidden) .hero-kicker .hero-kicker-text,
#exploreIntroDialog .hero-kicker .hero-kicker-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.home-view:not(.is-hidden) .hero-kicker .hero-kicker-date,
#exploreIntroDialog .hero-kicker .hero-kicker-date {
  display: inline;
  font-weight: 700;
}

.home-view:not(.is-hidden) .hero-kicker .hero-kicker-separator,
#exploreIntroDialog .hero-kicker .hero-kicker-separator {
  display: inline-block;
  margin: 0 4px;
  color: currentColor;
  font-weight: 600;
}

.home-view:not(.is-hidden) .hero-kicker::before,
#exploreIntroDialog .hero-kicker::before {
  animation: heroKickerOnAir 1.55s ease-out infinite;
  transform-origin: center;
}

@keyframes heroKickerOnAir {
  0% {
    opacity: 1;
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(37, 110, 244, 0.32);
  }

  58% {
    opacity: 0.88;
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(37, 110, 244, 0);
  }

  100% {
    opacity: 1;
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(37, 110, 244, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-view:not(.is-hidden) .hero-kicker::before,
  #exploreIntroDialog .hero-kicker::before {
    animation: none;
  }
}

/* Apartment explore: preset rail before manual filtering */
.results-view[data-active-tab="explore"] .explore-preset-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .explore-preset-panel[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"] .explore-preset-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.results-view[data-active-tab="explore"] .explore-preset-header div {
  display: grid;
  gap: 3px;
}

.results-view[data-active-tab="explore"] .explore-preset-header span {
  color: #1262e3;
  font-size: 12px;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .explore-preset-header strong {
  color: #17243a;
  font-size: 18px;
  font-weight: 860;
  letter-spacing: 0;
}

.results-view[data-active-tab="explore"] .explore-preset-header small {
  color: #1262e3;
  font-size: 12px;
  font-weight: 780;
  text-align: right;
}

.results-view[data-active-tab="explore"] .explore-preset-list {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.results-view[data-active-tab="explore"] .explore-preset-card {
  min-width: 0;
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #fbfdff;
  color: #17243a;
  padding: 10px 12px;
  text-align: left;
  box-shadow: none !important;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.table-empty-row td.empty-table-cell.is-presets {
  height: clamp(300px, 43vh, 430px) !important;
}

@supports (height: 100dvh) {
  .results-view[data-active-tab="explore"] .sheet-shell tbody tr.table-empty-row td.empty-table-cell.is-presets {
    height: clamp(300px, 43dvh, 430px) !important;
  }
}

.results-view[data-active-tab="explore"] .table-empty-state.is-presets {
  left: max(24px, calc((100vw - min(780px, calc(100vw - 86px))) / 2 - 16px));
  z-index: 6;
  width: min(780px, calc(100vw - 86px));
  margin-top: 0;
  border-color: #d1deeb;
  background: rgba(255, 255, 255, 0.985);
  padding: 22px;
  box-shadow: 0 24px 56px rgba(23, 54, 96, 0.15);
}

.results-view[data-active-tab="explore"] .table-empty-state.is-presets .explore-preset-panel {
  width: 100%;
}

.results-view[data-active-tab="explore"] .explore-preset-card strong,
.results-view[data-active-tab="explore"] .explore-preset-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .explore-preset-card strong {
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0;
}

.results-view[data-active-tab="explore"] .explore-preset-card span {
  color: #66758b;
  font-size: 11px;
  font-weight: 700;
}

.results-view[data-active-tab="explore"] .explore-preset-card:hover,
.results-view[data-active-tab="explore"] .explore-preset-card.is-active {
  border-color: #1262e3;
  background: #f3f8ff;
  color: #115ccf;
}

.results-view[data-active-tab="explore"] .explore-preset-card.is-active span {
  color: #2c67bd;
}

@media (max-width: 980px) {
  .results-view[data-active-tab="explore"] .explore-preset-panel {
    width: 100%;
  }

  .results-view[data-active-tab="explore"] .explore-preset-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .explore-preset-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    margin: 0 !important;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .results-view[data-active-tab="explore"] .table-empty-state.is-presets {
    left: max(18px, calc((100vw - min(440px, calc(100vw - 54px))) / 2 - 14px));
    width: min(440px, calc(100vw - 54px));
    margin-top: 0;
    padding: 16px 10px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header {
    align-items: center;
    margin-bottom: 8px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header strong {
    font-size: 15px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header small {
    max-width: 44%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"] .explore-preset-list {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .explore-preset-list::-webkit-scrollbar {
    display: none;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card {
    flex: 0 0 218px;
    min-height: 58px;
    padding: 9px 10px;
  }
}

/* Shared budget calculator trigger and dialog. */
.budget-calculator-trigger {
  min-width: 0;
  min-height: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfd3ec;
  border-radius: 10px;
  background: #eef5fd;
  color: #1559b4;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

.budget-calculator-trigger:hover {
  border-color: #95b9e6;
  background: #e7f1fd;
}

.budget-calculator-trigger:focus-visible {
  outline: 3px solid rgba(20, 99, 230, 0.15);
  outline-offset: 1px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(0, 1fr) 132px !important;
  gap: 6px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  width: 100% !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-calculator-filter-trigger {
  width: 132px;
  min-height: 38px;
  height: 38px;
  border-radius: 9px;
  padding: 0 8px;
  font-size: 11.5px;
}

.budget-calculator-dialog {
  width: min(480px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 24px);
  border: 0;
  background: transparent;
  padding: 0;
  color: #142239;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.budget-calculator-dialog::backdrop {
  background: rgba(7, 17, 31, 0.52);
  backdrop-filter: blur(3px);
}

.budget-calculator-panel {
  width: 100%;
  display: grid;
  gap: 16px;
  border: 1px solid #dbe5f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 22px;
  box-sizing: border-box;
  box-shadow: 0 24px 70px rgba(7, 17, 31, 0.24);
}

.budget-calculator-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.budget-calculator-panel > header div {
  display: grid;
  gap: 5px;
}

.budget-calculator-panel > header span {
  color: #2b6fc8;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.budget-calculator-panel > header h2 {
  margin: 0;
  color: #0c1b30;
  font-size: 24px;
  font-weight: 820;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.budget-calculator-close {
  min-width: 36px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f1f4f8;
  color: #59687c;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 740;
  cursor: pointer;
}

.budget-calculator-description,
.budget-calculator-note,
.budget-calculator-status {
  margin: 0;
}

.budget-calculator-description {
  color: #586a81;
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

.budget-calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.budget-calculator-fields > label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #4e5f75;
  font-size: 12px;
  font-weight: 760;
}

.budget-calculator-input-shell {
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d6e1ed;
  border-radius: 11px;
  background: #f7f9fc;
  padding: 0 12px;
  box-sizing: border-box;
}

.budget-calculator-input-shell:focus-within {
  border-color: #8eb8e9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(20, 99, 230, 0.09);
}

.budget-calculator-input-shell:has(input[aria-invalid="true"]) {
  border-color: #df8b83;
  background: #fff8f7;
}

.budget-calculator-input-shell input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  color: #11213a;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  text-align: right;
  outline: 0;
  appearance: textfield;
}

.budget-calculator-input-shell input::-webkit-outer-spin-button,
.budget-calculator-input-shell input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.budget-calculator-input-shell small {
  flex: 0 0 auto;
  color: #6b7b90;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.budget-calculator-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  border: 1px solid #cfe0f4;
  border-radius: 13px;
  background: #f1f7ff;
  padding: 14px 15px;
}

.budget-calculator-result > span {
  color: #4e6480;
  font-size: 12px;
  font-weight: 760;
}

.budget-calculator-result > strong {
  color: #1258c8;
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.budget-calculator-result > small {
  grid-column: 1 / -1;
  color: #63758b;
  font-size: 11.5px;
  line-height: 1.35;
}

.budget-calculator-note {
  color: #748297;
  font-size: 11.5px;
  line-height: 1.5;
  word-break: keep-all;
}

.budget-calculator-status {
  min-height: 17px;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

.budget-calculator-panel > footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}

.budget-calculator-panel > footer button {
  min-height: 44px;
  border: 1px solid #d5dfeb;
  border-radius: 11px;
  background: #ffffff;
  color: #4d5e73;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
}

.budget-calculator-panel > footer .budget-calculator-apply {
  border-color: #1463e6;
  background: #1463e6;
  color: #ffffff;
}

@media (max-width: 720px) {
  .budget-calculator-panel {
    gap: 14px;
    border-radius: 16px;
    padding: 18px;
  }

  .budget-calculator-panel > header h2 {
    font-size: 22px;
  }

  .budget-calculator-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .budget-calculator-input-shell {
    height: 44px;
  }

  .budget-calculator-input-shell input {
    height: 40px;
    font-size: 16px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 118px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-calculator-filter-trigger {
    width: 118px;
    font-size: 10.8px;
  }
}

/* Keep the explore budget and purchase-mode controls legible as one unit. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(96px, 1fr) 144px !important;
  gap: 8px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
  width: 144px;
  min-width: 144px;
  height: 38px;
  border-radius: 10px;
  background: #edf3fa;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button {
  width: 100%;
  min-height: 32px !important;
  height: 32px !important;
  max-height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 !important;
  padding: 0 5px;
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
    width: 286px !important;
    flex-basis: 286px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 146px !important;
    gap: 8px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
    width: 146px;
    min-width: 146px;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button {
    padding: 0 4px;
    font-size: 11.2px;
    letter-spacing: -0.01em;
  }
}

/* Apartment finder: preserve the desktop analysis flow in a mobile-first layout. */
@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) {
    background: #f4f7fb;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-docked {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    margin: 8px 10px 10px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 8px !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 42px !important;
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 5px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: #f4f7fb !important;
    padding: 5px 7px !important;
    color: #25354b !important;
    text-align: left !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary .summary-chip {
    min-width: 0;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: #ffffff;
    padding: 6px 7px;
    color: #263950;
    font-size: 11px;
    font-weight: 760;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary .summary-action {
    color: #1262e3;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary .summary-chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #1262e3;
    border-bottom: 1.5px solid #1262e3;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .summary-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:not(.is-mobile-open) .core-controls {
    display: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar.is-mobile-open .core-controls,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: end !important;
    gap: 9px 7px !important;
    margin-top: 8px !important;
    border-top: 1px solid #e7edf5 !important;
    padding: 10px 1px 1px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > button {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: grid !important;
    gap: 5px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-field {
    grid-column: 1 / -1 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .households-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .built-year-filter-field {
    grid-column: span 2 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    grid-column: span 2 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    grid-column: span 4 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > label > span:first-child,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .result-field > span:first-child {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    color: #66758a !important;
    font-size: 10.5px !important;
    font-weight: 730 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 146px !important;
    gap: 7px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button {
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    border: 1px solid #dbe4ef !important;
    border-radius: 7px !important;
    background: #f8fafc !important;
    color: #203149 !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls .select-picker-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .district-multi-button,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .size-picker-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
    font-weight: 740 !important;
    text-align: left !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #resetExploreFiltersButton {
    border: 1px solid #dbe4ef !important;
    background: #f8fafc !important;
    color: #506078 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) #rerunSearchButton {
    border: 1px solid #1262e3 !important;
    background: #1262e3 !important;
    color: #ffffff !important;
  }

  .results-view[data-active-tab="explore"] .explore-results-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 10px 18px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card {
    border: 1px solid #dbe5f1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-strip-filter {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "analysis-tabs"
      "table-tools" !important;
    gap: 7px !important;
    border-bottom: 1px solid #e3eaf3 !important;
    padding: 8px 10px !important;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs {
    width: 100% !important;
    gap: 9px !important;
    overflow-x: auto !important;
    padding-bottom: 1px !important;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-table-tools {
    width: 100%;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-analysis-tabs::-webkit-scrollbar,
  .results-view[data-active-tab="explore"] .result-data-card .excel-table-tools::-webkit-scrollbar {
    display: none;
  }

  .results-view[data-active-tab="explore"] .result-data-card .excel-table-tools button {
    flex: 0 0 auto;
    height: 32px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 11px;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    border-bottom: 1px solid #e3eaf3;
    background: #f7f9fc;
    padding: 5px;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab {
    display: none !important;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="cards"],
  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="table"] {
    min-height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #65748a;
    padding: 0 10px;
    font-size: 0;
    font-weight: 780;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="cards"] {
    order: 1;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="table"] {
    order: 2;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="cards"]::after {
    content: "요약 카드";
    font-size: 12px;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab[data-result-view="table"]::after {
    content: "상세표";
    font-size: 12px;
  }

  .results-view[data-active-tab="explore"] .excel-hidden-view-tabs .result-tab.active {
    background: #ffffff;
    color: #1262e3;
    box-shadow: 0 1px 3px rgba(36, 60, 92, 0.12);
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="cards"].active {
    border: 0;
    border-radius: 0;
    background: #f4f7fb;
    box-shadow: none;
    overflow: visible;
  }

  .results-view[data-active-tab="explore"] .card-view-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 14px 2px 8px;
  }

  .results-view[data-active-tab="explore"] .card-view-heading span {
    display: none;
  }

  .results-view[data-active-tab="explore"] .card-view-heading strong {
    font-size: 16px;
  }

  .results-view[data-active-tab="explore"] .card-view-heading small {
    font-size: 11px;
  }

  .results-view[data-active-tab="explore"] .card-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .results-view[data-active-tab="explore"] .result-card.mobile-result-card {
    min-width: 0;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 0;
    box-shadow: none;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card .card-photo {
    display: none;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card .card-content {
    gap: 11px;
    padding: 13px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-head {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-heading-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-rank {
    color: #1262e3;
    font-size: 10px;
    font-weight: 820;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-name {
    min-width: 0;
    border: 0;
    background: transparent;
    color: #15243a;
    padding: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 820;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-location {
    margin: 0;
    overflow: hidden;
    color: #6a788c;
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-head .favorite-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 1px solid #dbe4ef;
    border-radius: 7px;
    background: #ffffff;
    color: #a3afbf;
    font-size: 19px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-head .favorite-toggle.is-active {
    color: #1262e3;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-metrics > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    border: 0;
    border-radius: 7px;
    background: #f5f7fa;
    padding: 9px 10px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-metrics > div.is-primary {
    background: #eef5ff;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-metrics dt {
    color: #6b798d;
    font-size: 10px;
    font-weight: 700;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-metrics dd {
    margin: 0;
    overflow: hidden;
    color: #15243a;
    font-size: 14px;
    font-weight: 820;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-context {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-context span {
    border-radius: 5px;
    background: #f0f3f7;
    color: #5c6b80;
    padding: 5px 7px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card .card-judgment {
    margin: 0;
    border-radius: 7px;
    background: #f7f9fc;
    padding: 8px 9px;
    color: #4e6077;
    font-size: 11px;
    line-height: 1.35;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-actions button {
    min-width: 0;
    min-height: 38px;
    border: 1px solid #cfdae7;
    border-radius: 7px;
    background: #ffffff;
    color: #41536a;
    font-size: 11.5px;
    font-weight: 780;
  }

  .results-view[data-active-tab="explore"] .mobile-result-card-actions button.is-primary {
    border-color: #1262e3;
    background: #1262e3;
    color: #ffffff;
  }

  .results-view[data-active-tab="explore"] .card-list > .explore-preset-panel {
    width: 100% !important;
    max-width: 100% !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 10px 0 2px;
    box-shadow: none;
  }

  .results-view[data-active-tab="explore"] .card-list > .explore-preset-panel .explore-preset-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  .results-view[data-active-tab="explore"] .card-list > .explore-preset-panel .explore-preset-card {
    width: auto !important;
    min-width: 0 !important;
    min-height: 72px;
    padding: 10px;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell {
    max-height: 68vh;
    overflow: auto !important;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.city-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.city-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.district-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.district-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.dong-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.dong-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.rank-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.rank-cell {
    display: none !important;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.favorite-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.favorite-cell {
    position: sticky !important;
    left: 0 !important;
    z-index: 5;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    background: #ffffff;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.name-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.name-column {
    position: sticky !important;
    left: 42px !important;
    z-index: 4;
    width: 174px !important;
    min-width: 174px !important;
    max-width: 174px !important;
    background: #ffffff;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell thead th.favorite-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell thead th.name-column {
    z-index: 8;
    background: #f5f8fc;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.name-column[data-location]::after {
    content: attr(data-location);
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #7a8799;
    font-size: 9.5px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell .deal-history-toggle {
    max-width: 100%;
  }

  .results-view[data-active-tab="explore"] .excel-table-footer {
    gap: 8px;
    padding: 8px 10px;
  }

  .results-view[data-active-tab="explore"] .excel-table-summary {
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
  }

  .results-view[data-active-tab="explore"] .excel-table-summary span + span {
    padding-left: 8px;
  }
}

@media (max-width: 380px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary {
    grid-template-columns: auto auto minmax(0, 1fr) auto !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .mobile-filter-summary .summary-chip:nth-child(2) {
    display: none;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 132px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
    width: 132px !important;
    min-width: 132px !important;
  }
}

/* Keep the analysis hierarchy inside the existing tab visual system. */
.results-view[data-active-tab="explore"] .excel-analysis-tab .analysis-pro-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin-left: 4px;
  border-radius: 5px;
  background: #e7efff;
  color: #0b5ee8;
  padding: 0 5px;
  font-size: 8px;
  font-style: normal;
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .budget-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .region-filter-field {
    grid-column: 1 / -1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .size-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .households-filter-field,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .built-year-filter-field {
    grid-column: span 2 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > #resetExploreFiltersButton {
    grid-column: 1 / span 2 !important;
    grid-row: 4 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > #rerunSearchButton {
    grid-column: 3 / -1 !important;
    grid-row: 4 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > #resetExploreFiltersButton,
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > #rerunSearchButton {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .results-view[data-active-tab="explore"] .card-view-heading,
  .results-view[data-active-tab="explore"] .card-view-heading > div {
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: left;
  }

  .results-view[data-active-tab="explore"] .card-view-heading > small {
    flex: 0 0 auto;
    text-align: right;
  }

}

/* Final apartment finder budget-row sizing for the compact rental checkbox. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox {
  width: auto !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  align-self: end !important;
  padding: 0 2px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-gap-checkbox input {
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  padding: 0 !important;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px !important;
  }
}

/* Final compact area-picker width and consistent white badges. */
.size-picker-popover {
  width: min(320px, calc(100vw - 24px)) !important;
}

.size-picker-popover .size-pyeong-badge,
.size-picker-popover .size-option.is-active .size-pyeong-badge,
.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  border: 1px solid #dce5f0 !important;
  background: #ffffff !important;
}

.size-picker-popover .size-pyeong-badge,
.size-picker-popover .size-option.is-active .size-pyeong-badge {
  color: #52657e !important;
}

.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  color: #1262e3 !important;
}

.size-picker-popover .size-option.is-national-size {
  border: 1px solid #dce5f0 !important;
  background: #f8fafc !important;
}

.size-picker-popover .size-option.is-national-size:hover {
  border-color: #b9cbe2 !important;
  background: #f2f7fd !important;
}

.size-picker-popover .size-option.is-national-size.is-active {
  border-color: #2d72df !important;
  background: #edf5ff !important;
}

/* Use the same selected-state grammar as households and move-in-year options. */
.size-picker-popover .size-option.is-active,
.size-picker-popover .size-option.is-national-size.is-active {
  min-height: 34px;
  border: 0 !important;
  border-radius: 6px;
  background: #edf5ff !important;
  color: #1258c8 !important;
  padding: 0 10px !important;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
}

/* Pricing — a finite house-hunting pass, not an endless subscription. */
.pricing-view {
  --pricing-blue: #1262e3;
  --pricing-blue-dark: #0b4fc2;
  --pricing-ink: #12213a;
  --pricing-muted: #64748b;
  --pricing-content-width: 960px;
  width: 100%;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(43, 118, 238, 0.1), transparent 31%),
    linear-gradient(180deg, #f8fbff 0, #ffffff 470px);
  padding: 76px clamp(24px, 5vw, 72px) 54px;
}

.pricing-view.is-hidden {
  display: none !important;
}

.pricing-view [data-pricing-mode-content][hidden] {
  display: none !important;
}

.pricing-view.is-investor-mode {
  --pricing-blue: #17477e;
  --pricing-blue-dark: #0f345f;
  background:
    radial-gradient(circle at 50% 0, rgba(23, 71, 126, 0.11), transparent 31%),
    linear-gradient(180deg, #f7f9fc 0, #ffffff 470px);
}

.pricing-hero {
  width: min(820px, 100%);
  margin: 0 auto 48px;
  text-align: center;
}

.pricing-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 296px;
  margin: 0 auto 22px;
  border: 1px solid #d7e1ed;
  border-radius: 12px;
  background: #edf2f7;
  padding: 4px;
}

.pricing-mode-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #66768a;
  font-size: 13px;
  font-weight: 740;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.pricing-mode-switch button.active {
  background: #ffffff;
  color: var(--pricing-blue);
  font-weight: 820;
  box-shadow: 0 2px 8px rgba(35, 58, 91, 0.1);
}

.pricing-mode-switch button:focus-visible {
  outline: 2px solid var(--pricing-blue);
  outline-offset: 2px;
}

.pricing-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: #ffffff;
  color: var(--pricing-blue);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pricing-hero h1 {
  margin: 18px 0 17px;
  color: var(--pricing-ink);
  font-size: clamp(38px, 4.35vw, 62px);
  font-weight: 860;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.pricing-hero h1 strong {
  color: var(--pricing-blue);
  font-weight: inherit;
}

.pricing-hero > p {
  margin: 0;
  color: #526176;
  font-size: 16px;
  font-weight: 570;
  line-height: 1.72;
  letter-spacing: -0.025em;
}

.pricing-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 22px;
  margin-top: 23px;
}

.pricing-proof span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #41536b;
  font-size: 13px;
  font-weight: 720;
}

.pricing-proof i {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8f1ff;
}

.pricing-proof i::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 4px;
  height: 7px;
  border: solid var(--pricing-blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  width: min(var(--pricing-content-width), 100%);
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 570px;
  border: 1px solid #dce5f0;
  border-radius: 20px;
  background: #ffffff;
  padding: 34px 30px 30px;
  box-shadow: 0 10px 30px rgba(27, 53, 91, 0.055);
}

.pricing-card-featured {
  border: 2px solid var(--pricing-blue);
  padding: 33px 29px 29px;
  box-shadow: 0 18px 42px rgba(18, 98, 227, 0.13);
}

.pricing-card-long {
  border-color: #cfd9e6;
  background: #fbfcfe;
}

.pricing-view.is-investor-mode .pricing-card-featured {
  box-shadow: 0 18px 42px rgba(23, 71, 126, 0.14);
}

.pricing-best-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  border-radius: 999px;
  background: var(--pricing-blue);
  color: #ffffff;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
  transform: translateX(-50%);
}

.pricing-card header {
  min-height: 142px;
}

.pricing-plan-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--pricing-blue);
  font-size: 12px;
  font-weight: 790;
  letter-spacing: -0.02em;
}

.pricing-card h2 {
  margin: 0;
  color: var(--pricing-ink);
  font-size: 27px;
  font-weight: 840;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.pricing-card header p {
  margin: 12px 0 0;
  color: var(--pricing-muted);
  font-size: 14px;
  font-weight: 570;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 51px;
  margin-top: 4px;
  color: var(--pricing-ink);
}

.pricing-price strong {
  font-size: 36px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.045em;
}

.pricing-price span {
  color: #65758b;
  font-size: 13px;
  font-weight: 670;
}

.pricing-price-note {
  display: block;
  min-height: 19px;
  margin: 4px 0 17px;
  color: #7d8a9d;
  font-size: 11px;
  font-weight: 610;
}

.pricing-card-free .pricing-price {
  margin-bottom: 40px;
}

.pricing-cta {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 790;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.pricing-cta:hover {
  transform: translateY(-1px);
}

.pricing-cta-secondary {
  border: 1px solid #bdcadd;
  background: #ffffff;
  color: #293b54;
}

.pricing-cta-secondary:hover {
  border-color: #93a6bf;
  background: #f8fafc;
}

.pricing-cta-primary {
  border: 1px solid var(--pricing-blue);
  background: var(--pricing-blue);
  color: #ffffff;
}

.pricing-cta-primary:hover {
  border-color: var(--pricing-blue-dark);
  background: var(--pricing-blue-dark);
}

.pricing-cta-dark {
  border: 1px solid #17263d;
  background: #17263d;
  color: #ffffff;
}

.pricing-cta-dark:hover {
  border-color: #0d1829;
  background: #0d1829;
}

.pricing-card ul {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid #e7edf4;
  list-style: none;
}

.pricing-card li {
  position: relative;
  color: #34475f;
  padding-left: 25px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.pricing-card li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid var(--pricing-blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pricing-card li.is-muted {
  color: #a1acba;
}

.pricing-card li.is-muted::before {
  top: 8px;
  width: 11px;
  height: 1px;
  border: 0;
  background: #b8c1cc;
  transform: none;
}

.pricing-decision-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: min(var(--pricing-content-width), 100%);
  margin: 22px auto 0;
  border: 1px solid #d8e3f0;
  border-radius: 15px;
  background: #f5f8fc;
  padding: 21px 25px;
}

.pricing-decision-strip div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-decision-strip span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 6px;
  background: #e3ecf8;
  color: #314866;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 810;
  white-space: nowrap;
}

.pricing-decision-strip strong {
  color: var(--pricing-ink);
  font-size: 16px;
  font-weight: 790;
  letter-spacing: -0.025em;
}

.pricing-decision-strip p {
  margin: 0;
  color: #66758a;
  font-size: 12px;
  font-weight: 580;
  text-align: right;
}

.pricing-why {
  width: min(var(--pricing-content-width), 100%);
  margin: 92px auto 0;
}

.pricing-why > header {
  margin-bottom: 27px;
  text-align: center;
}

.pricing-why > header > span {
  color: var(--pricing-blue);
  font-size: 12px;
  font-weight: 810;
}

.pricing-why h2 {
  margin: 8px 0 0;
  color: var(--pricing-ink);
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 830;
  letter-spacing: -0.045em;
}

.pricing-why h2 strong {
  color: var(--pricing-blue);
  font-weight: inherit;
}

.pricing-why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #dfe6ef;
  border-bottom: 1px solid #dfe6ef;
}

.pricing-why-grid article {
  min-width: 0;
  padding: 28px 30px 30px;
}

.pricing-why-grid article + article {
  border-left: 1px solid #dfe6ef;
}

.pricing-why-grid b {
  display: block;
  margin-bottom: 22px;
  color: #a6b6c9;
  font-size: 11px;
  font-weight: 800;
}

.pricing-why-grid strong {
  display: block;
  color: #1d2f48;
  font-size: 17px;
  font-weight: 790;
  letter-spacing: -0.025em;
}

.pricing-why-grid p {
  margin: 9px 0 0;
  color: #65758a;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.62;
  letter-spacing: -0.015em;
}

.pricing-disclaimer {
  width: min(var(--pricing-content-width), 100%);
  margin: 46px auto 0;
  color: #8a97a8;
  font-size: 10.5px;
  font-weight: 540;
  text-align: center;
}

@media (max-width: 920px) {
  .pricing-view {
    padding-right: 20px;
    padding-left: 20px;
  }

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

  .pricing-card-long {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .pricing-decision-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .pricing-decision-strip p {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .pricing-view {
    background: linear-gradient(180deg, #f7faff 0, #ffffff 340px);
    padding: 44px 16px 42px;
  }

  .pricing-hero {
    margin-bottom: 38px;
    text-align: left;
  }

  .pricing-mode-switch {
    width: 100%;
    margin-bottom: 22px;
  }

  .pricing-eyebrow {
    min-height: 28px;
    padding: 0 11px;
    font-size: 11px;
  }

  .pricing-hero h1 {
    margin-top: 15px;
    font-size: clamp(35px, 10.3vw, 45px);
    line-height: 1.1;
  }

  .pricing-hero > p {
    font-size: 14px;
    line-height: 1.65;
  }

  .pricing-hero > p br {
    display: none;
  }

  .pricing-proof {
    justify-content: flex-start;
    gap: 8px 16px;
  }

  .pricing-proof span {
    font-size: 11.5px;
  }

  .pricing-plans {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pricing-card,
  .pricing-card-featured,
  .pricing-card-long {
    grid-column: auto;
    min-height: 0;
    border-radius: 16px;
    padding: 29px 22px 24px;
  }

  .pricing-card-featured {
    padding-top: 34px;
  }

  .pricing-card header {
    min-height: 0;
  }

  .pricing-card header p br {
    display: none;
  }

  .pricing-price {
    margin-top: 28px;
  }

  .pricing-card-free .pricing-price {
    margin-bottom: 25px;
  }

  .pricing-price strong {
    font-size: 34px;
  }

  .pricing-card ul {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
    padding-top: 21px;
  }

  .pricing-decision-strip {
    padding: 18px;
  }

  .pricing-decision-strip div {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .pricing-decision-strip strong {
    font-size: 15px;
  }

  .pricing-decision-strip p {
    font-size: 11px;
    line-height: 1.5;
  }

  .pricing-why {
    margin-top: 70px;
  }

  .pricing-why > header {
    text-align: left;
  }

  .pricing-why h2 {
    font-size: 29px;
    line-height: 1.22;
  }

  .pricing-why-grid {
    grid-template-columns: 1fr;
  }

  .pricing-why-grid article {
    padding: 23px 4px 24px;
  }

  .pricing-why-grid article + article {
    border-top: 1px solid #dfe6ef;
    border-left: 0;
  }

  .pricing-why-grid b {
    margin-bottom: 11px;
  }

  .pricing-disclaimer {
    margin-top: 34px;
    text-align: left;
    line-height: 1.55;
  }
}

/* Final parity: area rows follow the district card-style option states. */
.size-picker-popover .size-option,
.size-picker-popover .size-option.is-national-size {
  min-height: 32px;
  height: auto !important;
  border: 1px solid #dce5f0 !important;
  border-radius: 7px;
  background: #f8fafc !important;
  color: #334155;
  padding: 6px 8px !important;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.15;
}

.size-picker-popover .size-option:hover,
.size-picker-popover .size-option.is-national-size:hover {
  border: 1px solid #b9cbe2 !important;
  background: #f2f7fd !important;
  color: #334155;
}

.size-picker-popover .size-option.is-active,
.size-picker-popover .size-option.is-national-size.is-active {
  border: 1px solid #2d72df !important;
  border-radius: 7px;
  background: #edf5ff !important;
  color: #1258c8 !important;
  padding: 6px 8px !important;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.15;
}

/* Keep the finite pass out of the product-task tabs and beside account actions. */
.auth-actions .pricing-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 1px solid #d5e1f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #315b91;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 740;
  line-height: 1;
  white-space: nowrap;
}

.auth-actions .pricing-link-button:hover {
  border-color: #b8cce6;
  background: #f1f6fc;
  color: #174b8a;
}

.auth-actions .pricing-link-button.active,
.auth-actions .pricing-link-button.active:hover {
  border-color: #9bbdf0;
  background: #eaf2ff;
  color: #0f5fd7;
  font-weight: 800;
}

@media (max-width: 720px) {
  .auth-actions {
    gap: 6px;
  }

  .auth-actions .pricing-link-button {
    display: inline-flex !important;
    height: 30px;
    border-color: transparent;
    background: transparent;
    color: #315b91;
    padding: 0 7px;
    font-size: 11.5px;
  }

  .auth-actions .pricing-link-button.active,
  .auth-actions .pricing-link-button.active:hover {
    border-color: #cbdcf3;
    background: #eef5ff;
    color: #0f5fd7;
  }
}

.results-view[data-active-tab="explore"] .card-list-more {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d8eb;
  border-radius: 9px;
  background: #ffffff;
  color: #245f9f;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 750;
}

.results-view[data-active-tab="explore"] .card-list-more:hover {
  border-color: #9fbce0;
  background: #f5f9ff;
}

/* Final area-popover footprint and national-size badge. */
.size-picker-popover {
  width: min(236px, calc(100vw - 24px)) !important;
}

.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  min-height: 18px;
  border: 0 !important;
  border-radius: 999px;
  background: #1262e3 !important;
  color: #ffffff !important;
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.01em;
  box-shadow: none !important;
}

/* Area is the filter contract; pyeong stays as a familiar secondary reference. */
.size-picker-popover {
  max-height: none !important;
  overflow: visible !important;
}

.size-picker-popover .size-picker-selected {
  display: none !important;
}

.size-picker-popover .size-option,
.size-picker-popover .size-option.is-national-size {
  grid-template-columns: minmax(0, 1fr) auto !important;
  justify-content: stretch !important;
}

.size-picker-popover .size-option-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.size-picker-popover .size-option-area-main,
.size-picker-popover .size-option-pyeong-main {
  flex: 0 0 auto;
  color: inherit;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.1;
}

@media (max-height: 520px) {
  .size-picker-popover {
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
  }
}
/* Apartment table subway metadata. */
.station-cell-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  min-height: 21px;
  border: 1px solid color-mix(in srgb, var(--station-line-color) 82%, #ffffff);
  border-radius: 999px;
  background: var(--station-line-color);
  padding: 2px 7px 2px 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.station-cell-value > strong {
  color: var(--station-line-foreground, #ffffff);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.station-line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.96);
  color: var(--station-line-color);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.station-line-badge.is-numbered {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  padding: 0;
}

.station-line-badge.is-named {
  min-height: 15px;
  border-radius: 999px;
  padding: 1px 5px;
}

td.is-station-pending,
td.is-station-unavailable {
  color: #8a96a7;
}

/* Apartment explore: replace only the spreadsheet's blue palette in jeonse mode. */
body.is-explore-jeonse-mode {
  --jeonse-accent: #149b62;
  --jeonse-accent-dark: #0f784b;
  --jeonse-accent-deep: #0b603c;
  --jeonse-soft: #edf7f1;
  --jeonse-soft-hover: #e3f1e9;
  --jeonse-soft-strong: #d7eadd;
  --jeonse-line: #dce9e1;
  --jeonse-line-strong: #c9ded2;
  --jeonse-line-active: #93c9ab;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"],
.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"]:hover,
.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"]:focus-visible,
.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"].active {
  background: transparent !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"]:hover,
.results-view[data-active-tab="explore"] .result-data-card .analysis-mode-group [data-explore-analysis-mode="jeonse"]:focus-visible {
  color: #149b62;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card {
  border-color: var(--jeonse-line-strong);
  box-shadow: 0 14px 34px rgba(28, 96, 59, 0.08);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-analysis-strip-filter,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-table-footer {
  border-color: var(--jeonse-line);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-table-footer,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-state-strip,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .table-paywall {
  background: #fbfefc;
}

/* Incremental apartment result loading. */
.results-view[data-active-tab="explore"] .table-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.results-view[data-active-tab="explore"] .table-page-actions[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"] #tableLoadMoreButton {
  min-height: 34px;
  border: 1px solid #b9c9df;
  border-radius: 6px;
  background: #ffffff;
  padding: 0 14px;
  color: #1559b7;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.results-view[data-active-tab="explore"] #tableLoadMoreButton {
  cursor: pointer;
}

.results-view[data-active-tab="explore"] #tableLoadMoreButton:hover:not(:disabled) {
  border-color: #397bd5;
  background: #f3f7fd;
}

.results-view[data-active-tab="explore"] #tableLoadMoreButton:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 560px) {
  .results-view[data-active-tab="explore"] .table-page-actions {
    width: 100%;
    margin-left: 0;
  }

  .results-view[data-active-tab="explore"] #tableLoadMoreButton {
    width: 100%;
    min-height: 40px;
  }
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-analysis-tab.active,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-analysis-tab:hover,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell td.investment-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell th.jeonsePrice-column,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell th.jeonseRatio-column,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell td.jeonsePrice-column,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell td.jeonseRatio-column,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .analysis-priority-actions button.active,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-state-pill strong,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-selection-main strong,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-header span,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-header small {
  color: var(--jeonse-accent);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-analysis-tab.active::after {
  background: var(--jeonse-accent);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .analysis-sort-group .excel-analysis-tab.active {
  background: var(--jeonse-soft);
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .analysis-sort-group .excel-analysis-tab.active:hover {
  background: var(--jeonse-soft-hover);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .analysis-sort-group .excel-analysis-tab.active .analysis-sort-icon {
  color: var(--jeonse-accent);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .analysis-sort-group .excel-analysis-tab[data-sort-priority]::before,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] #prioritySortDoneButton,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .priority-sort-item > b,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-selection-main button:not(:disabled),
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .deal-history-mode-button.is-active {
  border-color: var(--jeonse-accent);
  background: var(--jeonse-accent);
  color: #ffffff;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .analysis-sort-group .excel-analysis-tab.is-priority-drag-over {
  background: var(--jeonse-soft-strong);
  box-shadow: inset 0 0 0 2px var(--jeonse-accent) !important;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .priority-sort-item.is-drag-over {
  box-shadow: inset 0 2px var(--jeonse-accent);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .excel-state-pill.active {
  border-color: var(--jeonse-line-active);
  background: var(--jeonse-soft);
  color: var(--jeonse-accent-deep);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-table-tools button {
  border-color: var(--jeonse-line-strong);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .excel-table-tools button:hover {
  border-color: var(--jeonse-line-active);
  background: #f4fcf7;
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .sheet-shell {
  scrollbar-color: #8fbea3 transparent;
  background:
    linear-gradient(90deg, rgba(236, 247, 240, 0.98), rgba(255, 255, 255, 0) 18px) left top / 18px 100% no-repeat,
    linear-gradient(270deg, rgba(236, 247, 240, 0.98), rgba(255, 255, 255, 0) 18px) right top / 18px 100% no-repeat,
    #ffffff;
  box-shadow:
    inset 0 1px 0 var(--jeonse-line),
    inset 0 -1px 0 var(--jeonse-line);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb {
  background: #8fbea3;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .result-data-card .sheet-shell::-webkit-scrollbar-thumb:hover {
  background: #6aa17f;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th[class*="column-group-"],
body.is-explore-jeonse-mode .sticky-sheet-header thead th,
body.is-explore-jeonse-mode .sticky-sheet-header thead th[class*="column-group-"] {
  border-right-color: var(--jeonse-line);
  border-bottom-color: var(--jeonse-line-strong);
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f4 100%);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th.favorite-column,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th.rank-column,
body.is-explore-jeonse-mode .sticky-sheet-header thead th.favorite-column,
body.is-explore-jeonse-mode .sticky-sheet-header thead th.rank-column {
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f4 100%);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th:hover,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th:focus-visible,
body.is-explore-jeonse-mode .sticky-sheet-header thead th:hover,
body.is-explore-jeonse-mode .sticky-sheet-header thead th:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, var(--jeonse-soft) 100%);
  color: var(--jeonse-accent-dark);
  box-shadow: inset 0 0 0 1px var(--jeonse-line-active);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th.is-sorted,
body.is-explore-jeonse-mode .sticky-sheet-header thead th.is-sorted {
  border-top-color: #9bceb2;
  background: linear-gradient(180deg, var(--jeonse-soft) 0%, var(--jeonse-soft-strong) 100%);
  color: var(--jeonse-accent-dark);
  box-shadow: inset 0 -2px 0 var(--jeonse-accent);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th .column-filter-button,
body.is-explore-jeonse-mode .sticky-sheet-header thead th .column-filter-button {
  border-color: var(--jeonse-line-strong);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th .column-filter-button:hover,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th .column-filter-button:focus-visible,
body.is-explore-jeonse-mode .sticky-sheet-header thead th .column-filter-button:hover,
body.is-explore-jeonse-mode .sticky-sheet-header thead th .column-filter-button:focus-visible {
  border-color: var(--jeonse-accent);
  background: var(--jeonse-soft);
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell thead th.has-column-filter .column-filter-button,
body.is-explore-jeonse-mode .sticky-sheet-header thead th.has-column-filter .column-filter-button {
  border-color: var(--jeonse-accent);
  background: var(--jeonse-accent);
  color: #ffffff;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody td {
  border-right-color: #e1eee6;
  border-bottom-color: #e1eee6;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:nth-child(even) td,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:nth-child(even) td.favorite-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:nth-child(even) td.rank-cell {
  background: #fbfefc;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:hover td,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.has-deal-history:hover td,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:hover td.favorite-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr:hover td.rank-cell {
  background: #effbf4;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row td,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row td.favorite-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row td.rank-cell {
  border-bottom-color: var(--jeonse-line);
  background: #f7fcf9;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row:hover td {
  background: var(--jeonse-soft);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row.is-sale td.deal-history-salePrice-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row.is-sale td.deal-history-investment-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row.is-sale td.positive {
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .deal-history-action-button:not(:disabled):hover,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .deal-history-action-button:not(:disabled):focus-visible,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .deal-history-mode-button:not(:disabled):focus-visible {
  border-color: var(--jeonse-line-active);
  background: var(--jeonse-soft);
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .table-empty-state.is-presets {
  border-color: var(--jeonse-line-strong);
  box-shadow: 0 24px 56px rgba(28, 96, 59, 0.13);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-card {
  border-color: var(--jeonse-line);
  background: #fbfefc;
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-card:hover,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-card.is-active {
  border-color: var(--jeonse-accent);
  background: #f3fcf7;
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .explore-preset-card.is-active span {
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .card-list-more {
  border-color: var(--jeonse-line-strong);
  color: var(--jeonse-accent-dark);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .card-list-more:hover {
  border-color: var(--jeonse-line-active);
  background: #f4fcf7;
}

body.is-explore-jeonse-mode .column-filter-popover {
  border-color: var(--jeonse-line-strong);
  box-shadow: 0 18px 42px rgba(28, 96, 59, 0.16);
}

.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .priority-sort-panel {
  border-color: var(--jeonse-line-strong);
  box-shadow: 0 12px 32px rgba(28, 96, 59, 0.14);
}

body.is-explore-jeonse-mode .column-filter-option:hover {
  background: var(--jeonse-soft);
}

body.is-explore-jeonse-mode .column-filter-option input {
  accent-color: var(--jeonse-accent);
}

body.is-explore-jeonse-mode .column-filter-text input,
body.is-explore-jeonse-mode .column-filter-range input,
body.is-explore-jeonse-mode .column-filter-reset {
  border-color: var(--jeonse-line-strong);
}

body.is-explore-jeonse-mode .column-filter-text input:focus,
body.is-explore-jeonse-mode .column-filter-range input:focus {
  border-color: var(--jeonse-accent);
  outline-color: var(--jeonse-accent);
}

body.is-explore-jeonse-mode .column-filter-apply {
  border-color: var(--jeonse-accent);
  background: var(--jeonse-accent);
}

/* Apartment finder budget is a pure ceiling; there is no minimum-range control. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

/* Legacy minimum-range styles remain inert when old cached markup is present. */
.results-view[data-active-tab="explore"] .budget-range-picker-field {
  display: none !important;
}

/* Kakao account funnel. Apartment browsing stays open; high-intent saves use this account layer. */
.auth-dialog {
  width: min(430px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: 22px;
  background: transparent;
  padding: 0;
  color: #152238;
  overflow: visible;
}

.auth-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
}

.auth-dialog-panel {
  position: relative;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border: 1px solid rgba(219, 229, 242, 0.94);
  border-radius: inherit;
  background: #ffffff;
  padding: 34px 34px 28px;
  box-shadow: 0 28px 70px rgba(15, 36, 66, 0.22);
}

.auth-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f3f6fa;
  color: #6d7888;
  padding: 0 0 2px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.auth-dialog-close:hover {
  background: #eaf0f7;
  color: #24364e;
}

.auth-signed-out-view,
.auth-signed-in-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-signed-out-view[hidden],
.auth-signed-in-view[hidden] {
  display: none;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  border-radius: 15px;
  background: #eef5ff;
}

.auth-brand-mark img {
  display: block;
  width: 28px;
  height: 28px;
}

.auth-eyebrow {
  color: #2563bd;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.05em;
}

.auth-dialog h2 {
  margin: 8px 0 0;
  color: #13233a;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: -0.04em;
}

.auth-dialog-lead {
  max-width: 330px;
  margin: 12px auto 0;
  color: #66758a;
  font-size: 13.5px;
  font-weight: 520;
  line-height: 1.65;
  word-break: keep-all;
}

.auth-benefit-list {
  width: 100%;
  margin: 25px 0 20px;
  border-top: 1px solid #e8eef5;
  border-bottom: 1px solid #e8eef5;
  padding: 9px 0;
  text-align: left;
}

.auth-benefit-list > div {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 39px;
}

.auth-benefit-list strong {
  color: #1d4f8d;
  font-size: 12px;
  font-weight: 820;
}

.auth-benefit-list span {
  color: #66758a;
  font-size: 12px;
  line-height: 1.4;
}

.kakao-login-button {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: #fee500;
  color: rgba(0, 0, 0, 0.86);
  padding: 0 18px;
  font-size: 15px;
  font-weight: 780;
  cursor: pointer;
}

.kakao-login-button:hover {
  background: #f5dc00;
}

.kakao-login-button:disabled {
  background: #eef1f4;
  color: #8a94a3;
  cursor: not-allowed;
}

.kakao-login-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.kakao-login-button span {
  grid-column: 2;
}

.auth-dialog-status {
  min-height: 18px;
  margin: 9px 0 0;
  color: #c24738;
  font-size: 11.5px;
  font-weight: 650;
}

.auth-dialog-status:empty {
  margin-top: 3px;
}

.auth-terms-note {
  margin: 6px 8px 0;
  color: #8a95a5;
  font-size: 10.5px;
  line-height: 1.55;
  word-break: keep-all;
}

.auth-profile-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 10px 0 17px;
  overflow: hidden;
  border: 5px solid #eef5ff;
  border-radius: 50%;
  background: #dceaff;
  color: #1f5fae;
  font-size: 24px;
  font-weight: 850;
}

.auth-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-profile-email {
  min-height: 20px;
  margin: 8px 0 0;
  color: #758295;
  font-size: 12.5px;
}

.auth-account-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  margin: 25px 0 18px;
  border: 1px solid #dce8f6;
  border-radius: 12px;
  background: #f6f9fd;
  padding: 17px;
  text-align: left;
}

.auth-account-note strong {
  color: #214b7d;
  font-size: 13px;
  font-weight: 800;
}

.auth-account-note span {
  color: #68788c;
  font-size: 11.5px;
  line-height: 1.5;
}

.auth-logout-button {
  width: 100%;
  min-height: 43px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #ffffff;
  color: #5b6879;
  font-size: 12.5px;
  font-weight: 740;
  cursor: pointer;
}

.auth-logout-button:hover {
  border-color: #bdcbdc;
  background: #f8fafc;
  color: #2e4158;
}

.login-button.is-authenticated {
  border-color: #c6daf6 !important;
  background: #eef5ff !important;
  color: #1659ae !important;
}

@media (max-width: 560px) {
  .auth-dialog {
    width: min(100% - 20px, 410px);
    max-height: calc(100dvh - 20px);
  }

  .auth-dialog-panel {
    max-height: calc(100dvh - 20px);
    padding: 30px 24px 23px;
  }

  .auth-dialog h2 {
    font-size: 22px;
  }

  .auth-dialog-lead {
    font-size: 13px;
  }
}

/* Apartment explore budget range and purchase-intent controls. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .result-toolbar:has(.budget-min-popover:not([hidden])) {
  z-index: 40 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
  position: relative;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding-right: 0;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-label > span {
  color: inherit;
  font: inherit;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-label > small {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  border-radius: 5px;
  background: #edf3fb;
  color: #4d6789;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  display: grid !important;
  grid-template-columns: minmax(120px, 1fr) 32px 104px !important;
  align-items: center;
  gap: 6px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell {
  display: grid !important;
  grid-template-columns: minmax(28px, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 0 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-input-shell input {
  width: 100% !important;
  min-width: 0 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger {
  position: static;
  align-self: center;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  min-width: 32px !important;
  min-height: 36px !important;
  height: 36px !important;
  border: 1px solid #d5dfeb !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #65768b;
  padding: 0 !important;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger.has-value {
  border-color: #b6cce8 !important;
  background: #eef5fd !important;
  color: #1d63ba;
}

@media (min-width: 1340px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      minmax(220px, 1fr)
      329px
      repeat(3, 175px)
      112px
      112px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger:focus-visible,
.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button:focus-visible {
  outline: 2px solid rgba(20, 99, 230, 0.28);
  outline-offset: 2px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
  box-sizing: border-box;
  width: 104px !important;
  min-width: 104px !important;
  height: 36px !important;
  border: 1px solid #dce5f0;
  border-radius: 9px;
  background: #f1f5fa;
  padding: 3px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment::before {
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(34, 55, 82, 0.12);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button {
  min-height: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  padding: 0 2px !important;
  color: #66768a;
  font-size: 10.5px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment button[aria-pressed="true"] {
  color: #1559aa;
  font-weight: 800;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-popover {
  position: absolute;
  z-index: 220;
  top: calc(100% + 8px);
  left: 0;
  width: 270px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(30, 56, 90, 0.16);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-popover[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-popover > label {
  display: block;
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 4px;
  padding: 0 !important;
  color: #293a51;
  font-size: 12.5px;
  font-weight: 780;
  line-height: 1.45;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-help {
  margin: 0 0 10px;
  color: #6d7b8e;
  font-size: 10.5px;
  line-height: 1.45;
  word-break: keep-all;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  height: 40px;
  border: 1px solid #cbd9e9;
  border-radius: 9px;
  background: #f7faff;
  padding: 0 11px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-input-shell input {
  width: 100%;
  min-width: 0;
  height: 38px !important;
  min-height: 38px !important;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 !important;
  color: #16263c;
  font-size: 15px;
  font-weight: 760;
  appearance: textfield;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-input-shell span {
  color: #5c6c80;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-error {
  min-height: 16px;
  margin: 6px 0 0;
  color: #bf4238;
  font-size: 10.5px;
  line-height: 1.45;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 7px;
  margin-top: 2px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-actions button {
  min-height: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #ffffff;
  color: #58677a;
  font-size: 12px;
  font-weight: 740;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) #minBudgetApplyButton {
  border-color: #1765cf;
  background: #1765cf;
  color: #ffffff;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-field {
    width: 360px !important;
    flex-basis: 360px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    order: 1;
    width: 100% !important;
    flex: 0 0 100%;
    grid-template-columns: minmax(0, 1fr) 36px 118px !important;
    gap: 5px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
    width: 118px !important;
    min-width: 118px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger {
    position: static !important;
    top: auto !important;
    right: auto !important;
    order: initial;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    min-width: 36px !important;
    min-height: 40px !important;
    height: 40px !important;
    margin-left: 0;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #65758a;
    padding: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger.has-value {
    background: #eef5fd !important;
    color: #1d63ba;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-popover {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    border-radius: 14px;
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 34px 118px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-purchase-mode-segment {
    width: 118px !important;
    min-width: 118px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-min-trigger {
    width: 34px !important;
    min-width: 34px !important;
  }
}

@media (min-width: 901px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .explore-results-layout {
    margin-bottom: 0 !important;
  }
}

/* Apartment explore: direct complex-info action and full complex profile popup */
.results-view[data-active-tab="explore"] .sheet-shell th.name-column.name-cell,
.results-view[data-active-tab="explore"] .sheet-shell td.name-column.name-cell {
  width: 238px;
  min-width: 238px;
  max-width: 238px;
}

.results-view[data-active-tab="explore"] .apartment-name-actions {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.results-view[data-active-tab="explore"] .apartment-name-actions .deal-history-toggle {
  width: 100%;
}

.results-view[data-active-tab="explore"] .apartment-name-actions .deal-history-toggle:disabled {
  grid-template-columns: minmax(0, 1fr);
  color: inherit;
  cursor: default;
}

.results-view[data-active-tab="explore"] .apartment-name-actions .deal-history-toggle:disabled .deal-history-caret {
  display: none;
}

.results-view[data-active-tab="explore"] .apartment-info-button {
  min-height: 25px;
  border: 1px solid #a9c4e7;
  border-radius: 5px;
  background: #ffffff;
  color: #0756b9;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .apartment-info-button:hover,
.results-view[data-active-tab="explore"] .apartment-info-button:focus-visible {
  border-color: #0756b9;
  background: #f2f7ff;
  outline: 0;
}

.deal-history-dialog.is-info {
  width: min(920px, calc(100vw - 32px));
  max-height: min(860px, calc(100dvh - 32px));
}

.deal-history-dialog.is-info .deal-history-dialog-panel {
  max-height: min(860px, calc(100dvh - 32px));
}

.deal-history-dialog.is-info .deal-history-dialog-panel header {
  min-height: 58px;
  background: #ffffff;
  padding: 13px 18px;
}

.deal-history-dialog.is-info .deal-history-dialog-panel header strong {
  font-size: 16px;
}

.deal-history-dialog.is-info .deal-history-dialog-body {
  background: #f5f7fa;
  padding: 18px;
}

.deal-history-dialog.is-info .apartment-info-panel {
  display: grid;
  gap: 14px;
}

.apartment-info-overview,
.apartment-info-section,
.apartment-info-evidence {
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  background: #ffffff;
}

.apartment-info-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.apartment-info-overview-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.apartment-info-eyebrow {
  color: #0756b9;
  font-size: 11px;
  font-weight: 850;
}

.apartment-info-overview-copy > strong {
  color: #172033;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.apartment-info-overview-copy > p {
  margin: 0;
  color: #66768b;
  font-size: 12.5px;
  font-weight: 680;
  line-height: 1.45;
}

.apartment-info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.apartment-info-badges span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d5e0ec;
  border-radius: 999px;
  background: #f8fafc;
  color: #53657a;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 800;
}

.apartment-info-badges span.is-verified {
  border-color: #bed8ca;
  background: #f2faf5;
  color: #247248;
}

.apartment-info-badges span.is-unverified {
  border-color: #e5d4ad;
  background: #fffaf0;
  color: #84631f;
}

.apartment-info-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  background: #ffffff;
}

.apartment-info-metric {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-right: 1px solid #e4e9f0;
  padding: 14px 16px;
}

.apartment-info-metric:last-child {
  border-right: 0;
}

.apartment-info-metric span {
  color: #708095;
  font-size: 11px;
  font-weight: 760;
}

.apartment-info-metric strong {
  overflow: hidden;
  color: #1b2d45;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.apartment-info-metric small {
  color: #7b899a;
  font-size: 10.5px;
  font-weight: 680;
}

.apartment-info-section {
  overflow: hidden;
}

.apartment-info-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e4e9f0;
  padding: 13px 16px;
}

.apartment-info-section-heading h3,
.apartment-info-section-heading p {
  margin: 0;
}

.apartment-info-section-heading h3 {
  flex: 0 0 auto;
  color: #1a2b43;
  font-size: 13px;
  font-weight: 900;
}

.apartment-info-section-heading p {
  color: #7a8798;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.4;
  text-align: right;
}

.deal-history-dialog.is-info .apartment-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.deal-history-dialog.is-info .apartment-info-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  border-right: 1px solid #e8edf3;
  border-bottom: 1px solid #e8edf3;
}

.deal-history-dialog.is-info .apartment-info-grid > div:nth-child(2n) {
  border-right: 0;
}

.deal-history-dialog.is-info .apartment-info-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.deal-history-dialog.is-info .apartment-info-grid dt,
.deal-history-dialog.is-info .apartment-info-grid dd {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  margin: 0;
  border: 0;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.35;
}

.deal-history-dialog.is-info .apartment-info-grid dt {
  background: #f8fafc;
  color: #66768a;
  font-weight: 800;
}

.deal-history-dialog.is-info .apartment-info-grid dd {
  overflow-wrap: anywhere;
  color: #26374d;
  font-weight: 760;
}

.apartment-info-market-table-wrap {
  overflow-x: auto;
}

.apartment-info-market-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  table-layout: fixed;
}

.apartment-info-market-table th,
.apartment-info-market-table td {
  height: 40px;
  border-right: 1px solid #e8edf3;
  border-bottom: 1px solid #e8edf3;
  padding: 7px 10px;
  color: #314157;
  font-size: 11px;
  font-weight: 730;
  text-align: right;
  white-space: nowrap;
}

.apartment-info-market-table th {
  background: #f7f9fc;
  color: #68778b;
  font-weight: 850;
}

.apartment-info-market-table th:first-child,
.apartment-info-market-table td:first-child {
  text-align: left;
}

.apartment-info-market-table th:last-child,
.apartment-info-market-table td:last-child {
  border-right: 0;
}

.apartment-info-market-table tbody tr:last-child td {
  border-bottom: 0;
}

.apartment-info-market-table tr.is-current td {
  background: #f1f6fd;
  color: #164f96;
}

.apartment-info-market-table td.is-size {
  font-weight: 900;
}

.apartment-info-market-table td.is-empty {
  height: 70px;
  color: #7a8798;
  text-align: center;
}

.apartment-info-loading,
.apartment-info-load-error {
  min-height: 35px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e4e9f0;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 760;
}

.apartment-info-loading {
  color: #0756b9;
  background: #f5f9ff;
}

.apartment-info-load-error {
  color: #9a5d18;
  background: #fffaf2;
}

.apartment-info-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.apartment-info-actions button {
  min-height: 38px;
  border: 1px solid #b8c7d9;
  border-radius: 7px;
  background: #ffffff;
  color: #27415f;
  padding: 0 15px;
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
}

.apartment-info-actions button:hover,
.apartment-info-actions button:focus-visible {
  border-color: #0756b9;
  color: #0756b9;
  outline: 0;
}

.apartment-info-actions button.is-primary {
  border-color: #0756b9;
  background: #0756b9;
  color: #ffffff;
}

.apartment-info-actions button.is-primary:hover,
.apartment-info-actions button.is-primary:focus-visible {
  background: #064a9e;
  color: #ffffff;
}

.apartment-info-evidence {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
}

.apartment-info-evidence strong {
  color: #34465d;
  font-size: 11.5px;
  font-weight: 850;
}

.apartment-info-evidence span {
  color: #788596;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.45;
}

.apartment-info-evidence.is-verified {
  border-color: #cfe0d6;
  background: #f7fbf8;
}

.apartment-info-evidence.is-unverified {
  border-color: #e8dcc0;
  background: #fffcf6;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell th.name-column,
  .results-view[data-active-tab="explore"] .result-panel[data-view-panel="table"].active .sheet-shell td.name-column {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }

  .deal-history-dialog.is-info {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .deal-history-dialog.is-info .deal-history-dialog-panel {
    max-height: calc(100dvh - 16px);
  }

  .deal-history-dialog.is-info .deal-history-dialog-panel header {
    min-height: 54px;
    padding: 11px 13px;
  }

  .deal-history-dialog.is-info .deal-history-dialog-body {
    padding: 10px;
  }

  .apartment-info-overview {
    padding: 16px;
  }

  .apartment-info-overview-copy > strong {
    font-size: 19px;
  }

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

  .apartment-info-metric {
    min-height: 78px;
    border-bottom: 1px solid #e4e9f0;
    padding: 12px;
  }

  .apartment-info-metric:nth-child(2n) {
    border-right: 0;
  }

  .apartment-info-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .apartment-info-section-heading {
    display: grid;
    gap: 4px;
  }

  .apartment-info-section-heading p {
    text-align: left;
  }

  .deal-history-dialog.is-info .apartment-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .deal-history-dialog.is-info .apartment-info-grid > div,
  .deal-history-dialog.is-info .apartment-info-grid > div:nth-child(2n),
  .deal-history-dialog.is-info .apartment-info-grid > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #e8edf3;
  }

  .deal-history-dialog.is-info .apartment-info-grid > div:last-child {
    border-bottom: 0;
  }

  .apartment-info-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apartment-info-actions button {
    padding: 0 8px;
  }
}

/* Apartment search data-quality states */
.results-view[data-active-tab="explore"] .apartment-list-row.is-gap-review > td {
  background: #f4f5f7 !important;
  color: #737b87;
}

.results-view[data-active-tab="explore"] .apartment-list-row.is-gap-review:hover > td {
  background: #eceff3 !important;
}

.gap-review-note {
  display: grid;
  gap: 2px;
  margin-top: 7px;
  max-width: 280px;
  color: #69717d;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.gap-review-note b,
.gap-review-value {
  width: max-content;
  border: 1px solid #c9cfd8;
  border-radius: 4px;
  background: #e6e9ed;
  padding: 2px 6px;
  color: #555e6b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.result-card.mobile-result-card.is-gap-review {
  border-color: #d9dde3;
  background: #f4f5f7;
  filter: saturate(.6);
}

.result-card.mobile-result-card.is-gap-review .card-photo,
.result-card.mobile-result-card.is-gap-review .card-content {
  opacity: .82;
}

.excel-analysis-tab.is-data-unavailable,
.excel-analysis-tab.is-data-unavailable:hover,
.sheet-shell thead th.is-data-unavailable,
.sticky-sheet-header thead th.is-data-unavailable {
  cursor: not-allowed !important;
  color: #8b929d !important;
}

.excel-analysis-tab.is-data-unavailable {
  border-color: #e1e4e8 !important;
  background: #f5f6f7 !important;
  box-shadow: none !important;
  opacity: .78;
}

.excel-analysis-tab.is-data-unavailable small {
  color: #7c8490 !important;
  font-weight: 700;
}

.sheet-shell thead th.is-data-unavailable .sort-indicator,
.sticky-sheet-header thead th.is-data-unavailable .sort-indicator,
.sheet-shell thead th.is-data-unavailable .column-filter-button,
.sticky-sheet-header thead th.is-data-unavailable .column-filter-button {
  opacity: .34;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab:not(.active) .analysis-sort-icon {
  color: #8d9aad;
  opacity: .72;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab:not(.active):hover .analysis-sort-icon,
.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab:not(.active):focus-visible .analysis-sort-icon {
  opacity: 1;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-data-unavailable,
.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-data-unavailable:hover,
.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-data-unavailable:focus-visible {
  background: transparent !important;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-results-unavailable {
  background: transparent !important;
  opacity: 1;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-results-unavailable:hover,
.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.is-results-unavailable:focus-visible {
  background: #f5f7fa !important;
  color: #243750;
}

.results-view[data-active-tab="explore"] .analysis-mode-group .excel-analysis-tab.is-results-unavailable {
  background: transparent !important;
  opacity: 1;
  cursor: pointer;
}

.results-view[data-active-tab="explore"] .analysis-sort-group .excel-analysis-tab.active .analysis-sort-icon {
  opacity: 1;
}

/* Apartment information redesign */
.deal-history-dialog.is-info {
  width: min(980px, calc(100vw - 32px));
  max-height: min(900px, calc(100dvh - 24px));
}

.deal-history-dialog.is-info .deal-history-dialog-panel {
  max-height: min(900px, calc(100dvh - 24px));
}

.deal-history-dialog.is-info .deal-history-dialog-panel > header {
  border-bottom: 1px solid #e3e8ef;
  background: rgba(255, 255, 255, .97);
}

.deal-history-dialog.is-info .deal-history-dialog-body {
  background: #f2f5f8;
  padding: 16px;
}

.deal-history-dialog.is-info .apartment-info-panel {
  gap: 12px;
}

.deal-history-dialog.is-info .apartment-info-overview,
.deal-history-dialog.is-info .apartment-info-section,
.deal-history-dialog.is-info .apartment-info-metrics,
.deal-history-dialog.is-info .apartment-info-evidence {
  border-color: #dfe5ed;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(24, 41, 66, .025);
}

.deal-history-dialog.is-info .apartment-info-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  align-items: stretch;
  overflow: hidden;
  gap: 0;
  padding: 0;
}

.deal-history-dialog.is-info .apartment-info-overview-copy {
  align-content: center;
  padding: 24px;
}

.deal-history-dialog.is-info .apartment-info-overview-copy > strong {
  letter-spacing: -.025em;
}

.apartment-info-price-snapshot {
  display: grid;
  align-content: center;
  gap: 14px;
  border-left: 1px solid #dbe6f3;
  background: #f4f8fe;
  padding: 18px 20px;
}

.apartment-info-price-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.apartment-info-price-heading > div {
  display: grid;
  gap: 3px;
}

.apartment-info-price-heading span {
  color: #6f8095;
  font-size: 10px;
  font-weight: 800;
}

.apartment-info-price-heading strong {
  color: #152a44;
  font-size: 16px;
  font-weight: 900;
}

.apartment-info-price-heading b {
  border: 1px solid #c8daf1;
  border-radius: 999px;
  background: #ffffff;
  color: #175cae;
  padding: 5px 8px;
  font-size: 9.5px;
  font-weight: 850;
  white-space: nowrap;
}

.apartment-info-price-snapshot dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.apartment-info-price-snapshot dl > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  border-right: 1px solid #dbe4ef;
  padding: 0 10px;
}

.apartment-info-price-snapshot dl > div:first-child {
  padding-left: 0;
}

.apartment-info-price-snapshot dl > div:last-child {
  border-right: 0;
  padding-right: 0;
}

.apartment-info-price-snapshot dt,
.apartment-info-price-snapshot dd {
  min-width: 0;
  margin: 0;
}

.apartment-info-price-snapshot dt {
  color: #708096;
  font-size: 9.5px;
  font-weight: 760;
}

.apartment-info-price-snapshot dd {
  overflow-wrap: anywhere;
  color: #172c47;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.apartment-info-price-snapshot.is-review {
  border-left-color: #dddfe4;
  background: #f5f6f7;
}

.apartment-info-price-snapshot.is-review .apartment-info-price-heading b {
  border-color: #d1d5db;
  color: #626a75;
}

.apartment-info-price-note {
  margin: 0;
  color: #68717d;
  font-size: 10px;
  font-weight: 680;
  line-height: 1.4;
}

.deal-history-dialog.is-info .apartment-info-metrics {
  background: #ffffff;
}

.deal-history-dialog.is-info .apartment-info-metric {
  min-height: 82px;
  padding: 13px 15px;
}

.deal-history-dialog.is-info .apartment-info-metric strong {
  font-size: 16px;
}

.deal-history-dialog.is-info .apartment-info-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.deal-history-dialog.is-info .apartment-info-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 12px;
}

.deal-history-dialog.is-info .apartment-info-section-heading {
  min-height: 47px;
  padding: 12px 14px;
}

.deal-history-dialog.is-info .apartment-info-section-heading h3 {
  font-size: 13px;
}

.apartment-info-market-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.deal-history-dialog.is-info .apartment-info-market-table th,
.deal-history-dialog.is-info .apartment-info-market-table td {
  height: 43px;
  padding: 8px 10px;
}

.deal-history-dialog.is-info .apartment-info-market-table tr.is-current td {
  background: #eef5ff;
  color: #124f9d;
}

.deal-history-dialog.is-info .apartment-info-market-table tr.is-current td.is-size::after {
  content: "선택";
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #1262e3;
  color: #ffffff;
  padding: 0 6px;
  font-size: 8.5px;
  font-weight: 850;
  vertical-align: middle;
}

.apartment-info-detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.apartment-info-detail-layout .apartment-info-section {
  min-width: 0;
  height: 100%;
}

.deal-history-dialog.is-info .apartment-info-detail-layout .apartment-info-grid {
  grid-template-columns: minmax(0, 1fr);
}

.deal-history-dialog.is-info .apartment-info-detail-layout .apartment-info-grid > div,
.deal-history-dialog.is-info .apartment-info-detail-layout .apartment-info-grid > div:nth-child(2n),
.deal-history-dialog.is-info .apartment-info-detail-layout .apartment-info-grid > div:nth-last-child(-n + 2) {
  border-right: 0;
  border-bottom: 1px solid #e8edf3;
}

.deal-history-dialog.is-info .apartment-info-detail-layout .apartment-info-grid > div:last-child {
  border-bottom: 0;
}

.apartment-info-empty-state {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 15px;
}

.apartment-info-empty-state span {
  border-radius: 999px;
  background: #eef1f4;
  color: #687483;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 850;
}

.apartment-info-empty-state p {
  margin: 0;
  color: #758295;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.45;
}

.deal-history-dialog.is-info .apartment-info-evidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
}

.deal-history-dialog.is-info .apartment-info-evidence span {
  text-align: right;
}

@media (max-width: 720px) {
  .deal-history-dialog.is-info {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .deal-history-dialog.is-info .deal-history-dialog-panel {
    max-height: calc(100dvh - 12px);
  }

  .deal-history-dialog.is-info .deal-history-dialog-body {
    padding: 9px;
  }

  .deal-history-dialog.is-info .apartment-info-panel {
    gap: 9px;
  }

  .deal-history-dialog.is-info .apartment-info-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .deal-history-dialog.is-info .apartment-info-overview-copy {
    padding: 17px;
  }

  .apartment-info-price-snapshot {
    border-top: 1px solid #dbe6f3;
    border-left: 0;
    padding: 15px 16px;
  }

  .apartment-info-price-snapshot dl > div {
    padding: 0 8px;
  }

  .apartment-info-price-snapshot dd {
    font-size: 11px;
  }

  .deal-history-dialog.is-info .apartment-info-actions button {
    min-height: 40px;
    padding: 0 8px;
  }

  .apartment-info-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .deal-history-dialog.is-info .apartment-info-market-table-wrap {
    overflow: visible;
    padding: 9px;
  }

  .deal-history-dialog.is-info .apartment-info-market-table {
    min-width: 0;
    display: block;
  }

  .deal-history-dialog.is-info .apartment-info-market-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .deal-history-dialog.is-info .apartment-info-market-table tbody {
    display: grid;
    gap: 8px;
  }

  .deal-history-dialog.is-info .apartment-info-market-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    background: #ffffff;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td {
    height: auto;
    min-height: 54px;
    display: grid;
    align-content: center;
    gap: 4px;
    border-right: 1px solid #e8edf3;
    border-bottom: 1px solid #e8edf3;
    padding: 9px 10px;
    text-align: left;
    white-space: normal;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td:nth-child(2n + 1) {
    border-right: 1px solid #e8edf3;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td:nth-child(2n) {
    border-right: 0;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td::before {
    content: attr(data-label);
    color: #78869a;
    font-size: 9px;
    font-weight: 760;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td.is-size {
    grid-column: 1 / -1;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-right: 0;
    text-align: left;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td.is-size::before {
    margin-right: 8px;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .deal-history-dialog.is-info .apartment-info-market-table tr.is-current {
    border-color: #9fc1ed;
    box-shadow: 0 0 0 1px #9fc1ed;
  }

  .deal-history-dialog.is-info .apartment-info-market-table td.is-empty {
    grid-column: 1 / -1;
    min-height: 70px;
    border: 0;
    text-align: center;
  }

  .deal-history-dialog.is-info .apartment-info-evidence {
    display: grid;
    gap: 4px;
  }

  .deal-history-dialog.is-info .apartment-info-evidence span {
    text-align: left;
  }
}

/* Current-district fallback for maps whose boundary asset predates reorganization. */
.current-district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-content: start;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.current-district-grid .map-region {
  width: 100%;
}

.current-district-grid .map-region.is-muted {
  opacity: 0.38;
}

@media (max-width: 720px) {
  .current-district-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .current-district-grid .map-region {
    min-height: 96px;
  }
}

/* Apartment explore: searchable district checklist without resizing the closed fields. */
@media (min-width: 721px) {
  .district-multi-popover {
    width: var(--district-popover-width, min(392px, calc(100vw - 24px)));
  }
}

.district-multi-popover {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  max-height: min(66vh, 440px);
  padding: 10px;
  overflow: hidden;
}

.district-multi-head {
  align-items: center;
}

.district-multi-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-multi-search {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) 21px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 7px 0 9px;
}

.district-multi-search:focus-within {
  border-color: #9fc0e9;
  background: #ffffff;
}

.district-multi-search svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #728096;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.district-multi-search input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: #182538;
  padding: 0 !important;
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  box-shadow: none !important;
}

.district-multi-search input::placeholder {
  color: #8a96a7;
}

.district-multi-search input::-webkit-search-cancel-button {
  display: none;
}

.district-multi-search button {
  width: 20px;
  min-width: 20px;
  height: 20px !important;
  min-height: 20px !important;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #e8edf4;
  color: #667386;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  box-shadow: none !important;
}

.district-multi-search button[hidden] {
  display: none !important;
}

.district-multi-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
  max-height: min(38vh, 260px);
  align-content: start;
  padding: 1px 2px 3px 1px;
}

.district-multi-list[hidden] {
  display: none !important;
}

.district-multi-popover .district-option {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  overflow: hidden;
  text-align: left;
  white-space: normal;
  font-size: 11.5px;
  line-height: 1.18;
}

.district-multi-popover .district-option:focus-visible {
  border-color: #86afe4;
  outline: 2px solid rgba(18, 98, 227, 0.14);
  outline-offset: 1px;
}

.district-option-check {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid #c8d3df;
  border-radius: 4px;
  background: #ffffff;
}

.district-option-check::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 1.5px solid #ffffff;
  border-bottom: 1.5px solid #ffffff;
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}

.district-option.is-active .district-option-check {
  border-color: #1262e3;
  background: #1262e3;
}

.district-option.is-active .district-option-check::after {
  opacity: 1;
}

.district-option-label {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.district-multi-selected {
  min-width: 0;
  display: grid;
  gap: 5px;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}

.district-multi-selected-label {
  color: #7b8798;
  font-size: 10.5px;
  font-weight: 720;
}

.district-multi-selected-chips {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.district-multi-selected-empty {
  color: #59677a !important;
  font-size: 11.5px !important;
  font-weight: 680 !important;
}

.district-multi-popover .district-selected-chip {
  min-height: 24px;
  height: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c9ddf7;
  border-radius: 999px;
  background: #eef5ff;
  color: #1758b1;
  padding: 3px 7px 3px 8px;
  font-size: 10.5px;
  font-weight: 730;
  line-height: 1.2;
  box-shadow: none !important;
}

.district-multi-popover .district-selected-chip span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.district-multi-popover .district-selected-chip span:last-child {
  font-size: 13px;
  line-height: 1;
}

.district-multi-empty {
  margin: 0;
  border: 1px dashed #d9e2ed;
  border-radius: 8px;
  background: #fafbfd;
  color: #728096;
  padding: 17px 10px;
  font-size: 11.5px;
  font-weight: 650;
  text-align: center;
}

.district-multi-empty[hidden] {
  display: none !important;
}

.district-multi-actions {
  position: relative;
  z-index: 1;
  background: #ffffff;
  padding-top: 0;
}

@media (max-width: 720px) {
  .district-multi-popover {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    max-height: min(70dvh, 520px);
    overflow: hidden;
  }

  .district-multi-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(38dvh, 300px);
  }
}

@media (max-width: 360px) {
  .district-multi-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Apartment finder: keep the example amount beside the unit and reveal entered values in brand blue. */
.results-view[data-active-tab="explore"] .budget-input-shell {
  gap: 3px !important;
}

.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput {
  padding: 0 !important;
  color: var(--hybrid-blue, #1463e6) !important;
  -webkit-text-fill-color: var(--hybrid-blue, #1463e6) !important;
  caret-color: var(--hybrid-blue, #1463e6) !important;
  text-align: right !important;
}

.results-view[data-active-tab="explore"] .budget-input-shell #budgetDisplayInput::placeholder {
  color: rgba(20, 99, 230, 0.38) !important;
  -webkit-text-fill-color: rgba(20, 99, 230, 0.38) !important;
  opacity: 1 !important;
}

/* Match the area label hierarchy to the budget label and badge every pyeong reference. */
.size-filter-label {
  min-width: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.size-filter-label > span {
  color: inherit;
  font: inherit;
  line-height: inherit;
}

.size-filter-label > small,
.size-picker-popover .size-option-copy .size-pyeong-badge,
.size-picker-popover .size-option.is-active .size-option-copy .size-pyeong-badge,
.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  border: 0 !important;
  border-radius: 5px;
  background: #edf3fb !important;
  color: #4d6789 !important;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none !important;
}

.size-picker-popover .size-option.is-active .size-option-copy .size-pyeong-badge {
  background: #e5efff !important;
  color: #2f62a6 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-label > small,
.results-view[data-active-tab="explore"] .size-filter-label > small,
.size-picker-popover .size-option-copy .size-pyeong-badge {
  background: #e5efff !important;
  color: #2f62a6 !important;
}

.results-view[data-active-tab="explore"] .size-filter-label > small {
  background: #f2f4f6 !important;
  color: #6f7a88 !important;
  font-weight: 600;
  opacity: 0.92;
}

.size-picker-popover .size-option.is-national-size .size-national-badge,
.size-picker-popover .size-option.is-national-size.is-active .size-national-badge {
  background: #1262e3 !important;
  color: #ffffff !important;
  font-weight: 620;
}

.size-picker-popover .size-option-badges {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.size-picker-popover .size-option-copy .size-area-badge {
  min-height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 4px;
  background: #f3f4f6;
  color: #687381;
  padding: 0 4px;
  font-size: 8.5px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.9;
  white-space: nowrap;
}

/* A district is subordinate to its city/province selection. */
.results-view[data-active-tab="explore"] .district-multi-button:disabled {
  border-color: #e8edf3 !important;
  background: #fcfdff !important;
  color: #a5afbd !important;
  opacity: 1 !important;
  cursor: default !important;
  box-shadow: none !important;
}

.results-view[data-active-tab="explore"] .district-multi-button:disabled .district-multi-chevron {
  opacity: 0.16;
}

/* Keep the default sale-price sort state from darkening one header cell. */
.results-view[data-active-tab="explore"] .sheet-shell thead th.salePrice-column.is-sorted:not(:hover):not(:focus-visible),
.sticky-sheet-header thead th.salePrice-column.is-sorted:not(:hover):not(:focus-visible) {
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  color: #16243a;
  font-weight: 760;
  box-shadow: none;
}

/* First spreadsheet row: gray before a search, black after any search. */
body.is-explore-search-pending .results-view[data-active-tab="explore"] .sheet-shell thead th,
body.is-explore-search-pending .sticky-sheet-header thead th {
  color: #8b929d !important;
  cursor: default !important;
  pointer-events: none !important;
}

body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .sheet-shell thead th,
body:not(.is-explore-search-pending) .sticky-sheet-header thead th {
  color: #16243a !important;
}

/* Before the first search, keep every column filter visible and equally muted. */
body.is-explore-search-pending .results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
body.is-explore-search-pending .sticky-sheet-header thead th .column-filter-button {
  visibility: visible !important;
  opacity: 0.34 !important;
  pointer-events: none !important;
}

/* The removed purchase-purpose toggle leaves only budget input and minimum filter. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
  grid-template-columns: minmax(120px, 1fr) 32px !important;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls > .budget-filter-field {
    width: auto !important;
    max-width: none !important;
    flex-basis: auto !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 36px !important;
  }
}

@media (max-width: 380px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field {
    grid-template-columns: minmax(0, 1fr) 34px !important;
  }
}

/* Explore quick start: a temporary compact overlay inside the empty spreadsheet. */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.table-empty-row td.empty-table-cell.is-presets {
  vertical-align: top;
}

.results-view[data-active-tab="explore"] .table-empty-state.is-presets > .explore-preset-panel {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  text-align: left;
}

.results-view[data-active-tab="explore"] .explore-preset-header {
  align-items: center;
  gap: 16px;
  margin-bottom: 9px;
}

.results-view[data-active-tab="explore"] .explore-preset-header div {
  gap: 2px;
}

.results-view[data-active-tab="explore"] .explore-preset-header strong {
  color: #18273d;
  font-size: 14.5px;
  font-weight: 820;
  line-height: 1.25;
}

.results-view[data-active-tab="explore"] .explore-preset-header span {
  color: #6c7a8e;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.results-view[data-active-tab="explore"] .explore-preset-header small {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #7a8798;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .explore-preset-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.results-view[data-active-tab="explore"] .explore-preset-card {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 14px;
  grid-template-areas:
    "badge title arrow"
    "badge meta arrow";
  align-items: center;
  align-content: center;
  column-gap: 10px;
  row-gap: 2px;
  border-color: #e0e7ef;
  border-radius: 7px;
  background: #fbfcfe;
  padding: 7px 10px;
}

.results-view[data-active-tab="explore"] .explore-preset-card .explore-preset-card-badge {
  grid-area: badge;
  box-sizing: border-box;
  width: 58px;
  max-width: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  border-radius: 4px;
  background: #eef4fb;
  color: #47709f;
  padding: 0 5px;
  font-size: 9.5px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .explore-preset-card strong {
  grid-area: title;
  color: #1c2c43;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.results-view[data-active-tab="explore"] .explore-preset-card .explore-preset-card-meta {
  grid-area: meta;
  color: #6b798c;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.results-view[data-active-tab="explore"] .explore-preset-card-arrow {
  position: static;
  grid-area: arrow;
  justify-self: end;
  color: #99a8bb;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  transform: none;
}

.results-view[data-active-tab="explore"] .explore-preset-card-arrow::before {
  content: "→";
}

.results-view[data-active-tab="explore"] .explore-preset-card:hover,
.results-view[data-active-tab="explore"] .explore-preset-card:focus-visible,
.results-view[data-active-tab="explore"] .explore-preset-card.is-active {
  border-color: #8eb5e8;
  background: #f5f9ff;
  color: #145fcf;
  outline: none;
}

.results-view[data-active-tab="explore"] .explore-preset-card:hover .explore-preset-card-arrow,
.results-view[data-active-tab="explore"] .explore-preset-card:focus-visible .explore-preset-card-arrow,
.results-view[data-active-tab="explore"] .explore-preset-card.is-active .explore-preset-card-arrow {
  color: #145fcf;
}

.results-view[data-active-tab="explore"] .table-empty-state.is-presets {
  left: max(24px, calc((100vw - min(720px, calc(100vw - 86px))) / 2 - 16px));
  z-index: 6;
  width: min(720px, calc(100vw - 86px));
  margin-top: 24px;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  padding: 13px 14px 14px;
  box-shadow: 0 7px 18px rgba(23, 54, 96, 0.055);
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .explore-preset-header {
    align-items: center;
    margin-bottom: 10px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header strong {
    font-size: 14px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header span {
    font-size: 10.5px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-header small {
    display: none;
  }

  .results-view[data-active-tab="explore"] .explore-preset-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    overflow: visible !important;
    padding-bottom: 0;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card {
    width: auto !important;
    min-width: 0 !important;
    min-height: 52px;
    grid-template-columns: 54px minmax(0, 1fr) 12px;
    column-gap: 8px;
    padding: 6px 9px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card .explore-preset-card-badge {
    width: 54px;
    max-width: 54px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card strong {
    font-size: 12.5px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card .explore-preset-card-meta {
    font-size: 9.5px;
  }

  .results-view[data-active-tab="explore"] .explore-preset-card-arrow {
    font-size: 12px;
  }

  .results-view[data-active-tab="explore"] .table-empty-state.is-presets {
    left: max(14px, calc((100vw - min(460px, calc(100vw - 38px))) / 2 - 14px));
    width: min(460px, calc(100vw - 38px));
    margin-top: 14px;
    border-radius: 10px;
    padding: 12px;
  }
}

/* Dedicated apartment profile: flat site-native information hierarchy. */
.results-view[data-active-tab="explore"] .apartment-info-button {
  min-height: 30px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #f7f9fc;
  color: #4a607a;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .apartment-info-button:hover {
  border-color: #b7cbe3;
  background: #edf4fc;
  color: #0f5fd7;
}

.results-view[data-active-tab="explore"] .apartment-info-button:focus-visible,
.complex-info-dialog :is(button, a):focus-visible {
  outline: 2px solid var(--hybrid-blue, #1463e6);
  outline-offset: 2px;
}

.complex-info-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 32px));
  margin: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--hybrid-text, #223047);
}

.complex-info-dialog::backdrop {
  background: rgba(20, 30, 45, .42);
}

.complex-info-dialog-panel {
  height: min(900px, calc(100dvh - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 8px;
  background: var(--hybrid-panel, #ffffff);
  box-shadow: 0 16px 44px rgba(23, 32, 51, .16);
}

.complex-info-dialog-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  background: var(--hybrid-panel, #ffffff);
  padding: 12px 16px 12px 22px;
}

.complex-info-dialog-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
}

.complex-info-dialog-kicker {
  grid-row: 1;
  width: max-content;
  color: var(--hybrid-blue, #1463e6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}

.complex-info-dialog-heading > strong {
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--hybrid-ink, #172033);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-info-dialog-heading > span:last-child {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--hybrid-muted, #667085);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#complexInfoDialogCloseButton {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--hybrid-muted, #667085);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

#complexInfoDialogCloseButton:hover {
  background: #f4f6f9;
  color: var(--hybrid-ink, #172033);
}

#complexInfoDialogCloseButton span {
  transform: translateY(-1px);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.complex-info-dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--hybrid-panel, #ffffff);
  scrollbar-gutter: stable;
}

.complex-profile {
  --complex-profile-gutter: 24px;
  color: var(--hybrid-text, #223047);
  font-size: 13px;
  font-weight: 400;
}

.complex-profile-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .86fr);
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
}

.complex-profile-summary {
  min-width: 0;
  padding: 22px var(--complex-profile-gutter);
}

.complex-profile-summary-header,
.complex-profile-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.complex-profile-summary-copy,
.complex-profile-section-header {
  min-width: 0;
}

.complex-profile-summary h3,
.complex-profile-section h3 {
  margin: 0;
  color: var(--hybrid-ink, #172033);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.complex-profile-summary p,
.complex-profile-section-header p {
  margin: 4px 0 0;
  color: var(--hybrid-muted, #667085);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.complex-profile-summary-header > span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.complex-profile-summary-header > span.is-verified {
  background: #eef8f2;
  color: #2f6d48;
}

.complex-profile-summary-header > span.is-partial {
  background: #f4f6f8;
  color: var(--hybrid-muted, #667085);
}

.complex-profile-key-facts,
.complex-profile-price-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0 0;
  border-top: 1px solid var(--hybrid-line-soft, #e8edf5);
  border-left: 1px solid var(--hybrid-line-soft, #e8edf5);
}

.complex-profile-fact {
  min-width: 0;
  display: grid;
  gap: 6px;
  border-right: 1px solid var(--hybrid-line-soft, #e8edf5);
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 13px 14px;
}

.complex-profile-fact dt,
.complex-profile-fact dd {
  min-width: 0;
  margin: 0;
}

.complex-profile-fact dt {
  color: var(--hybrid-muted, #667085);
  font-size: 11px;
  font-weight: 400;
}

.complex-profile-fact dd {
  display: grid;
  gap: 3px;
}

.complex-profile-fact strong {
  overflow-wrap: anywhere;
  color: var(--hybrid-ink, #172033);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.complex-profile-fact small {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.35;
}

.complex-profile-map {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(190px, 1fr) auto;
  border-left: 1px solid var(--hybrid-line, #dfe6ef);
  background: #f4f7fa;
}

.complex-profile-map-preview {
  min-height: 190px;
  overflow: hidden;
  background: #edf2f7;
}

.complex-profile-map-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: block;
  border: 0;
  pointer-events: none;
}

.complex-profile-map-placeholder {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 26px;
  text-align: center;
}

.complex-profile-map-placeholder p {
  max-width: 260px;
  margin: 0;
  color: var(--hybrid-muted, #667085);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.complex-profile-map-pin {
  width: 34px;
  height: 34px;
  display: block;
  position: relative;
  border: 1px solid rgba(20, 99, 230, .24);
  border-radius: 50%;
  background: var(--hybrid-blue-soft, #eaf2ff);
}

.complex-profile-map-pin::after {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--hybrid-blue, #1463e6);
}

.complex-profile-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--hybrid-line, #dfe6ef);
  background: var(--hybrid-panel, #ffffff);
  padding: 10px 12px 10px 14px;
}

.complex-profile-map-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.complex-profile-map-copy strong {
  color: var(--hybrid-ink, #172033);
  font-size: 12px;
  font-weight: 600;
}

.complex-profile-map-copy span {
  color: var(--hybrid-muted, #667085);
  font-size: 10px;
  font-weight: 400;
}

.complex-profile-map-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.complex-profile-map-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 6px;
  background: var(--hybrid-panel, #ffffff);
  color: var(--hybrid-text, #223047);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.complex-profile-map-actions a.is-primary {
  border-color: var(--hybrid-blue, #1463e6);
  color: var(--hybrid-blue, #1463e6);
}

.complex-profile-map-actions a:only-child {
  min-width: 132px;
}

.complex-profile-size-picker {
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  background: var(--hybrid-panel, #ffffff);
  padding: 12px var(--complex-profile-gutter);
}

.complex-profile-size-picker-label {
  color: var(--hybrid-muted, #667085);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.complex-profile-size-options {
  min-width: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.complex-profile-size-options button {
  min-width: max-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 7px;
  background: var(--hybrid-panel, #ffffff);
  color: var(--hybrid-text, #223047);
  padding: 0 11px;
  cursor: pointer;
}

.complex-profile-size-options button strong {
  font-size: 12px;
  font-weight: 500;
}

.complex-profile-size-options button span {
  color: var(--hybrid-muted, #667085);
  font-size: 10px;
  font-weight: 400;
}

.complex-profile-size-options button.is-active {
  border-color: var(--hybrid-blue, #1463e6);
  background: var(--hybrid-blue-soft, #eaf2ff);
  color: var(--hybrid-blue, #1463e6);
}

.complex-profile-section {
  min-width: 0;
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  background: var(--hybrid-panel, #ffffff);
  padding: 21px var(--complex-profile-gutter);
}

.complex-profile-price-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.complex-profile-review-note,
.complex-profile-status {
  margin: 12px 0 0;
  border-left: 2px solid #9da8b7;
  color: var(--hybrid-muted, #667085);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.complex-profile-status {
  margin: 0;
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  border-left: 0;
  background: #f6f8fb;
  padding: 10px var(--complex-profile-gutter);
}

.complex-profile-status.is-error {
  background: #fff8f4;
  color: #8f4b2c;
}

.complex-profile-market-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--hybrid-line, #dfe6ef);
}

.complex-profile-market-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 1.35fr .9fr .8fr;
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  background: var(--hybrid-panel, #ffffff);
  color: var(--hybrid-text, #223047);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.complex-profile-market-row:hover {
  background: #f8fafc;
}

.complex-profile-market-row.is-active {
  background: var(--hybrid-blue-soft, #eaf2ff);
  box-shadow: inset 3px 0 0 var(--hybrid-blue, #1463e6);
}

.complex-profile-market-row > span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 10px 12px;
}

.complex-profile-market-row > span:last-child {
  border-right: 0;
}

.complex-profile-market-row small,
.complex-profile-market-row em {
  overflow: hidden;
  color: var(--hybrid-muted, #667085);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-profile-market-row strong {
  overflow: hidden;
  color: var(--hybrid-ink, #172033);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-profile-empty {
  margin: 0;
  color: var(--hybrid-muted, #667085);
  padding: 20px 0 4px;
  font-size: 12px;
  font-weight: 400;
}

.complex-profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
}

.complex-profile-details > .complex-profile-section {
  border-right: 1px solid var(--hybrid-line, #dfe6ef);
  border-bottom: 0;
}

.complex-profile-details > .complex-profile-section:last-child {
  border-right: 0;
}

.complex-profile-detail-list {
  display: grid;
  gap: 0;
  margin: 15px 0 0;
}

.complex-profile-detail-list > div {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(86px, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 8px 0;
}

.complex-profile-detail-list dt,
.complex-profile-detail-list dd {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
}

.complex-profile-detail-list dt {
  color: var(--hybrid-muted, #667085);
  font-weight: 400;
}

.complex-profile-detail-list dd {
  overflow-wrap: anywhere;
  color: var(--hybrid-ink, #172033);
  font-weight: 500;
  text-align: right;
}

.complex-profile-evidence {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  background: #f7f9fb;
  padding: 15px var(--complex-profile-gutter) 18px;
}

.complex-profile-evidence > strong {
  color: var(--hybrid-ink, #172033);
  font-size: 11px;
  font-weight: 600;
}

.complex-profile-evidence ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin: 0;
  padding: 0;
  color: var(--hybrid-muted, #667085);
  list-style: none;
}

.complex-profile-evidence li {
  position: relative;
  padding-left: 9px;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.45;
}

.complex-profile-evidence li::before {
  content: "";
  width: 3px;
  height: 3px;
  position: absolute;
  top: .62em;
  left: 0;
  border-radius: 50%;
  background: #9aa5b5;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"] .apartment-info-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .complex-info-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .complex-info-dialog-panel {
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .complex-info-dialog-header {
    min-height: calc(70px + env(safe-area-inset-top));
    align-items: flex-end;
    padding: calc(10px + env(safe-area-inset-top)) 10px 10px 16px;
  }

  .complex-info-dialog-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }

  .complex-info-dialog-kicker,
  .complex-info-dialog-heading > strong,
  .complex-info-dialog-heading > span:last-child {
    grid-column: 1;
  }

  .complex-info-dialog-kicker {
    grid-row: 1;
  }

  .complex-info-dialog-heading > strong {
    grid-row: 2;
    font-size: 17px;
  }

  .complex-info-dialog-heading > span:last-child {
    grid-row: 3;
    max-width: calc(100vw - 76px);
    font-size: 11px;
  }

  .complex-profile {
    --complex-profile-gutter: 16px;
  }

  .complex-profile-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .complex-profile-summary {
    padding: 18px var(--complex-profile-gutter);
  }

  .complex-profile-summary-header {
    display: grid;
    gap: 9px;
  }

  .complex-profile-summary-header > span {
    width: max-content;
  }

  .complex-profile-key-facts {
    margin-top: 15px;
  }

  .complex-profile-fact {
    min-height: 73px;
    padding: 11px 10px;
  }

  .complex-profile-fact strong {
    font-size: 14px;
  }

  .complex-profile-map {
    min-height: 0;
    grid-template-rows: 180px auto;
    border-top: 1px solid var(--hybrid-line, #dfe6ef);
    border-left: 0;
  }

  .complex-profile-map-preview,
  .complex-profile-map-preview iframe,
  .complex-profile-map-placeholder {
    min-height: 180px;
  }

  .complex-profile-map-footer {
    display: grid;
    gap: 9px;
    padding: 11px var(--complex-profile-gutter) 13px;
  }

  .complex-profile-map-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .complex-profile-map-actions a {
    min-height: 42px;
  }

  .complex-profile-map-actions a:only-child {
    grid-column: 1 / -1;
  }

  .complex-profile-size-picker {
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 4;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 9px var(--complex-profile-gutter) 10px;
  }

  .complex-profile-size-picker-label {
    font-size: 10px;
  }

  .complex-profile-size-options button {
    min-height: 42px;
  }

  .complex-profile-section {
    padding: 18px var(--complex-profile-gutter);
  }

  .complex-profile-section-header {
    display: grid;
    gap: 2px;
  }

  .complex-profile-price-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 15px;
  }

  .complex-profile-market-list {
    gap: 9px;
    border-top: 0;
  }

  .complex-profile-market-row {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--hybrid-line, #dfe6ef);
    border-radius: 7px;
  }

  .complex-profile-market-row.is-active {
    border-color: rgba(20, 99, 230, .48);
    box-shadow: inset 3px 0 0 var(--hybrid-blue, #1463e6);
  }

  .complex-profile-market-row > span {
    min-height: 57px;
    border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
    padding: 9px 10px;
  }

  .complex-profile-market-row > span:first-child {
    grid-column: 1 / -1;
    min-height: 48px;
    border-right: 0;
  }

  .complex-profile-market-row > span:nth-child(3),
  .complex-profile-market-row > span:nth-child(5) {
    border-right: 0;
  }

  .complex-profile-market-row > span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .complex-profile-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .complex-profile-details > .complex-profile-section,
  .complex-profile-details > .complex-profile-section:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
  }

  .complex-profile-details > .complex-profile-section:last-child {
    border-bottom: 0;
  }

  .complex-profile-evidence {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px var(--complex-profile-gutter) 20px;
  }

  .complex-profile-evidence ul {
    display: grid;
    gap: 4px;
  }

}

/* Apartment finder: compact direct minimum/maximum budget range. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field.budget-range-direct {
  box-sizing: border-box;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 9px minmax(0, 1fr) 18px !important;
  align-items: center !important;
  gap: 4px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct > input[type="hidden"] {
  display: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 36px !important;
  height: 36px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  border: 1px solid #d7e1ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  padding: 0 7px !important;
  box-shadow: none !important;
  cursor: text;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field.is-max {
  border-color: #c9daee !important;
  background: #fbfdff !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field:focus-within {
  border-color: #3f7fd2 !important;
  box-shadow: 0 0 0 2px rgba(20, 99, 230, 0.1) !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field:has(input[aria-invalid="true"]) {
  border-color: #d45c52 !important;
  box-shadow: 0 0 0 2px rgba(196, 67, 57, 0.08) !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-label {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: #53657a;
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-label small {
  color: #8c99aa;
  font-size: 7px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field.is-max .budget-bound-label small {
  color: #1765cf;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field input {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  color: #43566e;
  -webkit-text-fill-color: #43566e;
  caret-color: #1765cf;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  box-shadow: none !important;
  appearance: textfield;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field.is-max input {
  color: #1463e6;
  -webkit-text-fill-color: #1463e6;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field input::placeholder {
  color: #a0abb9;
  -webkit-text-fill-color: #a0abb9;
  opacity: 1;
  font-weight: 680;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-separator,
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7a899b;
  font-size: 10.5px;
  font-weight: 740;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-inline-error {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(196, 67, 57, 0.24);
  border-radius: 7px;
  background: #ffffff;
  padding: 5px 8px;
  color: #b53f36;
  font-size: 10.5px;
  font-weight: 740;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(146, 43, 36, 0.09);
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-inline-error[hidden] {
  display: none !important;
}

@media (min-width: 1181px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    grid-template-columns:
      248px
      minmax(270px, 1fr)
      minmax(126px, 0.55fr)
      minmax(118px, 0.45fr)
      minmax(118px, 0.45fr)
      108px
      108px !important;
  }
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-trade-field.budget-range-direct {
    grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr) 20px !important;
    gap: 5px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-bound-field {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 9px !important;
  }
}

/* Apartment profile: decision-first transaction context with a single drill-down action. */
.complex-profile-deals > .complex-profile-section-header {
  align-items: center;
}

.complex-profile-deals-heading {
  min-width: 0;
}

.complex-profile-deal-tabs {
  min-height: 38px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--hybrid-line, #dfe6ef);
  border-radius: 7px;
  background: #f7f9fb;
}

.complex-profile-deal-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--hybrid-line, #dfe6ef);
  background: transparent;
  color: var(--hybrid-muted, #667085);
  padding: 0 11px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.complex-profile-deal-tabs button:last-child {
  border-right: 0;
}

.complex-profile-deal-tabs button.is-active {
  background: var(--hybrid-panel, #ffffff);
  color: var(--hybrid-blue, #1463e6);
  box-shadow: inset 0 -2px 0 var(--hybrid-blue, #1463e6);
}

.complex-profile-deal-tabs small {
  color: inherit;
  font-size: 9.5px;
  font-weight: 400;
}

.complex-profile-deals-content {
  display: grid;
  gap: 16px;
  margin-top: 17px;
}

.complex-profile-deal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--hybrid-line-soft, #e8edf5);
  border-left: 1px solid var(--hybrid-line-soft, #e8edf5);
}

.complex-profile-deal-stats .complex-profile-fact {
  min-height: 82px;
}

.complex-profile-deal-stats .complex-profile-fact strong {
  font-size: 13.5px;
}

.complex-profile-deals-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .78fr);
  border-top: 1px solid var(--hybrid-line, #dfe6ef);
  border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
}

.complex-profile-deal-chart {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(176px, 1fr) auto;
  border-right: 1px solid var(--hybrid-line, #dfe6ef);
  padding: 15px 18px 10px;
}

.complex-profile-deal-chart-header,
.complex-profile-deal-chart-dates,
.complex-profile-recent-deals-heading,
.complex-profile-deals-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.complex-profile-deal-chart-header {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 400;
}

.complex-profile-deal-chart-header span:last-child {
  color: var(--hybrid-text, #223047);
  font-weight: 500;
}

.complex-profile-deal-chart svg {
  width: 100%;
  height: 176px;
  display: block;
  overflow: visible;
}

.complex-profile-deal-chart-grid {
  stroke: #e6ebf2;
  stroke-width: 1;
}

.complex-profile-deal-chart-line {
  fill: none;
  stroke: var(--hybrid-blue, #1463e6);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}

.complex-profile-deal-chart-marker {
  fill: var(--hybrid-panel, #ffffff);
  stroke: var(--hybrid-blue, #1463e6);
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}

.complex-profile-deal-chart-dates {
  color: var(--hybrid-muted, #667085);
  font-size: 9.5px;
  font-weight: 400;
}

.complex-profile-deal-chart-empty,
.complex-profile-deals-state {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #f7f9fb;
  color: var(--hybrid-muted, #667085);
  padding: 22px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.complex-profile-deals-state {
  min-height: 84px;
  margin-top: 16px;
  border: 1px solid var(--hybrid-line-soft, #e8edf5);
}

.complex-profile-deals-state.is-error {
  background: #fff8f4;
  color: #8f4b2c;
}

.complex-profile-recent-deals {
  min-width: 0;
  padding: 15px 0 0;
}

.complex-profile-recent-deals-heading {
  padding: 0 14px 11px;
}

.complex-profile-recent-deals-heading strong {
  color: var(--hybrid-ink, #172033);
  font-size: 11px;
  font-weight: 600;
}

.complex-profile-recent-deals-heading span {
  color: var(--hybrid-muted, #667085);
  font-size: 9.5px;
  font-weight: 400;
}

.complex-profile-recent-deal-list {
  display: grid;
}

.complex-profile-recent-deal-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(76px, .9fr) minmax(92px, 1fr);
  align-items: center;
  gap: 2px 10px;
  border-top: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 8px 14px;
}

.complex-profile-recent-deal-row time {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 400;
}

.complex-profile-recent-deal-row strong {
  color: var(--hybrid-ink, #172033);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.complex-profile-recent-deal-row span {
  grid-column: 1 / -1;
  color: var(--hybrid-muted, #667085);
  font-size: 9.5px;
  font-weight: 400;
  text-align: right;
}

.complex-profile-deals-footer {
  min-height: 50px;
}

.complex-profile-deals-footer > span {
  color: var(--hybrid-muted, #667085);
  font-size: 10px;
  font-weight: 400;
}

.complex-profile-deals-all-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hybrid-blue, #1463e6);
  border-radius: 7px;
  background: var(--hybrid-blue, #1463e6);
  color: #ffffff;
  padding: 0 16px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.complex-profile-deals-all-button.is-expanded {
  background: var(--hybrid-panel, #ffffff);
  color: var(--hybrid-blue, #1463e6);
}

.complex-profile-all-deals {
  margin-top: 18px;
  border-top: 1px solid var(--hybrid-line, #dfe6ef);
}

.complex-profile-all-deals-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  padding: 12px 14px;
}

.complex-profile-all-deals-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.complex-profile-all-deals-heading strong {
  color: var(--hybrid-ink, #172033);
  font-size: 13px;
  font-weight: 600;
}

.complex-profile-all-deals-heading span,
.complex-profile-all-deals-header > span {
  color: var(--hybrid-muted, #667085);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.4;
}

.complex-profile-all-deals-header > span {
  flex: 0 0 auto;
  color: var(--hybrid-blue, #1463e6);
}

.complex-profile-all-deal-list {
  display: grid;
}

.complex-profile-all-deal-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(108px, .82fr) minmax(130px, 1fr) minmax(70px, .55fr) minmax(120px, .85fr);
  align-items: center;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  color: var(--hybrid-text, #223047);
}

.complex-profile-all-deal-row > * {
  min-width: 0;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 400;
}

.complex-profile-all-deal-row > strong {
  color: var(--hybrid-ink, #172033);
  font-size: 12.5px;
  font-weight: 600;
}

.complex-profile-all-deal-row.is-header {
  min-height: 36px;
  background: #f7f9fb;
  color: var(--hybrid-muted, #667085);
}

.complex-profile-all-deal-row.is-header > * {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 10px;
  font-weight: 400;
}

.complex-profile-all-deals-more {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--hybrid-line-soft, #e8edf5);
  background: #f8fafc;
  color: var(--hybrid-blue, #1463e6);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.complex-profile-all-deals-limit {
  margin: 0;
  background: #f8fafc;
  color: var(--hybrid-muted, #667085);
  padding: 11px 14px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 720px) {
  .complex-profile-deals > .complex-profile-section-header {
    gap: 12px;
  }

  .complex-profile-deal-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .complex-profile-deal-tabs button {
    min-height: 42px;
  }

  .complex-profile-deal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .complex-profile-deal-stats .complex-profile-fact {
    min-height: 76px;
  }

  .complex-profile-deals-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .complex-profile-deal-chart {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--hybrid-line, #dfe6ef);
    padding: 14px 10px 9px;
  }

  .complex-profile-deal-chart svg {
    height: 164px;
  }

  .complex-profile-recent-deals {
    padding-top: 13px;
  }

  .complex-profile-recent-deal-row {
    min-height: 50px;
    grid-template-columns: minmax(86px, .8fr) minmax(0, 1fr);
    padding: 8px 10px;
  }

  .complex-profile-deals-footer {
    display: grid;
    gap: 9px;
  }

  .complex-profile-deals-all-button {
    width: 100%;
    min-height: 46px;
  }

  .complex-profile-all-deals {
    margin-top: 16px;
  }

  .complex-profile-all-deals-header {
    min-height: 64px;
    padding: 10px;
  }

  .complex-profile-all-deals-heading span {
    max-width: 250px;
  }

  .complex-profile-all-deal-row.is-header {
    display: none;
  }

  .complex-profile-all-deal-row {
    min-height: 66px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 10px;
  }

  .complex-profile-all-deal-row > * {
    padding: 0;
  }

  .complex-profile-all-deal-row > strong {
    text-align: right;
  }

  .complex-profile-all-deal-row > span {
    color: var(--hybrid-muted, #667085);
    font-size: 10px;
  }

  .complex-profile-all-deal-row > span:last-child {
    text-align: right;
  }

  .complex-profile-evidence {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* Apartment finder: required maximum first, optional minimum revealed in place. */
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .budget-filter-label {
  min-width: 0;
  flex: 1 1 auto;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .budget-filter-label > span {
  color: #66758a !important;
  font-size: 11.5px !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .min-budget-text-toggle {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 16px !important;
  height: 16px !important;
  max-height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 0 0 auto;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline-offset: 2px;
  background: transparent !important;
  padding: 0 !important;
  color: #56708f !important;
  font: inherit;
  font-size: 9.5px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
  box-shadow: none !important;
  cursor: pointer;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .min-budget-text-toggle:hover,
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .min-budget-text-toggle:focus-visible {
  color: #1463e6 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .min-budget-text-toggle[aria-expanded="true"] {
  color: #7a899b !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct:not(.is-min-expanded) {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct.is-min-expanded {
  grid-template-columns: minmax(0, 1fr) 9px minmax(0, 1fr) !important;
  gap: 4px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-field[hidden],
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-range-separator[hidden] {
  display: none !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct:not(.is-min-expanded) .budget-bound-field.is-max {
  padding-right: 10px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-field {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 5px !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-label {
  color: #53657a;
  font-size: 9.5px;
  font-weight: 780;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-field input,
.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-field.is-max input {
  color: #1463e6 !important;
  -webkit-text-fill-color: #1463e6 !important;
  caret-color: #1463e6 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-field input::placeholder {
  color: rgba(20, 99, 230, 0.38) !important;
  -webkit-text-fill-color: rgba(20, 99, 230, 0.38) !important;
  opacity: 1 !important;
}

.results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct .budget-bound-unit {
  display: inline-flex;
  align-items: center;
  color: #41536a;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-filter-heading > .min-budget-text-toggle {
    min-height: 20px !important;
    height: 20px !important;
    max-height: 20px !important;
    font-size: 10px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct:not(.is-min-expanded) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .budget-range-direct.is-min-expanded {
    grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr) !important;
    gap: 5px !important;
  }
}

/* 관심단지: 계정 저장, 단지별 조건, 알림 채널 관리 */
.watchlist-view {
  --watch-blue: #1463e6;
  --watch-blue-deep: #0e4fbd;
  --watch-blue-soft: #eaf2ff;
  --watch-ink: #172033;
  --watch-muted: #667085;
  --watch-line: #dfe6ef;
  width: min(1480px, calc(100% - 44px));
  display: grid;
  gap: 16px;
  margin: 28px auto 48px;
  color: var(--watch-ink);
}

.watchlist-view.is-hidden {
  display: none;
}

.watchlist-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px;
}

.watchlist-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--watch-blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.watchlist-page-head h1 {
  margin: 3px 0 7px;
  color: #07162f;
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 860;
  line-height: 1.1;
}

.watchlist-page-head p {
  margin: 0;
  color: var(--watch-muted);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.55;
}

.watchlist-secondary-action,
.watchlist-complex-panel > header button,
.watchlist-rule-section > header button {
  min-height: 40px;
  border: 1px solid var(--watch-blue);
  border-radius: 8px;
  background: var(--watch-blue);
  color: #ffffff;
  padding: 0 15px;
  font-weight: 780;
  box-shadow: none;
}

.watchlist-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.12fr) repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.watchlist-overview article {
  min-width: 0;
  min-height: 104px;
  border: 1px solid var(--watch-line);
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
}

.watchlist-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 16px;
}

.watchlist-plan-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.watchlist-plan-card small,
.watchlist-channel-card small {
  color: var(--watch-muted);
  font-size: 12px;
  font-weight: 580;
}

.watchlist-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  background: #eff3f8;
  color: #475467;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.watchlist-plan-badge.is-pro {
  background: var(--watch-blue);
  color: #ffffff;
}

.watchlist-plan-card > strong {
  color: #0d1b32;
  font-size: 22px;
  font-weight: 880;
  line-height: 1;
}

.watchlist-usage-track {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.watchlist-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--watch-blue);
  transition: width 180ms ease;
}

.watchlist-plan-card > button {
  justify-self: start;
  grid-column: 1 / -1;
  border: 0;
  background: transparent;
  color: var(--watch-blue);
  padding: 0;
  font-size: 12px;
  font-weight: 760;
}

.watchlist-channel-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.watchlist-channel-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 900;
}

.watchlist-channel-mark.is-kakao {
  background: #fee500;
  color: #191919;
}

.watchlist-channel-mark.is-push {
  background: var(--watch-blue-soft);
  color: var(--watch-blue);
}

.watchlist-channel-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.watchlist-channel-card strong {
  color: #18243a;
  font-size: 14px;
  font-weight: 820;
}

.watchlist-channel-toggle,
.watchlist-rule-toggle {
  position: relative;
  min-width: 50px;
  min-height: 28px;
  border: 1px solid #ccd5e1;
  border-radius: 999px;
  background: #eef2f6;
  color: #667085;
  padding: 0 8px 0 23px;
  font-size: 10px;
  font-weight: 780;
}

.watchlist-channel-toggle::before,
.watchlist-rule-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transform: translateY(-50%);
  transition: left 160ms ease;
}

.watchlist-channel-toggle[aria-checked="true"],
.watchlist-rule-toggle[aria-checked="true"] {
  border-color: var(--watch-blue);
  background: var(--watch-blue);
  color: #ffffff;
  padding: 0 23px 0 8px;
}

.watchlist-channel-toggle[aria-checked="true"]::before,
.watchlist-rule-toggle[aria-checked="true"]::before {
  left: calc(100% - 22px);
}

.watchlist-channel-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.watchlist-live-status {
  min-height: 20px;
  margin: -2px 2px -6px;
  color: #526176;
  font-size: 12px;
  line-height: 1.5;
}

.watchlist-live-status:empty {
  display: none;
}

.watchlist-workspace {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--watch-line);
  border-radius: 11px;
  background: #ffffff;
}

.watchlist-complex-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--watch-line);
  background: #f8fafc;
}

.watchlist-complex-panel > header,
.watchlist-rule-section > header,
.watchlist-match-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watchlist-complex-panel > header {
  min-height: 70px;
  border-bottom: 1px solid var(--watch-line);
  background: #ffffff;
  padding: 14px 16px;
}

.watchlist-complex-panel > header > div,
.watchlist-rule-section > header > div,
.watchlist-match-section > header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.watchlist-complex-panel > header strong,
.watchlist-rule-section > header strong,
.watchlist-match-section > header strong {
  color: #12213a;
  font-size: 15px;
  font-weight: 840;
}

.watchlist-complex-panel > header span,
.watchlist-rule-section > header span,
.watchlist-match-section > header span {
  color: var(--watch-muted);
  font-size: 11px;
  font-weight: 650;
}

.watchlist-complex-panel > header button {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 12px;
}

.watchlist-complex-search {
  position: relative;
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--watch-line);
  background: #ffffff;
  padding: 12px 14px;
}

.watchlist-complex-search[hidden] {
  display: none;
}

.watchlist-complex-search > label {
  color: #475467;
  font-size: 11px;
  font-weight: 760;
}

.watchlist-complex-search > div:first-of-type {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.watchlist-complex-search input,
.watchlist-complex-search button,
.watchlist-condition-field select,
.watchlist-condition-field input {
  min-height: 40px;
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  padding: 0 11px;
  outline: none;
}

.watchlist-complex-search input:focus,
.watchlist-condition-field select:focus,
.watchlist-condition-field input:focus {
  border-color: var(--watch-blue);
  box-shadow: 0 0 0 3px rgba(20, 99, 230, 0.1);
}

.watchlist-complex-search button {
  border-color: var(--watch-blue);
  background: var(--watch-blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 780;
}

.watchlist-complex-suggestions {
  position: absolute;
  top: calc(100% - 5px);
  right: 14px;
  left: 14px;
  z-index: 15;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ccd8e7;
  border-radius: 8px;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.watchlist-complex-suggestions[hidden] {
  display: none;
}

.watchlist-complex-suggestion {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
}

.watchlist-complex-suggestion:hover,
.watchlist-complex-suggestion:focus-visible {
  background: var(--watch-blue-soft);
}

.watchlist-complex-suggestion strong {
  color: #172033;
  font-size: 13px;
  font-weight: 810;
}

.watchlist-complex-suggestion small,
.watchlist-complex-suggestions-empty {
  color: var(--watch-muted);
  font-size: 11px;
  line-height: 1.45;
}

.watchlist-complex-suggestions-empty {
  padding: 14px 10px;
  text-align: center;
}

.watchlist-item-list {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
}

.watchlist-item-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 12px;
  text-align: left;
}

.watchlist-item-card:hover {
  border-color: #d4deea;
  background: #ffffff;
}

.watchlist-item-card.is-active {
  border-color: #aac7f8;
  background: #ffffff;
  box-shadow: inset 3px 0 0 var(--watch-blue);
}

.watchlist-item-card > strong {
  min-width: 0;
  overflow: hidden;
  color: #14233b;
  font-size: 14px;
  font-weight: 830;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-item-card > em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  min-width: 26px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--watch-blue-soft);
  color: var(--watch-blue);
  padding: 0 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.watchlist-item-card > span {
  overflow: hidden;
  color: var(--watch-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-item-prices {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 2px;
  color: #455468;
  font-size: 11px;
  font-weight: 650;
}

.watchlist-items-empty,
.watchlist-detail-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 280px;
  color: var(--watch-muted);
  padding: 30px 22px;
  text-align: center;
}

.watchlist-items-empty[hidden],
.watchlist-detail-empty[hidden] {
  display: none;
}

.watchlist-items-empty > span,
.watchlist-detail-empty > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--watch-blue-soft);
  color: var(--watch-blue);
  font-size: 22px;
  font-weight: 800;
}

.watchlist-items-empty strong,
.watchlist-detail-empty strong {
  color: #27364c;
  font-size: 14px;
  font-weight: 820;
}

.watchlist-items-empty p,
.watchlist-detail-empty p {
  max-width: 280px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.watchlist-items-empty button {
  min-height: 38px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #ffffff;
  color: #34445b;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 760;
}

.watchlist-detail-panel {
  min-width: 0;
  background: #ffffff;
}

#watchlistDetailContent {
  display: grid;
  gap: 0;
}

#watchlistDetailContent[hidden] {
  display: none;
}

.watchlist-detail-head {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--watch-line);
  padding: 20px 22px;
}

.watchlist-detail-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.watchlist-detail-location {
  color: var(--watch-blue);
  font-size: 11px;
  font-weight: 780;
}

.watchlist-detail-head h2 {
  margin: 0;
  overflow: hidden;
  color: #0e1c33;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 870;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-detail-head small {
  color: var(--watch-muted);
  font-size: 11px;
}

.watchlist-detail-actions button {
  min-height: 38px;
  border: 1px solid #d2dbe7;
  border-radius: 8px;
  background: #ffffff;
  color: #5b6574;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 730;
}

.watchlist-price-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--watch-line);
  background: #fbfcfe;
}

.watchlist-price-snapshot article {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 16px 18px;
}

.watchlist-price-snapshot article + article {
  border-left: 1px solid var(--watch-line);
}

.watchlist-price-snapshot span {
  color: var(--watch-muted);
  font-size: 11px;
  font-weight: 680;
}

.watchlist-price-snapshot strong {
  overflow: hidden;
  color: #14233b;
  font-size: 17px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-rule-section,
.watchlist-match-section {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
}

.watchlist-rule-section {
  border-bottom: 1px solid var(--watch-line);
}

.watchlist-rule-section > header button {
  min-height: 36px;
  font-size: 12px;
}

.watchlist-rule-list {
  display: grid;
  gap: 7px;
}

.watchlist-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--watch-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.watchlist-rule-row.is-paused {
  background: #f8fafc;
  opacity: 0.72;
}

.watchlist-rule-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.watchlist-rule-copy strong {
  overflow: hidden;
  color: #1b2a41;
  font-size: 13px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.watchlist-rule-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  background: #f0f4f8;
  color: #526176;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 690;
}

.watchlist-rule-meta .is-kakao {
  background: #fff8c5;
  color: #615300;
}

.watchlist-rule-meta .is-push {
  background: var(--watch-blue-soft);
  color: var(--watch-blue-deep);
}

.watchlist-rule-meta .is-plan-paused {
  background: #fff1f1;
  color: #b42318;
}

.watchlist-rule-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.watchlist-rule-actions button {
  min-width: 34px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #596579;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 720;
}

.watchlist-rule-actions button:hover,
.watchlist-rule-actions button:focus-visible {
  background: #eef3f8;
  color: #172033;
}

.watchlist-rules-empty,
.watchlist-matches-empty {
  display: grid;
  gap: 4px;
  min-height: 82px;
  place-content: center;
  border: 1px dashed #cfd9e6;
  border-radius: 8px;
  color: var(--watch-muted);
  padding: 16px;
  text-align: center;
}

.watchlist-rules-empty[hidden],
.watchlist-matches-empty[hidden] {
  display: none;
}

.watchlist-rules-empty strong {
  color: #344054;
  font-size: 12px;
  font-weight: 780;
}

.watchlist-rules-empty p,
.watchlist-matches-empty {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.watchlist-match-section > header > small {
  color: var(--watch-muted);
  font-size: 10.5px;
}

.watchlist-match-list {
  display: grid;
  gap: 7px;
}

.watchlist-match-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  border: 1px solid var(--watch-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  color: inherit;
  font: inherit;
  text-align: left;
}

.watchlist-match-card.is-unread {
  border-color: #adc9f7;
  background: #f7faff;
  cursor: pointer;
}

button.watchlist-match-card.is-unread:hover,
button.watchlist-match-card.is-unread:focus-visible {
  border-color: var(--watch-blue);
  background: #eef5ff;
  outline: none;
}

.watchlist-match-card strong {
  color: #1b2a41;
  font-size: 13px;
  font-weight: 810;
}

.watchlist-match-card time,
.watchlist-match-card small {
  color: var(--watch-muted);
  font-size: 10.5px;
}

.watchlist-match-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #475467;
  font-size: 11.5px;
  line-height: 1.5;
}

.watchlist-condition-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  overflow: auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  box-shadow: 0 28px 80px rgba(8, 24, 50, 0.24);
}

.watchlist-condition-dialog::backdrop {
  background: rgba(9, 21, 39, 0.48);
  backdrop-filter: blur(3px);
}

.watchlist-condition-form {
  display: grid;
  gap: 16px;
  border: 1px solid #d9e2ed;
  border-radius: 12px;
  background: #ffffff;
  padding: 22px;
}

.watchlist-condition-form > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--watch-line);
  padding-bottom: 16px;
}

.watchlist-condition-form > header > div {
  display: grid;
  gap: 4px;
}

.watchlist-condition-form > header span {
  color: var(--watch-blue);
  font-size: 11px;
  font-weight: 800;
}

.watchlist-condition-form > header h2 {
  margin: 0;
  color: #101d32;
  font-size: 22px;
  font-weight: 860;
}

.watchlist-condition-form > header p {
  margin: 0;
  color: var(--watch-muted);
  font-size: 12px;
}

.watchlist-condition-form > header button {
  width: 36px;
  height: 36px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #ffffff;
  color: #526176;
  font-size: 21px;
}

.watchlist-condition-field {
  display: grid;
  gap: 7px;
}

.watchlist-condition-field > span:first-child,
.watchlist-channel-field legend {
  color: #344054;
  font-size: 12px;
  font-weight: 780;
}

.watchlist-condition-value-control {
  position: relative;
  display: block;
}

.watchlist-condition-value-control input {
  width: 100%;
  padding-right: 46px;
}

.watchlist-condition-value-control em {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 740;
  transform: translateY(-50%);
}

.watchlist-channel-field {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.watchlist-channel-field legend {
  margin-bottom: 7px;
}

.watchlist-channel-field label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--watch-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.watchlist-channel-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--watch-blue);
}

.watchlist-channel-field label > span {
  display: grid;
  gap: 3px;
}

.watchlist-channel-field strong {
  color: #26354b;
  font-size: 12px;
  font-weight: 800;
}

.watchlist-channel-field small {
  color: var(--watch-muted);
  font-size: 10.5px;
}

.watchlist-condition-preview {
  display: grid;
  gap: 5px;
  border-left: 3px solid var(--watch-blue);
  background: #f5f9ff;
  padding: 11px 12px;
}

.watchlist-condition-preview span {
  color: #5b6b80;
  font-size: 10px;
  font-weight: 720;
}

.watchlist-condition-preview strong {
  color: #1a345c;
  font-size: 12px;
  font-weight: 790;
  line-height: 1.45;
}

.watchlist-condition-form-status {
  min-height: 18px;
  margin: -6px 0;
  color: #b42318;
  font-size: 11px;
  line-height: 1.45;
}

.watchlist-condition-form > footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding-top: 2px;
}

.watchlist-condition-form > footer button {
  min-height: 44px;
  border: 1px solid #ced8e5;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  font-weight: 780;
}

#watchlistConditionSubmitButton {
  border-color: var(--watch-blue);
  background: var(--watch-blue);
  color: #ffffff;
}

@media (max-width: 1040px) {
  .watchlist-overview {
    grid-template-columns: 1fr 1fr;
  }

  .watchlist-plan-card {
    grid-column: 1 / -1;
  }

  .watchlist-workspace {
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  }

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

  .watchlist-price-snapshot article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--watch-line);
  }

  .watchlist-price-snapshot article:nth-child(4) {
    border-top: 1px solid var(--watch-line);
  }
}

@media (max-width: 720px) {
  .watchlist-view {
    width: calc(100% - 24px);
    gap: 12px;
    margin: 18px auto 34px;
  }

  .watchlist-page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .watchlist-page-head h1 {
    font-size: 26px;
  }

  .watchlist-page-head p {
    font-size: 13px;
  }

  .watchlist-secondary-action {
    min-height: 44px;
  }

  .watchlist-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .watchlist-plan-card {
    grid-column: auto;
  }

  .watchlist-overview article {
    min-height: 94px;
  }

  .watchlist-channel-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .watchlist-workspace {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .watchlist-complex-panel {
    border-right: 0;
    border-bottom: 1px solid var(--watch-line);
  }

  .watchlist-item-list {
    max-height: 330px;
    overflow-y: auto;
  }

  .watchlist-items-empty {
    min-height: 230px;
  }

  .watchlist-detail-empty {
    min-height: 180px;
  }

  .watchlist-detail-head {
    min-height: 0;
    align-items: flex-start;
    padding: 17px 15px;
  }

  .watchlist-detail-head h2 {
    font-size: 21px;
    white-space: normal;
  }

  .watchlist-detail-actions button {
    min-height: 40px;
  }

  .watchlist-price-snapshot article {
    padding: 13px 14px;
  }

  .watchlist-price-snapshot strong {
    font-size: 15px;
  }

  .watchlist-rule-section,
  .watchlist-match-section {
    padding: 17px 14px;
  }

  .watchlist-rule-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .watchlist-rule-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid #edf1f5;
    padding-top: 7px;
  }

  .watchlist-rule-toggle {
    min-height: 32px;
  }

  .watchlist-match-section > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .watchlist-condition-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .watchlist-condition-form {
    gap: 14px;
    padding: 17px 14px calc(17px + env(safe-area-inset-bottom));
  }

  .watchlist-condition-form > footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -14px -17px;
    border-top: 1px solid var(--watch-line);
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
}

/* Apartment explore: additive location evidence columns */
.results-view[data-active-tab="explore"] .sheet-shell th.regionalComparisonSummary-column,
.results-view[data-active-tab="explore"] .sheet-shell td.regionalComparisonSummary-column,
.sticky-sheet-header th.regionalComparisonSummary-column {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.results-view[data-active-tab="explore"] .sheet-shell td.regionalComparisonSummary-column {
  padding-right: 10px;
  padding-left: 10px;
  text-align: left;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell th.regionalComparisonSummary-column,
.results-view[data-active-tab="explore"] .sheet-shell td.regionalComparisonSummary-column,
.sticky-sheet-header th.regionalComparisonSummary-column {
  border-left: 2px solid #a9c8ed;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-not-sortable,
.sticky-sheet-header thead th.is-not-sortable {
  cursor: default !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th.is-not-sortable:not(.is-data-unavailable):hover,
.results-view[data-active-tab="explore"] .sheet-shell thead th.is-not-sortable:not(.is-data-unavailable):focus-visible,
.sticky-sheet-header thead th.is-not-sortable:not(.is-data-unavailable):hover,
.sticky-sheet-header thead th.is-not-sortable:not(.is-data-unavailable):focus-visible {
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  color: #16243a;
  box-shadow: none;
}

/* Apartment finder: scan-friendly freshness buckets backed by exact elapsed days. */
.results-view[data-active-tab="explore"] .sheet-shell th.daysSinceLastSale-column,
.results-view[data-active-tab="explore"] .sheet-shell td.daysSinceLastSale-column,
.sticky-sheet-header th.daysSinceLastSale-column {
  width: 106px;
  min-width: 106px;
  max-width: 106px;
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell td.daysSinceLastSale-column {
  padding-right: 7px;
  padding-left: 7px;
}

.deal-freshness-badge {
  box-sizing: border-box;
  min-width: 0;
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c5d8f1;
  border-radius: 4px;
  background: #eef5ff;
  color: #285f9f;
  padding: 3px 6px;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.deal-freshness-badge.is-week {
  border-color: #a9ccfa;
  background: #e7f1ff;
  color: #0b5ed7;
}

.deal-freshness-badge.is-month {
  border-color: #c0d8f7;
  background: #edf5ff;
  color: #2766b2;
}

.deal-freshness-badge.is-quarter {
  border-color: #cfdeef;
  background: #f1f6fc;
  color: #496f9d;
}

.deal-freshness-badge.is-half {
  border-color: #d6dfe9;
  background: #f3f6f9;
  color: #5d6f84;
}

.deal-freshness-badge.is-year {
  border-color: #dedfdf;
  background: #f6f6f5;
  color: #6f6b65;
}

.deal-freshness-badge.is-stale {
  border-color: #efd39d;
  background: #fff7e8;
  color: #94610f;
}

.deal-freshness-badge.is-unknown {
  border-color: #e1e5ea;
  background: #f7f8fa;
  color: #8792a1;
}

/* Apartment finder: trailing 3-month sale average immediately after the latest sale price. */
.results-view[data-active-tab="explore"] .sheet-shell th.saleAverage3m-column,
.results-view[data-active-tab="explore"] .sheet-shell td.saleAverage3m-column,
.sticky-sheet-header th.saleAverage3m-column {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  text-align: center;
}

.results-view[data-active-tab="explore"] .sheet-shell td.saleAverage3m-column.is-average-loading {
  color: #7b8798;
  font-size: 11.5px;
  font-weight: 650;
}

/* Apartment finder: keep the spreadsheet header fixed inside its scroll area. */
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 20;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > thead > tr > th {
  position: sticky !important;
  top: 0 !important;
  z-index: 21 !important;
}

.results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > thead > tr > th.favorite-column,
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > thead > tr > th.rank-column,
.results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > thead > tr > th.name-column {
  z-index: 22 !important;
}

/* Apartment finder: make the active spreadsheet sort read as a selected column. */
body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted,
body:not(.is-explore-search-pending) .sticky-sheet-header thead th.is-sorted {
  border-color: #b8d3f6 !important;
  background: #e6f1ff !important;
  color: #0b5ed7 !important;
  box-shadow: inset 0 -2px 0 #1463e6, inset 0 0 0 1px rgba(20, 99, 230, 0.1) !important;
}

body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .sheet-shell thead th.is-sorted .sort-indicator,
body:not(.is-explore-search-pending) .sticky-sheet-header thead th.is-sorted .sort-indicator {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #1463e6 !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > tbody > tr > td.is-sorted-column {
  background-color: #f4f8ff !important;
}

body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > tbody > tr:hover > td.is-sorted-column {
  background-color: #eaf3ff !important;
}

/* Keep spreadsheet sorting functional without showing direction arrows. */
.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-indicator,
.sticky-sheet-header thead th .sort-indicator {
  display: none !important;
}

/* Spreadsheet multi-sort: show priority and direction without changing the recommended-sort chips. */
.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-indicator,
.sticky-sheet-header thead th .sort-priority-indicator {
  order: -1;
  flex: 0 0 auto;
  width: auto;
  min-width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-right: 3px;
  border: 1px solid #0f58c7;
  border-radius: 8px;
  background: #1463e6;
  color: #ffffff;
  padding: 0 7px;
  line-height: 1;
  box-shadow: none;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-number,
.sticky-sheet-header thead th .sort-priority-number {
  width: auto;
  min-width: 0;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 9.5px;
  font-weight: 850;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-direction,
.sticky-sheet-header thead th .sort-priority-direction {
  color: inherit;
  font-size: 10.5px;
  font-weight: 850;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label,
.sticky-sheet-header thead th .filter-label {
  order: 0;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  order: 1;
}

/* Apartment finder: apartment names toggle five Excel-aligned history rows. */
.results-view[data-active-tab="explore"] .apartment-name-label {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: inherit;
}

/* Desktop apartment filters: preserve the toolbar while giving all five dropdowns one shared width. */
@media (min-width: 1220px) and (max-width: 1339px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    --explore-dropdown-width: clamp(132px, 10.4vw, 160px);
    grid-template-columns:
      minmax(220px, 1fr)
      calc(var(--explore-dropdown-width) + var(--explore-dropdown-width) + 35px)
      repeat(3, calc(var(--explore-dropdown-width) + 28px))
      93px
      93px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Apartment finder: expanded apartment-name history stays on a clean white sheet. */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row > td,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row:hover > td,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row > td.favorite-cell,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row > td.rank-cell,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row > td,
.results-view[data-active-tab="explore"][data-explore-analysis-mode="jeonse"] .sheet-shell tbody tr.deal-history-row:hover > td,
body:not(.is-explore-search-pending) .results-view[data-active-tab="explore"] .result-data-card .sheet-shell > table > tbody > tr.deal-history-row > td.is-sorted-column {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-sale > td,
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.deal-history-row.is-rent > td {
  height: 34px;
  padding-block: 5px !important;
}

/* Apartment finder: center the title and adjacent filter icon as one compact header group. */
.results-view[data-active-tab="explore"] .sheet-shell thead th,
.sticky-sheet-header thead th {
  box-sizing: border-box;
  padding-block: 5px !important;
  padding-inline: 7px !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-header-content,
.sticky-sheet-header thead th .column-header-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 3px;
  overflow: visible;
  box-sizing: border-box;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-indicator,
.sticky-sheet-header thead th .sort-indicator {
  display: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-indicator,
.sticky-sheet-header thead th .sort-priority-indicator {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  display: inline-flex;
  flex: 0 0 14px !important;
  gap: 0 !important;
  margin: 0 !important;
  border-radius: 4px;
  padding: 0 !important;
  box-sizing: border-box;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-number,
.sticky-sheet-header thead th .sort-priority-number {
  font-size: 7px;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .sort-priority-direction,
.sticky-sheet-header thead th .sort-priority-direction {
  font-size: 8px;
  line-height: 1;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label,
.sticky-sheet-header thead th .filter-label {
  min-width: 0;
  max-width: calc(100% - 20px);
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .column-filter-button,
.sticky-sheet-header thead th .column-filter-button {
  width: 17px;
  min-width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th[aria-sort]:not(.is-filterable) .column-header-content::after,
.sticky-sheet-header thead th[aria-sort]:not(.is-filterable) .column-header-content::after,
.results-view[data-active-tab="explore"] .sheet-shell thead th.is-not-sortable.is-filterable .column-header-content::before,
.sticky-sheet-header thead th.is-not-sortable.is-filterable .column-header-content::before {
  content: none;
  display: none;
}

.results-view[data-active-tab="explore"] .sheet-shell th.district-column,
.results-view[data-active-tab="explore"] .sheet-shell td.district-column,
.sticky-sheet-header th.district-column {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}

/* Apartment finder: keep the three core sale-price columns equally compact. */
.results-view[data-active-tab="explore"] .sheet-shell th.salePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell td.salePrice-column,
.sticky-sheet-header th.salePrice-column,
.results-view[data-active-tab="explore"] .sheet-shell th.saleAverage3m-column,
.results-view[data-active-tab="explore"] .sheet-shell td.saleAverage3m-column,
.sticky-sheet-header th.saleAverage3m-column,
.results-view[data-active-tab="explore"] .sheet-shell th.salePeak-column,
.results-view[data-active-tab="explore"] .sheet-shell td.salePeak-column,
.sticky-sheet-header th.salePeak-column {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
}

/* Apartment finder: reserve the blue price emphasis for the latest sale price. */
.results-view[data-active-tab="explore"] .sheet-shell tbody td.investment-cell {
  color: #132039 !important;
  font-weight: 650;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody td.salePrice-column {
  color: #1262e3 !important;
  font-weight: 760;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label-text,
.sticky-sheet-header thead th .filter-label-text {
  display: inline-block;
  min-width: max-content;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label.is-marquee,
.sticky-sheet-header thead th .filter-label.is-marquee {
  overflow: hidden !important;
  text-overflow: clip !important;
}

.results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label.is-marquee .filter-label-text,
.sticky-sheet-header thead th .filter-label.is-marquee .filter-label-text {
  animation: exploreHeaderMarquee 5.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes exploreHeaderMarquee {
  0%, 18%, 100% {
    transform: translateX(0);
  }

  68%, 86% {
    transform: translateX(calc(var(--filter-label-overflow, 0px) * -1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .results-view[data-active-tab="explore"] .sheet-shell thead th .filter-label.is-marquee .filter-label-text,
  .sticky-sheet-header thead th .filter-label.is-marquee .filter-label-text {
    animation: none;
  }
}

/* Apartment finder: one location fact per column for fast spreadsheet scanning. */
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceNearestMartName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceNearestMartName-column,
.sticky-sheet-header th.evidenceNearestMartName-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceMiddleSchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceMiddleSchoolName-column,
.sticky-sheet-header th.evidenceMiddleSchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceElementarySchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceElementarySchoolName-column,
.sticky-sheet-header th.evidenceElementarySchoolName-column {
  width: 166px !important;
  min-width: 166px !important;
  max-width: 166px !important;
}

.results-view[data-active-tab="explore"] .sheet-shell th.evidenceNearestMartDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceNearestMartDistance-column,
.sticky-sheet-header th.evidenceNearestMartDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceRetailGrade-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceRetailGrade-column,
.sticky-sheet-header th.evidenceRetailGrade-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceDepartmentStoreCount-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceDepartmentStoreCount-column,
.sticky-sheet-header th.evidenceDepartmentStoreCount-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceShoppingMallCount-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceShoppingMallCount-column,
.sticky-sheet-header th.evidenceShoppingMallCount-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceLargeMartCount-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceLargeMartCount-column,
.sticky-sheet-header th.evidenceLargeMartCount-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceMiddleSchoolDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceMiddleSchoolDistance-column,
.sticky-sheet-header th.evidenceMiddleSchoolDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceMiddleSchoolCount-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceMiddleSchoolCount-column,
.sticky-sheet-header th.evidenceMiddleSchoolCount-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceAverageClassSize-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceAverageClassSize-column,
.sticky-sheet-header th.evidenceAverageClassSize-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceStudentsPerTeacher-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceStudentsPerTeacher-column,
.sticky-sheet-header th.evidenceStudentsPerTeacher-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceElementaryDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceElementaryDistance-column,
.sticky-sheet-header th.evidenceElementaryDistance-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceElementaryAssignment-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceElementaryAssignment-column,
.sticky-sheet-header th.evidenceElementaryAssignment-column {
  width: 98px !important;
  min-width: 98px !important;
  max-width: 98px !important;
}

.results-view[data-active-tab="explore"] .sheet-shell td.evidenceNearestMartName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceMiddleSchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceElementarySchoolName-column {
  padding-right: 9px;
  padding-left: 9px;
  color: #213650;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.results-view[data-active-tab="explore"] .sheet-shell th.evidenceNearestMartName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceNearestMartName-column,
.sticky-sheet-header th.evidenceNearestMartName-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceRetailGrade-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceRetailGrade-column,
.sticky-sheet-header th.evidenceRetailGrade-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceMiddleSchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceMiddleSchoolName-column,
.sticky-sheet-header th.evidenceMiddleSchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell th.evidenceElementarySchoolName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.evidenceElementarySchoolName-column,
.sticky-sheet-header th.evidenceElementarySchoolName-column {
  border-left: 2px solid #a9c8ed !important;
}

.location-evidence-atomic-badge {
  min-width: 34px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d8ea;
  border-radius: 999px;
  background: #f3f7fc;
  color: #405a78;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.location-evidence-atomic-badge.is-retail {
  border-color: #d7c9ee;
  background: #f5f1fc;
  color: #694c9b;
}

.location-evidence-atomic-badge.is-verified {
  border-color: #b9d7c8;
  background: #edf8f2;
  color: #267052;
}

.location-evidence-atomic-badge.is-nearest {
  border-color: #edcf9e;
  background: #fff7e9;
  color: #895f1e;
}

@media (min-width: 1340px) {
  .results-view[data-active-tab="explore"]:not(.is-previewing) .core-controls {
    --explore-dropdown-width: clamp(132px, 10.4vw, 160px);
    grid-template-columns:
      minmax(220px, 1fr)
      calc(var(--explore-dropdown-width) + var(--explore-dropdown-width) + 35px)
      repeat(3, calc(var(--explore-dropdown-width) + 28px))
      112px
      112px !important;
  }

  .results-view[data-active-tab="explore"]:not(.is-previewing) .region-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Apartment finder: show pyeong first with exact exclusive area as its badge. */
.results-view[data-active-tab="explore"] .sheet-shell th.size-column,
.results-view[data-active-tab="explore"] .sheet-shell td.size-column,
.sticky-sheet-header th.size-column {
  width: 122px !important;
  min-width: 122px !important;
  max-width: 122px !important;
}

.size-area-combined {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.size-pyeong-value {
  color: inherit;
  font: inherit;
  line-height: 1;
}

.exclusive-area-badge {
  min-height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: #f3f4f6;
  color: #536273;
  padding: 0 4px;
  font-size: 8.5px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: 0;
  opacity: 1;
  white-space: nowrap;
}

.results-view[data-active-tab="explore"] .sheet-shell th.approvalYear-column,
.results-view[data-active-tab="explore"] .sheet-shell td.approvalYear-column,
.sticky-sheet-header th.approvalYear-column {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
}

/* Keep every primary spreadsheet row on the original shared cell height. */
.results-view[data-active-tab="explore"] .sheet-shell tbody tr.apartment-list-row {
  height: 50px;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.apartment-list-row > td {
  box-sizing: border-box;
  height: 50px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  vertical-align: middle;
}

.results-view[data-active-tab="explore"] .sheet-shell tbody tr.apartment-list-row .location-evidence-cell {
  max-height: 32px;
  overflow: hidden;
  align-items: center;
}

/* Keep subway labels compact, rectangular, and fully readable in the sheet. */
.results-view[data-active-tab="explore"] .sheet-shell th.nearestStationName-column,
.results-view[data-active-tab="explore"] .sheet-shell td.nearestStationName-column,
.sticky-sheet-header th.nearestStationName-column {
  width: 144px !important;
  min-width: 144px !important;
  max-width: 144px !important;
}

.results-view[data-active-tab="explore"] .sheet-shell td.nearestStationName-column {
  overflow: visible !important;
  text-overflow: clip !important;
}

.station-cell-value {
  gap: 3px;
  min-height: 18px;
  border-radius: 5px;
  padding: 2px 5px 2px 2px;
  box-shadow: none;
  white-space: nowrap;
}

.station-cell-value > strong {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 10.5px;
}

.station-line-badge.is-numbered {
  width: 14px;
  height: 14px;
}

.station-line-badge.is-named {
  min-height: 14px;
  border-radius: 3px;
  padding: 1px 4px;
}
