/* ==========================================================================
   FREC Design System — Modern Marketplace
   One token layer. Brand blue #1D4ED8 + amber accent #D97706 on slate
   neutrals. Lexend (headings) + Source Sans 3 (body). Flat, search-first.
   ========================================================================== */

:root {
    /* Brand */
    --brand: #1D4ED8;
    --brand-deep: #1E3A8A;
    --brand-bright: #3B82F6;
    --brand-soft: #EFF4FE;

    /* Accent (amber — listing CTA, featured) */
    --accent: #D97706;
    --accent-hover: #B45309;
    --accent-soft: #FDF3E3;

    /* Legacy aliases (kept so existing views keep working) */
    --gold: var(--accent);
    --gold-hover: var(--accent-hover);
    --gold-soft: var(--accent-soft);
    --color-navy: var(--brand);
    --color-navy-hover: var(--brand-deep);
    --color-gold: var(--accent);
    --color-gold-hover: var(--accent-hover);

    /* Neutrals */
    --canvas: #F8FAFC;
    --bg: #FFFFFF;
    --ink: #0F172A;
    --ink-soft: #475569;
    --line: #E2E8F0;

    /* Semantic */
    --success: #15803D;
    --success-soft: #E9F7EE;
    --danger: #B91C1C;
    --danger-soft: #FDECEC;
    --warning: #B45309;

    /* Elevation — subtle */
    --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-lift: 0 4px 16px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.06);

    /* Radii — 12px standard */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 12px;
    --radius-xl: 12px;
    --radius-pill: 999px;
    --radius: 12px;

    /* Typography */
    --font-heading: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-nav: var(--font-body);

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-display: clamp(2.5rem, 5vw, 3.75rem);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-brand: var(--brand);
    --text-inverse: #ffffff;
    --text-inverse-muted: rgba(255, 255, 255, 0.82);

    /* Layout */
    --header-h: 72px;
    --sidebar-w: 260px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Bootstrap overrides */
    --bs-primary: var(--brand);
    --bs-primary-rgb: 29, 78, 216;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--canvas);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-deep);
    --bs-border-radius: 0.625rem;
    --bs-border-color: var(--line);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 0.6rem;
}

h1 { letter-spacing: -0.03em; }

p {
    color: var(--ink);
    margin: 0 0 1rem;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

a:hover {
    color: var(--brand-deep);
}

::selection {
    background: var(--brand-soft);
    color: var(--brand-deep);
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.text-muted,
.form-text,
.card-subtitle,
.blockquote-footer {
    color: var(--ink-soft) !important;
}

.container {
    width: min(1200px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -48px;
    background: var(--brand);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    z-index: 2000;
    transition: top 0.25s var(--ease);
}

.skip-link:focus {
    top: 0.6rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn,
button.btn,
a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.62rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.005em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.12s var(--ease);
}

.btn:active {
    transform: translateY(1px);
}

.btn-brand,
.btn-primary,
.btn-navy {
    background: var(--brand);
    color: #fff !important;
    border-color: var(--brand);
}

.btn-brand:hover,
.btn-primary:hover,
.btn-primary:focus,
.btn-navy:hover,
.btn-navy:focus {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    color: #fff !important;
}

.btn-accent,
.btn-gold {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
}

.btn-accent:hover,
.btn-accent:focus,
.btn-gold:hover,
.btn-gold:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff !important;
}

.btn-outline,
.btn-outline-navy {
    background: #fff;
    color: var(--brand) !important;
    border-color: var(--brand);
}

.btn-outline:hover,
.btn-outline:focus,
.btn-outline-navy:hover,
.btn-outline-navy:focus {
    background: var(--brand);
    color: #fff !important;
    border-color: var(--brand);
}

.btn-ghost {
    background: #fff;
    color: var(--ink) !important;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    min-height: 42px;
    padding: 0.45rem 1rem;
    box-shadow: var(--shadow-soft);
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand) !important;
}

.btn-pill,
.btn-pill-outline {
    border-radius: var(--radius-pill);
    min-height: 40px;
    padding: 0.42rem 1.15rem;
}

.btn-pill-outline {
    background: transparent;
    color: var(--brand) !important;
    border-color: var(--brand);
}

.btn-pill-outline:hover,
.btn-pill-outline:focus {
    background: var(--brand);
    color: #fff !important;
    border-color: var(--brand);
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #991B1B;
    border-color: #991B1B;
}

.btn-secondary {
    background: var(--ink-soft);
    border-color: var(--ink-soft);
    color: #fff !important;
}

.btn-secondary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff !important;
}

