/* Subpage composition. Homepage, shared header and footer deliberately stay outside
   this scope. Mobbin references and visual acceptance criteria live in the design log. */
main[data-page]:not([data-page="home"]) {
  --surface-radius: 16px;
  --control-radius: 10px;
  --surface-padding: 28px;
  padding-block: 48px 80px;
  color: var(--dark-navy);

  & .page-heading {
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  & h1 {
    font-size: clamp(28px, 2.6vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.045em;
    margin: 0;
  }
  & .page-heading .brand-rule {
    display: none;
  }
  & .page-heading .intro {
    margin: 12px 0 0;
    font-size: 15px;
  }
  & h2 {
    letter-spacing: -0.025em;
    line-height: 1.45;
  }
  & h3 {
    line-height: 1.5;
  }
  & p {
    line-height: 1.7;
  }
  & :is(.card, .condition-form, .location-map-panel, .side-guide-panel) {
    box-shadow: none;
    border-color: var(--line);
    border-radius: 16px;
  }
  & .card {
    padding: 24px;
  }
  & .card.selected,
  & .card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
  }
  & :is(.card, .side-guide-panel) > :first-child {
    margin-top: 0;
  }
  & :is(.card, .side-guide-panel) > :last-child {
    margin-bottom: 0;
  }
  & .grid {
    gap: 24px;
  }
  & :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-radius: 10px;
    border-color: var(--border);
    background-color: #fff;
    font-weight: 400;
    min-width: 0;
  }
  & :is(button, .button):not(.login-provider-btn) {
    border-radius: 999px;
    font-size: 14px;
    box-shadow: none;
  }
  & :is(button, .button).primary {
    padding-inline: 24px;
  }
  & :is(.actions, .stack) {
    gap: 12px;
  }
  & .notice {
    border: 0;
    border-left: 3px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 8px 16px;
    font-size: 14px;
  }
  & .empty {
    padding: 48px 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
  }
  & .empty h2,
  & .empty h3 {
    font-size: 22px;
  }
  & .empty p {
    max-width: 60ch;
  }
  & .empty .actions {
    justify-content: flex-start;
  }
  & .side-guide-panel {
    padding: 24px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
  }
  &
    :is(
      .input-workspace,
      .notes-workspace,
      .onboarding-workspace,
      .help-workspace,
      .export-workspace,
      .maintenance-workspace,
      .example-workspace,
      .inspection-workspace,
      .surroundings-workspace
    ) {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 32px;
    align-items: start;
  }
  & .condition-form {
    padding: 28px;
    gap: 24px;
  }
  & :is(#note-form, #visit-form) {
    margin-top: 0;
  }
  & .condition-form fieldset {
    border-radius: 0;
    background: transparent;
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  & .condition-form legend {
    margin-bottom: 16px;
    font-size: 16px;
  }
  & .field-grid {
    gap: 20px;
  }
  & .listing-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  & .listing-field {
    min-width: 0;
  }
  & .listing-field-wide {
    grid-column: 1 / -1;
  }
  & .listing-field .meta {
    margin: 8px 0 0;
  }
  & #price-korean-display:empty {
    display: none;
  }
  & .condition-form > .primary {
    justify-self: start;
    width: auto;
    min-width: 180px;
  }
  & #profile-form fieldset {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  & #profile-form fieldset .choice {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px;
    margin: 0;
    min-height: 72px;
    text-align: left;
  }
  & #profile-form fieldset input {
    flex: none;
    position: static;
    margin: 0;
  }
  & :is(#profile-form, #budget-form) > a.button {
    justify-self: start;
    width: auto;
    border: 0;
    padding-inline: 0;
    color: var(--muted);
  }
  & .onboarding-progress {
    margin-bottom: 32px;
  }
  & .onboarding-progress ol {
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  & .onboarding-progress nav a {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 12px;
    border-bottom: 2px solid transparent;
  }
  & .onboarding-progress nav a[aria-current="page"] {
    border-bottom-color: var(--accent);
    color: var(--accent);
  }
  & .onboarding-progress nav a::after {
    display: none;
  }
  & .personal-preferences .preference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-block: 1px solid var(--line);
  }
  & .personal-preferences .preference-grid > section {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 24px;
  }
  & .personal-preferences .preference-grid > section + section {
    border-left: 1px solid var(--line);
  }
  & .menu-group {
    padding: 28px;
  }
  & .menu-group nav a {
    padding-block: 16px;
  }
  & .journey-steps {
    gap: 24px;
  }
  & .funding-page {
    max-width: none;
  }
  & .funding-page .condition-form {
    max-width: 960px;
  }
  & .journey-steps .card {
    border-top: 3px solid var(--dark-navy);
  }
  & .journey-current {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 24px;
  }
  & .journey-current .meta {
    grid-column: 1;
    margin: 0 0 8px;
  }
  & .journey-current h2 {
    grid-column: 1;
    margin: 0;
  }
  & .journey-current .button {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  & .checklist-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    margin-top: 24px;
  }
  & .checklist-controls {
    position: sticky;
    top: 88px;
  }
  & .checklist-content {
    min-width: 0;
  }
  & .checklist-content > .list {
    margin-top: 0;
  }
  & .checklist-item summary {
    display: grid;
    grid-template-columns: 1fr auto 16px;
    gap: 16px;
  }
  & .checklist-item summary .badge {
    justify-self: start;
  }
  & .checklist-item form .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  & .checklist-item form .grid > label:last-child {
    grid-column: 1 / -1;
  }
  & .help-questions {
    gap: 0;
    background: #fff;
    border-radius: 16px;
    padding-inline: 24px;
  }
  & .help-questions .card {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 20px 0;
  }
  & .help-questions .card:last-child {
    border-bottom: 0;
  }
  & .help-questions summary {
    font-weight: 600;
    line-height: 1.6;
  }

  /* Search workspace: a deliberate header grid and one aligned result surface. */
  & .discovery-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    align-items: end;
    gap: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  & .discovery-header .page-heading {
    border: 0;
    padding: 0;
    margin: 0;
  }
  & .discovery-header .search-form-compact {
    margin: 0;
    width: 100%;
  }
  & .discovery-header .search-form-compact > label {
    font-size: 13px;
    color: var(--muted);
  }
  & .discovery-recent {
    margin: 12px 0 24px;
    justify-content: flex-end;
  }
  & .discovery-recent a {
    font-size: 13px;
    padding: 8px 0;
  }
  & .discovery-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    margin-top: 0;
  }
  & .discovery-controls {
    padding: 20px;
    border-radius: 16px;
  }
  & .discovery-controls-panel {
    scrollbar-gutter: auto;
  }
  & .discovery-range-field,
  & .funding-money-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  & .money-input-hint {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    min-height: 1.7em;
  }
  & .discovery-draft-chips:empty {
    display: none;
  }
  & .discovery-applied-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
  }
  & .discovery-applied-filters button {
    width: auto;
    min-height: 44px;
    padding: 8px 14px;
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
  }
  & .discovery-applied-filters button:disabled {
    color: var(--muted);
    border-color: var(--border);
    background: var(--surface);
  }
  & .comparison-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin-bottom: 24px;
  }
  & .comparison-controls .meta {
    grid-column: 1 / -1;
    margin: 0;
  }
  & .compare .comparison-edit {
    display: block;
    width: auto;
    min-height: 44px;
    margin-top: 12px;
    padding: 8px 16px;
    color: var(--dark-navy);
    background: #fff;
  }
  & .funding-submit-actions {
    flex-wrap: wrap;
  }
  & .discovery-result-heading {
    margin: 0 0 20px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
  }
  & .discovery-result-heading h2 {
    margin: 0;
    font-size: 22px;
  }
  & .discovery-result-heading .meta {
    margin: 8px 0 0;
  }
  & .discovery-result-heading .actions {
    flex-wrap: nowrap;
    margin: 0;
    gap: 4px;
  }
  & .discovery-result-heading button {
    min-width: 60px;
    padding-inline: 14px;
  }
  & .discovery-workspace {
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
    gap: 20px;
  }
  & .discovery-list .card {
    padding: 24px;
  }
  & .discovery-list .card > .badge {
    align-self: flex-start;
  }
  & .discovery-list .card h3 {
    font-size: 20px;
    margin: 16px 0 8px;
  }
  & .discovery-map {
    padding: 20px;
    border-radius: 16px;
  }
  & .discovery-workspace[data-view="list"] {
    grid-template-columns: 1fr;
  }
  & .discovery-workspace[data-view="list"] .discovery-map {
    display: none;
  }
  & .discovery-workspace[data-view="list"] .discovery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 16px;
    align-items: stretch;
  }
  & .discovery-workspace .discovery-list > .empty {
    grid-column: 1 / -1;
  }
  & .discovery-list .card {
    display: flex;
    flex-direction: column;
  }
  & .discovery-list .card > .actions {
    margin-top: auto;
    padding-top: 16px;
  }
  & .discovery-workspace[data-has-results="false"][data-view="list"] {
    grid-template-columns: 1fr;
  }
  & .discovery-workspace[data-has-results="false"][data-view="list"] .discovery-map {
    display: none;
  }
  & .discovery-workspace[data-has-results="false"] .empty {
    min-height: 300px;
    padding: 48px 32px;
  }

  /* Catalogue: title and local navigation share a baseline; fields share a row. */
  & .catalogue-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  & .catalogue-heading .page-heading {
    margin: 0;
    padding: 0;
    border: 0;
  }
  & .catalogue-nav {
    flex: none;
    margin: 0;
    gap: 4px;
    padding: 4px;
    background: #eceef3;
    border-radius: 999px;
  }
  & .catalogue-nav a {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    border-radius: 999px;
    white-space: nowrap;
  }
  & .catalogue-nav a[aria-current="page"] {
    background: var(--dark-navy);
    color: white;
  }
  & .catalogue-nav a::after {
    display: none;
  }
  & .sh-notice-access {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    background: #eef0f5;
    border: 0;
    border-radius: 12px;
    margin-block: 16px 24px;
  }
  & .sh-notice-access p {
    margin: 4px 0 0;
    font-size: 13px;
  }
  & .sh-notice-access .button {
    width: auto;
    flex: none;
    margin: 0;
    background: white;
  }
  & #catalogue-host #notice-search {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 24px;
    border-radius: 16px;
    gap: 20px;
  }
  & #notice-search > label,
  & #notice-search > button {
    grid-column: auto;
  }
  & #notice-search > button {
    align-self: end;
  }
  & #catalogue-host .toolbar:not(.catalogue-query) {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
  }
  & #catalogue-host .toolbar:not(.catalogue-query) > label {
    flex: 0 1 240px;
  }
  & #catalogue-host .toolbar:not(.catalogue-query) > button {
    width: auto;
    flex: none;
  }
  & .catalogue-query {
    margin-block: 24px;
  }
  & .catalogue-query label {
    font-size: 13px;
  }
  & #catalogue-host > label:has(#notice-status) {
    display: block;
    width: min(100%, 240px);
    font-size: 13px;
  }
  & .notice-card {
    display: flex;
    flex-direction: column;
  }
  & .notice-card h2 {
    font-size: 20px;
  }
  & .notice-card > .actions {
    margin-top: auto;
    padding-top: 20px;
  }
  & .catalogue-facts {
    padding-block: 16px;
    border-block: 1px solid var(--line);
  }
  & .diff-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
  }
  & .diff-summary-grid .diff-card {
    grid-column: span 2;
    border: 0;
    border-radius: 0;
    padding: 20px;
    justify-content: flex-start;
    gap: 12px;
  }
  & .diff-card + .diff-card {
    border-left: 1px solid var(--line);
  }
  & .diff-summary-grid .diff-card:nth-child(n + 4) {
    grid-column: span 3;
    border-top: 1px solid var(--line);
    background: #f8f9fc;
  }
  & .diff-summary-grid .diff-card:nth-child(4) {
    border-left: 0;
  }
  & .diff-card .meta {
    margin: 0;
  }
  & .diff-value {
    font-size: 14px;
  }
  & .diff-missing {
    color: var(--muted);
  }
  & .comparison-guide-container {
    margin-block: 24px;
  }
  @media (min-width: 1200px) {
    & #catalogue-host #notice-search {
      grid-template-columns: 1fr 0.7fr 1.1fr 1.1fr 1.1fr auto;
      gap: 16px;
    }
    & #notice-search :is(input, select) {
      font-size: 14px;
      padding-inline-start: 12px;
    }
  }

  @media (min-width: 768px) {
    & .compare table {
      display: table;
      width: 100%;
      table-layout: fixed;
      border-collapse: separate;
      border-spacing: 0;
    }
    & .compare thead {
      display: table-header-group;
    }
    & .compare tbody {
      display: table-row-group;
    }
    & .compare tr,
    & .compare.single-candidate tr {
      display: table-row;
    }
    & .compare th,
    & .compare td {
      display: table-cell;
      padding: 20px 24px;
      border: 0;
      border-bottom: 1px solid var(--line);
      border-radius: 0;
      box-shadow: none;
      vertical-align: top;
    }
    & .compare th:first-child {
      width: 180px;
      padding: 24px 20px;
      background: var(--bg-page);
      font-size: 14px;
    }
    & .compare thead th {
      background: var(--dark-navy);
      color: #fff;
    }
    & .compare thead th:first-child {
      background: var(--dark-navy);
      color: #fff;
    }
    & .compare td + td {
      border-left: 1px solid var(--line);
    }
    & .compare tr[data-comparison-primary] > td {
      background: var(--bg-page);
      font-size: 16px;
    }
    & .compare tr[data-comparison-primary] > th {
      color: var(--dark-navy);
      font-weight: 700;
    }
    & .compare .comparison-cell-label {
      display: none;
    }
  }
  @media (max-width: 1199px) {
    & .discovery-layout {
      grid-template-columns: 1fr;
    }
    & .discovery-header {
      grid-template-columns: 1fr 1fr;
    }
    & .discovery-controls {
      border-radius: 0 0 16px 16px;
    }
  }
  @media (max-width: 900px) {
    & .checklist-layout {
      grid-template-columns: 1fr;
      gap: 24px;
    }
    & .checklist-controls {
      position: static;
    }
    & .diff-summary-grid {
      grid-template-columns: 1fr;
    }
    & .diff-summary-grid .diff-card {
      grid-column: 1 / -1;
      border-bottom: 1px solid var(--line);
      border-left: 0;
    }
    & .diff-summary-grid .diff-card:last-child {
      grid-column: 1 / -1;
      border-bottom: 0;
      border-left: 0;
    }
    & .diff-summary-grid .diff-card:nth-child(odd) {
      border-left: 0;
    }
    &
      :is(
        .input-workspace,
        .notes-workspace,
        .onboarding-workspace,
        .help-workspace,
        .export-workspace,
        .maintenance-workspace,
        .example-workspace,
        .inspection-workspace,
        .surroundings-workspace
      ) {
      grid-template-columns: 1fr;
      gap: 24px;
    }
    & .side-guide-panel {
      border-left: 0;
      border-top: 1px solid var(--border);
      padding: 24px 0;
      position: static;
    }
    & .catalogue-heading {
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;
    }
    & .discovery-header {
      grid-template-columns: 1fr;
      gap: 24px;
    }
    & .discovery-workspace {
      grid-template-columns: 1fr;
    }
    & .discovery-workspace[data-view="list"] .discovery-map {
      display: none;
    }
    & .discovery-workspace[data-view="map"][data-has-results="true"] .discovery-list {
      display: none;
    }
  }
  @media (max-width: 600px) {
    padding-block: 28px 48px;
    & .journey-current {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    & .journey-current .button {
      grid-column: 1;
      grid-row: auto;
      margin-top: 12px;
    }
    & .checklist-item summary {
      grid-template-columns: 1fr auto;
    }
    & .checklist-item summary strong {
      grid-column: 1 / -1;
    }
    & .checklist-item form .grid {
      grid-template-columns: 1fr;
    }
    & .discovery-workspace[data-view="list"] .discovery-list {
      grid-template-columns: 1fr;
    }
    & .listing-fields {
      grid-template-columns: 1fr;
      gap: 20px;
    }
    & .page-heading {
      margin-bottom: 24px;
      padding-bottom: 20px;
    }
    & .page-heading .intro {
      font-size: 14px;
    }
    & :is(.card, .condition-form) {
      padding: 20px;
    }
    & .empty {
      padding: 32px 24px;
    }
    & .condition-form > .primary {
      width: 100%;
    }
    & #profile-form fieldset {
      grid-template-columns: 1fr;
    }
    & #profile-form fieldset .choice {
      min-height: 56px;
    }
    & .grid {
      gap: 16px;
    }
    & .personal-preferences .preference-grid {
      grid-template-columns: 1fr;
    }
    & .personal-preferences .preference-grid > section {
      padding: 20px 0;
    }
    & .personal-preferences .preference-grid > section + section {
      border-left: 0;
      border-top: 1px solid var(--line);
    }
    & .catalogue-nav {
      width: 100%;
      justify-content: space-between;
    }
    & .catalogue-nav a {
      font-size: 12px;
      padding: 10px;
    }
    & .sh-notice-access {
      align-items: flex-start;
      flex-direction: column;
      gap: 12px;
    }
    & #catalogue-host #notice-search {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      padding: 20px;
    }
    & #notice-search > label:has(select[name="kind"]),
    & #notice-search > label:has(input[type="date"]),
    & #notice-search > button {
      grid-column: 1 / -1;
    }
    & .discovery-recent {
      justify-content: flex-start;
      gap: 16px;
    }
    & .discovery-result-heading {
      flex-direction: column;
      gap: 16px;
    }
    & .discovery-workspace[data-has-results="false"] .empty {
      min-height: 240px;
      padding: 32px 24px;
    }
    & .help-questions {
      padding-inline: 20px;
    }
    & .onboarding-progress nav a {
      padding-inline: 4px;
      font-size: 12px;
    }
  }
}
/* Shared task layouts: scoped away from the homepage. */
main[data-page]:not([data-page="home"]) {
  & :is(#profile-form, #budget-form) > a.button {
    min-width: 44px;
    padding-inline: 12px;
  }
  & .condition-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  & .condition-summary .condition-places {
    grid-column: 1 / -1;
  }
  & .account-preferences {
    margin-top: 32px;
  }
  & .account-preferences > summary {
    font-size: 18px;
    font-weight: 700;
  }
  & .account-preferences .personal-preferences {
    margin-top: 24px;
  }
  & .record-context {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
  & :is(#note-form, #visit-form) {
    gap: 20px;
  }
  & :is(#note-form, #visit-form) p {
    margin: 0;
  }
  & .visit-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }
  & .visit-topics .choice {
    min-height: 44px;
    margin: 0;
  }
  & .activity-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-top: 32px;
  }
  & .activity-links h2 {
    font-size: 18px;
  }
  & .activity-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
  }
  & .journey-steps {
    grid-template-columns: 1fr;
    gap: 12px;
    counter-reset: journey-step;
  }
  & .journey-steps .card {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 24px;
  }
  & .journey-steps .card[aria-current="step"] {
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
  }
  & .journey-steps h2 {
    margin: 0;
    font-size: 19px;
  }
  & .journey-steps h2::before {
    counter-increment: journey-step;
    content: counter(journey-step, decimal-leading-zero);
    display: inline-block;
    margin-right: 12px;
    color: var(--muted);
    font-size: 14px;
  }
  & .journey-steps .choice {
    grid-column: 1;
    min-height: 44px;
    margin: 0;
  }
  & .journey-steps .actions {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
  }
  & .journey-steps [data-journey-recheck] {
    grid-column: 1 / -1;
    justify-self: start;
  }
  & .funding-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 24px 0;
  }
  & .funding-sections button {
    min-height: 44px;
    min-width: 0;
    padding-inline: 8px;
    word-break: keep-all;
  }
  & .funding-group,
  & #funding-results {
    scroll-margin-top: 100px;
  }
  & .funding-page .condition-form {
    max-width: none;
  }
  & .funding-page .field-error {
    display: block;
    margin-top: 8px;
  }
  & [aria-invalid="true"] {
    border-color: #b42318;
    outline-color: #b42318;
  }
  & .finance-filter-group {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    margin-bottom: 24px;
  }
  & .finance-filter-group h2 {
    font-size: 18px;
    margin: 0 0 16px;
  }
  & .finance-filter-group .toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 16px;
    margin: 0;
  }
  & .finance-filter-group .toolbar label {
    min-width: 0;
    width: auto;
  }
  & .finance-filter-group .toolbar > button {
    min-height: 48px;
  }
  & .finance-filter-group .toolbar:has(#rate-filter) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }
  & .finance-filter-group .meta:last-child {
    margin-bottom: 0;
  }
  & .comparison-guide-container {
    margin-top: 24px;
  }
  &[data-page="public"] {
    max-width: 800px;
  }
  &[data-page="public"] .page-heading {
    text-align: left;
  }
  &[data-page="public"] :is(button, .button) {
    border-radius: 10px;
  }
  &[data-page="guide"] .public-guide {
    max-width: 880px;
    margin-inline: auto;
  }
  &[data-page="guide"] .public-guide > h1 {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
  }
  @media (max-width: 768px) {
    & .activity-links {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    & .journey-steps .card {
      grid-template-columns: 1fr;
    }
    & .journey-steps .actions {
      grid-column: 1;
      grid-row: auto;
    }
    & .finance-filter-group .toolbar,
    & .finance-filter-group .toolbar:has(#rate-filter) {
      grid-template-columns: 1fr;
    }
    & .finance-filter-group {
      padding: 20px;
    }
  }
}
main[data-page]:not([data-page="home"]) {
  & .finance-filter-group .toolbar {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
  @media (max-width: 1599px) {
    & .compare .comparison-extra {
      /* Keep the selected pair even when the legacy mobile cells use !important. */
      display: none !important;
    }
  }
  @media (max-width: 600px) {
    & .comparison-cell-label {
      /* Override the legacy mobile table's important inline label. */
      display: block !important;
      margin-bottom: 8px !important;
      width: fit-content;
    }
  }
}

/* Discovery, detail and comparison share a fact-first hierarchy. */
main[data-page]:not([data-page="home"]) {
  & .discovery-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin: 0 0 10px;
  }
  & .discovery-header {
    align-items: center;
    padding-bottom: 8px;
  }
  & .discovery-header h1 {
    font-size: 26px;
    letter-spacing: -0.04em;
  }
  & .discovery-recent {
    margin-block: 0 8px;
  }
  & .discovery-controls {
    padding: 20px;
    background: #fff;
  }
  & .discovery-controls .discovery-filter-grid {
    gap: 12px;
  }
  & .discovery-controls label {
    gap: 6px;
    font-size: 13px;
  }
  & .discovery-filter-panel > details > summary {
    font-size: 15px;
  }
  & .discovery-filter-panel > details > summary .meta {
    display: none;
  }
  & .discovery-preferences-link {
    display: block;
    font-size: 13px;
  }
  & .discovery-result-heading {
    align-items: start;
    gap: 16px;
    padding-bottom: 16px;
  }
  & .result-count {
    color: var(--accent);
    margin-left: 6px;
  }
  & .discovery-view-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    background: #fff;
  }
  & .discovery-view-switch button {
    border: 0;
    background: transparent;
    min-height: 38px;
  }
  & .discovery-view-switch button[aria-pressed="true"] {
    background: var(--dark-navy);
    color: #fff;
  }
  & .discovery-list .card {
    padding: 20px;
    box-shadow: none;
    border-radius: 14px;
    transition: border-color 0.15s ease;
  }
  & .discovery-list .card:hover {
    border-color: #a0a5b3;
  }
  & .property-card-heading {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: start;
  }
  & .property-type {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  & .discovery-list .property-card-heading h3 {
    margin: 6px 0 0;
  }
  & .property-card-heading .property-title {
    all: unset;
    display: inline-block;
    color: var(--dark-navy);
    font-family: inherit;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 750;
    cursor: pointer;
    min-height: 32px;
  }
  & .property-title:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  & .property-title:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    border-radius: 3px;
  }
  & .property-number {
    color: #656b7e;
    background: #f1f3f8;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
  }
  & .property-address {
    color: var(--muted);
    font-size: 13px;
    margin: 2px 0 12px;
  }
  & .discovery-list .card .discovery-price {
    font-size: 26px;
    letter-spacing: -0.04em;
    margin: 0 0 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
  }
  & .discovery-list .discovery-price + p {
    font-size: 13px;
    margin: 0;
  }
  & .property-record-count {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
  }
  & .property-record-count strong {
    color: var(--dark-navy);
  }
  & .discovery-list .card > .actions {
    display: flex;
    flex-wrap: wrap;
    padding-top: 12px;
    gap: 6px;
  }
  & .discovery-list .card > .actions button {
    width: auto;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    min-width: 0;
    flex: 0 1 auto;
  }
  & .discovery-list .card > .actions .primary {
    margin-right: auto;
    flex: 1 1 auto;
    background: var(--accent-soft);
    color: var(--accent);
    border-color: transparent;
  }
  & .discovery-skeleton {
    min-height: 275px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
      linear-gradient(#eceef3 0 0) 24px 30px / 45% 20px no-repeat,
      linear-gradient(#eceef3 0 0) 24px 95px / 65% 32px no-repeat,
      linear-gradient(#eceef3 0 0) 24px 155px / 80% 14px no-repeat,
      #fff;
  }
  & .discovery-workspace[data-has-results="false"] {
    grid-template-columns: 1fr;
  }
  & .discovery-workspace[data-has-results="false"] .empty {
    min-height: 220px;
  }
  & #discovery-detail {
    width: min(1040px, calc(100vw - 48px));
    max-height: 90dvh;
    border-radius: 18px;
    background: #fff;
  }
  & .discovery-detail-content {
    padding: 24px 32px 0;
  }
  & .property-detail-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
  }
  & .property-detail-topline button {
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 12px;
    min-height: 44px;
    padding: 8px 12px;
  }
  & .property-detail-heading {
    display: block;
    position: static;
    background: none;
    padding: 24px 0;
    border: 0;
    box-shadow: none;
  }
  & .property-detail-heading h2 {
    font-size: 30px;
    letter-spacing: -0.04em;
    margin: 0 0 8px;
  }
  & .property-detail-heading > p:last-child {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
  }
  & .property-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: 32px;
    align-items: start;
  }
  & .property-detail-layout > div {
    min-width: 0;
  }
  & .property-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px;
    background: #f3f5f9;
    border-radius: 12px;
  }
  & .property-facts > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  & .property-facts span,
  & .property-facts small {
    font-size: 12px;
    font-weight: 400;
    color: #60677c;
  }
  & .property-facts strong {
    font-size: 21px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
  }
  & .property-facts strong small {
    margin-left: 4px;
  }
  & .property-fact-price {
    grid-column: 1 / -1;
    padding-bottom: 20px;
    border-bottom: 1px solid #dce0e8;
  }
  & .property-fact-price strong {
    font-size: clamp(23px, 2.5vw, 30px);
    color: var(--dark-navy);
    letter-spacing: -0.04em;
  }
  & .property-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 28px 0 16px;
  }
  & .property-section-heading h3 {
    font-size: 20px;
    margin: 0 0 6px;
  }
  & .property-section-heading .meta {
    margin: 0;
    font-size: 12px;
  }
  & .property-section-heading label {
    font-size: 12px;
    min-width: 125px;
  }
  & .transaction-table-wrap {
    overflow: auto;
    border-block: 1px solid var(--border);
  }
  & .transaction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  & .transaction-table caption {
    text-align: left;
    padding: 12px 0;
    color: var(--muted);
    font-size: 12px;
  }
  & .transaction-table th,
  & .transaction-table td {
    text-align: left;
    padding: 14px 10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    vertical-align: top;
  }
  & .transaction-table th {
    background: #f8f9fc;
    color: var(--muted);
    font-weight: 500;
    font-size: 12px;
  }
  & .transaction-table td .meta {
    display: block;
    font-size: 11px;
    margin-top: 4px;
  }
  & .transaction-table td strong {
    font-size: 15px;
    white-space: nowrap;
  }
  & .transaction-table details summary {
    font-size: 12px;
    min-height: 44px;
    padding-block: 12px;
    margin-top: 6px;
  }
  & #discovery-detail .transaction-table .lease-price {
    padding: 0;
    border: 0;
    background: none;
    gap: 4px;
  }
  & #discovery-detail .transaction-table .lease-previous,
  & #discovery-detail .transaction-table .lease-price-label,
  & #discovery-detail .transaction-table .lease-price > small {
    font-size: 12px;
  }
  & .transaction-table td:first-child {
    white-space: nowrap;
  }
  & .property-evidence {
    padding: 12px 0 24px;
    font-size: 12px;
    color: var(--muted);
  }
  & .property-evidence summary {
    min-height: 44px;
    padding-top: 10px;
  }
  & .property-next-step {
    border-left: 1px solid var(--line);
    padding: 4px 0 0 24px;
  }
  & .property-next-step h3 {
    font-size: 24px;
    line-height: 1.45;
    letter-spacing: -0.035em;
    margin: 0 0 16px;
  }
  & .property-next-step p {
    font-size: 13px;
    color: var(--muted);
  }
  & .property-next-step ol {
    padding-left: 20px;
    margin: 24px 0;
  }
  & .property-next-step li {
    padding-left: 6px;
    margin-bottom: 20px;
    font-size: 13px;
  }
  & .property-next-step li::marker {
    color: var(--accent);
    font-weight: 700;
  }
  & .property-next-step li span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
  }
  & .discovery-detail-actions {
    bottom: 0;
    margin: 0;
    padding: 16px 0;
    background: #fff;
    justify-content: flex-end;
    gap: 8px;
  }
  & .discovery-detail-actions > span {
    margin-right: auto;
    color: var(--muted);
    font-size: 13px;
  }
  & .comparison-controls {
    gap: 16px;
    margin-block: 24px;
  }
  & .comparison-candidate {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
  }
  & .comparison-candidate.is-base {
    border-top: 3px solid var(--accent);
    padding-top: 20px;
  }
  & .comparison-candidate label {
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
  }
  & .comparison-candidate select {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-navy);
    background-color: #f8f9fc;
  }
  & .comparison-candidate-facts {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 12px;
    margin-top: 20px;
  }
  & .comparison-candidate-facts > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  & .comparison-candidate-facts span {
    font-size: 12px;
    color: var(--muted);
  }
  & .comparison-candidate-facts strong {
    font-size: clamp(18px, 2vw, 26px);
    letter-spacing: -0.035em;
  }
  & .comparison-candidate-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
  }
  & .comparison-candidate-footer .meta {
    font-size: 12px;
  }
  & .comparison-candidate-footer button {
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 12px;
    padding: 8px 12px;
    min-height: 44px;
  }
  & .diff-summary-header {
    display: flex;
    gap: 16px;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  & .diff-summary-header h2 {
    font-size: 21px;
    margin: 0;
  }
  & .diff-summary-header p {
    margin: 0;
    font-size: 12px;
  }
  & .diff-value {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    font-weight: 400;
  }
  & .diff-number {
    font-size: 25px;
    font-weight: 750;
    color: var(--accent);
    letter-spacing: -0.04em;
  }
  & .diff-summary-grid .diff-card {
    gap: 14px;
  }
  & .comparison-guide-container {
    margin-block: 28px;
  }
  @media (max-width: 900px) {
    & .property-detail-layout {
      grid-template-columns: 1fr;
      gap: 0;
    }
    & .property-next-step {
      display: none;
    }
    & .comparison-candidate {
      padding: 18px;
    }
    & .comparison-candidate.is-base {
      padding-top: 16px;
    }
    & .comparison-candidate-footer {
      flex-direction: column;
      align-items: flex-start;
    }
    & .diff-summary-grid .diff-card:nth-child(n + 4) {
      grid-column: 1 / -1;
      border-top: 0;
    }
    & .diff-summary-grid .diff-card {
      display: grid;
      grid-template-columns: 110px 1fr;
      gap: 16px;
    }
    & .diff-category {
      font-size: 12px;
    }
    & .diff-number {
      font-size: 22px;
    }
    & .diff-value {
      gap: 6px;
    }
  }
  @media (max-width: 600px) {
    & .discovery-header {
      gap: 12px;
      padding-bottom: 12px;
    }
    & .discovery-header .intro {
      display: none;
    }
    & .discovery-header .discovery-eyebrow {
      display: none;
    }
    & .discovery-controls-toggle {
      padding: 14px 16px;
      min-height: 52px;
    }
    & .discovery-controls-toggle .meta {
      display: inline;
      margin: 0 0 0 10px;
      font-size: 11px;
    }
    & .discovery-recent {
      gap: 12px;
      justify-content: flex-start;
      margin: 8px 0 12px;
    }
    & .discovery-recent > a:last-child {
      margin-left: auto;
    }
    & .discovery-result-heading {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      margin-bottom: 16px;
      padding-bottom: 12px;
    }
    & .discovery-result-heading > .actions {
      width: auto;
      align-self: start;
      grid-column: 2;
      grid-row: 1;
    }
    & .discovery-result-heading > div:first-child {
      display: contents;
    }
    & .discovery-result-heading > div:first-child > :not(h2) {
      grid-column: 1 / -1;
      margin-top: 0;
    }
    & .discovery-result-heading h2 {
      font-size: 20px;
    }
    & .discovery-result-heading .meta {
      font-size: 11px;
    }
    & .discovery-result-heading button {
      min-width: 48px;
      padding-inline: 10px;
    }
    & .discovery-list .card {
      padding: 20px;
    }
    & .discovery-list .card .discovery-price {
      font-size: 25px;
    }
    & #discovery-detail {
      width: 100%;
      max-width: 100%;
      max-height: 94dvh;
      border-radius: 18px 18px 0 0;
      margin: auto 0 0;
    }
    & .discovery-detail-content {
      padding: 16px 20px 0;
    }
    & .property-detail-topline {
      gap: 8px;
    }
    & .property-detail-topline > span {
      font-size: 11px;
    }
    & .property-detail-topline button {
      padding-inline: 8px;
      font-size: 11px;
    }
    & .property-detail-heading {
      padding-block: 20px;
    }
    & .property-detail-heading h2 {
      font-size: 26px;
    }
    & .property-facts {
      padding: 20px;
      gap: 16px;
    }
    & .property-section-heading {
      align-items: flex-start;
      flex-direction: column;
      gap: 12px;
    }
    & .property-section-heading label {
      flex-direction: row;
      align-items: center;
      width: 100%;
    }
    & .property-section-heading select {
      flex: 1;
      width: auto;
    }
    & .transaction-table th,
    & .transaction-table td {
      padding: 12px 6px;
      font-size: 12px;
    }
    & .transaction-table td strong {
      font-size: 14px;
    }
    & .discovery-detail-actions {
      flex-wrap: nowrap;
      padding-block: 14px calc(14px + env(safe-area-inset-bottom));
    }
    & .discovery-detail-actions > span {
      display: none;
    }
    & .discovery-detail-actions button {
      font-size: 12px;
      padding-inline: 10px;
      min-width: 0;
    }
    & .discovery-detail-actions .primary {
      flex: 1;
    }
    & .comparison-controls {
      gap: 10px;
    }
    & .comparison-candidate {
      padding: 14px 12px;
      min-width: 0;
    }
    & .comparison-candidate.is-base {
      padding-top: 12px;
    }
    & .comparison-candidate select {
      font-size: 14px;
      padding-left: 8px;
    }
    & .comparison-candidate-facts {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    & .comparison-candidate-facts strong {
      font-size: 18px;
    }
    & .comparison-candidate-footer {
      gap: 8px;
    }
    & .discovery-detail-actions button {
      width: auto;
      border-radius: 8px;
    }
    & .comparison-candidate-footer button {
      padding-inline: 8px;
    }
  }
}
main[data-page]:not([data-page="home"]) {
  & .discovery-controls .discovery-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  & .discovery-filter-panel > details > .discovery-filter-grid > label:first-child,
  & .discovery-filter-panel > details > .discovery-filter-grid > label:last-child,
  & .discovery-filter-panel > details > .discovery-filter-grid > label:nth-child(4) {
    grid-column: 1 / -1;
  }
  & .discovery-controls :is(input, select) {
    font-size: 14px;
    min-width: 0;
  }
  & .discovery-controls .discovery-filter-actions {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  & .discovery-controls .discovery-filter-actions button {
    width: auto;
    padding-inline: 10px;
    border-radius: 8px;
    font-size: 13px;
  }
  & .discovery-controls .discovery-filter-actions .primary {
    flex: 1;
  }
}
html:has(#discovery-detail[open]) {
  overflow: hidden;
}
@media (max-height: 500px) {
  main[data-page]:not([data-page="home"]) {
    & #discovery-detail {
      max-height: calc(100dvh - 16px);
    }
    & .discovery-detail-content {
      padding: 12px 20px 0;
    }
    & .property-detail-heading {
      padding-block: 10px;
    }
    & .property-detail-heading h2 {
      font-size: 24px;
      margin-bottom: 4px;
    }
    & .property-detail-heading .discovery-eyebrow,
    & .discovery-detail-actions > span {
      display: none;
    }
    & .property-facts {
      padding: 16px;
      gap: 12px;
    }
    & .discovery-detail-actions {
      padding-block: 8px;
    }
  }
}
@media (max-width: 600px) {
  main[data-page="explore"]:not([data-page="home"]) {
    padding-top: 20px;
  }
}

