:root {
    color-scheme: light;
    --ink: #17202a;
    --muted: #66717d;
    --line: #e3e7ec;
    --paper: #f5f6f8;
    --panel: #ffffff;
    --night: #0d1524;
    --night-soft: #152033;
    --gold: #c9a24c;
    --gold-dark: #8f6823;
    --teal: #1f8a83;
    --blue: #477ad9;
    --coral: #d46a4c;
    --mint: #dff4ec;
    --soft-gold: #f5ecd7;
    --soft-blue: #e9f0fb;
    --soft-coral: #fae8e1;
    --danger: #a44826;
    --shadow: 0 1rem 2.5rem rgba(20, 30, 45, 0.08);
    --tight-shadow: 0 0.55rem 1.35rem rgba(20, 30, 45, 0.08);
    --public-wide: 82rem;
    --public-gutter: max(1rem, calc((100% - var(--public-wide)) / 2));
    --font-sans: "Aptos", "Segoe UI Variable", "Segoe UI", "Inter", "Roboto", "Noto Sans", "Noto Sans Thai", "Leelawadee UI", "Helvetica Neue", Arial, sans-serif;
    --font-display: "Aptos Display", "Segoe UI Variable Display", "Aptos", "Segoe UI", "Inter", "Roboto", "Noto Sans", "Noto Sans Thai", "Leelawadee UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--gold-dark);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

img {
    max-width: 100%;
}

.site-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.75rem;
    padding: 0 2rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.home-body .site-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(13, 21, 36, 0.28);
}

