/* ---------------------------------------------------------------------------
   public/marketplace.css — the Tophat marketplace's public pages.
   @author Thomas G. and Sophia, SOPHIA XT LLC (sophiaxt.com)
   @sophia-mark sx1 df5ae605af70 b04c04872e93 4tnwonbvjGCET8sAffUkoVLXz3uiTc5-w__47XaMaqMRXI9Yk3jrHGVhEKAyBPwWochg-8HsPdpx0IzZMGbjCw
   Copyright (c) 2026 SOPHIA XT LLC. All rights reserved.

   sx: the marketing site's look, carried over rather than linked. site/site.css
   is content-hashed into site/dist by scripts/build-site.js and only the paths
   in its manifest are served, so these server-rendered pages cannot load it.
   The tokens below are its tokens, value for value (.prism/style-lock.md):
   navy #1f347f, deep #14235c, ink #1a2230, muted #525c6e, plat #eef2f6,
   border #d5dbe7, cyan #0C9ED9, and the same dark theme.

   sx! contrast, measured against the grounds each sits on:
     ink #1a2230 on white 15.9:1, on plat 14.4:1
     muted #525c6e on white 6.6:1, on plat 6.0:1
     navy #1f347f on white 10.6:1 (links, the primary button)
     white on navy-deep #14235c 14.3:1 (the band)
     #c9d3ec on navy-deep 10.2:1 (the band's lede)
     cyan #0C9ED9 on navy-deep 5.5:1 (the kicker; never small cyan on white)
     on-cyan #04121f on cyan 6.6:1 (the accent button)
     dark theme: #e6ebf5 on #0a1430 15.6:1, #a9b6db 8.6:1, #5cc3ef 8.9:1
   Gold stays in the logo and nowhere else, as the style lock says.

   Phone first. Nothing here is wider than the viewport at 320px: the cards are
   a single column, the search row wraps, and the map is full width.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-var.woff2") format("woff2-variations"),
       url("/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2-variations"),
       url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --white: #ffffff; --ink: #1a2230; --ink-2: #525c6e; --line: #d5dbe7; --plat: #eef2f6;
  --navy: #1f347f; --navy-deep: #14235c; --navy-bright: #2b46b8; --navy-tint: #e6ebf7;
  --cyan: #0C9ED9; --cyan-soft: #6cc9f0; --on-cyan: #04121f;

  --ground: var(--white); --ground-2: var(--plat); --card: var(--white);
  --text: var(--ink); --text-2: var(--ink-2); --rule: var(--line);
  --brand: var(--navy); --brand-tint: var(--navy-tint); --on-brand: #ffffff;
  --focus: var(--navy-bright); --band: var(--navy-deep);
  --band-lot: rgba(255, 255, 255, .07); --band-sublot: rgba(255, 255, 255, .03);
  --shadow: 0 14px 34px -24px rgba(20, 35, 92, .45);

  --r-xs: 2px; --r-sm: 4px; --r: 8px;
  --maxw: 1200px; --gutter: clamp(16px, 5vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-xs: .8125rem; --t-sm: .9375rem; --t-md: 1.0625rem;
  --t-lg: clamp(1.125rem, 1.05rem + .35vw, 1.3rem);
  --t-xl: clamp(1.25rem, 1.1rem + .6vw, 1.55rem);
  --t-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --ui: "Inter", ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0a1430; --ground-2: #0e1a3a; --card: #111d40;
    --text: #e6ebf5; --text-2: #a9b6db; --rule: #24335f;
    --brand: #5cc3ef; --brand-tint: #16244d; --on-brand: #04121f;
    --focus: #6cc9f0; --band: #070f26;
    --shadow: 0 14px 34px -18px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --ground: #0a1430; --ground-2: #0e1a3a; --card: #111d40;
  --text: #e6ebf5; --text-2: #a9b6db; --rule: #24335f;
  --brand: #5cc3ef; --brand-tint: #16244d; --on-brand: #04121f;
  --focus: #6cc9f0; --band: #070f26;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: var(--ui); font-size: var(--t-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-2xl); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: var(--t-xl); line-height: 1.2; }
h3 { font-size: var(--t-lg); line-height: 1.3; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; padding-block: 32px 64px; }
.muted { color: var(--text-2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px;
        background: var(--card); color: var(--text); border: 2px solid var(--focus);
        border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs);
}
.band :where(a, button, input, select, summary):focus-visible { outline-color: var(--cyan-soft); }

/* ---- masthead ------------------------------------------------------------ */
.mast { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
        padding: 8px var(--gutter); background: var(--ground); border-bottom: 1px solid var(--rule); }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; min-height: 44px;
        font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em;
        color: var(--text); text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo__sub { font-weight: 500; color: var(--text-2); }