/* Keep the discovery workspace dense enough for scanning on a desktop, while
   giving tablet filters their own grid rather than stretching the sidebar. */
main[data-page="explore"]:not([data-page="home"]) {
  width: min(calc(100% - 64px), 1600px);
  padding-top: 24px;

  & .discovery-header .intro {
    margin-top: 6px;
    font-size: 14px;
  }
  & .discovery-result-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  & .discovery-controls :is(input, select) {
    min-height: 44px;
    padding-block: 10px;
  }
  & .discovery-filter-panel > details > .discovery-filter-grid > label:nth-child(5) {
    grid-column: 1 / -1;
  }
  @media (min-width: 1200px) {
    & .discovery-layout {
      grid-template-columns: 320px minmax(0, 1fr);
    }
    & .discovery-controls {
      padding: 16px;
    }
    & .discovery-filter-panel > details > .discovery-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    & .discovery-result-heading > div:first-child {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 6px 16px;
    }
    & .discovery-result-heading .meta {
      margin: 0;
    }
    & .discovery-result-heading .meta:nth-of-type(2) {
      flex-basis: 100%;
    }
  }
  & .discovery-map {
    top: 84px;
    padding: 16px;
  }
  & .discovery-map h3 {
    margin-top: 0;
  }
  & .discovery-map .candidate-map {
    height: clamp(320px, calc(100dvh - 340px), 640px);
  }
  & .discovery-list .property-card-heading > div {
    min-width: 0;
  }
  & .property-number {
    flex-shrink: 0;
  }
  & .property-title {
    overflow-wrap: anywhere;
  }
  @media (max-width: 1199px) {
    & .discovery-filter-panel > details > summary {
      display: none;
    }
    & .discovery-filter-panel > details > .discovery-filter-grid {
      margin-top: 0;
    }
  }
  @media (min-width: 768px) and (max-width: 1199px) {
    width: calc(100% - 48px);

    & .discovery-header {
      grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr);
      gap: 24px;
    }
    & .discovery-layout {
      gap: 16px;
    }
    & .discovery-controls-toggle {
      padding: 12px 16px;
      min-height: 52px;
    }
    & .discovery-controls-toggle .meta {
      display: inline;
      margin-left: 12px;
    }
    & .discovery-controls .discovery-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    &
      .discovery-filter-panel
      > details
      > .discovery-filter-grid
      > label:is(:nth-child(4), :nth-child(5)) {
      grid-column: auto;
    }
    & .discovery-range .discovery-filter-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    & .discovery-controls .discovery-filter-actions {
      justify-content: flex-end;
    }
    & .discovery-controls .discovery-filter-actions .primary {
      flex: none;
      min-width: 180px;
    }
  }
  @media (max-width: 767px) {
    width: calc(100% - 32px);
    padding-top: 20px;

    & .discovery-header {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    & .discovery-header .intro {
      display: none;
    }
    & .discovery-layout {
      gap: 16px;
    }
    & .discovery-workspace[data-view="list"] .discovery-list {
      grid-template-columns: 1fr;
    }
    & .discovery-controls :is(input, select) {
      font-size: 16px;
    }
    & .discovery-controls .discovery-filter-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    & .discovery-list .card {
      padding: 18px;
    }
    & .discovery-map .candidate-map {
      height: clamp(280px, 45dvh, 520px);
    }
  }
  @media (max-width: 359px) {
    & .discovery-filter-panel > details > .discovery-filter-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }
}