/* --------------------------------------------------------------------------
   Surfaces
   -------------------------------------------------------------------------- */

.card-surface {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    background: #fff;
    color: var(--ink);
    min-height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink) !important;
    min-width: 0;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    flex: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    flex: none;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 3px 6px;
}

.brand-logo-dash {
    height: 34px;
    max-width: 120px;
    padding: 2px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-tag {
    color: var(--ink-soft);
    font-size: 0.72rem;
    line-height: 1.3;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-public .brand-tag {
    display: none;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 1.75rem;
}

.site-nav > a {
    color: var(--ink-soft);
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    position: relative;
    padding: 0.7rem 0;
}

.site-nav > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 3px;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
}

.site-nav > a:hover::after,
.site-nav > a[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
    color: var(--brand);
}

.site-nav > a[aria-current="page"] {
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

.nav-login,
.nav-logout {
    color: var(--ink) !important;
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.nav-login:hover,
.nav-logout:hover {
    color: var(--brand) !important;
}

.site-main {
    min-height: calc(100vh - 280px);
}

/* --------------------------------------------------------------------------
   Flash messages & toasts
   -------------------------------------------------------------------------- */

.flash-wrap:empty,
.flash-wrap:not(:has(.flash)) {
    display: none;
}

.flash-wrap:has(.flash) {
    padding-top: 1rem;
}

.flash {
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.flash-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(21, 128, 61, 0.25);
}

.flash-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(185, 28, 28, 0.25);
}

.flash-list {
    margin: 0;
    padding-left: 1.1rem;
}

.toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--ink);
    color: #fff;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lift);
    border-left: 4px solid var(--brand-bright);
}

/* --------------------------------------------------------------------------
   Hero (home — search first)
   -------------------------------------------------------------------------- */

.hero {
    background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
    color: var(--ink);
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
    padding: 3rem 0 2.5rem;
    position: relative;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--ink);
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    line-height: 1.15;
    max-width: 20ch;
}

.hero-lead {
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 56ch;
    line-height: 1.6;
}

.eyebrow {
    display: inline-block;
    color: var(--brand);
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: var(--text-xs);
    margin-bottom: 1rem;
    padding: 0;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.3rem;
    margin-top: 1.1rem;
    color: var(--ink-soft);
    font-size: var(--text-sm);
    font-weight: 600;
}

.hero-proof span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-proof i {
    color: var(--success);
}

.search-panel {
    margin-top: 1.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    box-shadow: var(--shadow-card);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
}

.search-panel .field {
    min-width: 0;
}

.search-panel .field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.search-panel .field input,
.search-panel .field select {
    min-height: 48px;
}

.search-submit {
    min-height: 48px;
    white-space: nowrap;
}

.popular-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    color: var(--ink-soft);
    margin-top: 0.9rem;
    font-size: var(--text-sm);
}

.popular-searches a {
    color: var(--brand);
    font-weight: 600;
    border-bottom: 1px solid transparent;
}

.popular-searches a:hover {
    border-bottom-color: var(--brand);
}

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    padding: 2.5rem 0 2rem;
    position: relative;
}

.page-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--ink);
}

.page-hero .hero-lead {
    max-width: 52ch;
    margin-bottom: 0;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: var(--text-sm);
}

.crumbs a,
.crumbs span {
    color: var(--ink-soft);
}

.crumbs a:hover {
    color: var(--brand);
}

.crumbs-dark a,
.crumbs-dark span {
    color: var(--ink-soft);
}

.crumbs-dark a:hover {
    color: var(--brand);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
    padding: 4.5rem 0;
    position: relative;
}

.section-alt {
    background: #fff;
    border-block: 1px solid var(--line);
}

