:root {
  --bg: #0b1420;
  --sidebar: #0c1724;
  --panel: #111e2d;
  --panel-soft: #142233;
  --panel-hover: #18293b;
  --line: #253647;
  --line-soft: #1c2c3d;
  --text: #edf3f8;
  --muted: #98abbd;
  --subtle: #6f8499;
  --accent: #70d9cf;
  --accent-strong: #95ece3;
  --accent-soft: rgba(112, 217, 207, 0.1);
  --blue: #7cb8f5;
  --amber: #e6bc79;
  --red: #f08f99;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f4f7f8;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-soft: #eef3f4;
  --panel-hover: #e6edef;
  --line: #ccd9dc;
  --line-soft: #dde6e8;
  --text: #152329;
  --muted: #536970;
  --subtle: #71868c;
  --accent: #087f78;
  --accent-strong: #056d67;
  --accent-soft: rgba(8, 127, 120, 0.11);
  --blue: #246ca8;
  --amber: #9c6410;
  --red: #b13e4b;
  --shadow: 0 18px 55px rgba(32, 57, 63, 0.12);
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff;
}
html[data-theme="light"] label {
  color: #344a51;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button,
input,
textarea,
select {
  border-radius: 10px;
}
button {
  color: inherit;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: #0d1927;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 44px;
}
input::placeholder,
textarea::placeholder {
  color: #657b90;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}
textarea {
  resize: vertical;
  min-height: 98px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--accent);
}
input[type="number"] {
  appearance: textfield;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 550;
  font-size: 0.88rem;
  color: #c9d7e4;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(1.8rem, 2.8vw, 2.55rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
p {
  margin-bottom: 14px;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small-copy {
  font-size: 0.82rem;
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.version {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 500;
}
.dot {
  padding: 0 10px;
  color: var(--subtle);
}
.skip-link {
  position: absolute;
  top: -70px;
  left: 12px;
  padding: 12px;
  background: var(--panel);
  z-index: 9999;
}
.skip-link:focus {
  top: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 11px 16px;
  min-height: 43px;
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--panel-soft);
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover {
  background: var(--panel-hover);
  border-color: #41566c;
  text-decoration: none;
}
.button.primary {
  background: var(--accent);
  color: #0b252b;
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.button.ghost {
  background: transparent;
}
.button.compact {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 0.82rem;
}
.button.danger {
  color: var(--red);
}
.wide {
  width: 100%;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  color: var(--muted);
}
.icon-button:hover {
  color: var(--text);
  background: var(--panel-soft);
}
.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(112, 217, 207, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg {
  width: 27px;
  height: 27px;
}
.brand-mark.small {
  width: 39px;
  height: 39px;
  border-radius: 11px;
}
.brand-mark.small svg {
  width: 23px;
  height: 23px;
}
.portal-link {
  color: var(--muted);
  font-size: 0.85rem;
}
.status-dot,
.login-features i {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.login-layout {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
}
.login-story {
  position: relative;
  overflow: hidden;
  padding: 38px max(45px, 7vw);
  display: flex;
  flex-direction: column;
  background: radial-gradient(
    ellipse at 30% 50%,
    #153140 0%,
    #0e1d2c 52%,
    #0d1926 100%
  );
  border-right: 1px solid var(--line);
}
.login-story-copy {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 85px 0 110px;
  max-width: 510px;
}
.login-story h1 {
  font-size: clamp(2.55rem, 4.2vw, 4.7rem);
  line-height: 1.13;
  letter-spacing: -0.055em;
  margin: 23px 0;
}
.login-story h1 span {
  color: var(--accent);
}
.login-story-copy > p {
  font-size: 1.04rem;
  color: #a5b8c8;
  max-width: 410px;
  line-height: 1.8;
}
.login-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
  color: #bdceda;
  font-size: 0.79rem;
}
.login-features span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.login-features i {
  width: 5px;
  height: 5px;
}
.login-foot {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.82rem;
}
.login-foot .version {
  margin-left: 14px;
}
.login-decoration {
  position: absolute;
  right: -120px;
  bottom: -70px;
  width: 470px;
  height: 470px;
  transform: rotate(-25deg);
  opacity: 0.5;
}
.contour {
  position: absolute;
  border: 1px solid rgba(112, 217, 207, 0.19);
  border-radius: 42% 28% 55% 32%;
}
.contour-one {
  inset: 20px;
}
.contour-two {
  inset: 75px;
}
.contour-three {
  inset: 130px;
}
.map-pin {
  position: absolute;
  top: 170px;
  left: 155px;
  background: #183849;
  color: var(--accent);
  padding: 15px;
  border: 1px solid rgba(112, 217, 207, 0.3);
  border-radius: 17px;
  transform: rotate(25deg);
}
.map-pin svg {
  width: 28px;
  height: 28px;
}
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.login-form {
  width: 100%;
  max-width: 370px;
}
.login-form .brand-mark {
  margin-bottom: 27px;
}
.login-form .eyebrow {
  font-size: 0.64rem;
}
.login-form h2 {
  font-size: 1.95rem;
  letter-spacing: -0.045em;
  margin: 12px 0 10px;
}
.login-form > p.muted {
  line-height: 1.7;
  font-size: 0.93rem;
  margin-bottom: 30px;
}
.login-form label {
  margin-bottom: 18px;
}
.login-form input {
  padding: 13px;
}
.login-form button {
  margin-top: 6px;
  justify-content: space-between;
  padding: 13px 16px;
}
.login-privacy {
  display: flex;
  gap: 9px;
  line-height: 1.6;
  font-size: 0.76rem;
  color: var(--subtle);
  margin-top: 23px;
}
.login-privacy svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.inline-error {
  border: 1px solid rgba(240, 143, 153, 0.3);
  background: rgba(240, 143, 153, 0.08);
  border-radius: 10px;
  color: var(--red);
  padding: 11px 13px;
  margin-bottom: 15px;
  font-size: 0.87rem;
}
.app-layout {
  display: flex;
  min-height: 100svh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  border-right: 1px solid var(--line-soft);
  background: var(--sidebar);
  padding: 30px 18px 22px;
  display: flex;
  flex-direction: column;
  z-index: 500;
}
.app-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 8px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}
.app-brand:hover {
  text-decoration: none;
}
.app-brand small {
  display: block;
  color: var(--subtle);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-top: 3px;
}
.nav-caption {
  margin: 43px 15px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--subtle);
  font-weight: 650;
}
#main-nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.nav-link:hover {
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(112, 217, 207, 0.1);
}
.nav-link svg {
  width: 19px;
  height: 19px;
}
.nav-link .nav-indicator {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.nav-label-mobile {
  display: none;
}
.listing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.listing-table {
  display: none;
}
.listing-card {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.listing-card:hover,
.listing-card:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}
.listing-card > img,
.listing-card-placeholder {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--panel-soft);
}
.listing-card-placeholder {
  display: grid;
  place-items: center;
}
.listing-card-placeholder svg {
  width: 34px;
  color: var(--subtle);
}
.listing-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 16px 17px;
  color: var(--muted);
  font-size: 0.76rem;
}
.listing-card-body strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.3;
}
.listing-card-price {
  color: var(--accent);
  font-size: 1.04rem;
  font-weight: 750;
}
.listing-card-facts {
  color: var(--subtle);
}
.listing-card-arrow {
  display: none;
}
.listing-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  color: var(--muted);
}
.listing-highlights strong {
  color: var(--text);
  font-size: 1.45rem;
}
.listing-highlights span {
  font-size: 0.84rem;
}
.listing-source-cta {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}
.listing-source-cta:hover,
.listing-source-cta:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}
.listing-source-cta svg {
  width: 18px;
  color: var(--accent);
}
.listing-source-cta span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.listing-source-cta small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-section-summary {
  margin-left: auto;
  color: var(--subtle);
  font-size: 0.66rem;
  font-weight: 500;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 12px 0;
  display: grid;
  gap: 15px;
}
.private-badge {
  font-size: 0.77rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-bottom .portal-link {
  font-size: 0.77rem;
}
.app-content {
  margin-left: 232px;
  width: calc(100% - 232px);
  display: flex;
  flex-direction: column;
}
.app-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  border-bottom: 1px solid var(--line-soft);
  gap: 16px;
}
.breadcrumb {
  color: var(--subtle);
  font-size: 0.82rem;
  display: flex;
  gap: 13px;
}
.breadcrumb strong {
  color: var(--muted);
  font-weight: 500;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.theme-control {
  display: block;
}
.theme-control select {
  width: auto;
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  background-color: var(--panel-soft);
}
.user-name {
  color: var(--muted);
  font-size: 0.8rem;
}
.header-actions .icon-button {
  border: 0;
}
#main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 35px 38px 45px;
  flex: 1;
  outline: none;
}
.app-footer {
  padding: 22px 38px;
  border-top: 1px solid var(--line-soft);
  color: var(--subtle);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.app-footer b {
  margin-left: 8px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading .eyebrow {
  display: block;
  margin-bottom: 10px;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 670px;
  font-size: 0.94rem;
  line-height: 1.7;
}
.page-heading .button {
  margin-top: 28px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 21px;
}
.panel-heading p {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 5px 0 0;
}
.panel-heading .eyebrow {
  font-size: 0.64rem;
  display: block;
  margin-bottom: 7px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 28px 0 15px;
}
.section-heading h2 {
  font-size: 1.1rem;
  margin: 0;
}
.section-heading a {
  font-size: 0.8rem;
}
.quick-url-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 18px;
  background:
    radial-gradient(ellipse at 0 100%, rgba(112, 217, 207, 0.08), transparent 55%),
    var(--panel);
}
.quick-url-panel h2 {
  margin: 4px 0 8px;
  font-size: 1.35rem;
}
.quick-url-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.84rem;
}
.quick-url-panel label {
  display: block;
  margin-bottom: 8px;
}
.quick-url-row {
  display: flex;
  gap: 10px;
}
.quick-url-row input {
  flex: 1;
  min-width: 0;
}
.quick-url-row .button {
  white-space: nowrap;
}
.quick-url-panel .field-help {
  display: block;
  margin-top: 8px;
}
.quick-url-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.quick-url-help .field-help {
  margin: 0;
}
.safari-guide ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
  line-height: 1.55;
}
.safari-guide label {
  display: block;
  margin-top: 18px;
}
.safari-guide textarea {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 15px;
}
.stat-top svg {
  width: 17px;
  height: 17px;
  color: var(--subtle);
}
.stat-number {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 650;
}
.stat-caption {
  font-size: 0.72rem;
  color: var(--subtle);
  margin-top: 8px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.start-panel {
  background:
    radial-gradient(
      ellipse at 100% 0,
      rgba(112, 217, 207, 0.07),
      transparent 60%
    ),
    var(--panel);
  display: flex;
  flex-direction: column;
}
.start-panel > p {
  max-width: 470px;
  line-height: 1.75;
  color: var(--muted);
  font-size: 0.9rem;
}
.start-panel h2 {
  font-size: 1.45rem;
}
.start-steps {
  margin: 11px 0 24px;
  display: flex;
  gap: 22px;
}
.start-step {
  flex: 1;
  font-size: 0.79rem;
  color: var(--muted);
}
.step-number {
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--accent);
  font-size: 0.75rem;
  margin-bottom: 10px;
}
.start-step b {
  display: block;
  color: #d6e3ed;
  font-weight: 550;
  margin-bottom: 3px;
}
.start-panel .button {
  align-self: flex-start;
  margin-top: auto;
}
.source-row,
.recent-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.source-row:first-of-type,
.recent-row:first-of-type {
  border-top: 0;
}
.source-row > div,
.recent-row > div {
  min-width: 0;
  flex: 1;
}
.source-row strong,
.recent-row strong {
  font-size: 0.84rem;
  font-weight: 550;
  display: block;
}
.source-row p,
.recent-row p {
  font-size: 0.75rem;
  color: var(--subtle);
  margin: 3px 0 0;
}
.source-symbol {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--muted);
  flex-shrink: 0;
}
.source-symbol svg {
  width: 17px;
  height: 17px;
}
.recent-listings-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.recent-listing-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
}
.recent-listing-card:hover,
.recent-listing-card:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}
.recent-listing-card img,
.recent-listing-placeholder {
  width: 78px;
  height: 78px;
  object-fit: cover;
  background: var(--panel-soft);
}
.recent-listing-placeholder {
  display: grid;
  place-items: center;
}
.recent-listing-placeholder svg {
  width: 24px;
  color: var(--subtle);
}
.recent-listing-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.recent-listing-copy strong {
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.recent-listing-copy > span {
  color: var(--subtle);
  font-size: 0.72rem;
}
.recent-listing-arrow {
  color: var(--subtle);
}
.recent-listing-arrow svg {
  width: 17px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.66rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(152, 171, 189, 0.04);
}
.tag.good {
  color: var(--accent);
  border-color: rgba(112, 217, 207, 0.2);
  background: var(--accent-soft);
}
.tag.warn {
  color: var(--amber);
  border-color: rgba(230, 188, 121, 0.2);
  background: rgba(230, 188, 121, 0.07);
}
.tag.bad {
  color: var(--red);
  border-color: rgba(240, 143, 153, 0.2);
  background: rgba(240, 143, 153, 0.06);
}
.tag.blue {
  color: var(--blue);
  border-color: rgba(124, 184, 245, 0.2);
  background: rgba(124, 184, 245, 0.07);
}
.notice {
  display: flex;
  gap: 12px;
  padding: 15px 17px;
  background: var(--accent-soft);
  border: 1px solid rgba(112, 217, 207, 0.15);
  border-radius: 12px;
  color: #bad4d9;
  font-size: 0.82rem;
  line-height: 1.7;
  margin-top: 20px;
}
.notice svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
  margin-top: 3px;
}
.notice.warn {
  background: rgba(230, 188, 121, 0.06);
  border-color: rgba(230, 188, 121, 0.18);
  color: #d9c8ac;
}
.notice.warn svg {
  color: var(--amber);
}
.notice p {
  margin: 0;
}
.empty-state {
  text-align: center;
  padding: 35px 22px;
  color: var(--muted);
}
.empty-state .empty-icon {
  color: var(--subtle);
  margin-bottom: 13px;
}
.empty-state .empty-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.25;
}
.empty-state h3 {
  color: #c6d5e1;
  font-weight: 550;
  font-size: 1rem;
}
.empty-state p {
  max-width: 450px;
  margin: 0 auto 18px;
  font-size: 0.84rem;
  line-height: 1.7;
}
.empty-state .button {
  margin: 0;
}
.loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 10px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-state {
  padding: 25px;
  border: 1px solid rgba(240, 143, 153, 0.25);
  background: rgba(240, 143, 153, 0.04);
  border-radius: 16px;
  color: var(--red);
}
.error-state p {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: #0c1724;
  border: 1px solid var(--line-soft);
  margin-bottom: 24px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 550;
  font-size: 0.83rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab svg {
  width: 17px;
  height: 17px;
}
.tab.active {
  background: var(--panel-soft);
  color: var(--accent);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.15);
}
.search-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(350px, 1.15fr);
  gap: 22px;
  align-items: start;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.field-grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.field-grid .full {
  grid-column: 1/-1;
}
.field-help {
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--subtle);
  font-weight: 400;
  margin: 0;
}
.form-section-title {
  font-size: 0.69rem;
  letter-spacing: 0.1em;
  color: var(--subtle);
  font-weight: 650;
  margin: 24px 0 13px;
  text-transform: uppercase;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.check-label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.81rem;
  line-height: 1.5;
}
.check-label input {
  margin: 2px 0 0;
  flex-shrink: 0;
}
.search-map-panel {
  padding: 0;
  overflow: hidden;
}
.map-toolbar {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.map-toolbar h3 {
  margin: 0;
  font-size: 0.9rem;
}
.map-toolbar p {
  font-size: 0.73rem;
  color: var(--muted);
  margin: 4px 0 0;
}
.map-canvas {
  height: 390px;
  background: #142331;
  position: relative;
  isolation: isolate;
}
.map-consent {
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #10202c;
  background-image:
    linear-gradient(rgba(112, 217, 207, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 217, 207, 0.035) 1px, transparent 1px);
  background-size: 35px 35px;
  padding: 35px;
}
.map-consent > div {
  max-width: 340px;
}
.map-consent svg {
  width: 38px;
  height: 38px;
  color: var(--accent);
  margin-bottom: 16px;
  stroke-width: 1.2;
}
.map-consent h3 {
  font-size: 1.06rem;
}
.map-consent p {
  font-size: 0.81rem;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 18px;
}
.map-caption {
  padding: 13px 20px;
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.map-caption strong {
  color: var(--text);
  font-weight: 500;
}
.bbox-summary {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin-top: 11px;
}
.search-aside-note {
  margin-top: 16px;
  padding: 17px 19px;
}
.search-aside-note h3 {
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.search-aside-note p {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.results-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 27px 0 15px;
}
.results-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.results-header p {
  font-size: 0.77rem;
  color: var(--muted);
  margin: 4px 0 0;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.candidate-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  position: relative;
  transition: border-color 0.15s;
}
.candidate-card:hover {
  border-color: #486277;
}
.candidate-card.candidate-outside-zone,
.listing-candidate-item.candidate-outside-zone {
  border-style: dashed;
}
.zone-status.outside {
  display: inline-flex;
  width: fit-content;
  margin: 6px 0 2px;
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--red) 16%, transparent);
  color: var(--red);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1;
}
.listing-candidate-item.surface-strong {
  border-color: color-mix(in srgb, #42c77a 72%, var(--line));
  background: color-mix(in srgb, #42c77a 7%, var(--panel));
}
.listing-candidate-item.surface-close {
  border-color: color-mix(in srgb, #f0b83f 76%, var(--line));
  background: color-mix(in srgb, #f0b83f 7%, var(--panel));
}
.listing-candidate-item.surface-broad {
  border-color: color-mix(in srgb, #ef7b39 76%, var(--line));
  background: color-mix(in srgb, #ef7b39 7%, var(--panel));
}
.candidate-visual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 2px 2px;
}
.candidate-visual-actions a {
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 750;
  text-decoration: none;
}
.candidate-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.candidate-card h3 {
  font-size: 1rem;
  margin: 0 0 5px;
}
.candidate-card .address {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.score {
  flex-shrink: 0;
  text-align: right;
}
.score strong {
  font-size: 1.65rem;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-weight: 650;
}
.score span {
  font-size: 0.72rem;
  color: var(--subtle);
}
.score small {
  display: block;
  font-size: 0.63rem;
  color: var(--subtle);
  margin-top: -3px;
}
.candidate-facts {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  padding: 15px 0;
  margin-top: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: #cad8e5;
}
.candidate-facts span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.candidate-facts svg {
  width: 14px;
  height: 14px;
  color: var(--subtle);
}
.candidate-evidence {
  margin: 14px 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.candidate-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.candidate-foot .confidence {
  font-size: 0.72rem;
  color: var(--muted);
}
.score-bar {
  height: 4px;
  background: var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin: 15px 0;
}
.score-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 9px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar .search-input {
  max-width: 360px;
  flex: 1;
  min-width: 180px;
}
.toolbar .button {
  margin-left: auto;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
  min-width: 630px;
}
th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 550;
  font-size: 0.7rem;
  color: var(--subtle);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  color: var(--text);
  font-weight: 500;
}
td small {
  display: block;
  margin-top: 3px;
  color: var(--subtle);
  font-size: 0.73rem;
}
td .button {
  font-size: 0.75rem;
}
tbody tr:hover {
  background: rgba(152, 171, 189, 0.025);
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.municipality-row {
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 15px;
}
.municipality-row:first-child {
  border-top: 0;
}
.municipality-row > div {
  flex: 1;
}
.municipality-row strong {
  font-size: 0.9rem;
}
.municipality-row p {
  font-size: 0.76rem;
  color: var(--subtle);
  margin: 4px 0 0;
}
.job-entry {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.job-entry:first-child {
  border-top: 0;
}
.job-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.job-entry-header strong {
  font-size: 0.85rem;
  font-weight: 550;
}
.job-entry p {
  color: var(--subtle);
  font-size: 0.76rem;
  margin: 5px 0;
}
.job-entry details {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.job-entry summary {
  cursor: pointer;
}
.log-output {
  background: #09121c;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #a6b9ca;
  font:
    11px/1.7 ui-monospace,
    SFMono-Regular,
    monospace;
}
.form-inline {
  display: flex;
  gap: 10px;
  align-items: end;
}
.form-inline label {
  flex: 1;
}
.source-cards {
  display: grid;
  gap: 14px;
}
.source-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
}
.source-card-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.source-card-heading > div {
  flex: 1;
}
.source-card h3 {
  font-size: 0.94rem;
  margin: 0;
}
.source-card p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
}
.source-meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--subtle);
}
.detail-dialog {
  border: 1px solid #344a5e;
  background: var(--bg);
  color: var(--text);
  border-radius: 21px;
  padding: 0;
  width: min(940px, calc(100% - 32px));
  max-height: 90svh;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5);
}
.detail-dialog::backdrop {
  background: rgba(3, 10, 17, 0.75);
  backdrop-filter: blur(5px);
}
.dialog-header {
  padding: 25px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}
.dialog-header .eyebrow {
  font-size: 0.62rem;
}
.dialog-header h2 {
  font-size: 1.4rem;
  margin: 6px 0;
}
.dialog-header p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}
.dialog-body {
  padding: 26px 28px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 23px;
}
.detail-grid .panel {
  padding: 19px;
}
.detail-section {
  margin-bottom: 25px;
}
.detail-section:last-child {
  margin-bottom: 0;
}
.detail-section h3 {
  font-size: 0.9rem;
  margin-bottom: 15px;
}
.detail-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 0;
}
.detail-dl > div {
  min-width: 0;
}
.detail-dl dt {
  color: var(--subtle);
  font-size: 0.71rem;
  margin-bottom: 4px;
}
.detail-dl dd {
  margin: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}
.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.evidence-list li {
  font-size: 0.81rem;
  line-height: 1.6;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.evidence-list svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  margin-top: 3px;
}
.evidence-list.contradictions svg {
  color: var(--amber);
}
.score-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.score-detail-top .score strong {
  font-size: 2.3rem;
}
.breakdown-row {
  margin: 14px 0;
}
.breakdown-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--muted);
}
.breakdown-row .score-bar {
  height: 3px;
  margin: 6px 0;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 17px 0;
}
.provenance-list {
  display: grid;
  gap: 10px;
}
.provenance-item {
  border-left: 2px solid var(--line);
  padding-left: 12px;
}
.provenance-item strong {
  font-size: 0.78rem;
  font-weight: 550;
}
.provenance-item p {
  font-size: 0.74rem;
  color: var(--subtle);
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.provenance-item a {
  font-size: 0.73rem;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.comparison-empty {
  min-height: 245px;
}
.comparison-tools {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.comparison-map {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  margin-top: 15px;
}
.visual-review {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, var(--surface));
}
.visual-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.visual-review-heading h4 {
  margin: 4px 0 0;
}
.visual-review-status {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}
.visual-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.visual-review-grid figure {
  margin: 0;
  min-width: 0;
}
.visual-frame {
  height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.visual-frame img,
.visual-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.parcel-aerial-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.parcel-aerial-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.parcel-aerial-overlay path {
  fill: rgba(255, 196, 61, 0.24);
  stroke: #ffd15c;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}
.parcel-marker-label {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(255, 209, 92, 0.8);
  border-radius: 999px;
  background: rgba(4, 11, 19, 0.84);
  color: #ffe7a6;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1;
  backdrop-filter: blur(5px);
  pointer-events: none;
}
.visual-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 17px;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
}
.visual-placeholder svg {
  width: 25px;
  height: 25px;
}
.visual-review-grid figcaption {
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.68rem;
}
.visual-review-note {
  margin: 13px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--teal) 9%, transparent);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.55;
}
.candidate-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.candidate-visual {
  position: relative;
  display: block;
  min-height: 120px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #08121d;
}
.candidate-visual img,
.candidate-visual iframe {
  width: 100%;
  height: 145px;
  display: block;
  border: 0;
  object-fit: cover;
}
.candidate-visual-link {
  height: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px 38px;
  color: #dcecff;
  text-align: center;
  background: linear-gradient(145deg, #102338, #07111d);
}
.candidate-visual-link > svg {
  width: 25px;
  height: 25px;
  color: var(--teal);
}
.candidate-visual-link > span:not(.candidate-visual-label) {
  font-size: 0.75rem;
  font-weight: 700;
}
.candidate-visual-link > small {
  color: #9fb4c8;
  font-size: 0.65rem;
}
.candidate-visual .candidate-visual-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(4, 11, 19, 0.82);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 650;
  backdrop-filter: blur(5px);
}
.candidate-visual .parcel-marker-label {
  top: 8px;
  right: 8px;
  bottom: auto;
  left: auto;
  color: #ffe7a6;
}
.candidate-visual-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.comparison-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 21px;
  background: var(--panel);
}
.comparison-block h3 {
  font-size: 1rem;
}
.photo-link {
  display: block;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.81rem;
  overflow-wrap: anywhere;
}
.toast-region {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: calc(100vw - 40px);
}
.toast {
  padding: 14px 18px;
  background: #1b3541;
  border: 1px solid rgba(112, 217, 207, 0.3);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: #d8edea;
  font-size: 0.85rem;
  max-width: 420px;
  animation: toast-in 0.2s ease-out;
}
.toast.error {
  background: #35212d;
  border-color: rgba(240, 143, 153, 0.3);
  color: #f6c8ce;
}
@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.noscript {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--panel);
  padding: 20px;
  border: 1px solid var(--red);
  z-index: 9999;
}
.leaflet-container {
  font:
    12px Inter,
    system-ui,
    sans-serif;
}
.leaflet-tooltip.district-map-label {
  border: 1px solid color-mix(in srgb, #e68b2c 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  box-shadow: 0 4px 16px rgb(15 23 42 / 14%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 5px 9px;
  white-space: nowrap;
}
.leaflet-control-attribution {
  font-size: 9px !important;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #142233;
  color: #edf3f8;
}
.leaflet-popup-content {
  font-size: 12px;
  line-height: 1.6;
}
.leaflet-popup-content p {
  margin: 7px 0;
}
.leaflet-popup-content button {
  background: var(--accent);
  border: 0;
  padding: 6px 10px;
  color: #0b252b;
  font-size: 11px;
}
.map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #70d9cf;
  color: #10242b;
  font-size: 11px;
  font-weight: 750;
  border: 2px solid #f0fffd;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.35);
}
@media (min-width: 1700px) {
  #main {
    padding-top: 45px;
  }
  .app-header {
    padding-left: max(38px, calc((100vw - 232px - 1524px) / 2));
    padding-right: max(38px, calc((100vw - 232px - 1524px) / 2));
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .app-content {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  #main {
    padding: 28px 25px 35px;
  }
  .app-header,
  .app-footer {
    padding-left: 25px;
    padding-right: 25px;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .listing-page-layout {
    grid-template-columns: 1fr;
  }
  .listing-map-column {
    position: static;
  }
  .search-map-panel .map-canvas,
  .search-map-panel .map-consent {
    height: 340px;
    min-height: 340px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .start-steps {
    gap: 13px;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat-card {
    padding: 16px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .app-brand {
    font-size: 1.16rem;
  }
  .app-brand small {
    font-size: 0.48rem;
  }
}
@media (max-width: 950px) {
  .quick-url-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .visual-review-grid {
    grid-template-columns: 1fr;
  }
  .visual-frame {
    height: 245px;
  }
  .login-story {
    padding: 32px;
  }
  .login-story h1 {
    font-size: 3rem;
  }
  .login-features {
    gap: 12px;
  }
  .login-form-side {
    padding: 32px;
  }
  .login-form h2 {
    font-size: 1.7rem;
  }
  .app-footer {
    flex-direction: column;
    gap: 5px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .button {
    margin-top: 0;
  }
  .page-heading h1 {
    font-size: 2rem;
  }
}
@media (max-width: 700px) {
  .quick-url-row {
    flex-direction: column;
  }
  .quick-url-row .button {
    width: 100%;
  }
  .quick-url-help {
    align-items: stretch;
    flex-direction: column;
  }
  .quick-url-help .button {
    width: 100%;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    min-height: auto;
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-story-copy {
    padding: 32px 0 9px;
    max-width: 420px;
  }
  .login-story h1 {
    font-size: 2.25rem;
    line-height: 1.13;
    margin: 16px 0;
  }
  .login-story h1 br:nth-child(2) {
    display: none;
  }
  .login-story-copy > p {
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 10px;
  }
  .login-story-copy .eyebrow {
    font-size: 0.58rem;
  }
  .login-features,
  .login-foot,
  .login-decoration {
    display: none;
  }
  .login-form-side {
    padding: 30px 24px 40px;
  }
  .login-form {
    max-width: 440px;
  }
  .login-form .brand-mark {
    display: none;
  }
  .login-form h2 {
    font-size: 1.65rem;
  }
  .login-form > p.muted {
    font-size: 0.84rem;
    margin-bottom: 22px;
  }
  .login-form .eyebrow {
    font-size: 0.58rem;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 17px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .app-layout {
    display: block;
  }
  .app-brand {
    padding: 0;
    font-size: 1.1rem;
  }
  .app-brand small {
    font-size: 0.45rem;
  }
  .brand-mark.small {
    width: 34px;
    height: 34px;
  }
  .brand-mark.small svg {
    width: 21px;
    height: 21px;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  #main-nav {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    margin: 0 -4px;
    padding-bottom: 10px;
  }
  .nav-link {
    padding: 9px 11px;
    gap: 7px;
    font-size: 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
  }
  .nav-link svg {
    width: 16px;
    height: 16px;
  }
  .nav-link .nav-indicator {
    display: none;
  }
  .app-content {
    margin: 0;
    width: 100%;
  }
  .app-header {
    height: 48px;
    padding: 0 20px;
  }
  .breadcrumb {
    font-size: 0.71rem;
    gap: 9px;
  }
  .user-name {
    font-size: 0.69rem;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions .icon-button {
    height: 30px;
    width: 30px;
  }
  .header-actions svg {
    width: 16px;
    height: 16px;
  }
  #main {
    padding: 25px 19px 35px;
  }
  .page-heading {
    margin-bottom: 23px;
    flex-wrap: wrap;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 1.85rem;
  }
  .page-heading p {
    font-size: 0.82rem;
    line-height: 1.65;
  }
  .page-heading .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 9px;
  }
  .page-heading .button {
    font-size: 0.79rem;
    min-height: 38px;
    padding: 9px 12px;
  }
  .stats-grid {
    gap: 10px;
    margin-bottom: 18px;
  }
  .stat-card {
    padding: 15px;
  }
  .stat-top {
    font-size: 0.71rem;
    margin-bottom: 12px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-caption {
    font-size: 0.64rem;
  }
  .stat-top svg {
    width: 15px;
    height: 15px;
  }
  .panel {
    padding: 19px;
    border-radius: 14px;
  }
  .dashboard-grid {
    gap: 17px;
  }
  .start-panel h2 {
    font-size: 1.25rem;
  }
  .start-panel > p {
    font-size: 0.81rem;
  }
  .start-steps {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .start-step {
    font-size: 0.71rem;
    min-width: 80px;
  }
  .source-row strong {
    font-size: 0.8rem;
  }
  .source-row p {
    font-size: 0.7rem;
  }
  .section-heading {
    margin-top: 24px;
  }
  .section-heading h2 {
    font-size: 1rem;
  }
  .tabs {
    gap: 2px;
    margin-bottom: 19px;
    width: 100%;
  }
  .tab {
    padding: 9px 10px;
    font-size: 0.74rem;
    flex: 1;
    justify-content: center;
  }
  .tab svg {
    width: 15px;
    height: 15px;
  }
  .search-grid {
    display: block;
  }
  .search-grid > aside {
    margin-top: 19px;
  }
  .search-map-panel {
    padding: 0;
  }
  .field-grid {
    gap: 13px;
  }
  .field-grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
  label {
    font-size: 0.79rem;
  }
  input,
  select,
  textarea {
    padding: 11px 10px;
    font-size: 0.85rem;
  }
  .form-section-title {
    font-size: 0.64rem;
  }
  .map-caption {
    font-size: 0.67rem;
    padding: 12px 15px;
    align-items: flex-start;
  }
  .map-toolbar {
    padding: 15px;
  }
  .map-toolbar h3 {
    font-size: 0.82rem;
  }
  .map-toolbar p {
    font-size: 0.67rem;
  }
  .map-toolbar .button {
    font-size: 0.68rem;
    padding: 7px 9px;
  }
  .search-map-panel .map-canvas,
  .search-map-panel .map-consent {
    height: 300px;
    min-height: 300px;
  }
  .map-consent {
    padding: 25px;
  }
  .map-consent p {
    font-size: 0.76rem;
  }
  .map-consent svg {
    width: 29px;
    height: 29px;
  }
  .search-aside-note {
    display: none;
  }
  .candidate-card {
    padding: 17px;
  }
  .candidate-card h3 {
    font-size: 0.95rem;
  }
  .candidate-facts {
    gap: 11px;
    font-size: 0.74rem;
  }
  .candidate-foot .confidence {
    font-size: 0.65rem;
  }
  .candidate-foot .button {
    font-size: 0.74rem;
  }
  .notice {
    font-size: 0.76rem;
    padding: 13px;
  }
  .detail-dialog {
    width: calc(100% - 16px);
    max-height: 94svh;
    border-radius: 16px;
  }
  .dialog-header {
    padding: 20px;
  }
  .dialog-header h2 {
    font-size: 1.2rem;
  }
  .dialog-body {
    padding: 20px;
  }
  .detail-grid {
    gap: 18px;
  }
  .detail-dl {
    gap: 13px;
  }
  .detail-dl dd {
    font-size: 0.8rem;
  }
  .dialog-body .tabs {
    overflow-x: auto;
    justify-content: initial;
  }
  .dialog-body .tab {
    flex: 0 0 auto;
  }
  .field-grid.three .full {
    grid-column: 1/-1;
  }
  .comparison-block {
    padding: 17px;
  }
  .app-footer {
    padding: 18px 20px;
    font-size: 0.65rem;
  }
  .toast-region {
    bottom: 16px;
    right: 16px;
  }
  .toast {
    padding: 12px 15px;
    font-size: 0.8rem;
  }
  .form-inline {
    flex-wrap: wrap;
  }
  .form-inline label {
    min-width: 120px;
  }
  .form-inline .button {
    min-height: 42px;
  }
  .toolbar {
    gap: 9px;
  }
  .toolbar .button {
    font-size: 0.75rem;
  }
  .table-wrap {
    border-radius: 12px;
  }
  th,
  td {
    padding: 13px 14px;
  }
  .admin-grid {
    gap: 18px;
  }
  .private-mobile {
    position: absolute;
    right: 20px;
    top: 22px;
    font-size: 0.65rem;
    color: var(--subtle);
  }
}

/* iOS compact experience: thumb navigation, safe areas and progressive disclosure. */
@media (max-width: 700px) {
  html {
    scroll-padding-top: calc(108px + env(safe-area-inset-top));
  }
  body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
  }
  .app-layout {
    min-height: 100dvh;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid rgba(151, 178, 199, 0.2);
    background: color-mix(in srgb, var(--sidebar) 86%, transparent);
    box-shadow: 0 -10px 30px rgba(2, 8, 14, 0.34);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    z-index: 1200;
  }
  .sidebar .app-brand,
  .sidebar .nav-caption,
  .sidebar .sidebar-bottom {
    display: none;
  }
  #main-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
    height: 66px;
  }
  .nav-link {
    min-width: 0;
    min-height: 58px;
    padding: 7px 2px 5px;
    border: 0;
    border-radius: 13px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    color: var(--subtle);
    font-size: 0.61rem;
    font-weight: 650;
    line-height: 1;
  }
  .nav-link:hover,
  .nav-link.active {
    border: 0;
    background: transparent;
  }
  .nav-link.active {
    color: var(--accent);
  }
  .nav-link.active::before {
    content: "";
    position: absolute;
    top: 4px;
    width: 30px;
    height: 3px;
    border-radius: 99px;
    background: currentColor;
  }
  .nav-link svg {
    width: 22px;
    height: 22px;
  }
  .nav-label-desktop {
    display: none;
  }
  .nav-label-mobile {
    display: inline;
  }
  .app-header {
    position: sticky;
    top: 0;
    z-index: 900;
    height: calc(52px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
    background: color-mix(in srgb, var(--sidebar) 88%, transparent);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
  }
  .breadcrumb > span,
  .breadcrumb:not(:has(strong)) {
    display: none;
  }
  .breadcrumb {
    font-size: 0;
  }
  .breadcrumb strong {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text);
  }
  .user-name {
    display: none;
  }
  #main {
    padding: 18px 15px calc(96px + env(safe-area-inset-bottom));
  }
  .app-footer {
    display: none;
  }
  .page-heading {
    margin-bottom: 16px;
    gap: 11px;
  }
  .page-heading > div {
    min-width: 0;
  }
  .page-heading .eyebrow {
    display: none;
  }
  .page-heading h1 {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
  }
  .page-heading p {
    margin-top: 7px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .page-heading .button {
    min-height: 44px;
    margin: 0;
  }
  .button,
  button,
  .icon-button {
    min-height: 44px;
    touch-action: manipulation;
  }
  .panel {
    padding: 16px;
    border-radius: 16px;
  }
  .quick-url-panel {
    gap: 11px;
    margin-bottom: 13px;
  }
  .quick-url-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .quick-url-copy .eyebrow,
  .quick-url-copy p,
  .quick-url-panel label,
  .quick-url-help .field-help {
    display: none;
  }
  .quick-url-panel h2 {
    margin: 0;
    font-size: 1.03rem;
  }
  .quick-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .quick-url-row input {
    min-height: 44px;
  }
  .quick-url-row .button {
    width: auto;
    min-width: 96px;
  }
  .quick-url-help {
    display: block;
    margin-top: 7px;
  }
  .quick-url-help .button {
    width: auto;
    min-height: 32px;
    padding: 4px 0;
    border: 0;
    font-size: 0.7rem;
  }
  .stats-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -15px 14px;
    padding: 0 15px;
    gap: 8px;
  }
  .stats-grid::-webkit-scrollbar,
  .listing-gallery::-webkit-scrollbar {
    display: none;
  }
  .stat-card {
    flex: 0 0 128px;
    min-height: 88px;
    scroll-snap-align: start;
    padding: 12px;
  }
  .stat-top {
    margin-bottom: 7px;
    font-size: 0.64rem;
  }
  .stat-number {
    font-size: 1.45rem;
  }
  .stat-caption {
    display: none;
  }
  .start-panel {
    display: none;
  }
  .dashboard-grid {
    display: block;
  }
  .dashboard-grid > .panel:not(.start-panel) {
    padding: 14px 16px;
  }
  .dashboard-grid .panel-heading {
    align-items: center;
    margin-bottom: 8px;
  }
  .dashboard-grid .panel-heading .eyebrow,
  .dashboard-grid .source-row p,
  .dashboard-grid .source-row .tag {
    display: none;
  }
  .dashboard-grid .panel-heading h2 {
    font-size: 1rem;
  }
  .dashboard-grid .source-row {
    padding: 8px 0;
  }
  .section-heading {
    margin: 18px 0 10px;
  }
  .recent-row {
    padding: 10px 0;
  }
  .recent-listings-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }
  .recent-listing-card {
    grid-template-columns: 86px minmax(0, 1fr) 20px;
  }
  .recent-listing-card img,
  .recent-listing-placeholder {
    width: 86px;
    height: 76px;
  }
  .recent-row .source-symbol {
    display: none;
  }
  .recent-row .button {
    font-size: 0;
    min-width: 44px;
    padding: 9px;
  }
  .recent-row .button svg {
    width: 19px;
    height: 19px;
  }
  #main > .notice:last-child {
    display: none;
  }
  .listing-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .listing-table {
    display: none;
  }
  .listing-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 20px;
    gap: 12px;
    align-items: center;
    min-height: 112px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
  }
  .listing-card:hover {
    text-decoration: none;
  }
  .listing-card > img,
  .listing-card-placeholder {
    width: 112px;
    height: 112px;
    object-fit: cover;
    background: var(--panel-soft);
  }
  .listing-card-placeholder {
    display: grid;
    place-items: center;
  }
  .listing-card-placeholder svg {
    width: 30px;
    color: var(--subtle);
  }
  .listing-card-body {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.72rem;
  }
  .listing-card-body strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .listing-card-price {
    color: var(--accent);
    font-size: 0.94rem;
    font-weight: 750;
  }
  .listing-card-facts {
    color: var(--subtle);
  }
  .listing-card-arrow {
    color: var(--subtle);
  }
  .listing-card-arrow svg {
    width: 17px;
  }
  .listing-toolbar {
    position: sticky;
    top: calc(58px + env(safe-area-inset-top));
    z-index: 50;
    padding: 7px 0 11px;
    background: var(--bg);
  }
  .listing-toolbar .small-copy,
  .listing-notice {
    display: none;
  }
  .listing-mobile-jumpbar {
    position: sticky;
    top: calc(52px + env(safe-area-inset-top));
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 0 0 10px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .listing-mobile-jumpbar a {
    min-height: 36px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 700;
    text-decoration: none;
  }
  .listing-mobile-jumpbar a.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .listing-page-layout {
    gap: 12px;
  }
  .listing-page-sheet {
    padding: 0 0 14px;
    overflow: hidden;
  }
  .listing-sheet {
    gap: 13px;
    margin: 0;
  }
  .listing-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 7px;
    padding: 0 12px;
  }
  .listing-gallery figure,
  .listing-gallery figure:first-child {
    flex: 0 0 87%;
    scroll-snap-align: center;
  }
  .listing-gallery img,
  .listing-gallery figure:first-child img {
    height: 238px;
    border: 0;
    border-radius: 0 0 15px 15px;
  }
  .listing-gallery figcaption {
    display: none;
  }
  .listing-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    padding: 0 16px;
  }
  .listing-highlights strong {
    grid-column: 1 / -1;
    font-size: 1.35rem;
  }
  .listing-highlights span {
    font-size: 0.76rem;
  }
  .listing-sheet-actions {
    position: sticky;
    top: calc(101px + env(safe-area-inset-top));
    z-index: 70;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 6px;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .listing-sheet-actions .button {
    min-width: 0;
    padding: 9px 5px;
    gap: 5px;
    font-size: 0.66rem;
  }
  .listing-sheet-actions svg {
    width: 15px;
  }
  .listing-page-sheet .detail-section {
    margin: 0 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
  }
  .listing-page-sheet .detail-section h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    font-size: 0.91rem;
  }
  .listing-page-sheet .detail-section h3 .mobile-section-summary {
    max-width: 92px;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-section-toggle {
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
  }
  .mobile-section-toggle svg {
    width: 17px;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
  }
  .mobile-section-toggle[aria-expanded="true"] svg {
    transform: rotate(-90deg);
  }
  .listing-page-sheet .detail-section.mobile-collapsed > :not(h3) {
    display: none;
  }
  .listing-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .listing-facts > div {
    padding: 9px;
  }
  .listing-page-sheet > hr {
    display: none;
  }
  .listing-page-sheet > .detail-actions {
    padding: 0 14px;
  }
  .listing-map-column {
    gap: 12px;
  }
  .listing-map-column .map-canvas,
  .listing-map-column .map-consent {
    height: min(58dvh, 440px);
    min-height: 330px;
  }
  .listing-zone-summary {
    padding: 14px;
  }
  .listing-zone-summary .location-clues,
  .listing-zone-summary .field-help {
    display: none;
  }
  .listing-candidate-list {
    gap: 9px;
  }
  .listing-candidate-item .candidate-visuals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-candidate-item .candidate-visual img {
    height: 104px;
  }
  .candidate-visual-note {
    display: none;
  }
  .toast-region {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.button {
  border-radius: 10px;
}
.photo-preview {
  margin: -4px 0 18px;
}
.photo-preview-image img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #09121c;
  margin-top: 12px;
}
.photo-preview-image.field-help {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.listing-sheet {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}
.listing-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.listing-gallery figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.listing-gallery img {
  width: 100%;
  height: 150px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}
.listing-gallery figure {
  margin: 0;
  min-width: 0;
}
.listing-gallery figcaption {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 6px;
}
.link-button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.listing-gallery figure:first-child img {
  height: 309px;
}
.listing-gallery-empty {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--subtle);
}
.listing-sheet-actions,
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.listing-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 13px 0;
}
.listing-facts > div {
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 11px;
}
.listing-facts dt {
  color: var(--subtle);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.listing-facts dd {
  margin: 5px 0 0;
  font-weight: 600;
}
.listing-description {
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.75;
}
.listing-title-link {
  color: inherit;
  text-decoration: none;
}
.listing-title-link:hover,
.listing-title-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}
.listing-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 20px;
  align-items: start;
}
.listing-mobile-jumpbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: min(520px, 100%);
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.listing-mobile-jumpbar a {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.listing-mobile-jumpbar a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.listing-view-summary,
.listing-view-map,
.listing-view-candidates {
  grid-template-columns: minmax(0, 1fr);
}
.listing-view-summary .listing-map-column {
  display: none;
}
.listing-view-map .listing-page-sheet,
.listing-view-map .listing-candidates-panel,
.listing-view-candidates .listing-page-sheet,
.listing-view-candidates .listing-map-panel,
.listing-view-candidates .listing-zone-summary {
  display: none;
}
.listing-view-map .listing-map-column,
.listing-view-candidates .listing-map-column {
  position: static;
}
.localization-zone-card {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  padding: 13px;
  border: 1px solid color-mix(in srgb, #9f6df2 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, #9f6df2 10%, var(--panel));
}
.localization-zone-card p,
.localization-zone-card small {
  margin: 4px 0 0;
  color: var(--muted);
}
.zone-swatch {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 3px solid #9f6df2;
  border-radius: 4px;
  background: color-mix(in srgb, #9f6df2 25%, transparent);
}
.announced-zone-card {
  border-color: color-mix(in srgb, #e68b2c 45%, var(--line));
  background: color-mix(in srgb, #e68b2c 10%, var(--panel));
}
.announced-zone-card .zone-swatch {
  border-color: #e68b2c;
  background: color-mix(in srgb, #e68b2c 25%, transparent);
}
.refinement-panel form,
.refinement-history {
  display: grid;
  gap: 12px;
}
.refinement-history {
  margin-top: 18px;
}
.refinement-history > div {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--panel-soft);
}
.refinement-history p {
  margin: 3px 0 0;
  color: var(--muted);
}
.listing-page-sheet,
.listing-map-column {
  min-width: 0;
}
.listing-map-column {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 84px;
}
.listing-map-column .map-canvas,
.listing-map-column .map-consent {
  height: 470px;
  min-height: 470px;
}
.listing-zone-summary .location-clues {
  grid-template-columns: 1fr;
}
.listing-candidate-list {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.candidate-group-title {
  margin: 12px 2px 0;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--red) 45%, var(--line));
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.listing-candidate-item {
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}
.listing-candidate-row {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.listing-candidate-item .candidate-visuals {
  margin: 8px 0 0;
}
.listing-candidate-item .candidate-visual {
  min-height: 95px;
}
.listing-candidate-item .candidate-visual img {
  height: 120px;
}
.listing-candidate-item .candidate-visual-note {
  margin: 8px 4px 2px;
}
.listing-candidate-row:hover,
.listing-candidate-row:focus-visible {
  border-color: var(--teal);
  background: rgba(112, 217, 207, 0.08);
}
.listing-candidate-row span:first-child {
  display: grid;
  gap: 3px;
}
.listing-candidate-row small {
  color: var(--subtle);
}
.listing-candidate-row > span:last-child {
  color: var(--teal);
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 1200px) {
  .listing-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-page-layout {
    grid-template-columns: 1fr;
  }
  .listing-map-column {
    position: static;
  }
}
@media (max-width: 700px) {
  .listing-map-column .map-canvas,
  .listing-map-column .map-consent {
    height: 390px;
    min-height: 390px;
  }
}
.location-clues {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.location-clue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(112, 217, 207, 0.035);
}
.location-clue svg {
  width: 17px;
  color: var(--accent);
  flex: 0 0 auto;
}
.location-clue p,
.location-clue small {
  margin: 3px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.45;
}
.location-clue small {
  display: block;
  color: var(--muted);
}
.location-preview:empty {
  display: none;
}
.location-analysis {
  margin-bottom: 18px;
}
.neighborhood-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(230, 139, 44, 0.45);
  border-radius: 11px;
  background: rgba(244, 184, 103, 0.09);
}
.neighborhood-summary p,
.neighborhood-summary small {
  margin: 0;
  color: var(--subtle);
  line-height: 1.45;
}
.neighborhood-summary a {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.listing-gallery figcaption strong,
.listing-gallery figcaption small {
  display: block;
}
.listing-gallery figcaption small {
  margin-top: 4px;
  color: var(--subtle);
  line-height: 1.35;
}
.photo-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0 5px;
}
.photo-signals .tag {
  font-size: 0.6rem;
}
.linked-sources {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}
.linked-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(112, 217, 207, 0.035);
}
.linked-source p {
  margin: 4px 0 0;
  color: var(--subtle);
  font-size: 0.76rem;
}
.linked-source .detail-actions {
  margin: 0;
  flex: 0 0 auto;
}
.linked-source-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

@media (max-width: 700px) {
  .listing-source-cta {
    margin: 0 12px;
    padding: 13px 14px;
  }
  .listing-source-cta strong {
    font-size: 0.9rem;
  }
  .listing-source-cta small {
    overflow: visible;
    font-size: 0.75rem;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }
  .listing-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-gallery figure:first-child {
    grid-column: span 2;
  }
  .listing-gallery img,
  .listing-gallery figure:first-child img {
    height: 185px;
  }
  .listing-facts,
  .location-clues {
    grid-template-columns: 1fr;
  }
  .linked-source,
  .linked-source-form {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .listing-gallery {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 7px;
    padding: 0 12px;
  }
  .listing-gallery figure,
  .listing-gallery figure:first-child {
    grid-column: auto;
    grid-row: auto;
    flex: 0 0 87%;
    scroll-snap-align: center;
  }
  .listing-gallery img,
  .listing-gallery figure:first-child img {
    height: 238px;
    border: 0;
    border-radius: 0 0 15px 15px;
  }
  .listing-gallery figcaption {
    display: none;
  }
  .listing-highlights span {
    font-size: 0.84rem;
    line-height: 1.35;
  }
  .listing-sheet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-sheet-actions .button:first-child {
    grid-column: 1 / -1;
  }
  .listing-sheet-actions .button {
    min-height: 42px;
    padding: 10px 9px;
    font-size: 0.78rem;
    line-height: 1.2;
  }
  .listing-page-sheet .detail-section h3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 3px;
    line-height: 1.35;
  }
  .listing-page-sheet .detail-section h3 .mobile-section-title {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .listing-page-sheet .detail-section h3 .mobile-section-summary {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    overflow: visible;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }
  .listing-page-sheet .detail-section h3 .mobile-section-toggle {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .listing-facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .listing-facts > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    align-items: baseline;
    gap: 10px;
    padding: 10px 2px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: transparent;
  }
  .listing-facts dt {
    font-size: 0.7rem;
    line-height: 1.35;
  }
  .listing-facts dd {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .listing-description,
  .neighborhood-summary p,
  .location-clue p,
  .location-clue small {
    font-size: 0.9rem;
    line-height: 1.65;
  }
}
