/* ==========================================================================
   listex.in — marketplace styles (DEMO: ported from the listex-web reference build, in listex brand colours)
   Text-first listings: generated "type posters" + highlighted WhatsApp text.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces & ink */
  --bg: #f6f7fd;
  --surface: #ffffff;
  --surface-2: #f3f5fe;
  --chat-bg: #e7efe8;
  --line: #e4e7f5;
  --line-strong: #cfd3e5;
  --ink: #1f2130;
  --ink-2: #3f424d;
  --muted: #595d6c;
  --on-dark-muted: #cfd3e5;

  /* Brand */
  --accent: #796cbf;
  --accent-hover: #5d5294;
  --brand: #5d5294;
  --brand-bright: #968ae0;
  --wa: #128c4a;          /* WhatsApp action (white text passes AA) */
  --wa-bright: #25d366;   /* WhatsApp bright (dark text only) */
  --wa-bubble: #e7f8ee;
  --wa-ink: #0d6b38;

  /* Highlight kinds (used in the parsed WhatsApp message) */
  --hl-price: #ffe27a;
  --hl-size: #bff0cf;
  --hl-loc: #cfe6fc;
  --hl-feat: #ffd3e2;

  /* Property-type palettes: tint (poster bg), ink (labels), mark (big-text highlighter) */
  --flat-tint: #e3f0fd;  --flat-ink: #1565C0;  --flat-mark: #b9dafb;  --flat-line: rgba(33,150,243,.12);  --flat-stroke: rgba(21,101,192,.28);
  --plot-tint: #e8f5e1;  --plot-ink: #2E7D32;  --plot-mark: #c5e8a8;  --plot-line: rgba(76,175,80,.14);  --plot-stroke: rgba(46,125,50,.28);
  --shop-tint: #f1eafc;  --shop-ink: #5b2a9e;  --shop-mark: #d9c6f7;  --shop-line: rgba(103,58,183,.11);  --shop-stroke: rgba(91,42,158,.26);
  --house-tint: #ffe4ec; --house-ink: #a1214f; --house-mark: #ffbfd3; --house-line: rgba(176,40,90,.18); --house-stroke: rgba(176,40,90,.24);
  --land-tint: #e0f2f1;  --land-ink: #0d6663;  --land-mark: #a6e3df;  --land-line: rgba(14,116,112,.14); --land-stroke: rgba(14,116,112,.26);

  /* Type */
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-lift: 0 14px 30px -14px rgba(16,32,26,.28);
  --shadow-panel: 0 24px 50px -30px rgba(16,32,26,.4);
  --max: 1240px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.icon { width: 20px; height: 20px; flex: none; }
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-lg { min-height: 52px; padding: 0 24px; border-radius: var(--r-md); font-size: 17px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #0e7a40; color: #fff; }
.btn-wa-bright { background: var(--wa-bright); color: #2b2741; }
.btn-wa-bright:hover { background: #1fbe5a; color: #2b2741; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #423a6a; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-icon { width: 44px; padding: 0; }
.btn-block { width: 100%; }

/* ---------- Chips & pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 1px solid #e4e7f5;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.chip:hover { color: var(--ink); background: var(--surface-2); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; }
.chip-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; }
.tag-nego { color: #423a6a; background: #e7e5fe; letter-spacing: 0; }
.tag-fixed { color: var(--ink); background: var(--surface-2); letter-spacing: 0; }
.segmented { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.segmented button { border: 0; min-height: 40px; padding: 0 14px; border-radius: 9px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); display: inline-block; flex: none; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo span { color: var(--brand-bright); }
.logo img { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.saved-count { min-width: 20px; height: 20px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }
@media (max-width: 960px) {
  .nav, .header-actions .hide-mobile { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav.is-open { display: flex; flex-direction: column; gap: 4px; padding: 8px var(--gutter) 16px; border-top: 1px solid var(--line); }
  .mobile-nav a { padding: 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 500; }
  .mobile-nav a:hover { background: var(--surface-2); }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .cols { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 32px; padding: 48px 0 32px; }
.site-footer h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--line); padding: 18px 0 28px; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

/* ---------- Highlighter (big text) ---------- */
.hl {
  --hl: var(--hl-price);
  background-image: linear-gradient(to top, var(--hl) 0, var(--hl) 44%, transparent 44%);
  background-repeat: no-repeat; background-size: 0% 100%;
  animation: sweep .9s .35s cubic-bezier(.3,.7,.2,1) forwards;
  padding: 0 .06em;
}
@keyframes sweep { to { background-size: 100% 100%; } }

/* ---------- Highlighted WhatsApp message ---------- */
.msg { font-family: var(--font-mono); line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.mk { border-radius: 4px; padding: 1px 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; color: var(--ink); }
.mk-p { background: var(--hl-price); }
.mk-s { background: var(--hl-size); }
.mk-l { background: var(--hl-loc); }
.mk-f { background: var(--hl-feat); }
.msg.is-animated .mk { background-repeat: no-repeat; background-size: 0% 100%; animation: sweep .7s cubic-bezier(.3,.7,.2,1) forwards; }
.msg.is-animated .mk-p { background: linear-gradient(var(--hl-price), var(--hl-price)) no-repeat; background-size: 0% 100%; }
.msg.is-animated .mk-s { background: linear-gradient(var(--hl-size), var(--hl-size)) no-repeat; background-size: 0% 100%; }
.msg.is-animated .mk-l { background: linear-gradient(var(--hl-loc), var(--hl-loc)) no-repeat; background-size: 0% 100%; }
.msg.is-animated .mk-f { background: linear-gradient(var(--hl-feat), var(--hl-feat)) no-repeat; background-size: 0% 100%; }
.msg-snippet { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.bubble { background: var(--wa-bubble); border-radius: 6px 20px 20px 20px; padding: 18px 20px; }
.hl-key { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; color: var(--muted); }

/* ---------- Type posters (the image replacement) ---------- */
.poster {
  position: relative; overflow: hidden; isolation: isolate;
  background-color: var(--tint); color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16px 18px;
}
.poster > * { position: relative; z-index: 1; }
.poster .p-tag { align-self: flex-start; background: #fff; color: var(--p-ink); }
.poster .p-big { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
.poster .p-sub { margin-top: 6px; font-weight: 500; color: var(--p-ink); font-size: 14px; }
.poster .p-wm {
  position: absolute; z-index: 0; right: -8px; bottom: -14px; white-space: nowrap; line-height: 1;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1.5px var(--stroke);
  transition: transform .6s ease;
}
.poster.t-flat  { --tint: var(--flat-tint);  --p-ink: var(--flat-ink);  --stroke: var(--flat-stroke);  --mark: var(--flat-mark);
  background-image: repeating-linear-gradient(0deg, var(--flat-line) 0 1px, transparent 1px 14px); }
.poster.t-plot  { --tint: var(--plot-tint);  --p-ink: var(--plot-ink);  --stroke: var(--plot-stroke);  --mark: var(--plot-mark);
  background-image: repeating-linear-gradient(0deg, var(--plot-line) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, var(--plot-line) 0 1px, transparent 1px 22px); }
.poster.t-shop  { --tint: var(--shop-tint);  --p-ink: var(--shop-ink);  --stroke: var(--shop-stroke);  --mark: var(--shop-mark);
  background-image: repeating-linear-gradient(135deg, var(--shop-line) 0 8px, transparent 8px 18px); }
.poster.t-house { --tint: var(--house-tint); --p-ink: var(--house-ink); --stroke: var(--house-stroke); --mark: var(--house-mark);
  background-image: radial-gradient(var(--house-line) 1.4px, transparent 1.6px); background-size: 14px 14px; }
.poster.t-land  { --tint: var(--land-tint);  --p-ink: var(--land-ink);  --stroke: var(--land-stroke);  --mark: var(--land-mark);
  background-image: radial-gradient(circle at 0 100%, transparent 9px, var(--land-line) 9px 10px, transparent 10px); background-size: 20px 12px; }
.poster .hl { --hl: var(--mark); }
.type-tag { background: var(--tint); color: var(--p-ink); }
.t-flat.type-tag { --tint: var(--flat-tint); --p-ink: var(--flat-ink); }
.t-plot.type-tag { --tint: var(--plot-tint); --p-ink: var(--plot-ink); }
.t-shop.type-tag { --tint: var(--shop-tint); --p-ink: var(--shop-ink); }
.t-house.type-tag { --tint: var(--house-tint); --p-ink: var(--house-ink); }
.t-land.type-tag { --tint: var(--land-tint); --p-ink: var(--land-ink); }

/* ---------- Listing card (poster) ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
/* Masonry: each card is as tall as its message, and the next card sits right
   under it. JS (layoutMasonry) sets each card's row span from its height;
   without JS this is a normal grid. */
.grid-cards.masonry { grid-auto-rows: 2px; row-gap: 0; align-items: start; }
.grid-cards.masonry > .card { margin-bottom: 22px; }
.grid-cards.masonry .card-foot { margin-top: 4px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card:hover .p-wm { transform: translateX(-14px); }
.card .poster { height: 176px; }
.card .p-big { font-size: 46px; }
.card .p-wm { font-size: 74px; bottom: -30px; opacity: .8; }
.card .poster { justify-content: flex-start; gap: 34px; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-price { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; }
.card-title { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; line-height: 1.3; }
.card-title::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card-title:hover { color: var(--ink); }
.card-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 10px; }
.card-foot a, .card-foot button, .save-btn { position: relative; z-index: 2; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar-wa { background: #dff5e7; color: var(--wa-ink); }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; font-family: var(--font-display); font-weight: 800; }
.avatar-xl { width: 96px; height: 96px; font-size: 36px; font-family: var(--font-display); font-weight: 800; }
.save-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.85); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.card-save { position: absolute; top: 12px; right: 12px; z-index: 3; }
.save-btn[aria-pressed="true"] svg { fill: #e11d48; stroke: #e11d48; }
.save-btn:hover { background: #fff; }

/* Compact (mobile list) card */
.card-compact { flex-direction: row; gap: 12px; padding: 10px; border-radius: 18px; }
.card-compact .poster { flex: 0 0 112px; height: 132px; border-radius: 12px; padding: 10px; }
.card-compact .p-big { font-size: 28px; }
.card .p-big.is-long { font-size: 34px; letter-spacing: -0.03em; line-height: 1.02; }
.card-compact .p-big.is-long { font-size: 20px; letter-spacing: -0.02em; }
.card-compact .p-wm { font-size: 44px; right: auto; left: 6px; bottom: -10px; -webkit-text-stroke-width: 1px; }
.card-compact .card-body { padding: 2px 2px 2px 0; gap: 4px; }
.card-compact .card-price { font-size: 22px; }
.card-compact .card-title { font-size: 14px; }
.card-compact .msg-snippet { background: none; padding: 0; font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: auto; }

/* WhatsApp-view card */
.chat-wall { background: var(--chat-bg); padding: 22px; border-radius: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.chat-card { position: relative; background: #fff; border-radius: 6px 18px 18px 18px; padding: 16px 18px; box-shadow: 0 1px 0 rgba(16,32,26,.06); }
.chat-card .msg { font-size: 15px; margin: 10px 0 0; }
.chat-card .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.chat-card .meta b { color: var(--wa-ink); }
.chat-card .foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e4e7f5; display: flex; align-items: center; gap: 10px; }
@media (max-width: 640px) {
  .chat-wall { padding: 12px; border-radius: 0; margin: 0 calc(var(--gutter) * -1); grid-template-columns: 1fr; }
}

/* ---------- Animations ---------- */
.rot { display: inline-block; height: 1.12em; overflow: hidden; vertical-align: bottom; }
.rot-in { display: flex; flex-direction: column; animation: rot 10s cubic-bezier(.7,0,.3,1) infinite; }
.rot-in span { height: 1.12em; line-height: 1.12em; white-space: nowrap; }
@keyframes rot { 0%,18%{transform:translateY(0)} 25%,43%{transform:translateY(-20%)} 50%,68%{transform:translateY(-40%)} 75%,93%{transform:translateY(-60%)} 100%{transform:translateY(-80%)} }
.ticker-band { background: var(--ink); color: #fff; overflow: hidden; padding: 14px 0; }
.ticker { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.ticker-band:hover .ticker { animation-play-state: paused; }
.ticker a { display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; font-size: 15px; white-space: nowrap; border-right: 1px solid #3f424d; color: #fff; text-decoration: none; }
.ticker .t-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink); background: var(--hl-price); padding: 3px 7px; border-radius: 5px; }
.ticker .t-loc { color: #b2b6ca; }
.ticker .t-price { font-family: var(--font-display); font-weight: 700; color: var(--hl-size); }
@keyframes marquee { to { transform: translateX(-50%); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.7)} }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--ink); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pop { opacity: 0; transform: translateY(6px); animation: pop .45s ease forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.type-on { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 0; animation: typeon 2.4s steps(44) .2s forwards; vertical-align: bottom; }
@keyframes typeon { to { max-width: 100%; } }
.drift { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(-60px); } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rot-in, .ticker, .pulse, .caret, .drift { animation: none !important; }
  .hl, .msg.is-animated .mk { animation: none; background-size: 100% 100% !important; }
  .type-on { animation: none; max-width: 100%; }
  .pop { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card .p-wm { transition: none; }
}

/* ---------- Home ---------- */
.hero { padding: 64px 0 48px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-copy { flex: 999 1 560px; min-width: 0; }
.hero-demo { flex: 1 1 360px; min-width: 0; max-width: 460px; margin: 0 auto; }
.hero h1 { margin: 22px 0 0; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 .rot { color: var(--accent); }
.hero .lede { margin: 20px 0 0; max-width: 540px; font-size: 19px; line-height: 1.55; color: #595d6c; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.search-box { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; background: var(--surface); border: 1px solid #e4e7f5; border-radius: 18px; box-shadow: 0 10px 30px -18px rgba(16,32,26,.35); max-width: 660px; }
.search-box .segmented { border: 0; background: #f3f5fe; }
.search-box input { flex: 1 1 200px; min-width: 0; border: 0; outline: none; padding: 12px 10px; font-size: 16px; background: transparent; }
.search-box .btn { min-height: 48px; }
.popular { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-panel); }
.demo-card .bubble { margin-top: 12px; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; padding: 14px 16px; border-radius: 4px 16px 16px 16px; min-height: 52px; }
.demo-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-tags span { padding: 8px 12px; border-radius: 10px; }
.section { padding: 56px 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: clamp(30px, 3.4vw, 40px); }
.section-head p { margin: 6px 0 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cat-tile { height: 150px; border-radius: var(--r-lg); text-decoration: none; }
.cat-tile .p-big { font-size: 32px; }
.cat-tile .p-wm { font-size: 64px; }
.cat-tile:hover .p-wm { transform: translateX(-14px); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.step .num { font-family: var(--font-display); font-weight: 800; font-size: 48px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.step h3 { margin: 14px 0 6px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); }
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: 44px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 10px 0 0; font-size: clamp(30px, 3.4vw, 40px); }
.cta-band p { margin: 14px 0 0; color: var(--on-dark-muted); font-size: 17px; max-width: 520px; }
.cta-band .eyebrow { color: var(--hl-size); }
.marker-dark { color: var(--ink); background: var(--hl-price); padding: 0 8px; border-radius: 6px; }
@media (max-width: 640px) { .cta-band { padding: 28px 22px; border-radius: 22px; } .hero { padding-top: 32px; gap: 32px; } }

/* ---------- Listings (search) page ---------- */
.page-head { padding: 36px 0 8px; }
.page-head h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); }
.results-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 20px; }
.filters { flex: 1 1 260px; max-width: 300px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend, .field label, .field .label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding: 0; display: block; }
.field select, .field input[type=text], .field input[type=tel], .field input[type=number] {
  width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-size: 16px;
}
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row input { position: absolute; opacity: 0; pointer-events: none; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #e4e7f5; background: #fff; font-size: 14px; cursor: pointer; }
.radio-row input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.radio-row input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.results { flex: 999 1 560px; min-width: 0; }
.results-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.results-bar select { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; background: #fff; }
.filters-toggle { display: none; }
@media (max-width: 860px) {
  .filters { display: none; max-width: none; flex-basis: 100%; }
  .filters.is-open { display: flex; }
  .filters-toggle { display: inline-flex; }
  .results .grid-cards { grid-template-columns: 1fr; gap: 12px; }
}
.empty { text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty h2 { margin: 0 0 8px; font-size: 26px; }

/* ---------- Listing detail ---------- */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; padding-top: 24px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.detail-layout { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.detail-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.detail-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 1000px) { .detail-side { position: sticky; top: 92px; } }
.detail-poster { height: 380px; border-radius: var(--r-xl); padding: 28px 32px; }
.detail-poster .p-big { font-size: clamp(72px, 10vw, 148px); line-height: .9; letter-spacing: -0.05em; }
.detail-poster .p-big.is-long { font-size: clamp(44px, 6.4vw, 92px); line-height: .95; }
.detail-poster .p-sub { font-size: 20px; margin-top: 12px; }
.detail-poster .p-wm { font-size: 170px; bottom: -36px; right: -20px; -webkit-text-stroke-width: 2px; }
.detail-price { font-family: var(--font-display); font-weight: 800; font-size: 52px; letter-spacing: -0.04em; line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.fact dt { font-size: 13px; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-weight: 700; font-size: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.panel h2 { margin: 0; font-size: 26px; }
.extract { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.extract li { display: flex; align-items: center; gap: 12px; }
.extract .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.extract .k { color: var(--muted); width: 84px; flex: none; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-panel); }
.link-copy { margin-top: 18px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; gap: 10px; }
.link-copy span { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emi { background: var(--ink); color: #fff; border-radius: 24px; padding: 24px; }
.emi .eyebrow { color: var(--hl-size); }
.emi .big { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; margin-top: 8px; }
.emi .big small { font-size: 18px; font-weight: 500; color: var(--on-dark-muted); }
.emi label { display: flex; justify-content: space-between; font-size: 14px; color: var(--on-dark-muted); margin-top: 14px; }
.emi input[type=range] { width: 100%; accent-color: var(--hl-price); margin-top: 6px; }
.emi .bar { margin-top: 16px; height: 8px; border-radius: 99px; background: #3f424d; overflow: hidden; }
.emi .bar i { display: block; height: 100%; background: var(--hl-price); border-radius: 99px; }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 8px; border-radius: 12px; background: var(--bg); }
.mini:hover { color: var(--ink); background: var(--surface-2); }
.mini .poster { width: 72px; height: 60px; border-radius: 10px; padding: 6px; flex: none; justify-content: center; align-items: center; text-align: center; }
.mini .p-big { font-size: 16px; letter-spacing: -0.02em; line-height: 1; }
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .detail-poster { height: 300px; padding: 20px 18px; border-radius: 0; margin: 0 calc(var(--gutter) * -1); }
  .detail-poster .p-sub { font-size: 16px; }
  .detail-poster .p-wm { font-size: 104px; bottom: -26px; }
  .detail-price { font-size: 42px; }
  .panel { padding: 18px; border-radius: 20px; }
  .crumbs { display: none; }
  .detail-layout { margin-top: 0; }
  .detail-side .contact-card .actions { display: none; }
  .mobile-cta { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .mobile-cta .btn-wa { flex: 1; }
  body.has-mobile-cta { padding-bottom: 84px; }
}

/* ---------- Brokers ---------- */
.broker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.broker-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s ease, box-shadow .2s ease; }
.broker-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.broker-card h3 { margin: 0; font-size: 19px; }
.broker-card h3 a { color: var(--ink); text-decoration: none; }
.broker-card h3 a::after { content: ""; position: absolute; inset: 0; }
.broker-card .btn { position: relative; z-index: 1; }
.type-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.type-bar i { display: block; height: 100%; }
.broker-hero { padding: 40px 0 8px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.broker-hero h1 { margin: 0; font-size: clamp(32px, 4vw, 52px); }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 24px; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- For brokers (post) ---------- */
.convert { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.convert .arrow { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .convert { grid-template-columns: 1fr; } .convert .arrow { justify-self: center; transform: rotate(90deg); } }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.feature h3 { margin: 14px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 26px; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }
.units { display: flex; flex-wrap: wrap; gap: 8px; }
.units span { font-family: var(--font-mono); font-size: 14px; padding: 6px 10px; border-radius: 8px; background: var(--hl-size); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: flex; flex-wrap: wrap; }
.auth-art { flex: 1 1 420px; min-height: 280px; border-radius: 0; }
.auth-art .p-big { font-size: clamp(56px, 7vw, 104px); }
.auth-art .p-wm { font-size: 160px; }
.auth-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px var(--gutter); }
.auth-form form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.phone-field { display: flex; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; }
.phone-field span { display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-2); font-weight: 700; color: var(--ink-2); }
.phone-field input { flex: 1; min-width: 0; border: 0; outline: none; min-height: 50px; padding: 0 12px; font-size: 18px; letter-spacing: .04em; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { min-height: 56px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 12px; width: 100%; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- 404 ---------- */
.nf { padding: 64px 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.nf .bubble { font-family: var(--font-mono); font-size: 18px; max-width: 520px; text-align: left; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; z-index: 100; transition: all .25s ease; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { body.has-mobile-cta .toast { bottom: 100px; } }

/* ---------- Social feed: load more, actions, double-tap, back to top ---------- */
.feed-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }
.btn-more {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 30px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 12px 28px -14px rgba(16,32,26,.55); transition: transform .15s ease, box-shadow .15s ease;
}
.btn-more:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(16,32,26,.6); }
.btn-more:active { transform: scale(.97); }
.btn-more.is-loading svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed-count { font-size: 13px; color: var(--muted); }
.feed-end { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.feed-end svg { color: var(--brand); }
.btn-round { border-radius: 50%; width: 44px; min-height: 44px; }
.card-foot .btn-ghost.btn-round { border-color: var(--line); color: var(--ink-2); }
.card-loc .views { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; }
.card-loc { flex-wrap: wrap; }
.card.is-new { animation: feedIn .45s ease both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card .poster { cursor: pointer; user-select: none; }
.burst { position: absolute; z-index: 4; left: 50%; top: 50%; color: #e11d48; pointer-events: none; transform: translate(-50%, -50%) scale(.2); animation: burst .85s ease forwards; }
.burst svg { width: 72px; height: 72px; fill: #e11d48; stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 6px 14px rgba(225,29,72,.35)); }
@keyframes burst { 30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 60% { transform: translate(-50%, -50%) scale(.95); } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
.save-btn[aria-pressed="true"] svg { animation: pop-heart .35s ease; }
@keyframes pop-heart { 50% { transform: scale(1.3); } }
.to-top {
  position: fixed; right: 18px; bottom: 22px; z-index: 45; width: 50px; height: 50px; border-radius: 50%; border: 0;
  background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -10px rgba(16,32,26,.6); opacity: 0; transform: translateY(14px); pointer-events: none; transition: all .25s ease;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
body.has-mobile-cta .to-top { bottom: 96px; }
@media (prefers-reduced-motion: reduce) {
  .card.is-new, .burst, .btn-more.is-loading svg, .save-btn[aria-pressed="true"] svg { animation: none; }
  .to-top { transition: none; }
}

/* The poster takes taps itself (open / double-tap save), above the whole-card link. */
.card:not(.card-compact) .poster { z-index: 2; }

/* ---------- Location: bar, picker, distance ---------- */
.loc-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 15px; cursor: pointer;
  box-shadow: 0 6px 16px -12px rgba(16,32,26,.5); max-width: 100%;
}
.loc-btn > svg:first-child { color: var(--brand); }
.loc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-btn:hover { background: var(--surface-2); }
.filters .loc-btn { width: 100%; justify-content: flex-start; }
.filters .loc-btn > svg:last-child { margin-left: auto; }
.km { color: var(--brand); font-weight: 700; }
.loc-modal { position: fixed; inset: 0; z-index: 100; background: rgba(16,32,26,.45); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease; }
@media (min-width: 700px) { .loc-modal { align-items: center; } }
@keyframes fadeIn { from { opacity: 0; } }
.loc-sheet {
  width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px -20px rgba(16,32,26,.5); animation: sheetUp .28s cubic-bezier(.3,.7,.2,1);
}
@media (min-width: 700px) { .loc-sheet { border-radius: 24px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
.loc-head { display: flex; align-items: center; justify-content: space-between; }
.loc-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.loc-gps { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 60px; padding: 10px 14px; border-radius: 16px; border: 1px solid #cfe6fc; background: #f5f4ff; color: var(--accent); cursor: pointer; }
.loc-gps span { display: flex; flex-direction: column; color: var(--ink); }
.loc-gps small { color: var(--muted); font-size: 13px; }
.loc-gps.is-loading svg { animation: spin 1s linear infinite; }
.loc-radius { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.loc-search { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; font-size: 16px; }
.loc-list { overflow: auto; display: flex; flex-direction: column; min-height: 120px; }
.loc-list button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 16px; cursor: pointer; color: var(--ink); }
.loc-list button:hover, .loc-list button.is-on { background: var(--surface-2); }
.loc-list button svg { color: var(--muted); }
.loc-list button span { flex: 1; }
.loc-list small { color: var(--muted); font-size: 13px; }
.loc-sub { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 6px; }
.loc-all { min-height: 48px; border-radius: 14px; border: 1px dashed var(--line-strong); background: none; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .loc-modal, .loc-sheet, .loc-gps.is-loading svg { animation: none; } }

/* ---------- Area tags (localities we have listings in) ---------- */
.area-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.area-tags .chip .n { font-size: 12px; font-weight: 600; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--hl-loc); color: var(--ink); text-align: center; }
.area-tags .chip[aria-pressed="true"] .n { background: rgba(255,255,255,.22); color: #fff; }
.area-tags .chip-more { border-style: dashed; color: var(--accent); }
.area-tags .chip { max-width: 220px; white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 640px) { .area-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; } .area-tags::-webkit-scrollbar { display: none; } }

/* ---------- Photos: cover on cards, gallery on the listing ---------- */
.poster.photo { background: #1f2130; padding: 0; }
.poster.photo > .cover { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.poster.photo::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0, transparent 34%, transparent 58%, rgba(0,0,0,.6) 100%); }
.poster.photo .photo-top { position: absolute; z-index: 1; top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; }
.poster.photo .photo-foot { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; color: #fff; }
.poster.photo .photo-big { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.media-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.card-compact .poster.photo .photo-big { font-size: 16px; }
.card-compact .poster.photo .photo-top { top: 6px; left: 6px; }
.card-compact .poster.photo .photo-foot { left: 6px; right: 6px; bottom: 6px; }
.card-compact .media-badge { font-size: 10px; padding: 2px 6px; }
.detail-poster.photo { padding: 0; }
.detail-poster.photo .photo-top { top: 20px; left: 22px; right: 22px; }
.detail-poster.photo .photo-big { font-size: clamp(30px, 4vw, 48px); }
.detail-poster.photo .photo-foot { left: 22px; right: 22px; bottom: 18px; }
.detail-poster > video.cover { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin-top: -14px; scrollbar-width: thin; }
.g-item { position: relative; flex: 0 0 auto; width: 112px; height: 84px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #1f2130; cursor: pointer; scroll-snap-align: start; }
.g-item.is-on { border-color: var(--brand); }
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; background: rgba(0,0,0,.3); }

/* ---------- Home: plain-words search ---------- */
.hero-search { flex-direction: column; align-items: stretch; gap: 8px; max-width: 680px; }
.hero-search .tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.hero-search .tabs::-webkit-scrollbar { display: none; }
.hero-search .tabs button { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 15px; cursor: pointer; }
.hero-search .tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.hero-search .qrow { display: flex; gap: 8px; }
.hero-search .qrow input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; background: var(--bg); outline: none; }
.hero-search .qrow input:focus { border-color: var(--accent); background: #fff; }
.q-hint { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; min-height: 0; padding: 0 4px; }
.q-hint:empty { display: none; }
.q-hint .qh { padding: 3px 9px; border-radius: 99px; background: var(--hl-loc); color: var(--ink); font-weight: 600; }

/* ---------- Home: numbers bar ---------- */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 4px; }
.stats-bar > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stats-bar b { display: block; font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.stats-bar span { font-size: 13px; color: var(--muted); }

/* ---------- Home: city cards ---------- */
.city-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.city-card { position: relative; display: flex; align-items: flex-end; min-height: 140px; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); background-color: var(--tint, var(--surface-2)); padding: 0; }
.city-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.city-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55)); }
.city-card.poster::after { background: none; }
.city-card .cc-body { position: relative; z-index: 1; padding: 14px; display: flex; flex-direction: column; }
.city-card:has(img) .cc-body { color: #fff; }
.city-card b { font-family: var(--font-display); font-size: 21px; }
.city-card small { font-size: 13px; opacity: .9; }
.city-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); transition: .2s; }

/* ---------- Home: shelves ---------- */
.shelf { margin-bottom: 30px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); }
.shelf-head a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.shelf-row > .card { scroll-snap-align: start; }

/* ---------- Home: rates ---------- */
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rate { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.rate:hover { border-color: var(--accent); }
.r-place { font-weight: 700; } .r-place small { font-weight: 500; color: var(--muted); }
.r-kind { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.r-val { font-family: var(--font-display); font-size: 24px; margin-top: 4px; } .r-val small { font-size: 14px; color: var(--muted); font-weight: 500; }
.r-range { font-size: 13px; color: var(--muted); }

/* ---------- Home: why listex ---------- */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.why > div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.why-i { font-size: 26px; }
.why h3 { margin: 10px 0 6px; font-size: 18px; }
.why p { margin: 0; color: var(--muted); }

/* ---------- Home: about + link grid ---------- */
.seo-block p { max-width: 820px; }
.seo-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; margin-top: 18px; }
.seo-links h3 { margin: 0 0 6px; font-size: 15px; }
.seo-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.seo-links a { color: var(--ink-2); font-size: 14px; text-decoration: none; }
.seo-links a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Home: short hero (listings start on the first phone screen) ---------- */
.hero.hero-short { padding: 34px 0 22px; gap: 0; }
.hero.hero-short .hero-copy { flex: 1 1 100%; max-width: 760px; }
.hero.hero-short h1 { margin: 0; font-size: clamp(30px, 4.4vw, 52px); }
.hero.hero-short .lede { margin: 12px 0 0; font-size: 17px; }
.hero.hero-short .search-box { margin-top: 18px; }
@media (max-width: 640px) { .hero.hero-short { padding: 18px 0 10px; } .hero.hero-short .lede { font-size: 15px; } }
.rate[hidden] { display: none; }
@media (max-width: 640px) {
  /* Phone: get the first listing onto the first screen */
  .hero.hero-short h1 { font-size: 27px; }
  .hero.hero-short .lede { display: none; }
  .hero.hero-short .search-box { margin-top: 12px; padding: 6px; }
  #fresh .section-head p, #fresh [data-hl-key] { display: none; }
  #fresh .section-head h2 { font-size: 22px; }
  #fresh .area-tags { margin: 8px 0 6px; }
}
/* The hero's own padding must keep the page's side margin (gutter). */
.hero.hero-short { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (max-width: 640px) { #fresh-view { display: none; } .hero-search .qrow .btn { padding: 0 14px; } }
.hero-search .tabs, .hero-search .qrow, .hero-search .q-hint { width: 100%; min-width: 0; max-width: 100%; }
.hero-search { flex-wrap: nowrap; }

/* ---------- Home: hero side panel — just posted near you ---------- */
.hero.hero-short { align-items: center; }
.hero.hero-short .hero-copy { flex: 1 1 560px; }
.hero-side { flex: 0 1 400px; min-width: 0; }
.hero-side[hidden] { display: none; }
.hs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow-panel); }
.hs-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.hs-list { display: flex; flex-direction: column; gap: 10px; }
.hs-item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); padding: 8px; border-radius: 14px; background: var(--bg); transition: transform .15s ease, background .15s ease; animation: hsIn .5s ease both; }
.hs-item:nth-child(2) { animation-delay: .12s; } .hs-item:nth-child(3) { animation-delay: .24s; }
@keyframes hsIn { from { opacity: 0; transform: translateY(8px); } }
.hs-item:hover { background: var(--surface-2); transform: translateX(3px); color: var(--ink); }
.hs-poster.poster { flex: 0 0 84px; height: 70px; border-radius: 10px; padding: 8px; justify-content: center; }
.hs-poster .p-big { font-size: 18px; letter-spacing: -0.02em; }
.hs-poster .p-wm { display: none; }
.hs-poster.photo .photo-top, .hs-poster.photo .photo-foot { display: none; }
.hs-txt { display: flex; flex-direction: column; min-width: 0; }
.hs-txt b { font-family: var(--font-display); font-size: 18px; }
.hs-txt span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-txt small { font-size: 12px; color: var(--muted); }
.hs-foot { margin-top: 12px; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.hs-foot b { color: var(--ink); }
@media (max-width: 960px) { .hero-side { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .hs-item { animation: none; } }
.hs-poster .p-big.is-long { font-size: 14px; white-space: nowrap; }

/* ---------- Home: local property pulse ---------- */
.pulse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; min-width: 0; }
.pcard h3 { margin: 0 0 6px; font-size: 18px; }
.pc-sub { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.pc-sub b { color: var(--ink); }
.pc-bars { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pc-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 32px; gap: 10px; align-items: center; font-size: 14px; }
.pc-bars li > span, .pc-bars li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.pc-bars li > a:hover { color: var(--accent); text-decoration: underline; }
.pc-bars i { display: block; height: 8px; border-radius: 99px; background: #968ae0; min-width: 4px; }
.pc-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.pc-cta { display: inline-block; font-weight: 700; font-size: 14px; text-decoration: none; }
.pc-news { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.pc-news a { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; display: block; }
.pc-news a:hover { color: var(--accent); text-decoration: underline; }
.pc-news small { color: var(--muted); font-size: 12px; }
.pc-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Local pulse v2: balanced layout, colour bands, no empty space ---------- */
.pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a c" "b c"; align-items: stretch; }
.pc-a { grid-area: a; } .pc-b { grid-area: b; } .pc-c { grid-area: c; }
@media (max-width: 860px) { .pulse-grid { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c"; } }
.pcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pc-band { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 12px; padding: 16px 20px; color: #fff; }
.pc-band span { grid-column: 1; font-weight: 700; font-size: 16px; }
.pc-band b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--font-display); font-size: 38px; line-height: 1; letter-spacing: -0.02em; }
.pc-band small { grid-column: 1; opacity: .85; font-size: 13px; }
.pc-green { background: linear-gradient(120deg, #5d5294, #968ae0 70%, #b5abfc); }
.pc-blue { background: linear-gradient(120deg, #5d5294, #796cbf 60%, #968ae0); }
.pc-ink { background: linear-gradient(120deg, #1f2130, #423a6a 70%, #5d5294); }
.pc-body { padding: 16px 20px 18px; flex: 1; display: flex; flex-direction: column; }
.pc-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chips span { padding: 6px 10px; border-radius: 99px; background: #e7e5fe; color: #423a6a; font-size: 14px; font-weight: 600; }
.pc-chips b { margin-left: 4px; padding: 0 6px; border-radius: 99px; background: #fff; }
.pc-kv { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; }
.pc-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.pc-stack i { display: block; min-width: 6px; }
.pc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.pc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pc-body .pc-cta { margin-top: auto; padding-top: 14px; }
.pc-body .pc-bars i { background: #968ae0; }
.pc-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: auto; padding-top: 12px; }
.pc-prices > div { background: var(--bg); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.pc-prices span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-prices b { font-family: var(--font-display); font-size: 20px; margin-top: 2px; }
.pc-prices em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 500; }
.pc-prices small { font-size: 12px; color: var(--muted); }
.pc-news { margin: 0; gap: 14px; }
.pc-news li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pc-news li:last-child { border-bottom: 0; padding-bottom: 0; }

.pc-pop { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.pc-pop-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg); color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.pc-pop-i:hover { transform: translateX(3px); color: var(--ink); }
.pc-pop-t { flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 8px; color: #fff; background: #796cbf; }
.pc-pop-t.t-plot { background: #2E7D32; } .pc-pop-t.t-shop { background: #6a3fb5; } .pc-pop-t.t-house { background: #c43b6c; } .pc-pop-t.t-land { background: #14918c; }
.pc-pop-x { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pc-pop-x b { font-family: var(--font-display); font-size: 16px; }
.pc-pop-x small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-pop-i em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Hero illustration (pure SVG + CSS) ---------- */
.hero-art { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-panel); border: 1px solid var(--line); background: #efedfd; }
.hx-svg { display: block; width: 100%; height: auto; }
.hx-rise { transform-box: fill-box; transform-origin: 50% 100%; animation: hxRise .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hxRise { from { transform: scaleY(0); opacity: 0; } }
.hx-win { animation: hxTw 4s ease-in-out infinite; }
@keyframes hxTw { 50% { fill: #FFE082; } }
.hx-pin { animation: hxBob 2s ease-in-out infinite; animation-delay: 1.2s; }
@keyframes hxBob { 50% { transform: translateY(-10px); } }
.hx-chat { animation: hxFloat 4s ease-in-out infinite; }
@keyframes hxFloat { 50% { transform: translateY(-8px); } }
.hx-dot { animation: hxDot 1.2s ease-in-out infinite; }
@keyframes hxDot { 50% { opacity: .35; } }
.hx-cloud { animation: hxDrift 16s ease-in-out infinite alternate; }
.hx-cloud2 { animation-duration: 22s; animation-direction: alternate-reverse; }
@keyframes hxDrift { to { transform: translateX(40px); } }
.hx-tree { animation: hxSway 5s ease-in-out infinite; }
@keyframes hxSway { 50% { transform: rotate(3deg); } }
.hx-flag { transform-box: fill-box; transform-origin: 0 50%; animation: hxFlag 1.6s ease-in-out infinite; }
@keyframes hxFlag { 50% { transform: scaleX(.75); } }
.hx-heart { transform-box: fill-box; transform-origin: center; animation: hxBeat 2.4s ease-in-out infinite; }
@keyframes hxBeat { 10%, 30% { transform: scale(1.12); } 20% { transform: scale(1); } }
.hx-sun { animation: hxGlow 6s ease-in-out infinite; }
@keyframes hxGlow { 50% { opacity: .7; } }
.hx-road { animation: hxRoad 3s linear infinite; }
@keyframes hxRoad { to { stroke-dashoffset: -52; } }
@media (prefers-reduced-motion: reduce) { .hero-art * { animation: none !important; } }

/* ---------- Header: same menu as the main site ---------- */
.site-header .nav { gap: 22px; }
.site-header .nav a { font-size: 14.5px; color: var(--muted); font-weight: 500; }
.site-header .nav a:hover { color: var(--ink); }
.site-header .nav a[aria-current="page"] { color: #5d5294; font-weight: 700; }
.btn-auth { background: var(--surface); color: var(--ink) !important; border: 1px solid var(--line); font-weight: 600; min-height: 44px; }
.btn-auth:hover { border-color: #796cbf; color: #796cbf !important; }
.mobile-nav .btn-auth { justify-content: center; margin-top: 6px; }

/* ---------- Same look as the main listex.in site ---------- */
body { background: radial-gradient(1100px 680px at 84% -170px, #efedfd, transparent 62%), radial-gradient(900px 700px at -10% 100%, #eef0fa, transparent 58%), var(--bg); background-attachment: fixed; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.025em; }
.pc-pop-t { background: #796cbf; } .pc-pop-t.t-shop { background: #c47a12; }

#p-news .pc-body > .pc-pop:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- City / kind pages (server-drawn, for search) ---------- */
.seo-page .crumbs { margin-top: 22px; }
.seo-intro { max-width: 760px; font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 12px 0 4px; }
.seo-page a.chip { text-decoration: none; color: var(--ink); }
.seo-page a.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seo-sec { margin: 44px 0 0; max-width: 860px; }
.seo-sec h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; margin: 0 0 14px; }
.seo-areas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 18px; }
.seo-areas a { color: var(--ink); font-weight: 600; }
.seo-faq { border: 1px solid var(--line, #e6e6ef); border-radius: 14px; padding: 14px 18px; background: #fff; margin-bottom: 10px; }
.seo-faq summary { font-weight: 700; cursor: pointer; min-height: 24px; }
.seo-faq p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.6; }
.seo-page + footer, .seo-page { padding-bottom: 40px; }
.seo-page a.chip { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .seo-sec .area-tags { flex-wrap: wrap; overflow: visible; } }