.section-head {
    margin-bottom: 2.25rem;
    max-width: 650px;
}

.section-head h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--ink);
}

.section-kicker {
    color: var(--brand);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    font-weight: 700;
    margin-bottom: 0.5rem !important;
}

.section-head p {
    color: var(--ink-soft);
    margin-top: 0.6rem;
    font-size: var(--text-lg);
}

.section-more {
    margin-top: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state i {
    font-size: 2.4rem;
    color: var(--brand-bright);
}

.empty-state h2,
.empty-state h3 {
    margin-top: 0.9rem;
}

.empty-state p {
    color: var(--ink-soft);
    max-width: 46ch;
    margin-inline: auto;
}

.text-link {
    font-weight: 700;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.text-link:hover {
    color: var(--brand-deep);
}

/* --------------------------------------------------------------------------
   Stats strip
   -------------------------------------------------------------------------- */

.stats-strip {
    background: var(--brand-deep);
    color: #fff;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--text-inverse-muted);
    margin: 0;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field label {
    display: block;
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: 0.3rem;
    color: var(--ink);
}

.field input,
.field select,
.form-control,
.form-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.85rem;
    color: var(--ink);
    background: #fff;
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.field input:focus,
.field select:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.field-error {
    color: var(--danger);
    font-weight: 600;
    font-size: var(--text-sm);
    margin: 0.35rem 0 0;
}

.field-hint {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0.35rem 0 0;
}

.form-card textarea,
.contact-card textarea,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
    color: var(--ink);
    font-family: var(--font-body);
    transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.form-card textarea:focus,
.contact-card textarea:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.4rem;
    align-items: start;
}

.contact-card,
.form-card {
    padding: 1.75rem;
}

.form-section {
    border: 0;
    margin: 0 0 1.5rem;
    padding: 0;
}

.form-section legend {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
    color: var(--ink);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-card .field,
.contact-card .field {
    margin-bottom: 1rem;
}

.check-inline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.4rem 0 0.6rem;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-actions-center {
    justify-content: center;
}

.asset-preview img {
    max-height: 64px;
    width: auto;
    display: block;
}

.asset-preview-sm img {
    max-height: 32px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pager-wrap {
    margin-top: 1.5rem;
}

.pager-wrap .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pager-wrap .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
}

.pager-wrap .pagination a:hover {
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: var(--shadow-soft);
}

.pager-wrap .pagination .active a {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Listing cards
   -------------------------------------------------------------------------- */

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

.listing-grid-count-1 {
    grid-template-columns: minmax(280px, 400px);
    justify-content: center;
}

.listing-grid-count-2 {
    grid-template-columns: repeat(2, minmax(280px, 400px));
    justify-content: center;
}

.listing-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(29, 78, 216, 0.35);
}

.listing-card-media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--brand-soft);
}

.listing-card-media img,
.listing-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card-media img {
    transition: transform 0.4s var(--ease);
}

.listing-card:hover .listing-card-media img {
    transform: scale(1.04);
}

.listing-card-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.listing-photo-note {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
}

.listing-badge,
.listing-purpose-badge {
    position: absolute;
    top: 0.75rem;
    z-index: 2;
    padding: 0.32rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.listing-badge {
    left: 0.75rem;
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.listing-purpose-badge {
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
}

.listing-card-body {
    padding: 1rem 1.15rem 1.15rem;
}

.listing-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.listing-card-price {
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.listing-card-loc {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0;
    text-align: right;
    max-width: 45%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-card-loc i {
    color: var(--brand-bright);
}

.listing-card-title {
    font-size: 1rem;
    margin: 0.55rem 0 0.85rem;
    line-height: 1.35;
    font-weight: 600;
}

.listing-card-title a {
    color: var(--ink);
}

.listing-card-title a:hover {
    color: var(--brand);
}

.listing-card-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

.listing-card-facts span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.listing-card-facts i {
    color: var(--brand-bright);
}

.listing-kicker,
.listing-meta {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin-bottom: 0.35rem;
}

.listing-price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.listing-meta span + span::before {
    content: " · ";
}

.listing-card-placeholder,
.listing-hero-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 180px;
    color: var(--brand-bright);
    font-size: 2.4rem;
    background: var(--brand-soft);
}

/* --------------------------------------------------------------------------
   Listing index: sidebar filters + results with grid/list view toggle
   -------------------------------------------------------------------------- */

.listing-index-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.listing-filters {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    padding: 1.25rem;
}

.listing-filters .filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}

.listing-filters .form-actions {
    flex-direction: column;
    align-items: stretch;
}

.listing-filters .form-actions .btn {
    width: 100%;
}

.listing-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.listing-count {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: var(--text-sm);
}

.view-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.view-toggle button {
    width: 42px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    display: grid;
    place-items: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.view-toggle button + button {
    border-left: 1px solid var(--line);
}

.view-toggle button:hover {
    color: var(--brand);
}

.view-toggle button.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

/* List view (default) — horizontal cards */
.listing-grid.listing-view-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.listing-grid.listing-view-list .listing-card {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
}

.listing-grid.listing-view-list .listing-card-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
}

.listing-grid.listing-view-list .listing-card-body {
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.listing-grid.listing-view-list .listing-card-title {
    font-size: 1rem;
    margin: 0.35rem 0 0.6rem;
}

@media (max-width: 768px) {
    .listing-grid.listing-view-list .listing-card {
        grid-template-columns: 1fr;
    }

    .listing-grid.listing-view-list .listing-card-media {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }
}

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.category-card {
    padding: 1.5rem;
    display: block;
    color: var(--ink);
    position: relative;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.category-card::after {
    content: "\F138";
    font-family: "bootstrap-icons";
    position: absolute;
    right: 1.25rem;
    top: 1.5rem;
    color: var(--brand-bright);
    transition: transform 0.25s var(--ease);
}

.category-card:hover {
    color: var(--ink);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(29, 78, 216, 0.35);
}

.category-card:hover::after {
    transform: translateX(4px);
}

.category-card i {
    font-size: 1.5rem;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    margin-bottom: 0.75rem;
}

.category-card h3 {
    font-size: var(--text-xl);
    font-weight: 600;
}

.category-card p {
    color: var(--ink-soft);
    margin-bottom: 0;
}

.category-group {
    margin-bottom: 2.75rem;
}

.category-group-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1.1rem;
    color: var(--ink);
    transition: transform 0.25s var(--ease);
}

.category-group-head:hover {
    transform: translateX(4px);
}

.category-group-head i {
    font-size: 1.8rem;
    color: var(--brand);
}

.category-group-head h2 {
    margin-bottom: 0.2rem;
}

.category-group-head p {
    margin: 0;
    color: var(--ink-soft);
}

.category-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    color: var(--ink);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.category-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: rgba(29, 78, 216, 0.35);
}

.category-chip i {
    color: var(--brand);
    font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.blog-card {
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(29, 78, 216, 0.35);
}

.blog-card h2 {
    font-size: 1.25rem;
}

.blog-card h2 a,
.blog-card h3 a {
    color: var(--ink);
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
    color: var(--brand);
}

.blog-cover,
.article-cover,
.cover-preview {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.blog-cover {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    height: 200px;
    margin-bottom: 0;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.blog-card:hover .blog-cover img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 1.5rem 1.5rem 1.65rem;
}

.blog-kicker {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.article-wrap {
    max-width: 760px;
}

.article-body {
    margin-top: 1.25rem;
}

.cover-preview {
    max-width: 360px;
    height: auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--brand-deep);
    color: #fff;
    padding: 3.5rem 0 1.5rem;
    position: relative;
}

.footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
}

.footer-cta-copy h2 {
    color: #fff;
    margin: 0 0 0.3rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.footer-cta-copy p {
    color: var(--text-inverse-muted);
    margin: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr 1fr;
    gap: 2rem;
    padding-top: 1.5rem;
}

.footer-grid > div:nth-child(2) .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 0.5rem;
}

.footer-brand,
.footer-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}

.footer-brand {
    font-size: var(--text-xl);
}

.footer-heading {
    color: #A5C2F7;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: var(--text-xs);
    margin-bottom: 0.75rem;
}

.footer-tagline,
.footer-links,
.footer-links a,
.footer-bottom p {
    color: var(--text-inverse-muted);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.footer-legal a {
    color: var(--text-inverse-muted);
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    gap: 0.6rem;
}

.social-links a {
    color: #fff;
    font-size: 1.05rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-links a:hover {
    background: var(--brand-bright);
    color: #fff !important;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Auth
   -------------------------------------------------------------------------- */

.auth-page {
    padding: 2.5rem 0 4rem;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
}

.auth-card h1 {
    font-size: 1.75rem;
}

.auth-lead,
.auth-links {
    color: var(--ink-soft);
}

.auth-links a {
    font-weight: 600;
}

.auth-ssb-button {
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.auth-ssb-help {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0.6rem 0 0;
    text-align: center;
}

.auth-divider {
    align-items: center;
    color: var(--ink-soft);
    display: flex;
    font-size: var(--text-xs);
    gap: 0.75rem;
    margin: 1.4rem 0;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    background: var(--line);
    content: '';
    flex: 1;
    height: 1px;
}

.auth-page .card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.auth-page .card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
}

/* --------------------------------------------------------------------------
   Dashboard shell
   -------------------------------------------------------------------------- */

.theme-dashboard {
    background: var(--canvas);
}

.dash-shell {
    display: flex;
    min-height: 100vh;
}

.dash-sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 1.25rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: none;
}

.brand-dash {
    padding: 0 0.4rem;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dash-nav a,
.dash-nav .nav-disabled {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink-soft);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
}

.dash-nav a i {
    color: var(--brand-bright);
    font-size: 1.05rem;
}

.dash-nav a:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.dash-nav a.is-active {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
}

.dash-nav .nav-disabled {
    color: rgba(15, 23, 42, 0.35);
    cursor: default;
}

.dash-public-link {
    margin-top: auto;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: var(--text-sm);
    padding: 0.4rem;
}

.dash-public-link:hover {
    color: var(--brand);
}

.dash-main {
    flex: 1;
    min-width: 0;
}

.dash-topbar {
    background: #fff;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.dash-topbar .nav-toggle {
    display: inline-flex;
    color: var(--ink);
    border-color: var(--line);
}

.dash-welcome {
    margin: 0;
    font-weight: 600;
    color: var(--ink-soft);
}

.dash-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-badge {
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.28rem 0.6rem;
    border-radius: var(--radius-pill);
}

.dash-username {
    font-weight: 600;
    font-size: var(--text-sm);
}

.dash-logout {
    color: var(--ink-soft) !important;
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.dash-logout:hover {
    color: var(--brand) !important;
}

.dash-content {
    padding: 1.75rem;
}

.dash-shell.is-collapsed .dash-sidebar {
    width: 78px;
}

.dash-shell.is-collapsed .brand-name,
.dash-shell.is-collapsed .dash-nav a,
.dash-shell.is-collapsed .dash-nav .nav-disabled,
.dash-shell.is-collapsed .dash-public-link {
    font-size: 0;
}

.dash-shell.is-collapsed .dash-nav i,
.dash-shell.is-collapsed .dash-public-link i,
.dash-shell.is-collapsed .brand-mark {
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Dashboard content
   -------------------------------------------------------------------------- */

.page-head {
    margin-bottom: 1.5rem;
}

.page-head p {
    color: var(--ink-soft);
    margin: 0;
}

.page-head-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.filter-bar {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
}

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

.filter-bar .field {
    min-width: 0;
}

.table-wrap {
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

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

.metric-card {
    padding: 1.4rem;
}

.metric-label {
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.metric-value-sm {
    font-size: 1.05rem;
    word-break: break-word;
}

.metric-note {
    color: var(--ink-soft);
    margin: 0;
    font-size: var(--text-sm);
}

.meter {
    height: 8px;
    background: var(--brand-soft);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.meter span,
.meter-fill {
    display: block;
    height: 100%;
    background: var(--brand);
    width: 0;
}

.meter-fill-0 { width: 0%; }
.meter-fill-50 { width: 50%; }
.meter-fill-100 { width: 100%; }

.prose-narrow {
    max-width: 44rem;
}

.prose-narrow p,
.prose p,
.prose li {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    font-weight: 700;
}

.table-actions {
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Status pills & switches
   -------------------------------------------------------------------------- */

.status-pill {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-pill);
}

.status-pill.is-on {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill.is-off {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-pill.is-draft {
    background: var(--brand-soft);
    color: var(--brand);
}

.switch {
    width: 44px;
    height: 26px;
    border: 0;
    border-radius: var(--radius-pill);
    background: #CBD5E1;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.switch::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s var(--ease);
}

.switch.is-on {
    background: var(--brand);
}

.switch.is-on::after {
    transform: translateX(18px);
}

/* --------------------------------------------------------------------------
   Admin: icon picker, category tree, photos
   -------------------------------------------------------------------------- */

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius-sm);
    color: var(--ink);
    display: inline-grid;
    place-items: center;
}

.icon-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.icon-current {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.icon-current i {
    font-size: 1.6rem;
    color: var(--brand);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.5rem;
    max-height: 280px;
    overflow: auto;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.icon-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid transparent;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.3rem;
    color: var(--ink);
    font-size: var(--text-xs);
    cursor: pointer;
}

.icon-choice i {
    font-size: 1.2rem;
    color: var(--brand);
}

.icon-choice.is-selected,
.icon-choice:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.tree-block {
    padding: 1rem 1.15rem 0.85rem;
    margin-bottom: 1rem;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
}

.tree-row-child {
    padding-left: 0.25rem;
}

.tree-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex: none;
}

.tree-main {
    min-width: 0;
    flex: 1;
}

.tree-name {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

.tree-meta {
    margin: 0;
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

.tree-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--line);
}

.tree-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tree-add {
    margin: 0.35rem 0 0.5rem 3.2rem;
}

.inline-form {
    display: inline;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.photo-item {
    margin: 0;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.photo-item figcaption {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Listing detail page
   -------------------------------------------------------------------------- */

.listing-page {
    background: var(--canvas);
    padding: 1.5rem 0 3rem;
}

.listing-page-inner {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.listing-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

.listing-crumbs a,
.listing-crumbs span {
    color: var(--ink-soft);
}

.listing-crumbs a:hover {
    color: var(--brand);
}

.listing-back {
    font-weight: 700;
    color: var(--ink) !important;
}

.listing-crumb-sep {
    width: 1px;
    height: 1rem;
    background: var(--line);
    margin: 0 0.35rem;
}

.property-overview {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin: 1.5rem 0 1.75rem;
}

.property-overline {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: var(--text-xs);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.property-overview .listing-title-lg {
    font-size: clamp(1.5rem, 2.7vw, 2.1rem);
    max-width: 22ch;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.property-price-block {
    text-align: right;
    flex: none;
}

.property-price-block .listing-price-lg {
    color: var(--ink);
    margin: 0;
}

.property-price-block p:last-child {
    color: var(--ink-soft);
    margin: 0;
}

.listing-mosaic {
    display: grid;
    grid-template-columns: 1.6fr 0.8fr;
    gap: 0.65rem;
    margin-bottom: 2.25rem;
    min-height: 480px;
}

.listing-mosaic-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--brand-soft);
    min-height: 480px;
}

.listing-mosaic-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 480px;
}

.listing-mosaic-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0.65rem;
}

.mosaic-tile {
    position: relative;
    border: 0;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--brand-soft);
    cursor: pointer;
    display: block;
    min-height: 235px;
}

.mosaic-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 235px;
    transition: transform 0.4s var(--ease);
}

.mosaic-tile:hover img {
    transform: scale(1.04);
}

.mosaic-tile-empty {
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    font-size: 1.8rem;
    cursor: default;
}

.mosaic-tile-empty img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.mosaic-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-lift);
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.mosaic-nav:hover {
    background: var(--brand);
    color: #fff;
}

.mosaic-prev { left: 0.9rem; }
.mosaic-next { right: 0.9rem; }

.mosaic-chips {
    position: absolute;
    left: 0.9rem;
    bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mosaic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.74);
    color: #fff !important;
    border: 0;
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.85rem;
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s var(--ease);
}

.mosaic-chip:hover {
    background: var(--brand);
}

.mosaic-count {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    background: rgba(15, 23, 42, 0.74);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.7rem;
    font-size: var(--text-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.listing-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 3rem;
    align-items: start;
}

.listing-price-lg {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.listing-title-lg {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    margin-bottom: 0.75rem;
}

.listing-factline,
.listing-statline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
}

.listing-factline span {
    background: var(--brand-soft);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
}

.listing-locline {
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.listing-locline i,
.listing-statline i {
    color: var(--brand-bright);
    margin-right: 0.25rem;
}

.listing-inline-badge {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
}

.property-key-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.property-key-facts > span {
    min-width: 140px;
    flex: 1;
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 0.55rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
}

.property-key-facts i {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
}

.property-key-facts strong {
    color: var(--ink);
    line-height: 1.2;
}

.property-key-facts small {
    color: var(--ink-soft);
}

.listing-media-row {
    display: flex;
    gap: 0.65rem;
    overflow: auto;
    padding: 0.85rem 0 0.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.media-thumb {
    border: 2px solid transparent;
    background: var(--brand-soft);
    border-radius: var(--radius-md);
    padding: 0;
    width: 108px;
    height: 76px;
    overflow: hidden;
    flex: none;
    cursor: pointer;
    transition: border-color 0.2s var(--ease);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-thumb.is-active {
    border-color: var(--brand);
}

.listing-about,
.listing-features,
.listing-area {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.listing-about h2,
.listing-features h2,
.listing-area h2,
.listing-related h2 {
    color: var(--ink);
    font-size: 1.45rem;
}

.listing-about-body.is-collapsed [data-read-more-text] {
    max-height: 7.6em;
    overflow: hidden;
    position: relative;
}

.listing-about-body.is-collapsed [data-read-more-text]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.4em;
    background: linear-gradient(transparent, #fff);
}

.read-more-btn {
    background: none;
    border: 0;
    color: var(--brand);
    font-weight: 700;
    padding: 0.4rem 0;
    cursor: pointer;
}

.read-more-btn:hover {
    color: var(--brand-deep);
}

.listing-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.4rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.listing-specs dt {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin-bottom: 0.2rem;
}

.listing-specs dd {
    margin: 0;
    font-weight: 700;
    color: var(--ink);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.feature-grid li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--canvas);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.75rem;
}

.feature-grid i {
    color: var(--brand);
    font-size: 1.1rem;
}

.amenity-list,
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.4rem 1rem;
}

.listing-side {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}

.inquiry-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.25rem;
    border: 1px solid var(--line);
}

.inquiry-heading {
    padding: 0.1rem 0.1rem 0.85rem;
}

.inquiry-heading p {
    font-family: var(--font-heading);
    color: var(--ink);
    font-size: 1.1rem;
    margin: 0 0 0.2rem;
}

.inquiry-heading span {
    color: var(--ink-soft);
    font-size: var(--text-sm);
}

.inquiry-agent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.inquiry-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    flex: none;
    font-size: 1rem;
}

.inquiry-agent-name {
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.inquiry-agent-meta {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin: 0;
}

.inquiry-card .field {
    margin-bottom: 0.6rem;
}

.inquiry-card .field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.inquiry-card .field input,
.inquiry-card .field textarea {
    min-height: 44px;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-md);
    background: var(--canvas);
}

.inquiry-card .field textarea {
    height: 96px;
    min-height: 96px;
    max-height: 96px;
    resize: none;
}

.inquiry-card .btn + .btn {
    margin-top: 0.5rem;
}

.listing-related {
    margin-top: 2.5rem;
    padding-top: 1rem;
}

.listing-related .listing-grid {
    margin-top: 0.85rem;
}

.listing-map {
    width: 100%;
    min-height: 220px;
    border: 0;
    border-radius: var(--radius-md);
}

.listing-map-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.listing-map-heading h2,
.listing-map-heading .listing-locline {
    margin-bottom: 0;
}

.listing-map-heading > a {
    flex: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.listing-map-unavailable {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.5rem;
    color: var(--ink-soft);
    background: var(--surface-soft);
    border: 1px dashed var(--line);
}

.listing-hero-grid,
.listing-body-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.listing-gallery,
.listing-summary,
.listing-copy,
.listing-inquiry {
    padding: 1rem;
}

.listing-hero-image {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
}

.listing-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow: auto;
}

.listing-thumbs img {
    width: 88px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.listing-facts {
    padding-left: 1.1rem;
}

.listing-meter {
    margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Pricing plans
   -------------------------------------------------------------------------- */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.plan-card {
    padding: 1.85rem;
    position: relative;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.plan-card.is-current {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.plan-card.is-current::before {
    content: "Current plan";
    position: absolute;
    top: 1.85rem;
    right: 1.85rem;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
}

.plan-name {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.plan-price span {
    font-size: 1rem;
    color: var(--ink-soft);
    font-weight: 600;
}

.plan-note {
    color: var(--ink-soft);
    margin-top: 0.75rem;
}

.plan-card ul {
    margin: 1rem 0 1.25rem;
    padding-left: 0;
    list-style: none;
}

.plan-card li {
    margin-bottom: 0.5rem;
    padding-left: 1.6rem;
    position: relative;
}

.plan-card li::before {
    content: "\F26E";
    font-family: "bootstrap-icons";
    color: var(--brand);
    position: absolute;
    left: 0;
    top: 0.05rem;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Tickets
   -------------------------------------------------------------------------- */

.ticket-thread {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.ticket-msg {
    padding: 1rem 1.15rem;
}

.ticket-msg.is-staff {
    outline: 2px solid var(--brand);
}

.ticket-meta {
    color: var(--ink-soft);
    font-size: var(--text-sm);
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .site-nav {
        gap: 1.1rem;
    }
}

@media (max-width: 991px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem 1.5rem;
        gap: 0.85rem;
        box-shadow: var(--shadow-lift);
        border-top: 1px solid var(--line);
        justify-content: flex-start;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav > a::after {
        display: none;
    }

    .site-nav > a[aria-current="page"] {
        background: var(--brand-soft);
        border-left: 3px solid var(--brand);
        border-radius: var(--radius-sm);
        padding-inline: 0.85rem;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .category-grid,
    .stats-grid,
    .footer-grid,
    .metric-grid,
    .form-row,
    .contact-grid,
    .listing-hero-grid,
    .listing-body-grid,
    .plan-grid,
    .blog-grid,
    .listing-mosaic,
    .listing-split,
    .listing-specs {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

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

    .listing-grid-count-2 {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .listing-mosaic,
    .listing-mosaic-main,
    .listing-mosaic-main img {
        min-height: 340px;
    }

    .listing-side {
        position: static;
    }

    .listing-index-layout {
        grid-template-columns: 1fr;
    }

    .listing-filters {
        position: static;
    }

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

    .dash-shell {
        display: block;
    }

    .dash-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        z-index: 40;
        width: min(80vw, var(--sidebar-w));
        box-shadow: var(--shadow-lift);
    }

    .dash-shell.is-sidebar-open .dash-sidebar {
        transform: none;
    }

    .hero {
        padding: 3.5rem 0 3rem;
    }

    .property-overview {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 68px;
    }

    .container {
        width: min(100% - 1.5rem, 1200px);
    }

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

    .search-submit {
        min-height: 48px;
        width: 100%;
    }

    .hero-proof {
        display: grid;
        gap: 0.45rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .listing-grid,
    .listing-grid-count-1,
    .listing-grid-count-2,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .property-overview {
        display: block;
    }

    .property-price-block {
        text-align: left;
        margin-top: 1rem;
    }

    .listing-mosaic {
        display: block;
        min-height: 280px;
    }

    .listing-mosaic-main,
    .listing-mosaic-main img {
        min-height: 280px;
    }

    .listing-mosaic-side {
        display: none;
    }

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

    .property-key-facts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .listing-map-heading {
        display: block;
    }

    .listing-map-heading > a {
        display: inline-block;
        margin-top: 0.65rem;
    }

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

    .footer-grid > div:nth-child(2) .footer-links {
        grid-template-columns: 1fr;
    }

    .dash-content {
        padding: 1rem;
    }
}