/* Two candidates remain aligned in tablet tables. Narrow screens retain the
   existing labelled cards; their supporting text belongs beside its value. */
main[data-page]:not([data-page="home"]) {
  @media (min-width: 768px) and (max-width: 1199px) {
    padding-top: 28px;
    & .funding-group,
    & #funding-results {
      scroll-margin-top: 124px;
    }
    & .discovery-map {
      top: 120px;
    }
    & .compare th,
    & .compare td {
      min-width: 0;
      padding: 18px 16px;
      overflow-wrap: anywhere;
    }
    & .compare th:first-child {
      width: 140px;
      padding: 18px 16px;
    }
    & .comparison-candidate-footer {
      flex-direction: row;
      align-items: center;
    }
    & .diff-summary-grid {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    & .diff-summary-grid .diff-card {
      display: flex;
      grid-column: span 2;
      border-bottom: 0;
      padding: 18px;
      gap: 12px;
    }
    & .diff-summary-grid .diff-card + .diff-card {
      border-left: 1px solid var(--line);
    }
    & .diff-summary-grid .diff-card:nth-child(n + 4) {
      grid-column: span 3;
      border-top: 1px solid var(--line);
    }
    & .diff-summary-grid .diff-card:nth-child(4) {
      border-left: 0;
    }
  }
  @media (max-width: 900px) {
    & .diff-summary-grid .diff-card > .meta {
      grid-column: 2;
    }
  }
  @media (max-width: 767px) {
    & :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
      font-size: 16px;
    }
    & .diff-summary-grid .diff-card {
      grid-template-columns: 80px minmax(0, 1fr);
      gap: 8px 12px;
      padding: 16px;
    }
    & .diff-category {
      word-break: keep-all;
    }
    & .funding-sections button {
      font-size: 12px;
    }
  }
}