.brand {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.home-body .brand {
    color: #ffffff;
}

.nav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.home-body .nav a {
    color: #ffffff;
}

.nav a:hover {
    background: rgba(201, 162, 76, 0.12);
}

.page-shell {
    width: min(74rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.home-body .page-shell {
    width: 100%;
    padding: 0;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(74rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 2.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

.home-body .site-footer {
    margin-top: 0;
}

.footer-meta,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.footer-links {
    justify-content: flex-end;
}

.site-footer a {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
}

h1 {
    max-width: 54rem;
    font-size: clamp(2.45rem, 3.9rem, 4.25rem);
    overflow-wrap: anywhere;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.05rem;
}

.kicker {
    margin: 0 0 0.55rem;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lead {
    max-width: 44rem;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

button,
.button-link,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.72rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 8px;
    background: var(--gold);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button-link:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
}

.button-secondary {
    border-color: var(--line);
    background: #ffffff;
    color: var(--ink);
}

.button-secondary:hover {
    border-color: var(--gold);
    background: var(--soft-gold);
}

.compact-button {
    min-height: 2.35rem;
    padding: 0.45rem 0.75rem;
}

select,
input,
textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

select:focus,
input:focus,
textarea:focus {
    border-color: var(--gold);
    outline: 3px solid rgba(201, 162, 76, 0.22);
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.hero,
.panel {
    padding: 1.5rem 0;
}

.panel {
    margin-bottom: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--tight-shadow);
}

.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0;
}

.details div {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.compact-details {
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.compact-details div {
    padding: 0.8rem;
}

dt {
    color: var(--muted);
    font-size: 0.85rem;
}

dd {
    margin: 0.25rem 0 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.quick-search,
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-top: 1.5rem;
}

.quick-search label,
.filters label,
.contact-form label,
.stacked-form label,
.listing-form label,
.decision-actions label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.directory-hero {
    position: relative;
    min-height: 42rem;
    padding: 9rem 1rem 5rem;
    overflow: hidden;
    background-color: var(--night);
    background-image: url("/assets/img/hero-thailand.webp");
    background-position: center;
    background-size: cover;
    color: #ffffff;
}

.directory-hero::before {
    position: absolute;
    inset: 0;
    background: rgba(5, 9, 16, 0.66);
    content: "";
}

.directory-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    width: min(88rem, 100%);
    margin: 0 auto;
    text-align: center;
}

.directory-hero .lead {
    color: rgba(255, 255, 255, 0.82);
}

.directory-search {
    width: min(58rem, 100%);
    grid-template-columns: minmax(16rem, 1.4fr) minmax(10rem, 0.8fr) minmax(10rem, 0.8fr) auto;
    gap: 0;
    margin-top: 2rem;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.24);
}

.directory-search label {
    padding: 0 0.65rem;
    border-right: 1px solid var(--line);
    color: var(--muted);
    text-align: left;
}

.directory-search label:last-of-type {
    border-right: 0;
}

.directory-search input,
.directory-search select {
    min-height: 2.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.directory-search input:focus,
.directory-search select:focus {
    outline: 0;
}

.directory-search button {
    min-height: 3.35rem;
    min-width: 8rem;
}

.hero-down {
    position: absolute;
    z-index: 1;
    right: 50%;
    bottom: 1.25rem;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    transform: translateX(50%);
}

.home-section {
    width: min(74rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 4.5rem 0;
}

.feature-band {
    width: 100%;
    padding-right: max(1rem, calc((100% - 74rem) / 2));
    padding-left: max(1rem, calc((100% - 74rem) / 2));
    background: #f2f3f5;
}

.home-section-title {
    display: grid;
    justify-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

.home-section-title::after {
    width: 3rem;
    height: 0.2rem;
    margin-top: 0.85rem;
    border-radius: 8px;
    background: var(--gold);
    content: "";
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.split-heading::after {
    display: none;
}

.city-grid {
    display: grid;
    grid-auto-rows: 12.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.city-card,
.search-photo-card {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    align-items: flex-end;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--night-soft);
    background-position: center;
    background-size: cover;
    color: #ffffff;
    text-decoration: none;
    box-shadow: var(--tight-shadow);
}

.city-card::before,
.search-photo-card::before {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 16, 0.38);
    content: "";
}

.city-card:hover::before,
.search-photo-card:hover::before {
    background: rgba(6, 10, 16, 0.22);
}

.city-card.featured {
    grid-row: span 2;
    grid-column: span 2;
}

.city-card-copy,
.search-photo-card span {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.2rem;
}

.city-card b,
.search-photo-card b {
    font-size: 1.2rem;
}

.city-card small,
.search-photo-card small {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.city-ribbon {
    position: absolute;
    z-index: 1;
    top: 1rem;
    left: 1rem;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    background: var(--gold);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.city-card-sukhumvit {
    background-image: url("/assets/img/area-sukhumvit.svg");
}

.city-card-thonglor {
    background-image: url("/assets/img/area-thonglor.svg");
}

.city-card-sathorn {
    background-image: url("/assets/img/area-sathorn.svg");
}

.city-card-riverside {
    background-image: url("/assets/img/area-riverside.svg");
}

.city-card-ari {
    background-image: url("/assets/img/area-ari.svg");
}

.search-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
}

.search-photo-card {
    min-height: 17rem;
}

.search-card-rent {
    background-image: url("/assets/img/property-rent.svg");
}

.search-card-sale {
    background-image: url("/assets/img/property-sale.svg");
}

.search-card-family {
    background-image: url("/assets/img/property-family.svg");
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.process-grid article {
    position: relative;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.process-grid span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    place-items: center;
    border-radius: 8px;
    background: var(--soft-gold);
    color: var(--gold-dark);
    font-weight: 900;
}

.process-grid b {
    display: block;
    font-size: 1.05rem;
}

.process-grid p {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.owner-strip {
    padding-top: 3rem;
}

.search-filters {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--tight-shadow);
}

.filter-group {
    grid-column: span 3;
    min-width: 0;
}

.filter-operation {
    grid-column: span 3;
    padding: 0;
    margin: 0;
    border: 0;
}

.filter-operation legend {
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 2.75rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.segmented-control label {
    display: grid;
    min-width: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.segmented-control input {
    position: absolute;
    width: 1px;
    min-height: 0;
    height: 1px;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: grid;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    place-items: center;
    text-align: center;
}

.segmented-control label + label span {
    border-left: 1px solid var(--line);
}

.segmented-control input:checked + span {
    background: var(--soft-gold);
    color: var(--gold-dark);
}

.filter-actions {
    display: grid;
    grid-column: span 3;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: end;
}

.autocomplete-field {
    position: relative;
    z-index: 10;
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.autocomplete-field:focus-within {
    z-index: 90;
}

.autocomplete-listbox {
    position: absolute;
    z-index: 95;
    top: calc(100% + 0.38rem);
    right: 0;
    left: 0;
    overflow: clip;
    border: 1px solid rgba(213, 188, 139, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1rem 2.4rem rgba(7, 16, 31, 0.18);
    color: #182338;
    backdrop-filter: blur(10px);
}

.autocomplete-listbox.is-state {
    padding: 0.72rem 0.82rem;
    color: #61708a;
    font-size: 0.82rem;
    font-weight: 560;
}

.autocomplete-option {
    display: grid;
    width: 100%;
    min-height: 0;
    gap: 0.12rem;
    padding: 0.72rem 0.82rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #182338;
    font: inherit;
    font-size: 0.87rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.autocomplete-option + .autocomplete-option {
    border-top: 1px solid rgba(222, 228, 238, 0.9);
}

.autocomplete-option.active,
.autocomplete-option:hover {
    background: #fff6e6;
    color: #101a2b;
}

.autocomplete-option strong {
    color: inherit;
    font-weight: 680;
}

.autocomplete-option span {
    color: #66758e;
    font-size: 0.76rem;
    font-weight: 560;
}

.result-count {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0;
}

.result-bar p {
    margin: 0;
}

.result-bar p + p {
    color: var(--muted);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2,
.section-heading p {
    margin: 0;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
}

.listing-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--tight-shadow);
}

.listing-card.is-boosted {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 76, 0.18);
}

.listing-frame {
    position: relative;
    overflow: hidden;
    background: var(--soft-blue);
}

.listing-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    color: var(--muted);
    text-decoration: none;
}

.listing-gallery-track {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    transition: transform 180ms ease;
}

.listing-slide {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 0 0 100%;
    align-self: stretch;
    overflow: hidden;
    place-items: center;
    background: var(--soft-blue);
    visibility: hidden;
}

.listing-gallery-track:not(.is-gallery-ready) .listing-slide:first-child,
.listing-slide.is-active {
    visibility: visible;
}

.listing-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.listing-slide.is-media-fallback {
    padding: 1rem;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.listing-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    background: var(--gold);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(13, 21, 36, 0.72);
    color: #ffffff;
    transform: translateY(-50%);
}

.gallery-nav-prev {
    left: 0.55rem;
}

.gallery-nav-next {
    right: 0.55rem;
}

.gallery-dots {
    position: absolute;
    top: 0.85rem;
    right: 0.75rem;
    display: flex;
    gap: 0.3rem;
}

.gallery-dots span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

.gallery-dots span.active {
    background: #ffffff;
}

.agency-overlay {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    max-width: calc(100% - 1.5rem);
    min-height: 2.35rem;
    gap: 0.45rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 0.35rem 1rem rgba(20, 30, 45, 0.12);
}

.agency-overlay img,
.agency-overlay span {
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
    background: var(--night);
    color: #ffffff;
}

.agency-overlay span {
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.agency-overlay b {
    min-width: 0;
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listing-body {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.listing-body h2,
.listing-body h3,
.listing-body p {
    margin: 0;
}

.listing-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.listing-meta-row span {
    min-height: 1.55rem;
    padding: 0.18rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.price {
    color: var(--gold-dark);
    font-size: 1.1rem;
    font-weight: 900;
}

.listing-location {
    color: var(--muted);
    font-size: 0.95rem;
}

.mini-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.mini-details div {
    min-width: 0;
}

.mini-details dt {
    font-size: 0.75rem;
}

.mini-details dd {
    font-size: 0.9rem;
}

.listing-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.empty-state {
    padding: 1.25rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.empty-state h2,
.empty-state p {
    margin: 0;
}

.empty-state p {
    margin-top: 0.35rem;
    color: var(--muted);
}

.facility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 1rem 0 0;
    list-style: none;
}

.facility-list li {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.property-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.5rem 0;
}

.property-copy {
    align-self: center;
}

.property-gallery {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.75rem;
}

.property-gallery-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.property-gallery-strip {
    display: flex;
    min-width: 0;
    gap: 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.property-gallery img,
.media-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
    background: #e9eef0;
}

.property-gallery-strip img {
    flex: 0 0 clamp(7.5rem, 30%, 11rem);
    scroll-snap-align: start;
}

.media-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.description-text {
    max-width: 48rem;
    color: var(--muted);
}

.legal-hero h1 {
    max-width: 52rem;
}

.legal-content {
    display: grid;
    gap: 1.35rem;
    max-width: 54rem;
}

.legal-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
    border-bottom: 0;
}

.legal-section h2 {
    margin-bottom: 0.6rem;
}

.legal-section p,
.legal-section ul {
    margin: 0;
    color: var(--muted);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
    margin-top: 0.7rem;
}

.legal-section ul {
    padding-left: 1.2rem;
}

.conversation-list {
    display: grid;
    gap: 0.85rem;
    max-width: 52rem;
    margin: 1rem 0;
}

.conversation-message {
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.conversation-message header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.conversation-message strong {
    color: var(--ink);
}

.conversation-message p {
    margin: 0;
    color: var(--ink);
    white-space: normal;
}

.stacked-form,
.contact-form,
.listing-form {
    display: grid;
    gap: 0.85rem;
    max-width: 42rem;
    margin-top: 1rem;
}

.choice-group {
    display: grid;
    gap: 0.55rem;
    padding: 0;
    border: 0;
}

.choice-group legend {
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.choice-group label {
    display: grid;
    grid-template-columns: 1.2rem minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem;
    min-width: 0;
    color: var(--ink);
    font-weight: 700;
}

.choice-group input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.18rem;
}

.decision-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    max-width: 52rem;
    margin-top: 1rem;
}

.decision-actions form {
    display: grid;
    gap: 0.5rem;
}

.decision-actions textarea {
    min-height: 4rem;
}

.contact-panel {
    padding-bottom: 3rem;
}

.contact-form .contact-remember {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
    color: var(--ink);
    font-weight: 600;
}

.contact-form .contact-remember input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.18rem 0 0;
    accent-color: var(--gold-dark);
}

.contact-form .contact-remember strong,
.contact-form .contact-remember small {
    display: block;
}

.contact-form .contact-remember strong {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.25;
}

.contact-form .contact-remember small {
    margin-top: 0.16rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
}

.admin-auth {
    max-width: 42rem;
    margin-top: 2rem;
}

.admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.backoffice-body .admin-heading > form {
    display: none;
}

.backoffice-body .panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.backoffice-body .admin-heading {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.backoffice-body .admin-heading .lead {
    max-width: 46rem;
    margin-bottom: 0;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.admin-tabs a,
.admin-tabs span {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 0.2rem 0.55rem rgba(12, 22, 38, 0.04);
}

.admin-tabs a.active {
    border-color: var(--gold);
    background: var(--soft-gold);
    color: var(--gold-dark);
    font-weight: 800;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.admin-table {
    width: 100%;
    min-width: 48rem;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fbfaf6;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: #fffdf7;
}

.admin-table a {
    color: var(--gold-dark);
    font-weight: 800;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    background: var(--soft-gold);
    color: var(--gold-dark);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.listing-form {
    max-width: 58rem;
}

.listing-form fieldset {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.listing-form legend {
    padding: 0 0.35rem;
    color: var(--gold-dark);
    font-weight: 900;
}

.listing-form .checkbox-line {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.listing-form .checkbox-line input {
    width: 1rem;
    min-height: 1rem;
    flex: 0 0 auto;
}

.media-input-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 0.9fr) minmax(18rem, 1.1fr);
    gap: 0.85rem;
    align-items: stretch;
}

.upload-dropzone {
    justify-content: center;
    min-height: 12rem;
    padding: 1rem;
    border: 1px dashed var(--gold);
    border-radius: 8px;
    background: var(--soft-gold);
    text-align: center;
}

.upload-dropzone input {
    min-height: auto;
    padding: 0.65rem;
    border-style: dashed;
    background: #ffffff;
}

.upload-dropzone b {
    color: var(--gold-dark);
    font-size: 1rem;
}

.upload-dropzone small {
    color: var(--muted);
    font-weight: 700;
}

.upload-dropzone.is-dragging {
    border-color: var(--night);
    background: #fff8e8;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.85rem;
}

.form-note {
    margin: 1rem 0 0;
    color: var(--muted);
}

.muted-small {
    color: var(--muted);
    font-size: 0.82rem;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.inline-form button {
    white-space: nowrap;
}

.listing-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.payment-table {
    min-width: 72rem;
}

.audit-actions-table {
    min-width: 86rem;
}

.json-preview {
    max-width: 28rem;
    max-height: 12rem;
    overflow: auto;
    margin: 0;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8faf9;
    color: var(--ink);
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.payment-actions {
    display: grid;
    gap: 0.75rem;
    min-width: 16rem;
}

.payment-actions form {
    display: grid;
    gap: 0.5rem;
}

.payment-actions textarea {
    min-height: 4rem;
}

.notice {
    max-width: 48rem;
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 700;
}

.notice p {
    margin: 0;
}

.notice p + p {
    margin-top: 0.35rem;
}

.notice.success,
.notice.notice-success {
    border: 1px solid rgba(31, 138, 131, 0.35);
    background: rgba(31, 138, 131, 0.08);
    color: #0b5f59;
}

.notice.error,
.notice.notice-error {
    border: 1px solid rgba(164, 72, 38, 0.35);
    background: rgba(164, 72, 38, 0.08);
    color: #7a2f18;
}

.backoffice-body .details {
    margin: 1rem 0;
}

.backoffice-body .details div,
.backoffice-body .empty-state {
    box-shadow: var(--tight-shadow);
}

.backoffice-shell {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    min-height: 100vh;
    background: #f2f4f8;
}

.backoffice-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.25rem;
    background: var(--night);
    color: #ffffff;
}

.backoffice-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    margin-bottom: 1.25rem;
    color: #ffffff;
    text-decoration: none;
}

.backoffice-brand span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: 8px;
    background: var(--gold);
    font-weight: 900;
}

.backoffice-brand b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backoffice-nav {
    display: grid;
    gap: 0.35rem;
}

.backoffice-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 800;
    text-decoration: none;
}

.backoffice-nav a:hover,
.backoffice-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.backoffice-nav span {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.76rem;
}

.backoffice-nav a.active span {
    background: var(--gold);
    color: #ffffff;
}

.backoffice-site-link {
    margin-top: auto;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
}

.backoffice-main {
    min-width: 0;
}

.backoffice-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    margin: 1rem 1rem 0;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.topbar-search {
    flex: 1 1 24rem;
    max-width: 34rem;
}

.topbar-search label {
    display: grid;
    gap: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.topbar-search input {
    min-height: 2.35rem;
    background: #f7f8fa;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.topbar-actions form {
    margin: 0;
}

.topbar-icon,
.topbar-avatar {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 900;
    text-decoration: none;
}

.topbar-avatar {
    background: var(--night);
    color: #ffffff;
}

.backoffice-content {
    width: 100%;
    max-width: 1180px;
    padding: 1rem;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.dashboard-hero-copy,
.dashboard-hero-card,
.metric-card,
.dashboard-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.dashboard-hero-copy {
    padding: 1.35rem;
}

.dashboard-hero-card {
    display: grid;
    align-content: center;
    gap: 0.35rem;
    padding: 1.35rem;
    background: var(--night);
    color: #ffffff;
}

.dashboard-hero-card span,
.dashboard-hero-card small {
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero-card b {
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: 1.75rem;
    line-height: 1.1;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.9rem;
    padding: 1rem;
}

.metric-card small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.metric-card b {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1.35rem;
    line-height: 1.15;
}

.metric-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    font-weight: 900;
}

.metric-icon.gold {
    background: var(--soft-gold);
    color: var(--gold-dark);
}

.metric-icon.coral {
    background: var(--soft-coral);
    color: var(--coral);
}

.metric-icon.mint {
    background: var(--mint);
    color: var(--teal);
}

.metric-icon.blue {
    background: var(--soft-blue);
    color: var(--blue);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-card {
    grid-column: span 4;
    min-width: 0;
    padding: 1rem;
}

.dashboard-card-wide {
    grid-column: span 8;
}

.accent-card {
    background: #5e4bc4;
    color: #ffffff;
}

.accent-card .kicker,
.accent-card p,
.accent-card a {
    color: rgba(255, 255, 255, 0.86);
}

.accent-card a {
    display: inline-flex;
    margin-top: 1rem;
    font-weight: 900;
}

.bar-list {
    display: grid;
    gap: 1rem;
}

.bar-list div {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr) 3rem;
    gap: 0.75rem;
    align-items: center;
}

.bar-list span {
    color: var(--muted);
    font-weight: 800;
}

.bar-list b {
    display: block;
    justify-self: start;
    max-width: 100%;
    height: 0.75rem;
    border-radius: 8px;
    background: var(--gold);
}

.bar-list em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.dashboard-link-list {
    display: grid;
    gap: 0.6rem;
}

.dashboard-link-list a {
    padding: 0.72rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f9fb;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.pagination-current,
.pagination-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

.pagination-current {
    color: var(--ink);
}

.pagination-disabled {
    opacity: 0.56;
}

.cookie-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 30;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    max-width: 58rem;
    margin: 0 auto;
    padding: 1rem;
    border: 1px solid rgba(210, 183, 117, 0.45);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 18px 40px rgba(32, 33, 36, 0.16);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.cookie-banner p {
    margin: 0 0 0.35rem;
    color: var(--muted);
}

.cookie-banner a {
    color: var(--accent-dark);
    font-weight: 700;
}

.cookie-banner button {
    flex: 0 0 auto;
}

@media (max-width: 64rem) {
    .site-header {
        padding: 0 1rem;
    }

    .directory-search {
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .directory-search label {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0.25rem 0.45rem 0.55rem;
    }

    .directory-search button {
        grid-column: 1 / -1;
    }

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

    .backoffice-shell {
        display: block;
    }

    .backoffice-sidebar {
        position: relative;
        min-height: auto;
    }

    .backoffice-nav {
        grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    }

    .backoffice-site-link {
        margin-top: 1rem;
    }

    .dashboard-card,
    .dashboard-card-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 42rem) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 1rem;
    }

    .page-shell {
        width: 100%;
        padding: 1rem;
    }

    .panel {
        width: 100%;
        min-width: 0;
        padding: 1.25rem;
        overflow: hidden;
    }

    .lead {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .nav {
        flex-wrap: wrap;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }

    h1 {
        max-width: 100%;
        font-size: 2rem;
    }

    .directory-hero {
        min-height: 36rem;
        padding: 8.25rem 1rem 4rem;
    }

    .directory-search {
        grid-template-columns: 1fr;
    }

    .home-section {
        padding: 3rem 0;
    }

    .split-heading,
    .section-heading,
    .property-hero,
    .admin-heading,
    .dashboard-hero,
    .backoffice-topbar {
        display: block;
    }

    .split-heading a,
    .section-heading a {
        display: inline-flex;
        margin-top: 0.75rem;
    }

    .city-grid {
        grid-auto-rows: 11rem;
        grid-template-columns: 1fr;
    }

    .city-card.featured {
        grid-row: span 1;
        grid-column: span 1;
    }

    .search-filters,
    .filter-actions {
        grid-template-columns: 1fr;
    }

    .filter-group,
    .filter-operation,
    .filter-actions {
        grid-column: 1 / -1;
    }

    .result-bar,
    .property-gallery {
        margin-top: 1rem;
    }

    .property-gallery {
        flex-direction: row;
        gap: 0.75rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding-bottom: 0.35rem;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .property-gallery-featured,
    .property-gallery-strip {
        display: contents;
    }

    .property-gallery img {
        flex: 0 0 min(82vw, 21rem);
        scroll-snap-align: start;
    }

    .result-bar {
        display: block;
    }

    .result-bar p + p {
        margin-top: 0.35rem;
    }

    .agency-overlay {
        right: 0.55rem;
        bottom: 0.55rem;
        left: 0.55rem;
    }

    .listing-actions,
    .mini-details,
    .bar-list div,
    .media-input-grid {
        grid-template-columns: 1fr;
    }

    .bar-list em {
        text-align: left;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-search {
        max-width: none;
    }

    .topbar-actions {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .backoffice-content {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 42rem) {
    .cookie-banner {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        gap: 0.65rem;
        max-height: min(42vh, 14.5rem);
        padding: 0.75rem;
        overflow: auto;
    }

    .cookie-banner strong {
        margin-bottom: 0.15rem;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .cookie-banner p {
        margin-bottom: 0.2rem;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .cookie-banner a {
        font-size: 0.8rem;
    }

    .cookie-banner button {
        width: 100%;
        min-height: 2.55rem;
        padding: 0.55rem 0.8rem;
        font-size: 0.86rem;
    }
}

/* High-fidelity visual refinement aligned to the provided public and backoffice references. */
:root {
    --accent: #ed4f87;
    --accent-dark: #bb3268;
    --accent-soft: #fde8f0;
    --admin-purple: #6e5bea;
    --admin-purple-dark: #4d3ab8;
    --admin-bg: #f6f7fb;
    --admin-sidebar: #1b2431;
    --admin-sidebar-soft: #253142;
}

.home-body {
    background: #ffffff;
}

.site-header {
    min-height: 5rem;
}

.home-body .site-header {
    padding: 0 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(14, 22, 35, 0.18);
    backdrop-filter: blur(5px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.04rem;
}

.brand::before {
    display: grid;
    width: 2.1rem;
    height: 2.1rem;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    content: "BP";
    font-size: 0.72rem;
    font-weight: 900;
}

.home-body .brand::before {
    background: rgba(237, 79, 135, 0.96);
    box-shadow: 0 0.65rem 1.4rem rgba(0, 0, 0, 0.22);
}

.nav {
    gap: 0.5rem;
}

.nav a {
    padding: 0.52rem 0.82rem;
    font-size: 0.9rem;
}

.home-body .nav a:hover,
.home-body .nav a:focus {
    background: rgba(255, 255, 255, 0.12);
}

.nav .nav-cta {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.nav .nav-cta:hover,
.nav .nav-cta:focus {
    background: var(--accent-dark);
}

.home-body .nav .nav-login {
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.directory-hero {
    min-height: 45rem;
    padding: 9rem 1rem 5.75rem;
    background-position: center 42%;
}

.directory-hero::before {
    background: rgba(6, 10, 18, 0.7);
}

.directory-hero-content {
    width: min(72rem, 100%);
    padding-top: 3rem;
}

.home-body .directory-hero .kicker,
.home-body .home-section .kicker {
    color: var(--accent);
}

.directory-hero h1 {
    max-width: 55rem;
    margin: 0;
    color: #ffffff;
    font-size: 4.1rem;
    line-height: 1.04;
    text-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.34);
}

.directory-hero .lead {
    max-width: 40rem;
    color: rgba(255, 255, 255, 0.86);
}

.directory-search {
    width: min(64rem, 100%);
    margin-top: 2.35rem;
    padding: 0.65rem;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 1.8rem 3.6rem rgba(0, 0, 0, 0.28);
}

.directory-search label {
    justify-content: center;
    min-height: 4rem;
    padding: 0 1rem;
}

.directory-search label span {
    color: #202938;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.directory-search input,
.directory-search select {
    color: var(--ink);
    font-weight: 800;
}

.directory-search button {
    min-height: 4rem;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    border-color: var(--accent);
    background: var(--accent);
}

.directory-search button:hover,
.directory-search button:focus {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.hero-down {
    bottom: 1.85rem;
    width: 3rem;
    height: 3rem;
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0.9rem 2rem rgba(0, 0, 0, 0.22);
}

.home-section {
    width: min(76rem, calc(100% - 2rem));
    padding: 5rem 0;
}

.home-section-title {
    margin-bottom: 2.35rem;
}

.home-section-title h2 {
    max-width: 42rem;
    margin: 0;
    font-size: 2rem;
    line-height: 1.16;
}

.home-section-title::after {
    width: 3.3rem;
    background: var(--accent);
}

.section-copy {
    max-width: 43rem;
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-weight: 600;
}

.split-heading {
    align-items: center;
}

.split-heading .section-copy {
    max-width: 34rem;
}

.feature-band {
    padding-right: max(1rem, calc((100% - 76rem) / 2));
    padding-left: max(1rem, calc((100% - 76rem) / 2));
    background: #f4f5f8;
}

.city-grid {
    grid-auto-rows: 13.25rem;
    gap: 1.2rem;
}

.city-card,
.search-photo-card {
    padding: 1.25rem;
    box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, 0.14);
}

.city-card::before,
.search-photo-card::before {
    background: rgba(8, 13, 22, 0.52);
}

.city-card:hover::before,
.search-photo-card:hover::before {
    background: rgba(8, 13, 22, 0.38);
}

.city-ribbon {
    background: var(--accent);
}

.city-card b,
.search-photo-card b {
    font-size: 1.3rem;
    line-height: 1.15;
}

.home-listing-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.home-listing-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--tight-shadow);
}

.home-listing-tabs a {
    min-height: 2.35rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 900;
    text-decoration: none;
}

.home-listing-tabs a.active,
.home-listing-tabs a:hover,
.home-listing-tabs a:focus {
    background: var(--accent);
    color: #ffffff;
}

.home-body .button-link {
    border-color: var(--accent);
    background: var(--accent);
}

.home-body .button-link:hover,
.home-body .button-link:focus {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.listing-grid {
    gap: 1.25rem;
}

.home-body .listing-card {
    box-shadow: 0 1rem 2.35rem rgba(15, 23, 42, 0.1);
}

.home-body .listing-card.is-boosted {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(237, 79, 135, 0.18), 0 1rem 2.35rem rgba(15, 23, 42, 0.12);
}

.home-body .listing-badge {
    background: var(--accent);
}

.process-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.process-grid article {
    padding: 1.65rem;
    border-color: #eceff4;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
}

.process-grid span {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.process-grid article::after {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #e2e6ed;
    content: "0" counter(process-step);
    counter-increment: process-step;
    font-size: 1.45rem;
    font-weight: 900;
}

.process-grid {
    counter-reset: process-step;
}

.owner-strip {
    width: 100%;
    padding-right: max(1rem, calc((100% - 76rem) / 2));
    padding-left: max(1rem, calc((100% - 76rem) / 2));
    background: #111827;
    color: #ffffff;
}

.owner-strip .home-section-title h2,
.owner-strip dt,
.owner-strip dd {
    color: #ffffff;
}

.owner-strip .details div {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.backoffice-shell {
    grid-template-columns: 18.25rem minmax(0, 1fr);
    background: var(--admin-bg);
}

.backoffice-sidebar {
    padding: 1.1rem 1rem;
    background: var(--admin-sidebar);
    box-shadow: 1rem 0 2.2rem rgba(15, 23, 42, 0.08);
}

.backoffice-brand {
    min-height: 3.4rem;
    margin-bottom: 1rem;
}

.backoffice-brand .brand-mark {
    background: var(--admin-purple);
    box-shadow: 0 0.7rem 1.5rem rgba(110, 91, 234, 0.32);
}

.backoffice-brand b {
    display: grid;
    gap: 0.08rem;
    white-space: normal;
}

.backoffice-brand strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backoffice-brand small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.backoffice-menu-label {
    display: block;
    margin: 0.75rem 0 0.5rem 0.35rem;
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.backoffice-nav {
    gap: 0.42rem;
}

.backoffice-nav a {
    min-height: 2.95rem;
    padding: 0.55rem 0.62rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
}

.backoffice-nav a:hover,
.backoffice-nav a.active {
    background: var(--admin-sidebar-soft);
}

.backoffice-nav span {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
}

.backoffice-nav a.active span {
    background: var(--admin-purple);
}

.backoffice-site-link {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.backoffice-main {
    background: var(--admin-bg);
}

.backoffice-topbar {
    min-height: 4.8rem;
    margin: 1rem 1.25rem 0;
    padding: 0.85rem 1rem;
    border-color: #eef0f5;
    box-shadow: 0 0.8rem 2rem rgba(15, 23, 42, 0.06);
}

.topbar-search label {
    color: #9aa3b0;
    text-transform: uppercase;
}

.topbar-search input {
    min-height: 2.55rem;
    border-color: #eef1f5;
    background: #f7f8fb;
}

.topbar-icon,
.topbar-avatar {
    width: auto;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.72rem;
    border-color: #edf0f5;
    background: #f9fafc;
}

.topbar-avatar {
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    background: var(--admin-purple);
}

.backoffice-content {
    max-width: 1360px;
    padding: 1.25rem 1.25rem 2rem;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.dashboard-hero-copy,
.dashboard-hero-card,
.metric-card,
.dashboard-card {
    border-color: #eef0f5;
    box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.06);
}

.dashboard-hero-copy {
    padding: 1.65rem;
}

.dashboard-hero-copy h1 {
    max-width: 42rem;
    font-size: 2.35rem;
    line-height: 1.08;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.backoffice-body .button-link {
    border-color: var(--admin-purple);
    background: var(--admin-purple);
    color: #ffffff;
}

.backoffice-body .button-link:hover,
.backoffice-body .button-link:focus {
    border-color: var(--admin-purple-dark);
    background: var(--admin-purple-dark);
}

.muted-link {
    border-color: #e7eaf1;
    background: #ffffff;
    color: var(--ink);
}

.backoffice-body .muted-link:hover,
.backoffice-body .muted-link:focus {
    border-color: #d8ddea;
    background: #f7f8fb;
    color: var(--ink);
}

.backoffice-body .button-link.muted-link {
    border-color: #e7eaf1;
    background: #ffffff;
    color: var(--ink);
}

.backoffice-body .button-link.muted-link:hover,
.backoffice-body .button-link.muted-link:focus {
    border-color: #d8ddea;
    background: #f7f8fb;
    color: var(--ink);
}

.admin-snapshot {
    background: var(--admin-purple);
    color: #ffffff;
}

.snapshot-meter {
    height: 0.52rem;
    overflow: hidden;
    margin-top: 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
}

.snapshot-meter span {
    display: block;
    height: 100%;
    border-radius: 8px;
    background: #ffffff;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    min-height: 7.4rem;
    justify-content: space-between;
    padding: 1.15rem;
}

.metric-icon {
    order: 2;
    width: 3.25rem;
    height: 3.25rem;
}

.dashboard-grid {
    gap: 1.25rem;
}

.dashboard-card {
    padding: 1.25rem;
}

.dashboard-card-chart {
    min-height: 26rem;
}

.dashboard-card-compact {
    display: grid;
    align-content: start;
    justify-items: start;
}

.dashboard-line-chart {
    display: flex;
    align-items: flex-end;
    height: 10.5rem;
    gap: 1.1rem;
    margin: 0.25rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid #eef0f5;
    border-radius: 8px;
    background: #fbfcfe;
}

.dashboard-line-chart span {
    display: block;
    width: 100%;
    min-height: 0.85rem;
    border-radius: 8px 8px 0 0;
    background: var(--admin-purple);
}

.dashboard-line-chart span:nth-child(2) {
    background: #42c6a4;
}

.dashboard-line-chart span:nth-child(3) {
    background: #f1788f;
}

.dashboard-line-chart span:nth-child(4) {
    background: #f4bd61;
}

.dashboard-ring {
    display: grid;
    width: 8rem;
    height: 8rem;
    margin: 0.65rem 0 0.8rem;
    place-items: center;
    border-radius: 999px;
    border: 0.85rem solid var(--admin-purple);
    background: #edf0f5;
}

.dashboard-ring span {
    display: grid;
    width: 5.65rem;
    height: 5.65rem;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-size: 1.4rem;
    font-weight: 900;
}

.muted-text {
    color: var(--muted);
}

.operations-card {
    display: grid;
    align-content: start;
}

.dashboard-action-list,
.dashboard-link-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.dashboard-action-list a {
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
}

.dashboard-action-list a:hover,
.dashboard-action-list a:focus {
    text-decoration: underline;
}

.dashboard-link-list a {
    padding-right: 0;
    padding-left: 0;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    border-radius: 0;
    background: transparent;
}

.bar-list b {
    background: var(--admin-purple);
}

@media (max-width: 64rem) {
    .home-body .site-header {
        padding: 0.9rem 1rem;
    }

    .directory-hero h1 {
        font-size: 3.1rem;
    }

    .directory-search {
        grid-template-columns: 1fr 1fr;
    }

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

    .home-listing-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .backoffice-shell {
        display: block;
    }

    .backoffice-sidebar {
        position: relative;
        min-height: auto;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 42rem) {
    .home-body .site-header {
        background: rgba(14, 22, 35, 0.92);
    }

    .brand {
        max-width: 100%;
    }

    .nav {
        width: 100%;
        gap: 0.35rem;
    }

    .nav a {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 8.5rem;
    }

    .directory-hero {
        min-height: 39rem;
        padding-top: 9.25rem;
    }

    .directory-hero-content {
        padding-top: 0;
    }

    .directory-hero h1 {
        font-size: 2.35rem;
    }

    .directory-search {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .directory-search label {
        min-height: 3.4rem;
        border-right: 0;
    }

    .home-section-title h2 {
        font-size: 1.55rem;
    }

    .home-listing-tabs {
        width: 100%;
    }

    .home-listing-tabs a {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
    }

    .process-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .backoffice-content {
        padding: 1rem 0.75rem;
    }

    .dashboard-hero-copy h1 {
        font-size: 1.8rem;
    }

    .dashboard-line-chart {
        height: 8rem;
        gap: 0.65rem;
    }

    .property-gallery {
        display: grid;
        gap: 0.75rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .property-gallery-featured,
    .property-gallery-strip {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .property-gallery-strip img {
        flex: 0 1 auto;
    }
}

/* Modern typography pass: system fonts only, lighter weights, Thai-capable fallbacks. */
body,
input,
select,
textarea,
button {
    font-family: var(--font-sans);
}

h1,
h2,
h3,
.brand,
.backoffice-brand,
.dashboard-hero-copy h1,
.home-section-title h2,
.directory-hero h1 {
    font-family: var(--font-display);
}

strong,
b,
h1,
h2,
h3,
.directory-hero h1,
.home-section-title h2,
.dashboard-hero-copy h1,
.dashboard-hero-card b,
.metric-card b,
.dashboard-ring span,
.price {
    font-weight: 700;
}

.brand,
.nav a,
button,
.button-link,
.button-secondary,
.home-listing-tabs a,
.backoffice-nav a,
.dashboard-action-list a,
.dashboard-link-list a,
.admin-table a,
.accent-card a {
    font-weight: 600;
}

.kicker,
.brand::before,
.listing-badge,
.city-ribbon,
.listing-meta-row span,
.listing-slide.is-media-fallback,
.agency-overlay span,
.filter-operation legend,
.segmented-control label,
.listing-form label,
.admin-tabs a,
.admin-tabs span,
.backoffice-brand small,
.backoffice-menu-label,
.topbar-search label,
.topbar-icon,
.topbar-avatar,
.metric-card small,
.metric-icon,
.process-grid span,
.process-grid article::after,
.directory-search input,
.directory-search select {
    font-weight: 600;
}

.directory-hero .lead,
.section-copy,
.lead,
.listing-location,
.muted-text,
.site-footer {
    font-weight: 400;
}

h1,
h2,
h3,
.directory-hero h1,
.home-section-title h2,
.dashboard-hero-copy h1,
.backoffice-brand strong {
    font-weight: 650;
}

/* Full-width public layout pass: sections become page bands, cards stay as cards. */
.public-full-width .page-shell {
    width: 100%;
}

.public-full-width:not(.home-body) .page-shell {
    padding: 0;
}

.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth),
.public-full-width .page-shell > .property-hero,
.public-full-width .page-shell > .legal-hero {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(2.5rem, 5vw, 5rem) var(--public-gutter);
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):nth-of-type(even) {
    background: #f6f7f9;
}

.public-full-width .page-shell > .legal-hero {
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.public-full-width .legal-section {
    width: min(54rem, 100%);
}

.home-section,
.feature-band,
.owner-strip {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(3rem, 6vw, 5.5rem) var(--public-gutter);
}

.feature-band {
    background: #f4f5f8;
}

.process-section {
    background: #ffffff;
}

.owner-strip {
    background: #111827;
}

.public-body .site-footer {
    width: 100%;
    margin: 0;
    padding: 1.5rem var(--public-gutter) 2.25rem;
    background: #ffffff;
}

@media (max-width: 42rem) {
    .public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth),
    .public-full-width .page-shell > .property-hero,
    .public-full-width .page-shell > .legal-hero,
    .home-section,
    .feature-band,
    .owner-strip {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

/* Rizz-inspired custom backoffice pass: original code/assets, no third-party template copy. */
:root {
    --rizz-bg: #f5f7fb;
    --rizz-panel: #ffffff;
    --rizz-line: #e8edf4;
    --rizz-text: #111827;
    --rizz-muted: #8993a6;
    --rizz-accent: #22c55e;
    --rizz-accent-dark: #16a34a;
    --rizz-accent-soft: #eafaf1;
    --rizz-blue-soft: #eef4ff;
    --rizz-rose-soft: #fff0f4;
    --rizz-amber-soft: #fff7e8;
    --rizz-shadow: 0 1rem 2.6rem rgba(27, 39, 67, 0.055);
    --rizz-card-shadow: 0 0.6rem 1.8rem rgba(27, 39, 67, 0.045);
}

.backoffice-body {
    background: var(--rizz-bg);
    color: var(--rizz-text);
}

.backoffice-shell {
    grid-template-columns: 4.75rem minmax(0, 1fr);
    background: var(--rizz-bg);
}

.backoffice-sidebar {
    align-items: center;
    padding: 1.4rem 0.65rem;
    border-right: 1px solid var(--rizz-line);
    background: #ffffff;
    box-shadow: none;
}

.backoffice-brand {
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    margin-bottom: 1.35rem;
}

.backoffice-brand .brand-mark,
.backoffice-brand span {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: var(--rizz-accent);
    color: #ffffff;
    font-size: 0.78rem;
    box-shadow: 0 0.75rem 1.45rem rgba(34, 197, 94, 0.26);
}

.backoffice-brand .brand-mark::after,
.backoffice-brand span::after {
    position: absolute;
    right: 0.05rem;
    top: 0.15rem;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #f7c948;
    content: "";
}

.backoffice-brand .brand-mark,
.backoffice-brand span {
    position: relative;
}

.backoffice-brand b,
.backoffice-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.backoffice-nav {
    width: 100%;
    gap: 0.55rem;
}

.backoffice-nav a {
    position: relative;
    justify-content: center;
    width: 3rem;
    min-height: 3rem;
    padding: 0;
    margin: 0 auto;
    color: #95a0b4;
    font-size: 0;
}

.backoffice-nav a::before {
    position: absolute;
    left: -0.65rem;
    width: 0.25rem;
    height: 1.55rem;
    border-radius: 999px;
    background: transparent;
    content: "";
}

.backoffice-nav a:hover,
.backoffice-nav a.active {
    background: var(--rizz-accent-soft);
    color: var(--rizz-accent-dark);
}

.backoffice-nav a.active::before {
    background: var(--rizz-accent);
}

.backoffice-nav span {
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid transparent;
    background: transparent;
    color: currentColor;
    font-size: 0.66rem;
    font-weight: 650;
}

.backoffice-nav a.active span,
.backoffice-nav a:hover span {
    border-color: rgba(34, 197, 94, 0.2);
    background: #ffffff;
    color: var(--rizz-accent-dark);
}

.backoffice-nav em {
    position: absolute;
    left: calc(100% + 0.7rem);
    z-index: 20;
    min-width: max-content;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--rizz-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--rizz-text);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--rizz-card-shadow);
    transform: translateX(-0.25rem);
    transition: opacity 160ms ease, transform 160ms ease;
}

.backoffice-nav a:hover em,
.backoffice-nav a:focus em {
    opacity: 1;
    transform: translateX(0);
}

.backoffice-site-link {
    display: grid;
    width: 3rem;
    min-height: 3rem;
    padding: 0;
    margin-top: auto;
    place-items: center;
    border-color: var(--rizz-line);
    background: #ffffff;
    color: var(--rizz-muted);
    font-size: 0;
    box-shadow: var(--rizz-card-shadow);
}

.backoffice-site-link::before {
    color: var(--rizz-accent-dark);
    content: "Site";
    font-size: 0.72rem;
    font-weight: 650;
}

.backoffice-main {
    background: var(--rizz-bg);
}

.backoffice-topbar {
    min-height: 6.05rem;
    margin: 0;
    padding: 1.45rem 2.1rem;
    border: 0;
    border-bottom: 1px solid var(--rizz-line);
    border-radius: 0;
    background: var(--rizz-bg);
    box-shadow: none;
}

.topbar-greeting {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: min(24rem, 38vw);
    gap: 1rem;
}

.topbar-greeting div {
    display: grid;
    gap: 0.05rem;
    min-width: 0;
}

.topbar-greeting span {
    color: var(--rizz-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

.topbar-greeting strong {
    overflow: hidden;
    color: #252a3a;
    font-size: 1.45rem;
    font-weight: 650;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-menu-glyph {
    position: relative;
    display: grid;
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--rizz-card-shadow);
}

.topbar-menu-glyph i,
.topbar-menu-glyph::before,
.topbar-menu-glyph::after {
    width: 1rem;
    height: 2px;
    border-radius: 999px;
    background: #9aa4b7;
    content: "";
}

.topbar-menu-glyph {
    gap: 0.2rem;
}

.topbar-search {
    flex: 0 1 21.5rem;
    max-width: 25rem;
    margin-left: auto;
}

.topbar-search label {
    position: relative;
    display: block;
    color: var(--rizz-muted);
    font-size: 0;
}

.topbar-search label::before {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 1rem;
    width: 0.82rem;
    height: 0.82rem;
    border: 2px solid #9aa4b7;
    border-radius: 999px;
    content: "";
    transform: translateY(-58%);
}

.topbar-search label::after {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 1.7rem;
    width: 0.45rem;
    height: 2px;
    border-radius: 999px;
    background: #9aa4b7;
    content: "";
    transform: rotate(45deg) translateY(0.38rem);
}

.topbar-search label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.topbar-search input {
    min-height: 3.05rem;
    padding-left: 3.05rem;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--rizz-text);
    font-size: 0.92rem;
    box-shadow: var(--rizz-card-shadow);
}

.topbar-search input::placeholder {
    color: #99a4b8;
}

.topbar-actions {
    gap: 0.72rem;
}

.topbar-icon,
.topbar-avatar {
    min-width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--rizz-muted);
    font-size: 0.78rem;
    box-shadow: var(--rizz-card-shadow);
}

.topbar-icon:hover,
.topbar-icon:focus {
    color: var(--rizz-accent-dark);
}

.topbar-locale {
    color: var(--rizz-accent-dark);
}

.topbar-avatar {
    background: #111827;
    color: #ffffff;
}

.backoffice-body .compact-button,
.backoffice-body .button-secondary.compact-button {
    min-height: 2.55rem;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--rizz-text);
    box-shadow: var(--rizz-card-shadow);
}

.backoffice-body .compact-button:hover,
.backoffice-body .compact-button:focus {
    background: var(--rizz-accent);
    color: #ffffff;
}

.backoffice-content {
    width: 100%;
    max-width: none;
    padding: 1.45rem 2.1rem 2.4rem;
}

.backoffice-body .admin-heading,
.dashboard-hero-copy,
.dashboard-hero-card,
.metric-card,
.dashboard-card,
.admin-table-wrap,
.backoffice-body .details div,
.backoffice-body .empty-state,
.listing-form fieldset,
.notice {
    border-color: var(--rizz-line);
    border-radius: 8px;
    background: var(--rizz-panel);
    box-shadow: var(--rizz-shadow);
}

.backoffice-body .admin-heading {
    padding: 1.25rem 1.45rem;
}

.backoffice-body .admin-heading h1 {
    max-width: none;
    color: #202638;
    font-size: 2.05rem;
    line-height: 1.1;
}

.backoffice-body .admin-heading .lead {
    color: var(--rizz-muted);
    font-size: 0.98rem;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
    gap: 1.4rem;
    margin-bottom: 1.4rem;
}

.dashboard-hero-copy {
    padding: 1.35rem 1.5rem;
}

.dashboard-hero-copy h1 {
    color: #202638;
    font-size: 2rem;
    line-height: 1.08;
}

.dashboard-hero-copy .lead {
    max-width: 40rem;
    color: var(--rizz-muted);
    font-size: 0.96rem;
}

.dashboard-hero-card {
    background: #ffffff;
    color: var(--rizz-text);
}

.dashboard-hero-card span,
.dashboard-hero-card small {
    color: var(--rizz-muted);
}

.dashboard-hero-card b {
    color: #202638;
    font-size: 1.95rem;
}

.admin-snapshot {
    background: #ffffff;
    color: var(--rizz-text);
}

.snapshot-meter {
    height: 0.46rem;
    background: #eef2f7;
}

.snapshot-meter span {
    background: var(--rizz-accent);
}

.backoffice-body .button-link {
    border: 0;
    border-radius: 8px;
    background: var(--rizz-accent);
    color: #ffffff;
    box-shadow: 0 0.5rem 1.35rem rgba(34, 197, 94, 0.2);
}

.backoffice-body .button-link:hover,
.backoffice-body .button-link:focus {
    background: var(--rizz-accent-dark);
}

.backoffice-body .button-link.muted-link,
.backoffice-body .muted-link {
    border: 0;
    background: #ffffff;
    color: var(--rizz-text);
    box-shadow: var(--rizz-card-shadow);
}

.backoffice-body .button-link.muted-link:hover,
.backoffice-body .button-link.muted-link:focus,
.backoffice-body .muted-link:hover,
.backoffice-body .muted-link:focus {
    background: var(--rizz-accent-soft);
    color: var(--rizz-accent-dark);
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    margin-bottom: 1.4rem;
}

.metric-card {
    min-height: 8rem;
    align-items: flex-start;
    padding: 1.35rem 1.45rem;
}

.metric-card small {
    color: var(--rizz-muted);
    font-size: 0.86rem;
}

.metric-card b {
    margin-top: 0.4rem;
    color: #202638;
    font-size: 1.65rem;
    letter-spacing: 0;
}

.metric-icon {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 999px;
    color: #8b98b2;
    font-size: 0.74rem;
}

.metric-icon.gold,
.metric-icon.blue,
.metric-icon.coral,
.metric-icon.mint {
    background: #f2f5fa;
    color: #8b98b2;
}

.metric-card:nth-child(1) .metric-icon {
    background: var(--rizz-blue-soft);
    color: #5c75b8;
}

.metric-card:nth-child(2) .metric-icon {
    background: var(--rizz-rose-soft);
    color: #f43f5e;
}

.metric-card:nth-child(3) .metric-icon {
    background: var(--rizz-accent-soft);
    color: var(--rizz-accent-dark);
}

.metric-card:nth-child(4) .metric-icon,
.metric-card:nth-child(6) .metric-icon {
    background: var(--rizz-amber-soft);
    color: #d97706;
}

.dashboard-grid {
    gap: 1.4rem;
}

.dashboard-card {
    padding: 1.45rem;
}

.dashboard-card-wide {
    grid-column: span 8;
}

.dashboard-card h2,
.section-heading h2 {
    color: #202638;
    font-size: 1.15rem;
}

.dashboard-card-chart {
    min-height: 25.5rem;
}

.dashboard-line-chart {
    height: 11rem;
    border-color: var(--rizz-line);
    background: #fbfdff;
}

.dashboard-line-chart span {
    background: var(--rizz-accent);
}

.dashboard-line-chart span:nth-child(2) {
    background: #c4d5d9;
}

.dashboard-line-chart span:nth-child(3) {
    background: #27c56f;
}

.dashboard-line-chart span:nth-child(4) {
    background: #f87171;
}

.dashboard-ring {
    border-color: var(--rizz-accent);
    background: #edf3f4;
}

.dashboard-ring span {
    color: #202638;
}

.backoffice-body .kicker {
    color: var(--rizz-accent-dark);
}

.accent-card,
.operations-card {
    background: #ffffff;
    color: var(--rizz-text);
}

.accent-card .kicker,
.accent-card p,
.accent-card a {
    color: inherit;
}

.dashboard-action-list a {
    min-height: 2.35rem;
    padding: 0.62rem 0.78rem;
    border: 0;
    border-radius: 8px;
    background: var(--rizz-accent);
    color: #ffffff;
    box-shadow: 0 0.45rem 1.1rem rgba(34, 197, 94, 0.18);
}

.dashboard-action-list a:hover,
.dashboard-action-list a:focus {
    background: var(--rizz-accent-dark);
    text-decoration: none;
}

.dashboard-link-list a {
    min-height: 2.45rem;
    border-bottom-color: var(--rizz-line);
    color: var(--rizz-text);
}

.bar-list span,
.bar-list em,
.muted-text {
    color: var(--rizz-muted);
}

.bar-list b {
    background: var(--rizz-accent);
}

.admin-tabs {
    gap: 0.45rem;
}

.admin-tabs a,
.admin-tabs span {
    border-color: var(--rizz-line);
    background: #ffffff;
    color: var(--rizz-muted);
    box-shadow: none;
}

.admin-tabs a.active,
.admin-tabs a:hover,
.admin-tabs a:focus {
    border-color: var(--rizz-accent);
    background: var(--rizz-accent-soft);
    color: var(--rizz-accent-dark);
}

.admin-table-wrap {
    overflow: auto;
}

.admin-table {
    color: #111827;
    font-size: 0.93rem;
}

.admin-table th,
.admin-table td {
    padding: 0.88rem 1rem;
    border-bottom: 1px dashed #dfe6ef;
}

.admin-table th {
    background: #f1f4f9;
    color: #111827;
    font-size: 0.78rem;
    font-weight: 650;
    text-transform: none;
}

.admin-table tbody tr:hover {
    background: #fbfdfc;
}

.admin-table a {
    color: var(--rizz-accent-dark);
}

.status-pill {
    border-radius: 999px;
    background: var(--rizz-accent-soft);
    color: var(--rizz-accent-dark);
    font-weight: 650;
}

.notice {
    border-width: 1px;
}

.notice.success {
    border-color: rgba(34, 197, 94, 0.28);
    background: var(--rizz-accent-soft);
    color: #166534;
}

.notice.error,
.notice.notice-error {
    border-color: rgba(244, 63, 94, 0.26);
    background: var(--rizz-rose-soft);
    color: #9f1239;
}

.backoffice-body select,
.backoffice-body input,
.backoffice-body textarea {
    border-color: var(--rizz-line);
    background: #ffffff;
}

.backoffice-body select:focus,
.backoffice-body input:focus,
.backoffice-body textarea:focus {
    border-color: var(--rizz-accent);
    outline-color: rgba(34, 197, 94, 0.18);
}

.backoffice-body .details div {
    padding: 0.95rem 1rem;
}

.backoffice-body dt {
    color: var(--rizz-muted);
}

.backoffice-body dd {
    color: #202638;
    font-weight: 650;
}

.listing-form fieldset {
    padding: 1.2rem;
}

.listing-form legend {
    color: var(--rizz-accent-dark);
}

.upload-dropzone {
    border-color: rgba(34, 197, 94, 0.38);
    background: var(--rizz-accent-soft);
}

.upload-dropzone b {
    color: var(--rizz-accent-dark);
}

@media (max-width: 74rem) {
    .backoffice-topbar {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .topbar-greeting {
        min-width: 0;
        flex: 1 1 100%;
    }

    .topbar-search {
        flex: 1 1 18rem;
        max-width: none;
        margin-left: 0;
    }

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

    .dashboard-card,
    .dashboard-card-wide {
        grid-column: span 12;
    }
}

@media (max-width: 64rem) {
    .backoffice-shell {
        display: block;
    }

    .backoffice-sidebar {
        position: sticky;
        z-index: 30;
        top: 0;
        display: grid;
        grid-template-columns: auto auto;
        min-height: auto;
        gap: 0.5rem;
        padding: 0.65rem;
        border-right: 0;
        border-bottom: 1px solid var(--rizz-line);
    }

    .backoffice-brand {
        width: auto;
        margin: 0;
    }

    .backoffice-nav {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: repeat(auto-fit, minmax(2.65rem, 1fr));
        width: auto;
        gap: 0.35rem;
    }

    .backoffice-nav a {
        width: 100%;
        max-width: 3rem;
    }

    .backoffice-nav a::before,
    .backoffice-nav em {
        display: none;
    }

    .backoffice-site-link {
        justify-self: end;
        margin-top: 0;
    }

    .backoffice-content {
        padding: 1rem;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 42rem) {
    .backoffice-topbar {
        align-items: stretch;
    }

    .topbar-greeting strong {
        font-size: 1.15rem;
    }

    .topbar-actions {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-copy h1 {
        font-size: 1.45rem;
    }

    .dashboard-hero-copy,
    .dashboard-hero-card,
    .dashboard-card,
    .metric-card {
        padding: 1rem;
    }
}

/* TownHub-inspired custom public frontend pass: original CSS/markup, no third-party assets or code copy. */
:root {
    --townhub-navy: #31436f;
    --townhub-navy-dark: #26365c;
    --townhub-blue: #4db7fe;
    --townhub-blue-dark: #2f82e6;
    --townhub-blue-soft: #eaf6ff;
    --townhub-mint: #50d2aa;
    --townhub-rose: #f45d92;
    --townhub-amber: #f6b545;
    --townhub-ink: #25324d;
    --townhub-muted: #7183a7;
    --townhub-shadow: 0 1.35rem 3.2rem rgba(42, 57, 96, 0.16);
    --matrix-gold: #c8a25d;
    --matrix-gold-dark: #9c7332;
}

.public-body {
    --accent: var(--townhub-blue);
    --accent-dark: var(--townhub-blue-dark);
    --accent-soft: var(--townhub-blue-soft);
    color: var(--townhub-ink);
    background: #ffffff;
}

.public-body a {
    color: var(--townhub-blue-dark);
}

.public-body .site-header {
    min-height: 5rem;
    padding: 0 2.35rem;
    border: 0;
    background: var(--townhub-navy);
    box-shadow: 0 0.8rem 2rem rgba(25, 37, 67, 0.16);
}

.home-body .site-header {
    background: rgba(49, 67, 111, 0.96);
    backdrop-filter: none;
}

.public-body .brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    text-decoration: none;
}

.public-body .brand::before {
    display: none;
}

.public-body .brand-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid rgba(200, 162, 93, 0.72);
    border-radius: 8px;
    color: var(--matrix-gold);
    font-size: 1.18rem;
    font-weight: 850;
    line-height: 1;
}

.brand-copy {
    display: grid;
    min-width: 0;
    gap: 0.05rem;
    line-height: 1.05;
    text-transform: uppercase;
}

.brand-copy strong {
    color: #ffffff;
    font-size: 1.16rem;
    font-weight: 780;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.68rem;
    font-weight: 650;
}

.public-body .nav a {
    min-height: 2.65rem;
    color: #ffffff;
    font-size: 0.9rem;
}

.public-body .nav a:hover,
.public-body .nav a:focus {
    background: rgba(77, 183, 254, 0.14);
}

.public-body .nav .nav-cta {
    border: 1px solid var(--townhub-blue);
    background: var(--townhub-blue);
    box-shadow: 0 0 0 0.35rem rgba(77, 183, 254, 0.14);
}

.public-body .nav .nav-cta:hover,
.public-body .nav .nav-cta:focus {
    border-color: #6ac3ff;
    background: #6ac3ff;
    color: #ffffff;
}

.public-body .nav .nav-login {
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.04);
}

.directory-hero {
    min-height: 40rem;
    padding: 8.9rem 1rem 4.25rem;
    background-image: url("/assets/img/hero-thailand.webp");
    background-position: center 54%;
}

.directory-hero::before {
    background: rgba(8, 20, 36, 0.52);
}

.directory-hero-content {
    width: min(70rem, 100%);
    padding-top: 2.65rem;
}

.directory-hero-content::before {
    display: block;
    width: 3.5rem;
    height: 0.16rem;
    margin-bottom: 1.15rem;
    border-radius: 999px;
    background: var(--matrix-gold);
    content: "";
}

.home-body .directory-hero .kicker {
    margin-bottom: 0.65rem;
    color: var(--matrix-gold);
}

.directory-hero h1 {
    max-width: 56rem;
    margin: 0 auto;
    color: #ffffff;
    font-size: 4.15rem;
    line-height: 1.04;
    text-shadow: 0 0.18rem 0.65rem rgba(4, 11, 20, 0.3);
}

.directory-hero .lead {
    max-width: 45rem;
    margin-top: 0.8rem;
    color: rgba(244, 219, 169, 0.96);
    font-size: 1.08rem;
    font-weight: 700;
}

.hero-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.9rem;
    margin-top: 2rem;
}

.hero-tabs a {
    position: relative;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
}

.hero-tabs a:hover,
.hero-tabs a:focus,
.hero-tabs a.active {
    color: var(--townhub-blue);
}

.hero-tabs a.active::after {
    position: absolute;
    right: 50%;
    bottom: -1rem;
    width: 0;
    height: 0;
    border-right: 0.65rem solid transparent;
    border-bottom: 0.65rem solid #ffffff;
    border-left: 0.65rem solid transparent;
    content: "";
    transform: translateX(50%);
}

.directory-search {
    position: relative;
    width: min(76rem, 100%);
    grid-template-columns: minmax(13.5rem, 1.35fr) minmax(8.5rem, 0.82fr) minmax(8.5rem, 0.78fr) minmax(11rem, 1fr) minmax(7.5rem, 0.72fr) minmax(7.5rem, 0.72fr) minmax(11rem, auto);
    margin-top: 1.85rem;
    padding: 0.65rem;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 0.4rem rgba(255, 255, 255, 0.18), 0 1.45rem 3.4rem rgba(7, 16, 31, 0.24);
}

.directory-search label {
    min-height: 3.65rem;
    justify-content: center;
    padding: 0 0.85rem;
    border-right: 1px solid #e5edf7;
}

.directory-search label span {
    color: var(--townhub-muted);
    font-size: 0.78rem;
    text-transform: none;
}

.directory-search input,
.directory-search select {
    color: var(--townhub-ink);
    font-size: 0.98rem;
    font-weight: 560;
}

.directory-search button {
    min-height: 3.65rem;
    min-width: 10rem;
    border-color: var(--matrix-gold);
    background: var(--matrix-gold);
    color: #ffffff;
    white-space: nowrap;
}

.directory-search button:hover,
.directory-search button:focus {
    border-color: var(--matrix-gold-dark);
    background: var(--matrix-gold-dark);
}

.quick-category-row {
    display: grid;
    justify-items: center;
    gap: 1.1rem;
    margin-top: 1.95rem;
}

.quick-category-row p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.93rem;
    font-style: italic;
    font-weight: 560;
}

.quick-category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.55rem;
}

.quick-category-list a {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    min-width: 5.2rem;
    color: #ffffff;
    text-decoration: none;
}

.quick-category-list span {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 2px solid rgba(77, 183, 254, 0.58);
    border-radius: 999px;
    color: var(--townhub-blue);
    font-size: 0.82rem;
    font-weight: 720;
}

.quick-category-list a:hover span,
.quick-category-list a:focus span {
    border-color: var(--townhub-blue);
    background: var(--townhub-blue);
    color: #ffffff;
}

.quick-category-list b {
    font-size: 0.86rem;
    font-weight: 600;
}

.hero-down {
    bottom: -1.3rem;
    width: 4.4rem;
    height: 3.25rem;
    border: 0;
    border-radius: 999px 999px 0 0;
    background: #ffffff;
    color: var(--townhub-blue);
    box-shadow: none;
}

.home-section {
    background: #ffffff;
}

.feature-band {
    background: #f6f8fb;
}

.home-section-title {
    position: relative;
    isolation: isolate;
}

.home-section-title[data-watermark]::before {
    position: absolute;
    z-index: -1;
    top: -1.2rem;
    left: 50%;
    color: rgba(77, 183, 254, 0.1);
    content: attr(data-watermark);
    font-size: 5.2rem;
    font-weight: 760;
    line-height: 1;
    text-transform: uppercase;
    transform: translateX(-50%);
    white-space: nowrap;
}

.home-section-title h2 {
    color: var(--townhub-ink);
}

.home-body .home-section .kicker {
    color: var(--townhub-blue-dark);
}

.home-section-title::after {
    background: var(--townhub-blue);
}

.section-copy {
    color: var(--townhub-muted);
}

.city-grid {
    gap: 1.45rem;
}

.city-card,
.search-photo-card {
    border-radius: 8px;
    box-shadow: 0 1rem 2.6rem rgba(31, 43, 74, 0.14);
}

.city-card::before,
.search-photo-card::before {
    background: rgba(8, 18, 35, 0.44);
}

.city-ribbon {
    border-radius: 8px;
    background: var(--townhub-rose);
}

.home-listing-tabs {
    border-color: #e3ebf6;
    box-shadow: 0 0.6rem 1.5rem rgba(42, 57, 96, 0.08);
}

.home-listing-tabs a.active,
.home-listing-tabs a:hover,
.home-listing-tabs a:focus,
.home-body .button-link {
    background: var(--townhub-blue);
    color: #ffffff;
}

.home-body .button-link {
    border-color: var(--townhub-blue);
}

.home-body .button-link:hover,
.home-body .button-link:focus {
    border-color: var(--townhub-blue-dark);
    background: var(--townhub-blue-dark);
}

.public-body .listing-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: 1.9rem;
}

.home-featured-listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}

.public-body .listing-card {
    position: relative;
    display: grid;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1rem 2.2rem rgba(31, 43, 74, 0.12);
}

.public-body .listing-card::after {
    display: none;
}

.public-body .listing-card:hover,
.public-body .listing-card:focus-within {
    border-color: #c9d8e8;
    box-shadow: 0 1.15rem 2.6rem rgba(31, 43, 74, 0.16);
}

.public-body .listing-frame {
    min-height: 0;
    border-bottom: 1px solid #e5edf7;
    background: #edf4fb;
}

.public-body .listing-media {
    min-height: 12rem;
    aspect-ratio: 16 / 10;
    background: #edf4fb;
}

.public-body .listing-slide {
    background: #edf4fb;
}

.public-body .listing-badge {
    z-index: 4;
    top: 0.85rem;
    right: 0.85rem;
    left: auto;
    border-radius: 999px;
    background: var(--townhub-rose);
    box-shadow: 0 0.65rem 1.35rem rgba(244, 93, 146, 0.28);
}

.public-body .gallery-nav {
    z-index: 5;
    top: 50%;
    width: 2.35rem;
    min-height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.88);
    color: #23344f;
    box-shadow: 0 0.45rem 1.1rem rgba(19, 31, 55, 0.18);
    transform: translateY(-50%);
}

.public-body .gallery-nav:hover,
.public-body .gallery-nav:focus {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--townhub-blue-dark);
}

.public-body .gallery-dots {
    z-index: 5;
    right: 0.85rem;
    bottom: 0.85rem;
    top: auto;
    align-items: center;
    padding: 0.28rem 0.35rem;
    border-radius: 999px;
    background: rgba(18, 30, 50, 0.32);
}

.public-body .gallery-dots span {
    background: rgba(255, 255, 255, 0.62);
}

.public-body .gallery-dots span.active {
    background: #ffffff;
}

.public-body .agency-overlay {
    position: static;
    z-index: auto;
    inset: auto;
    width: 100%;
    max-width: none;
    min-height: 2.45rem;
    padding: 0.42rem 0.5rem;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #f7faff;
    color: #263a59;
    box-shadow: none;
}

.public-body .agency-overlay span {
    background: var(--townhub-blue);
}

.public-body .agency-overlay b {
    color: #263a59;
}

.public-body .listing-body {
    position: static;
    z-index: auto;
    gap: 0.78rem;
    padding: 1rem;
    background: #ffffff;
    color: var(--townhub-ink);
}

.public-body .listing-body a,
.public-body .listing-body h2,
.public-body .listing-body h3 {
    color: var(--townhub-ink);
}

.public-body .listing-body h2 a,
.public-body .listing-body h3 a {
    display: -webkit-box;
    min-height: 2.55rem;
    overflow: hidden;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.public-body .listing-body h2 a:hover,
.public-body .listing-body h2 a:focus,
.public-body .listing-body h3 a:hover,
.public-body .listing-body h3 a:focus {
    color: var(--townhub-blue-dark);
    text-decoration: underline;
}

.public-body .listing-meta-row {
    gap: 0.4rem;
}

.public-body .listing-meta-row span {
    border: 1px solid #dbe6f2;
    border-radius: 999px;
    background: #f7fbff;
    color: #516582;
    font-size: 0.74rem;
}

.public-body .listing-meta-row span:nth-child(2) {
    border-color: rgba(31, 138, 131, 0.22);
    background: rgba(31, 138, 131, 0.08);
    color: #21635f;
}

.public-body .price {
    width: fit-content;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #1d2c44;
    font-size: 1.02rem;
}

.public-body .listing-body h2,
.public-body .listing-body h3 {
    font-size: 1.08rem;
    line-height: 1.22;
}

.public-body .listing-location {
    display: -webkit-box;
    overflow: hidden;
    color: #5d6f86;
    font-size: 0.9rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.public-body .mini-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.1rem;
    border: 0;
}

.public-body .mini-details div {
    display: flex;
    min-width: 0;
    min-height: 2.85rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.52rem 0.55rem;
    border: 1px solid #e0e8f2;
    border-radius: 8px;
    background: #f8fbfe;
}

.public-body .mini-details div:last-child {
    border-right: 1px solid #e0e8f2;
}

.public-body .mini-details dt {
    color: #6b7f97;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-body .mini-details dd {
    min-width: 0;
    color: #1d2c44;
    font-size: 0.86rem;
    font-weight: 760;
    overflow-wrap: anywhere;
    text-align: right;
}

.public-body .listing-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.05rem;
}

.public-body .listing-actions .button-link,
.public-body .listing-actions .button-secondary {
    justify-content: center;
    min-height: 2.45rem;
    box-shadow: none;
}

.public-body .listing-actions .button-link {
    border-color: var(--townhub-blue);
    background: var(--townhub-blue);
    color: #ffffff;
}

.public-body .listing-actions .button-secondary {
    border-color: #dbe6f2;
    background: #ffffff;
    color: #1d2c44;
}

.public-body .listing-actions .button-link:hover,
.public-body .listing-actions .button-link:focus {
    border-color: var(--townhub-blue-dark);
    background: var(--townhub-blue-dark);
}

.public-body .listing-actions .button-secondary:hover,
.public-body .listing-actions .button-secondary:focus {
    border-color: var(--townhub-blue);
    background: #eff7ff;
    color: var(--townhub-blue-dark);
}
.process-grid article {
    border-color: #e4edf7;
}

.process-grid span {
    background: var(--townhub-blue-soft);
    color: var(--townhub-blue-dark);
}

.owner-strip {
    background: var(--townhub-navy-dark);
}

.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child {
    background: #31436f;
    color: #ffffff;
}

.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child h1,
.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child h2,
.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child .lead,
.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child .kicker {
    color: #ffffff;
}

.public-full-width:not(.home-body) .page-shell > .panel:not(.admin-auth):first-child .kicker {
    color: var(--townhub-blue);
}

.search-filters,
.filters {
    border-color: #e1eaf5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--townhub-shadow);
}

.search-filters .filter-group,
.filters .filter-group {
    color: var(--townhub-muted);
}

.search-filters input,
.search-filters select,
.filters input,
.filters select {
    border-color: #e1eaf5;
}

.search-filters input:focus,
.search-filters select:focus,
.filters input:focus,
.filters select:focus {
    border-color: var(--townhub-blue);
    outline-color: rgba(77, 183, 254, 0.22);
}

.filter-actions button,
.public-body .button-link {
    border-color: var(--townhub-blue);
    background: var(--townhub-blue);
    color: #ffffff;
}

.filter-actions button:hover,
.filter-actions button:focus,
.public-body .button-link:hover,
.public-body .button-link:focus {
    border-color: var(--townhub-blue-dark);
    background: var(--townhub-blue-dark);
}

.public-body .site-footer {
    width: 100%;
    padding-right: var(--public-gutter);
    padding-left: var(--public-gutter);
    border-top: 1px solid #e5edf7;
    background: #ffffff;
}

.public-body .footer-links a:nth-child(-n+2) {
    font-weight: 800;
}

@media (max-width: 64rem) {
    .public-body .site-header {
        flex-wrap: wrap;
        padding: 0.85rem 1rem;
    }

    .public-body .nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .directory-hero {
        min-height: 46rem;
        padding-top: 9.8rem;
    }

    .directory-hero h1 {
        font-size: 3.05rem;
    }

    .directory-search {
        grid-template-columns: 1fr 1fr;
        width: min(48rem, 100%);
    }

    .directory-search button {
        grid-column: 1 / -1;
    }

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

    .quick-category-list {
        gap: 1rem;
    }

    .home-section-title[data-watermark]::before {
        top: -0.75rem;
        font-size: 4rem;
    }
}

@media (max-width: 42rem) {
    .public-body {
        overflow-x: hidden;
    }

    .public-body .site-header {
        align-items: flex-start;
        display: grid;
        grid-template-columns: 1fr;
        background: var(--townhub-navy);
    }

    .public-body .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.5rem;
        overflow: visible;
    }

    .public-body .nav a {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding-right: 0.45rem;
        padding-left: 0.45rem;
        font-size: 0.84rem;
        white-space: normal;
        text-align: center;
    }

    .directory-hero {
        min-height: 52rem;
        padding-top: 11.25rem;
    }

    .hero-tabs {
        gap: 0.9rem;
    }

    .directory-hero-content {
        max-width: 100%;
        overflow: hidden;
    }

    .directory-hero h1 {
        max-width: 22rem;
        font-size: 2.25rem;
    }

    .directory-hero .lead {
        max-width: 22rem;
        font-size: 1rem;
    }

    .directory-search {
        grid-template-columns: 1fr;
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.18), var(--townhub-shadow);
    }

    .directory-search label {
        min-height: 3.25rem;
        border-right: 0;
        border-bottom: 1px solid #e5edf7;
    }

    .directory-search label:last-of-type {
        border-bottom: 0;
    }

    .quick-category-row {
        align-items: stretch;
        justify-items: stretch;
    }

    .quick-category-row p {
        max-width: 100%;
        text-align: center;
    }

    .quick-category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-category-list a {
        min-width: 0;
    }

    .home-section-title[data-watermark]::before {
        max-width: 100%;
        overflow: hidden;
        font-size: 3.1rem;
    }

    .public-body .listing-card,
    .public-body .listing-frame,
    .public-body .listing-media {
        min-height: 0;
    }

    .home-featured-listing-grid {
        grid-template-columns: 1fr;
    }

    .public-body .listing-media {
        min-height: 14rem;
        aspect-ratio: 16 / 10;
    }

    .public-body .listing-body {
        padding: 0.95rem;
    }

    .public-body .mini-details {
        grid-template-columns: 1fr;
    }

    .public-body .mini-details div {
        min-height: 2.55rem;
    }

    .public-body .listing-actions {
        grid-template-columns: 1fr;
    }
}

/* Property detail layout pass: title first, gallery second, stronger detail cards. */
.property-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.9rem;
}

.property-copy {
    width: min(76rem, 100%);
    align-self: start;
}

.property-copy h1 {
    width: 100%;
    max-width: 70rem;
    margin: 0.35rem 0 0;
}

.property-price-line {
    width: min(70rem, 100%);
    max-width: none;
    margin-top: 0.85rem;
    color: #314155;
    font-size: 1.25rem;
    font-weight: 650;
}

.public-full-width .page-shell > .property-gallery-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(1.5rem, 3.2vw, 3rem) var(--public-gutter) clamp(2.5rem, 5vw, 5rem);
    border: 0;
    border-radius: 0;
    background: #f6f8fb;
    box-shadow: none;
}

.property-gallery-panel .property-gallery {
    width: min(86rem, 100%);
    margin: 0;
}

.property-gallery-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.property-gallery-strip {
    display: flex;
    min-width: 0;
    gap: 0.65rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0.1rem 0 0.45rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.property-gallery-item {
    display: block;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #e8eef5;
    box-shadow: 0 12px 28px rgba(37, 49, 65, 0.11);
    cursor: zoom-in;
}

.property-gallery-item:focus-visible {
    outline: 3px solid rgba(201, 162, 76, 0.45);
    outline-offset: 3px;
}

.property-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    object-fit: cover;
    transition: transform 180ms ease;
}

.property-gallery-item:hover img,
.property-gallery-item:focus-visible img {
    transform: scale(1.025);
}

.property-gallery-strip .property-gallery-item {
    flex: 0 0 clamp(6.5rem, 12vw, 9rem);
    scroll-snap-align: start;
    box-shadow: 0 8px 18px rgba(37, 49, 65, 0.09);
}

.property-gallery-strip .property-gallery-item img {
    aspect-ratio: 1 / 1;
}

.property-details-grid > div {
    border-color: #c9d8e8;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(35, 48, 67, 0.08);
}

.property-details-grid dt {
    color: #52657a;
    font-weight: 750;
}

.property-details-grid dd {
    color: #142033;
}

.property-description-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
}

.property-description-copy {
    min-width: 0;
}

.property-description-copy .description-text {
    max-width: 58rem;
}

.property-location-details {
    max-width: 58rem;
}

.property-map-column h3 {
    margin: 0 0 0.75rem;
}

.property-map-card {
    position: relative;
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-height: 20rem;
    padding: 1rem;
    overflow: hidden;
    border: 2px solid #cbd8e6;
    border-radius: 8px;
    background: #f8fbfd;
    color: #172437;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(35, 48, 67, 0.12);
}

.property-map-card.is-available {
    border-color: #2f9f62;
    background: #f3fbf6;
    box-shadow: 0 18px 38px rgba(29, 122, 71, 0.18);
}

.property-map-card.is-unavailable {
    border-color: #d87070;
    background: #fff7f7;
    box-shadow: 0 16px 34px rgba(145, 55, 55, 0.12);
}

.property-map-card.is-link:hover,
.property-map-card.is-link:focus {
    border-color: #1d7a47;
    color: #123728;
    text-decoration: none;
    transform: translateY(-1px);
}

.map-status-pill {
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 0.4rem;
    padding: 0.32rem 0.58rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
}

.map-status-pill.is-available {
    color: #10663c;
}

.map-status-pill.is-unavailable {
    color: #a33c3c;
}

.map-status-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: currentColor;
}

.map-status-pill.is-available .map-status-dot {
    box-shadow: 0 0 0 4px rgba(36, 156, 90, 0.16);
}

.map-status-pill.is-unavailable .map-status-dot {
    box-shadow: 0 0 0 4px rgba(184, 72, 72, 0.14);
}

.map-preview {
    position: relative;
    display: block;
    min-height: 10.5rem;
    overflow: hidden;
    border: 1px solid rgba(47, 159, 98, 0.25);
    border-radius: 8px;
    background: #edf5ef;
}

.map-preview.is-muted {
    border-color: rgba(184, 72, 72, 0.22);
    background: #f6eeee;
}

.map-block,
.map-road,
.map-pin {
    position: absolute;
    display: block;
}

.map-block {
    border: 1px solid rgba(77, 120, 93, 0.1);
    border-radius: 8px;
    background: #dceade;
}

.map-preview.is-muted .map-block {
    background: #ebdddd;
}

.map-block-a {
    top: 1rem;
    left: 1rem;
    width: 31%;
    height: 28%;
}

.map-block-b {
    right: 1.1rem;
    bottom: 1.1rem;
    width: 35%;
    height: 31%;
}

.map-block-c {
    right: 18%;
    top: 1.25rem;
    width: 22%;
    height: 22%;
}

.map-road {
    border: 1px solid rgba(125, 150, 135, 0.25);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(36, 58, 47, 0.08);
    transform-origin: left center;
}

.map-preview.is-muted .map-road {
    border-color: rgba(155, 118, 118, 0.25);
}

.map-road-a {
    top: 42%;
    left: -10%;
    width: 120%;
    height: 0.62rem;
    transform: rotate(-9deg);
}

.map-road-b {
    top: 71%;
    left: -8%;
    width: 118%;
    height: 0.5rem;
    transform: rotate(8deg);
}

.map-road-c {
    top: -18%;
    left: 46%;
    width: 0.6rem;
    height: 140%;
    transform: rotate(20deg);
}

.map-pin {
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #ffffff;
    color: #13824f;
    box-shadow: 0 14px 28px rgba(19, 130, 79, 0.24);
    transform: translate(-50%, -50%);
}

.map-preview.is-muted .map-pin {
    color: #b04747;
    box-shadow: 0 14px 28px rgba(176, 71, 71, 0.16);
}

.map-pin svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.map-card-copy {
    display: grid;
    gap: 0.22rem;
}

.map-card-copy strong {
    color: #172437;
    font-size: 1.05rem;
}

.map-card-copy span {
    color: #5d6f82;
    font-size: 0.92rem;
}

.contact-required-note {
    max-width: 42rem;
}
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.field-badge {
    flex: 0 0 auto;
    padding: 0.04rem 0.28rem;
    border: 1px solid #e1e8f0;
    border-radius: 999px;
    background: transparent;
    color: #738296;
    font-size: 0.62rem;
    font-weight: 650;
    line-height: 1.2;
}

.field-badge.required {
    border-color: rgba(178, 142, 63, 0.28);
    background: rgba(201, 162, 76, 0.06);
    color: #806b35;
}

.property-lightbox[hidden] {
    display: none;
}

.property-lightbox {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem clamp(1rem, 4vw, 3rem);
    background: rgba(8, 14, 24, 0.92);
}

body.is-lightbox-open {
    overflow: hidden;
}

.property-lightbox-frame {
    display: grid;
    justify-items: center;
    gap: 0.85rem;
    min-width: 0;
    margin: 0;
}

.property-lightbox-frame img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    border-radius: 8px;
    object-fit: contain;
    background: #111827;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.property-lightbox-frame figcaption {
    max-width: min(56rem, 100%);
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
}

.property-lightbox-close,
.property-lightbox-nav {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    box-shadow: none;
}

.property-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.property-lightbox-close:hover,
.property-lightbox-close:focus,
.property-lightbox-nav:hover,
.property-lightbox-nav:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.property-lightbox.is-single .property-lightbox-nav {
    visibility: hidden;
}

@media (max-width: 64rem) {
    .property-description-layout {
        grid-template-columns: 1fr;
    }

    .property-map-card {
        min-height: 15rem;
    }
}

@media (max-width: 42rem) {
    .public-full-width .page-shell > .property-gallery-panel {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .property-gallery-featured {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
        overflow: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
    }

    .property-gallery-featured .property-gallery-item {
        min-width: 0;
        width: 100%;
        flex: none;
        scroll-snap-align: unset;
    }

    .property-gallery-featured .property-gallery-item img {
        aspect-ratio: 4 / 3;
    }

    .property-gallery-strip {
        display: flex;
        gap: 0.55rem;
        overflow-x: auto;
        padding-bottom: 0.45rem;
        scroll-snap-type: x proximity;
    }

    .property-gallery-strip .property-gallery-item {
        flex: 0 0 5.75rem;
    }

    .property-gallery-strip .property-gallery-item img {
        aspect-ratio: 1 / 1;
    }

    .form-label-row {
        align-items: flex-start;
    }

    .field-badge {
        max-width: 9.5rem;
        white-space: normal;
        text-align: right;
    }

    .property-lightbox {
        grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
        gap: 0.4rem;
        padding: 4rem 0.6rem 2rem;
    }

    .property-lightbox-close,
    .property-lightbox-nav {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.45rem;
    }

    .property-lightbox-frame img {
        max-height: calc(100vh - 8rem);
    }
}

/* Matrix Real Estate client home polish: clean first-screen search and branded assets. */
.public-body .brand-matrix {
    min-width: 12rem;
    max-width: 13.75rem;
}

.public-body .brand-matrix img {
    display: block;
    width: 13.625rem;
    max-width: 100%;
    height: auto;
}

.directory-hero {
    min-height: 37rem;
    padding: 8.25rem 1rem 2.75rem;
    z-index: 2;
    overflow: visible;
    background-position: center 52%;
}

.directory-hero::before {
    background: rgba(8, 20, 36, 0.34);
}

.directory-hero-content {
    width: min(88rem, 100%);
    padding-top: 1.55rem;
    z-index: 3;
}

.directory-hero-content::before {
    margin-right: auto;
    margin-left: auto;
}

.directory-hero h1 {
    max-width: 52rem;
    font-size: 3.85rem;
}

.directory-hero .lead {
    margin-top: 0.7rem;
    font-size: 1.02rem;
}

.home-search-form {
    position: relative;
    z-index: 8;
    width: min(88rem, calc(100vw - 2rem));
    grid-template-columns:
        minmax(12.25rem, 1.32fr)
        minmax(8.5rem, 0.9fr)
        minmax(8.75rem, 0.9fr)
        minmax(7.75rem, 0.74fr)
        minmax(7.35rem, 0.68fr)
        minmax(6.8rem, 0.58fr)
        minmax(6.8rem, 0.58fr)
        minmax(10rem, 0.82fr);
    gap: 0.55rem;
    align-items: end;
    margin-top: 1.65rem;
    padding: 0.78rem;
    border: 1px solid rgba(221, 229, 240, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1rem 2.6rem rgba(7, 16, 31, 0.2);
}

.home-search-form .autocomplete-field:focus-within {
    z-index: 120;
}

.home-search-form .autocomplete-listbox {
    top: calc(100% + 0.42rem);
    border-color: rgba(204, 166, 97, 0.78);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 1.25rem 2.8rem rgba(7, 16, 31, 0.24);
}

.home-search-form label {
    display: grid;
    align-content: start;
    justify-content: stretch;
    gap: 0.35rem;
    min-height: 0;
    padding: 0;
    border: 0;
    color: #52617c;
    text-align: left;
}

.home-search-form label span {
    color: #465671;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.2;
}

.home-search-form input,
.home-search-form select {
    min-height: 2.65rem;
    padding: 0.58rem 0.72rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fbfdff;
    color: #24324b;
    font-size: 0.9rem;
    font-weight: 620;
    box-shadow: none;
}

.home-search-form input::placeholder {
    color: #8c9aaf;
}

.home-search-form input:focus,
.home-search-form select:focus {
    border-color: var(--matrix-gold);
    outline: 3px solid rgba(200, 162, 93, 0.22);
}

.home-search-form button {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    align-self: end;
    padding: 0.58rem 0.95rem;
    border-color: var(--matrix-gold);
    border-radius: 8px;
    background: var(--matrix-gold);
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: normal;
}

.home-search-form button:hover,
.home-search-form button:focus {
    border-color: var(--matrix-gold-dark);
    background: var(--matrix-gold-dark);
}

.home-search-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    align-self: end;
    min-width: 0;
}

.home-search-form .home-search-actions button {
    min-height: 2.65rem;
}

.home-search-form .home-search-actions .map-open-submit {
    border-color: #dbe4ef;
    background: #ffffff;
    color: #24324b;
    box-shadow: none;
}

.home-search-form .home-search-actions .map-open-submit:hover,
.home-search-form .home-search-actions .map-open-submit:focus {
    border-color: var(--matrix-gold);
    background: #fff8eb;
    color: #24324b;
}

.map-open-button {
    gap: 0.45rem;
}

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

.search-filters .filter-actions {
    grid-column: span 6;
}

.search-results-anchor {
    scroll-margin-top: 1.25rem;
}

.filter-actions .map-open-button {
    border-color: #dbe4ef;
    background: #ffffff;
    color: #24324b;
    box-shadow: none;
}

.filter-actions .map-open-button:hover,
.filter-actions .map-open-button:focus {
    border-color: var(--townhub-blue);
    background: #eff7ff;
    color: var(--townhub-blue-dark);
}

.map-search-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 2.4fr) minmax(12rem, 0.95fr);
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 0.25rem;
    padding: 0.75rem;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #f8fbfe;
}

.map-search-panel[hidden] {
    display: none;
}

.map-search-guide,
.map-selection-card {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #e1eaf5;
    border-radius: 8px;
    background: #ffffff;
}

.map-search-guide h2 {
    font-size: 1rem;
}

.map-tool-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

.map-tool-switch button {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    border-color: #dbe4ef;
    background: #ffffff;
    color: #24324b;
    box-shadow: none;
}

.map-tool-switch button.active {
    border-color: var(--townhub-blue);
    background: var(--townhub-blue);
    color: #ffffff;
}

.map-viewport {
    position: relative;
    min-height: 22rem;
    overflow: hidden;
    border: 1px solid #cfdae8;
    border-radius: 8px;
    background: #edf5fb;
    touch-action: none;
}

.map-viewport:focus {
    outline: 3px solid rgba(77, 183, 254, 0.24);
    outline-offset: 2px;
}

.map-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

.map-tile-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #dbe8f1;
}

.map-tile {
    position: absolute;
    display: block;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.map-selection-box {
    position: absolute;
    z-index: 3;
    border: 3px solid #2f82e6;
    border-radius: 50%;
    background: rgba(77, 183, 254, 0.22);
    box-shadow: 0 0 0 9999px rgba(17, 34, 60, 0.1);
    pointer-events: none;
}

.map-zoom-controls {
    position: absolute;
    z-index: 4;
    top: 0.75rem;
    left: 0.75rem;
    display: grid;
    gap: 0.35rem;
}

.map-zoom-controls button {
    display: grid;
    width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    place-items: center;
    border-color: rgba(26, 46, 74, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #1c314d;
    font-size: 1.2rem;
    line-height: 1;
    box-shadow: 0 0.45rem 1rem rgba(24, 42, 64, 0.13);
}

.map-zoom-controls button:hover,
.map-zoom-controls button:focus {
    border-color: var(--townhub-blue);
    background: #ffffff;
    color: var(--townhub-blue-dark);
}

.map-attribution {
    position: absolute;
    z-index: 4;
    right: 0.55rem;
    bottom: 0.55rem;
    max-width: calc(100% - 1.1rem);
    padding: 0.18rem 0.38rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #26374c;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.map-attribution:hover,
.map-attribution:focus {
    color: var(--townhub-blue-dark);
    text-decoration: underline;
}

.map-selection-card p {
    margin: 0;
    color: #52617c;
}

.map-selection-card button {
    width: 100%;
}

.latest-listings-section {
    position: relative;
    z-index: 1;
    padding-top: 2.5rem;
    padding-bottom: 4.5rem;
    background: #f6f8fb;
}

.latest-listings-section .home-section-title {
    margin-bottom: 1.55rem;
}

.latest-listings-section .home-section-title::after {
    display: none;
}

.latest-listings-section .section-copy {
    max-width: 34rem;
}

.home-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 1.5rem;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #ffffff;
    color: var(--townhub-muted);
    text-align: center;
}

.home-empty-state h3 {
    color: var(--townhub-ink);
}

.home-empty-state p {
    margin: 0;
}

@media (max-width: 78rem) {
    .home-search-form {
        width: min(58rem, 100%);
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-search-form .search-field-primary {
        grid-column: 1 / -1;
    }

    .home-search-form button {
        grid-column: 1 / -1;
    }

    .map-search-panel {
        grid-template-columns: 1fr;
    }

    .map-viewport {
        min-height: 20rem;
    }
}

@media (max-width: 64rem) {
    .public-body .brand-matrix {
        max-width: 12.25rem;
    }

    .public-body .brand-matrix img {
        width: 12.25rem;
    }

    .directory-hero {
        min-height: 41rem;
        padding-top: 9.4rem;
    }

    .directory-hero h1 {
        font-size: 2.95rem;
    }

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

    .filter-actions {
        grid-template-columns: 1fr;
    }

    .search-filters .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 42rem) {
    .public-body .brand-matrix {
        max-width: 11rem;
    }

    .public-body .brand-matrix img {
        width: 11rem;
    }

    .directory-hero {
        min-height: 0;
        padding: 10.75rem 1rem 2rem;
    }

    .directory-hero-content {
        padding-top: 0.45rem;
    }

    .directory-hero h1 {
        max-width: 22rem;
        font-size: 2.18rem;
    }

    .directory-hero .lead {
        max-width: 22rem;
        font-size: 0.98rem;
    }

    .home-search-form {
        grid-template-columns: 1fr;
        width: min(23rem, 100%);
        margin-top: 1.35rem;
        padding: 0.7rem;
        gap: 0.6rem;
    }

    .home-search-form .search-field-primary,
    .home-search-form button {
        grid-column: auto;
    }

    .home-search-form label {
        border: 0;
    }

    .home-search-form input,
    .home-search-form select,
    .home-search-form button {
        min-height: 2.75rem;
    }

    .filter-actions {
        grid-template-columns: 1fr;
    }

    .map-search-panel {
        padding: 0.6rem;
    }

    .map-search-guide,
    .map-selection-card {
        padding: 0.85rem;
    }

    .map-viewport {
        min-height: 17rem;
    }

    .latest-listings-section {
        padding-top: 2rem;
    }
}

/* Search page client polish: slimmer controls, right-side map tools and lighter typography. */
.public-full-width:not(.home-body) .page-shell > .search-page-panel.panel:not(.admin-auth):first-child {
    background: #f7f9fc;
    color: #182335;
}

.public-full-width:not(.home-body) .page-shell > .search-page-panel.panel:not(.admin-auth):first-child h1 {
    max-width: 48rem;
    color: #162235;
    font-size: 2.85rem;
    font-weight: 650;
}

.public-full-width:not(.home-body) .page-shell > .search-page-panel.panel:not(.admin-auth):first-child .lead {
    max-width: 46rem;
    color: #5f6d7e;
    font-size: 0.98rem;
    font-weight: 400;
}

.public-full-width:not(.home-body) .page-shell > .search-page-panel.panel:not(.admin-auth):first-child .kicker {
    color: #9d7a35;
    font-size: 0.7rem;
    font-weight: 700;
}

.search-page-panel .search-filters {
    gap: 0.62rem;
    align-items: end;
    margin-top: 1.35rem;
    padding: 0.82rem;
    border-color: #dce5ef;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0.75rem 1.8rem rgba(32, 48, 72, 0.08);
}

.search-page-panel .filter-group,
.search-page-panel .filters label,
.search-page-panel .filter-operation legend {
    gap: 0.28rem;
    color: #607083;
    font-size: 0.76rem;
    font-weight: 650;
}

.search-page-panel .search-filters input,
.search-page-panel .search-filters select {
    min-height: 2.36rem;
    padding: 0.48rem 0.64rem;
    border-color: #d9e3ee;
    background: #fbfdff;
    color: #1f2c3d;
    font-size: 0.84rem;
    font-weight: 400;
}

.search-page-panel .search-filters input::placeholder {
    color: #93a0b0;
}

.search-page-panel .segmented-control {
    min-height: 2.36rem;
    border-color: #d9e3ee;
}

.search-page-panel .segmented-control label {
    color: #607083;
    font-size: 0.78rem;
    font-weight: 500;
}

.search-page-panel .segmented-control span {
    padding: 0.52rem 0.42rem;
}

.search-page-panel .segmented-control input:checked + span {
    background: #f4ecd9;
    color: #7d6125;
}

.search-page-panel .filter-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
}

.search-page-panel .filter-actions button,
.search-page-panel .filter-actions .button-secondary {
    min-height: 2.36rem;
    padding: 0.48rem 0.68rem;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.2;
}

.search-page-panel .filter-actions button[type="submit"]:not(.map-open-button) {
    border-color: #2f8fd7;
    background: #2f8fd7;
}

.search-page-panel .filter-actions button[type="submit"]:not(.map-open-button):hover,
.search-page-panel .filter-actions button[type="submit"]:not(.map-open-button):focus {
    border-color: #2474b2;
    background: #2474b2;
}

.search-page-panel .filter-actions .map-open-button,
.search-page-panel .filter-actions .button-secondary {
    border-color: #d9e3ee;
    background: #ffffff;
    color: #314056;
}

.search-page-panel .filter-actions .map-open-button:hover,
.search-page-panel .filter-actions .map-open-button:focus,
.search-page-panel .filter-actions .button-secondary:hover,
.search-page-panel .filter-actions .button-secondary:focus {
    border-color: #c8a15a;
    background: #fff9ed;
    color: #5f471c;
}

.search-page-panel .map-search-panel {
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 16rem);
    grid-template-rows: auto 1fr;
    gap: 0.62rem;
    align-items: start;
    margin-top: 0.35rem;
    padding: 0.62rem;
    border-color: #dce5ef;
    background: #f5f8fb;
    box-shadow: none;
}

.search-page-panel .map-search-guide {
    grid-column: 2;
    grid-row: 1;
}

.search-page-panel .map-viewport {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 21rem;
    border-color: #cdd9e7;
    background: #e9f1f7;
}

.search-page-panel .map-selection-card {
    grid-column: 2;
    grid-row: 2;
}

.search-page-panel .map-search-guide,
.search-page-panel .map-selection-card {
    gap: 0.58rem;
    padding: 0.78rem;
    border-color: #dfe7f1;
    background: #ffffff;
    box-shadow: none;
}

.search-page-panel .map-search-guide .kicker,
.search-page-panel .map-selection-card .kicker {
    margin-bottom: 0;
    color: #728196;
    font-size: 0.64rem;
    font-weight: 700;
}

.search-page-panel .map-search-guide h2 {
    color: #1f2c3d;
    font-size: 0.96rem;
    font-weight: 600;
}

.search-page-panel .map-tool-switch {
    gap: 0.32rem;
}

.search-page-panel .map-tool-switch button,
.search-page-panel .map-selection-card button {
    min-height: 2.18rem;
    padding: 0.42rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.search-page-panel .map-tool-switch button {
    border-color: #d9e3ee;
    color: #314056;
}

.search-page-panel .map-tool-switch button.active {
    border-color: #2f8fd7;
    background: #2f8fd7;
}

.search-page-panel .map-selection-card p {
    color: #607083;
    font-size: 0.82rem;
    font-weight: 400;
}

.search-page-panel .map-selection-card button[data-map-confirm] {
    border-color: #c7a15a;
    background: #c7a15a;
}

.search-page-panel .map-selection-card button[data-map-confirm]:hover,
.search-page-panel .map-selection-card button[data-map-confirm]:focus {
    border-color: #9d7731;
    background: #9d7731;
}

.search-page-panel .map-zoom-controls {
    top: 0.58rem;
    left: 0.58rem;
    gap: 0.28rem;
}

.search-page-panel .map-zoom-controls button {
    width: 2rem;
    min-height: 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.search-page-panel .map-attribution {
    right: 0.42rem;
    bottom: 0.42rem;
    padding: 0.12rem 0.28rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.84);
    color: #506074;
    font-size: 0.58rem;
    font-weight: 400;
    line-height: 1.15;
}

.search-page-panel .result-bar {
    color: #5f6d7e;
    font-size: 0.86rem;
}

@media (max-width: 78rem) {
    .search-page-panel .map-search-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .search-page-panel .map-search-guide,
    .search-page-panel .map-viewport,
    .search-page-panel .map-selection-card {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 64rem) {
    .search-page-panel .filter-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 42rem) {
    .public-full-width:not(.home-body) .page-shell > .search-page-panel.panel:not(.admin-auth):first-child h1 {
        font-size: 2rem;
    }

    .search-page-panel .search-filters {
        padding: 0.7rem;
    }

    .search-page-panel .map-viewport {
        min-height: 17.5rem;
    }
}