.mast nav { display: none; gap: 2px; font-size: var(--t-sm); }
.mast nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
              color: var(--text-2); text-decoration: none; }
.mast nav a:hover { color: var(--text); }
@media (min-width: 820px) { .mast nav { display: flex; } }
.mast__in { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
            border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--card);
            color: var(--text); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.mast__in:hover { border-color: var(--brand); }
@media (max-width: 380px) { .logo__sub { display: none; } }

/* ---- buttons ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em;
       min-height: 44px; padding: 0 20px; border-radius: var(--r-sm); border: 1px solid transparent;
       font: 600 var(--t-sm)/1.2 var(--ui); text-decoration: none; cursor: pointer;
       transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--navy-bright); color: #fff; }
.btn--accent { background: var(--cyan); color: var(--on-cyan); }
.btn--accent:hover { background: var(--cyan-soft); }
.btn--ghost { border-color: var(--brand); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--brand-tint); }

/* ---- the navy plat band with the search ----------------------------------- */
.band { background-color: var(--band); color: #fff; padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
        background-image:
          linear-gradient(var(--band-lot) 1px, transparent 1px),
          linear-gradient(90deg, var(--band-lot) 1px, transparent 1px),
          linear-gradient(var(--band-sublot) 1px, transparent 1px),
          linear-gradient(90deg, var(--band-sublot) 1px, transparent 1px);
        background-size: 192px 128px, 192px 128px, 48px 32px, 48px 32px; }