/* Saved homes: keep finding, selecting and comparing in the same workspace. */
main[data-page]:not([data-page="home"]) .home-library {
  & .page-heading {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }
  & .tab-switch a[aria-current="page"] {
    background: var(--dark-navy);
    border-color: var(--dark-navy);
    color: white;
  }
  & .library-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(160px, 220px);
    align-items: end;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }
  & .library-search label {
    min-width: 0;
  }
  & .library-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
    padding: 20px;
    border-radius: 16px;
    background: var(--accent-soft);
  }
  & .library-selection p {
    margin: 6px 0 0;
  }
  & .library-selection.is-empty {
    margin: 16px 0;
    padding: 0;
    background: transparent;
  }
  & .library-selection .actions {
    margin: 0;
  }
  & .library-card {
    display: flex;
    flex-direction: column;
  }
  & .library-card > .actions {
    margin-top: auto;
    padding-top: 16px;
  }
  & .library-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-bottom: 12px;
    cursor: pointer;
  }
  & .library-choice input {
    width: 20px;
    height: 20px;
    flex: none;
  }
  & .library-choice .badge {
    margin-left: auto;
  }
  & .library-facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin: 12px 0;
    padding: 16px 0;
    border-block: 1px solid var(--line);
  }
  & .library-facts dt {
    color: var(--muted);
    font-size: 13px;
  }
  & .library-facts dd {
    margin: 6px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  @media (max-width: 767px) {
    & .library-search {
      grid-template-columns: minmax(0, 1fr) auto;
      padding: 16px;
    }
    & .library-search label:last-child {
      grid-column: 1 / -1;
    }
    & .library-selection {
      padding: 16px;
    }
    & .library-selection .actions {
      width: 100%;
    }
    & .library-selection .primary {
      flex: 1;
    }
  }
}

/* Supply workspace: a visual introduction, bounded filters and scannable notices. */
main[data-page="supply"] #catalogue-host[data-catalogue-page="supply"] {
  & .catalogue-heading {
    margin-bottom: 24px;
    padding-bottom: 0;
    border: 0;
  }
  & .supply-intro {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    overflow: hidden;
    border-radius: 20px;
    background: #edf0f4;
    margin-bottom: 36px;
  }
  & .supply-intro-copy {
    padding: 22px 28px;
    align-self: center;
  }
  & .supply-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
  }
  & .supply-intro h2 {
    font-size: clamp(24px, 2vw, 28px);
    line-height: 1.3;
    letter-spacing: -0.045em;
    margin: 8px 0;
  }
  & .supply-intro p {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 4px;
  }
  & .supply-intro a,
  & .supply-source-access a {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 20px;
  }
  & .supply-city {
    position: relative;
    margin: 0;
    min-height: 190px;
    background: #17324e;
  }
  & .supply-city img {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: center 65%;
  }
  & .supply-city figcaption {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 10px;
    color: white;
    background: #102233e6;
    padding: 5px 8px;
    border-radius: 4px;
  }
  & .supply-workspace {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }
  & .supply-sidebar {
    min-width: 0;
  }
  & .supply-filters {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin: 0;
    background: white;
  }
  & .supply-filters > summary {
    font-weight: 700;
    font-size: 15px;
    min-height: 28px;
  }
  & .supply-filters > summary span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }
  & #notice-search {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 0;
    border: 0;
    box-shadow: none;
    margin: 20px 0 0;
    background: transparent;
    border-radius: 0;
  }
  & #notice-search > label,
  & #notice-search > button {
    grid-column: auto;
  }
  & #notice-search input,
  & #notice-search select {
    width: 100%;
    min-height: 44px;
    font-size: 13px;
  }
  & #notice-search button {
    width: 100%;
    margin-top: 4px;
    border-radius: 10px;
  }
  & .supply-filter-note {
    font-size: 12px;
    color: var(--muted);
    margin: 16px 0 0;
  }
  & .supply-source-access {
    padding: 24px 8px;
  }
  & .supply-source-access h3 {
    font-size: 15px;
    margin: 14px 0 8px;
  }
  & .supply-source-access p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
  }
  & .supply-results {
    min-width: 0;
  }
  & .supply-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
  }
  & .supply-results-heading h2 {
    margin: 0;
    font-size: 22px;
  }
  & .supply-results-heading h2 span {
    color: var(--accent);
    padding-left: 6px;
  }
  & .supply-results-heading p {
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 0;
  }
  & .supply-results-heading label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  & #notice-status {
    width: 158px;
    min-height: 44px;
    margin: 0;
    font-size: 13px;
  }
  & .supply-results > .meta,
  & .catalogue-source-notes {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
  }
  & .catalogue-source-notes {
    margin: 24px 0 16px;
  }
  & .notice-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 0;
  }
  & .notice-card {
    padding: 24px;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px #1a1a2e04;
  }
  & .notice-badges {
    align-items: center;
    justify-content: space-between;
  }
  & .notice-card h2 {
    font-size: 20px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  & .notice-address {
    color: var(--muted);
    font-size: 13px;
  }
  & .catalogue-facts {
    grid-template-columns: 100px minmax(0, 1fr);
    background: #f6f7f9;
    border: 0;
    border-radius: 10px;
    padding: 16px;
    margin: 4px 0;
    gap: 8px;
  }
  & .catalogue-facts dt {
    font-size: 12px;
  }
  & .notice-period strong {
    font-variant-numeric: tabular-nums;
  }
  & .notice-publication {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
    margin: 12px 0;
  }
  & .notice-publication dd {
    margin: 0;
  }
  & .notice-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
  }
  & .notice-actions > .button,
  & .notice-actions > button {
    width: auto;
    min-height: 44px;
    font-size: 13px;
    border-radius: 8px;
    padding: 10px 16px;
  }
  & .notice-original {
    background: var(--dark-navy);
    color: white;
    border-color: var(--dark-navy);
  }
  & .supply-pagination {
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    gap: 20px;
    font-size: 13px;
  }
  & .supply-pagination > button {
    width: auto;
    flex: 0 1 auto;
    padding: 10px 14px;
  }
  & .supply-save-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 20px;
  }
  & .supply-empty {
    text-align: center;
    padding: 44px 24px;
    border: 1px dashed var(--border);
    background: white;
    border-radius: 16px;
  }
  & .supply-empty > span {
    font-size: 40px;
    color: var(--muted);
  }
  & .supply-empty h3 {
    margin: 12px 0 8px;
    font-size: 18px;
  }
  & .supply-empty p {
    color: var(--muted);
    font-size: 14px;
  }
  @media (max-width: 899px) {
    & .supply-workspace {
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }
    & .supply-sidebar {
      display: contents;
    }
    & .supply-results {
      order: 1;
    }
    & .supply-source-access {
      order: 2;
      padding: 20px 4px 0;
    }
    & .supply-source-access h3,
    & .supply-source-access .notice-provider {
      display: inline-block;
      margin: 0 8px 6px 0;
    }
    & #notice-search {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    & .supply-intro-copy {
      padding: 24px;
    }
  }
  @media (max-width: 599px) {
    & .supply-intro {
      grid-template-columns: minmax(0, 1fr);
      margin-bottom: 24px;
    }
    & .supply-intro-copy {
      padding: 22px;
    }
    & .supply-intro h2 {
      font-size: 23px;
    }
    & .supply-city {
      min-height: 88px;
    }
    & .supply-city img {
      object-position: center 70%;
    }
    & .supply-intro p {
      margin-bottom: 8px;
    }
    & .supply-results-heading {
      align-items: flex-start;
    }
    & .supply-results-heading label {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
    }
    & #notice-status {
      width: 140px;
    }
    & .notice-card {
      padding: 20px;
    }
    & .notice-card h2 {
      font-size: 18px;
    }
    & .catalogue-facts {
      grid-template-columns: minmax(0, 1fr);
      padding: 14px;
    }
    & .notice-actions > .button,
    & .notice-actions > button {
      flex: 1 1 auto;
    }
  }
}
.notice-provider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark-navy);
}
.notice-provider::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #66758b;
}
.notice-provider[data-provider="lh"]::before {
  background: #9c6424;
}
.notice-provider[data-provider="sh"]::before {
  background: #386c74;
}