.band h1 { color: #fff; max-width: 24ch; }
.band a { color: #fff; }
.kicker { font-family: var(--mono); font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em;
          text-transform: uppercase; color: var(--cyan); margin: 0 0 14px; }
.lede { font-size: var(--t-lg); color: #c9d3ec; max-width: 60ch; margin: 14px 0 0; }
.narrow .lede, .results .lede { color: var(--text-2); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; padding: 0;
             font-size: var(--t-xs); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .7; }
.band .crumbs { color: #c9d3ec; }
.narrow .crumbs { color: var(--text-2); }

.search { margin-top: 24px; }
.search__main { display: flex; flex-wrap: wrap; gap: 8px; }
.search input, .search select {
  min-height: 46px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid #c3cde6;
  background: #fff; color: var(--ink); font: 400 var(--t-sm)/1.2 var(--ui); min-width: 0;
}
.search__main input[type="search"] { flex: 1 1 260px; }
.search__main select { flex: 1 1 150px; }
.search__main .btn { flex: 0 0 auto; }
.search__more { margin-top: 12px; }
.search__more summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center;
                        font-size: var(--t-sm); font-weight: 600; color: #fff; }
.search__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
                margin-top: 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label, .fld__label { font-size: var(--t-xs); font-weight: 600; color: #c9d3ec; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center;
        color: #c9d3ec; font-size: var(--t-xs); }
.pair input { width: 100%; }

/* ---- results -------------------------------------------------------------- */
.results { padding-block: 24px 48px; }
.results__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
                margin-bottom: 16px; }
.results__count { font-size: var(--t-lg); }
.toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.toggle a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
            color: var(--text); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.toggle a + a { border-left: 1px solid var(--rule); }
.toggle a[aria-current="true"] { background: var(--brand); color: var(--on-brand); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px;
         grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { height: 100%; display: flex; flex-direction: column; background: var(--card);
        border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden;
        transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.card__link { display: block; color: inherit; text-decoration: none; flex: 1; }
.card__link:hover .card__h { text-decoration: underline; }
.card__media { position: relative; aspect-ratio: 16 / 10.5; background: var(--ground-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__plat { width: 100%; height: 100%; display: grid; place-items: center; background-color: var(--navy-deep);
              background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
                                linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
              background-size: 48px 32px; }
.card__plat span { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase;
                   color: #c9d3ec; border: 1px solid rgba(255,255,255,.35); padding: 4px 10px; }
.card__status { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: var(--r-xs);
                background: var(--navy-deep); color: #fff; font-size: var(--t-xs); font-weight: 600; }
.card__body { padding: 14px 16px 6px; }
.card__h { font-size: var(--t-lg); margin-bottom: 4px; overflow-wrap: anywhere; }
.card__place { color: var(--text-2); font-size: var(--t-sm); margin-bottom: 6px; overflow-wrap: anywhere; }
.card__facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--t-sm); color: var(--text-2); margin-bottom: 6px; }
.card__price { font-family: var(--display); font-weight: 600; font-size: var(--t-lg); margin: 0; }
.card__firm { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.card__broker { color: var(--text-2); }

.empty { padding: 40px 20px; text-align: center; background: var(--ground-2); border-radius: var(--r); }
.empty p { margin: 8px 0 0; }

.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 28px 0 0; justify-content: center; }
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
           padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); text-decoration: none; color: var(--text); }
.pager a[aria-current="page"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.pager__gap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--text-2); }

/* ---- map ------------------------------------------------------------------- */
.mp-map { position: relative; width: 100%; height: clamp(320px, 62vh, 640px); margin-bottom: 24px;
          border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--ground-2); }
.mp-map__note { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px;
                text-align: center; color: var(--text-2); z-index: 500; pointer-events: none; }
.mp-map__note[hidden] { display: none; }
.mp-pop { font: 400 14px/1.4 var(--ui); color: #1a2230; min-width: 180px; max-width: 240px; }
.mp-pop a { color: #1f347f; font-weight: 600; }
.mp-pop p { margin: 2px 0; }

/* ---- places, chips, call to action ------------------------------------------- */
.places-near { padding-bottom: 32px; }
.places-near h2 { margin-bottom: 12px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule);
           border-radius: var(--r-sm); text-decoration: none; color: var(--text); font-size: var(--t-sm); }
.chips a:hover { border-color: var(--brand); }
.chips span { color: var(--text-2); margin-left: 4px; }
.chips--sm { margin-top: 6px; }
.chips--sm a { min-height: 32px; padding: 0 10px; font-size: var(--t-xs); }
.place { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.place h2 { margin-bottom: 10px; }
.place__cities { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
                 grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.cta { padding-bottom: 56px; }
.cta__box { background: var(--ground-2); border: 1px solid var(--rule); border-radius: var(--r); padding: clamp(20px, 4vw, 36px); }
.cta__box h2 { margin-bottom: 8px; }
.cta__box p { color: var(--text-2); max-width: 60ch; }

.alert { padding: 12px 14px; border: 1px solid #c0392b; border-left-width: 4px; border-radius: var(--r-sm);
         background: var(--card); color: var(--text); }

/* ---- footer ------------------------------------------------------------------- */
.foot { background: var(--ground-2); border-top: 1px solid var(--rule); padding-top: 32px; font-size: var(--t-sm); color: var(--text-2); }
.foot__row { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot__row { grid-template-columns: 2fr 1fr; } }
.foot__name { font-family: var(--display); font-weight: 700; color: var(--text); font-size: var(--t-md); }
.foot__col { display: flex; flex-direction: column; gap: 2px; }
.foot__col a { min-height: 32px; display: inline-flex; align-items: center; }
.foot__bar { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-block: 16px 24px; margin-top: 16px;
             border-top: 1px solid var(--rule); font-size: var(--t-xs); }
.foot__bar p { margin: 0; }