/* Shared workspace, September 2026: quiet surfaces, clear task hierarchy. */
main[data-page]:not([data-page="home"]) {
  padding-top: 24px;
  & .page-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
  }
  & .page-context-location {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }
  & .page-context-location a {
    display: flex;
    padding: 8px;
    margin-left: -8px;
  }
  & .page-context nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  & .page-context nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
  }
  & .page-context nav a[aria-current="page"] {
    color: var(--dark-navy);
    background: #e9edf2;
    font-weight: 700;
  }
  & .page-context nav a:hover {
    background: #eef0f4;
  }
  & .page-context nav a::after {
    display: none;
  }
  & .page-heading {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 28px;
  }
  & h1 {
    font-weight: 750;
    letter-spacing: -0.05em;
  }
  & h2 {
    font-weight: 700;
  }
  & :is(.card, .condition-form, .location-map-panel) {
    border-radius: 14px;
    border-color: #e2e6ec;
    box-shadow: 0 3px 14px #17273e04;
  }
  & :is(button, .button):not(.login-provider-btn) {
    border-radius: 9px;
    font-weight: 600;
  }
  & :is(input, select, textarea):focus-visible {
    outline: 3px solid #b7405726;
    outline-offset: 2px;
    border-color: var(--accent);
  }
  & .side-guide-panel {
    background: #edf1f5;
    border: 0;
    border-radius: 14px;
    padding: 24px;
  }
  & .side-guide-panel h2 {
    font-size: 17px;
  }
  & .side-guide-panel p {
    font-size: 14px;
  }
  & .empty {
    background: linear-gradient(125deg, #fff 65%, #f1f4f8);
    border: 1px solid #e2e6ec;
    padding: 40px;
  }
  & .empty::before {
    content: "";
    display: block;
    width: 34px;
    height: 28px;
    border: 1.5px solid #9aa8b9;
    border-radius: 6px;
    background:
      linear-gradient(#e3e9f1, #e3e9f1) 7px 8px / 18px 2px no-repeat,
      linear-gradient(#e3e9f1, #e3e9f1) 7px 15px / 12px 2px no-repeat;
    margin-bottom: 18px;
  }
  & .empty h2 {
    font-size: 21px;
    margin-top: 0;
  }
  & .empty p {
    color: var(--muted);
    font-size: 14px;
  }
  & .menu-group {
    position: relative;
    padding: 30px;
    overflow: hidden;
  }
  & .menu-group h2 {
    font-size: 22px;
    margin-bottom: 8px;
  }
  & .menu-group::before {
    content: "";
    display: block;
    width: 36px;
    height: 5px;
    border-radius: 4px;
    background: #b74057;
    margin-bottom: 22px;
  }
  & .menu-group:nth-child(2)::before {
    background: #4f7189;
  }
  & .menu-group:nth-child(3)::before {
    background: #898067;
  }
  & .menu-group:nth-child(4)::before {
    background: #65817b;
  }
  & .menu-group nav a {
    padding: 14px 0;
    transition: color 160ms;
  }
  & .menu-group nav a:hover {
    color: var(--accent);
  }
  & .menu-group nav a span {
    color: #8c98a8;
  }
  & .activity-overview > a {
    padding: 30px;
    gap: 16px;
  }
  & .activity-overview > a:first-child {
    background: #202d42;
    color: #fff;
    border-color: #202d42;
  }
  & .activity-overview > a:first-child .meta {
    color: #c4cedc;
  }
  & .activity-overview strong {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
  }
  & .activity-links {
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  & .library-search {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  & .library-facts {
    background: #f3f5f8;
    padding: 16px;
    border-radius: 10px;
  }
  & .library-facts dd {
    font-variant-numeric: tabular-nums;
  }
  & .account-save,
  & .account-settings,
  & .account-preferences {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  & .account-records > h2 {
    font-size: 22px;
  }
  & .discovery-controls-panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--line);
  }
  & .discovery-header {
    border-bottom: 0;
  }
  & .discovery-controls {
    background: transparent;
  }
  & .journey-steps {
    gap: 16px;
  }
  & .journey-steps .card {
    background: #fff;
    border: 1px solid var(--line);
    padding: 24px;
  }
  & .journey-steps .card[aria-current="step"] {
    border-color: #b7405766;
    background: #fff8f9;
  }
  & .checklist-controls {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
  }
  & .checklist-item summary {
    padding-block: 4px;
  }
  & .funding-page .condition-form {
    max-width: none;
  }
  & .funding-group {
    min-width: 0;
  }
  & .compare :is(th, td) {
    font-variant-numeric: tabular-nums;
  }
  & .help-questions {
    border: 1px solid var(--line);
  }
  & .onboarding-progress {
    margin-block: 0 24px;
  }
}

@media (min-width: 1100px) {
  main[data-page="funding"] #funding-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    & > .actions,
    & > .funding-group:first-of-type {
      grid-column: 1 / -1;
    }
    & > .actions:empty {
      display: none;
    }
    & > .funding-group {
      padding: 0 0 16px;
    }
  }
}
@media (max-width: 899px) {
  main[data-page]:not([data-page="home"]) {
    & .page-context {
      align-items: flex-start;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 24px;
      padding-bottom: 12px;
    }
    & .page-context nav {
      max-width: 100%;
      gap: 0;
    }
    & .page-context nav a {
      padding: 9px 10px;
    }
    & .side-guide-panel {
      padding: 20px;
    }
  }
}
@media (max-width: 599px) {
  main[data-page]:not([data-page="home"]) {
    padding-top: 16px;
    & .page-context-location {
      font-size: 11px;
    }
    & .page-context {
      margin-bottom: 22px;
    }
    & .page-context nav {
      font-size: 11px;
    }
    & .page-context nav a {
      padding: 8px;
    }
    & .page-heading {
      margin-bottom: 24px;
    }
    & h1 {
      font-size: 28px;
    }
    & .card,
    & .menu-group,
    & .activity-overview > a {
      padding: 20px;
    }
    & .empty {
      padding: 28px 22px;
    }
    & .activity-links {
      padding: 20px;
    }
    & .checklist-controls {
      position: static;
      padding: 18px;
    }
    & .example-pair {
      grid-template-columns: 1fr;
    }
  }
}

/* Search controls have one scroll surface and a separate, always reachable footer.
   Card rows share tracks so optional renewal facts never offset neighborhood facts. */
main[data-page="explore"]:not([data-page="home"]) {
  & .discovery-controls-panel {
    overflow: visible;
    max-height: none;
  }
  & .discovery-controls {
    padding: 0;
    overflow: hidden;
  }
  & .discovery-controls-scroll {
    padding: 20px;
    min-height: 0;
  }
  & .discovery-filter-heading {
    font-size: 18px;
    margin: 0 0 16px;
  }
  & .discovery-filter-panel > details > summary {
    display: none;
  }
  & .discovery-filter-panel > details > .discovery-filter-grid {
    margin-top: 0;
  }
  & .discovery-controls .discovery-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  &
    .discovery-filter-panel
    > details
    > .discovery-filter-grid
    > label:is(:nth-child(2), :nth-child(3)) {
    grid-column: auto;
  }
  & .discovery-filter-panel > details > .discovery-filter-grid > label:first-child,
  & .discovery-period-group .discovery-filter-grid > label:last-child {
    grid-column: 1 / -1;
  }
  & .discovery-controls label {
    font-size: 13px;
  }
  & .discovery-controls .discovery-range,
  & .discovery-period-group {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 12px;
  }
  & .discovery-period-group h3 {
    font-size: 14px;
    margin: 4px 0 12px;
  }
  & .discovery-controls .discovery-range > summary {
    font-size: 14px;
    justify-content: space-between;
    list-style: none;
  }
  & .discovery-range > summary::after {
    content: "+";
    font-size: 20px;
    font-weight: 400;
  }
  & .discovery-range[open] > summary::after {
    content: "−";
  }
  & .discovery-controls .discovery-filter-actions {
    position: static;
    margin: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
  }
  &
    .discovery-controls-scroll
    > :is(.discovery-personal-bar, .discovery-starts, .discovery-notice-entry) {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 16px;
  }
  & .discovery-notice-entry > a,
  & .discovery-preferences-link {
    display: block;
    font-size: 13px;
    margin-top: 16px;
  }
  & .discovery-notice-entry details {
    font-size: 12px;
    color: var(--muted);
  }
  & .discovery-draft-chips:empty {
    display: none;
  }
  & .discovery-list .card {
    display: grid;
    grid-row: span 7;
    grid-template-rows: subgrid;
    row-gap: 0;
    min-width: 0;
  }
  & .property-identity {
    padding-bottom: 10px;
  }
  & .property-identity .property-address {
    margin-bottom: 0;
  }
  & .property-price-slot {
    padding-bottom: 10px;
  }
  & .property-price-slot .lease-price {
    margin: 0;
    height: auto;
    align-content: start;
    box-sizing: border-box;
  }
  & .property-card-facts > .property-size {
    margin-top: 0;
  }
  & .discovery-list .neighborhood-card {
    align-self: stretch;
  }
  & .discovery-list .property-record-count {
    border-top: 0;
    padding-top: 0;
  }
  & .property-personal-slot:empty {
    min-height: 0;
  }
  & .discovery-list .card > .actions {
    align-self: end;
    margin-top: 8px;
  }

  /* Use color for contract meaning, not a full-height empty price panel. */
  & .discovery-list .property-price-slot .lease-price {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 7px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }
  & .property-price-slot .lease-kind {
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.5;
    background: #edf6f2;
    color: #286357;
  }
  & .property-price-slot [data-contract-kind="renewal"] .lease-kind {
    background: #fbf3e5;
    color: #795c28;
  }
  & .property-price-slot [data-contract-kind="unknown"] .lease-kind {
    background: #f1f2f5;
    color: #606775;
  }
  & .property-price-slot .lease-price-label {
    align-self: center;
    font-size: 11px;
    color: var(--muted);
  }
  & .property-price-slot .lease-price > :is(strong, .lease-previous, .lease-check) {
    grid-column: 1 / -1;
  }
  & .property-price-slot .lease-price > strong {
    font-size: 28px;
    letter-spacing: -0.045em;
  }
  & .property-price-slot .lease-previous {
    font-size: 12px;
    color: var(--muted);
  }
  & .property-price-slot .lease-check {
    font-size: 12px;
    line-height: 1.5;
  }
  & .property-number {
    display: none;
  }
  & .property-identity .property-title {
    font-size: 18px;
    line-height: 1.4;
  }
  & .property-identity .property-address {
    font-size: 12px;
    margin-top: 5px;
  }
  & .property-card-facts > .property-size {
    font-size: 14px;
  }
  & .property-card-facts > .meta {
    font-size: 12px;
    margin-bottom: 0;
  }
  & .discovery-list .neighborhood-card {
    border: 0;
    background: var(--bg-page);
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    min-height: 0;
  }
  & .neighborhood-icon {
    display: none;
  }
  & .neighborhood-label {
    font-size: 11px;
  }
  & .neighborhood-station {
    margin-bottom: 12px;
  }
  & .neighborhood-station strong {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 10px;
    font-size: 14px;
  }
  & .neighborhood-station strong > span {
    font-size: 16px;
    margin-top: 0;
  }
  & .neighborhood-station > div {
    flex: 1;
  }
  & .neighborhood-facilities {
    gap: 8px;
  }
  & .neighborhood-facilities li {
    font-size: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 6px;
  }
  & .neighborhood-facilities li > div {
    gap: 2px 6px;
  }
  & .neighborhood-facilities a {
    color: var(--text-primary);
    text-decoration: none;
  }
  & .neighborhood-facilities a:hover {
    text-decoration: underline;
  }
  & .neighborhood-source summary {
    padding-block: 5px;
    font-size: 11px;
  }
  & .discovery-list .property-record-count {
    font-size: 12px;
    margin-top: 12px;
  }
  & .discovery-list .card > .actions {
    padding-top: 0;
    gap: 6px;
  }
  & .discovery-list .card > .actions button {
    min-height: 40px;
    padding: 8px 10px;
  }
  & .discovery-list .card > .actions .primary {
    background: transparent;
    color: var(--accent);
    padding-left: 0;
    text-align: left;
  }
  & .discovery-list .card > .actions .primary:hover {
    background: var(--accent-soft);
  }
  & .discovery-contract-filters {
    gap: 6px;
  }
  & .discovery-contract-filters button {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
  }
  & .discovery-choice {
    border: 0;
    padding: 0;
    margin: 18px 0 0;
    min-width: 0;
  }
  & .discovery-choice legend {
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    margin-bottom: 8px;
  }
  & .discovery-choice > div {
    display: flex;
    gap: 6px;
  }
  & .discovery-choice label {
    position: relative;
    flex: 1;
    margin: 0;
    cursor: pointer;
  }
  & .discovery-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    margin: 0;
  }
  & .discovery-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
  }
  & .discovery-choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 650;
  }
  & .discovery-choice input:focus-visible + span {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
  & .discovery-choice input:disabled + span {
    opacity: 0.55;
    cursor: wait;
  }
  & .discovery-period-group > summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 8px;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
  }
  & .discovery-period-group > summary::-webkit-details-marker {
    display: none;
  }
  & .discovery-period-group > summary::after {
    content: "+";
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 20px;
    font-weight: 400;
  }
  & .discovery-period-group[open] > summary::after {
    content: "−";
  }
  & .discovery-period-group > summary .meta {
    font-size: 12px;
    font-weight: 400;
    margin-top: 3px;
  }
  & .discovery-controls .discovery-range > summary {
    font-size: 13px;
  }
  & .discovery-controls-scroll {
    padding: 18px;
  }
  & .discovery-filter-heading {
    font-size: 16px;
    margin-bottom: 18px;
  }
  & .discovery-controls {
    border-radius: 12px;
  }
  & .discovery-controls :is(select, input[type="month"], input[type="number"]) {
    border-radius: 7px;
  }
  & .discovery-recent {
    font-size: 12px;
  }
  @media (min-width: 1200px) {
    & .discovery-layout {
      grid-template-columns: 280px minmax(0, 1fr);
    }

    & .discovery-controls {
      display: flex;
      flex-direction: column;
      max-height: calc(100dvh - 112px);
    }
    & .discovery-controls-scroll {
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-gutter: stable;
    }
  }
  @media (max-width: 767px) {
    & .discovery-controls-scroll {
      padding: 16px;
    }
    & .discovery-controls .discovery-filter-actions {
      padding: 12px 16px;
    }
    & .discovery-filter-heading {
      display: none;
    }
  }
}
