/* SgBizMart — design system. Mobile-first: base rules target phones,
   min-width queries layer on tablet (720px) and desktop (1024px). */

/* ───────── Tokens ───────── */
:root {
  color-scheme: light;
  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --surface-2: #F4F1EA;
  --ink: #14211D;
  --ink-2: #3A4843;
  --muted: #65726D;
  --line: #E5E0D5;
  --line-strong: #CEC7B8;

  --brand: #0F5B46;
  --brand-hover: #0C4B3A;
  --brand-ink: #0A3A2E;
  --brand-tint: #E5F1EC;

  --sell: #C4461A;
  --sell-hover: #A93A14;
  --sell-tint: #FBEBE3;

  --gold: #8A6412;
  --gold-tint: #F8EFD6;
  --danger: #B3261E;
  --danger-tint: #FBE9E7;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 29, .05);
  --shadow-md: 0 8px 24px -10px rgba(20, 33, 29, .18), 0 2px 6px rgba(20, 33, 29, .05);
  --shadow-lg: 0 24px 60px -20px rgba(10, 58, 46, .35);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 60px;
  --gutter: 16px;
}

/* ───────── Reset & base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, dl, dd, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid rgba(15, 91, 70, .4); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.section { padding-block: 56px; }
.section--tint { background: var(--surface-2); }
.section__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.section__head--row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }

.h1, .h2, .h3 { font-family: var(--font-display); font-weight: 560; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); }
.h2 { font-size: clamp(1.65rem, 4.6vw, 2.4rem); }
.h3 { font-size: 1.25rem; line-height: 1.25; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); }
.eyebrow--sell { color: var(--sell); }
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.link { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(15, 91, 70, .35); }
.link:hover { text-decoration-color: currentColor; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.link-arrow span { display: inline-flex; align-items: center; gap: 6px; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }
.icon { width: 20px; height: 20px; flex: none; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .97rem; line-height: 1.2; text-align: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); }
.btn--sell { background: var(--sell); color: #fff; }
.btn--sell:hover { background: var(--sell-hover); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--brand-ink); }
.btn--light:hover { background: #F1EEE6; }
.btn--outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn--lg { min-height: 54px; padding-inline: 26px; font-size: 1.03rem; }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ───────── Header ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: var(--header-h);
  background: rgba(250, 248, 243, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 10px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.14rem; letter-spacing: -.02em; margin-right: auto; }
.brand__mark { width: 32px; height: 32px; }
.brand em { font-style: normal; color: var(--brand); }
.nav { display: none; }
.nav a { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-tint); }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.count-dot {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--sell); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center;
}
.header-cta { display: none; }
.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: 8px var(--gutter) 20px;
}
.mobile-menu a:not(.btn) { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.mobile-menu a:not(.btn) svg { width: 18px; height: 18px; color: var(--muted); }
.mobile-menu .btn { margin-top: 16px; }

/* ───────── Badges & chips ───────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: .76rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--verified { background: var(--brand-tint); color: var(--brand); }
.badge--new { background: var(--gold-tint); color: var(--gold); }
.badge--sell { background: var(--sell-tint); color: var(--sell); }
.badge--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge--on-dark { background: rgba(255, 255, 255, .12); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--removable { min-height: 34px; padding: 4px 8px 4px 12px; font-size: .84rem; background: var(--brand-tint); border-color: transparent; color: var(--brand); }
.chip--removable svg { width: 14px; height: 14px; }

/* ───────── Listing card ───────── */
.lcard {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.lcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.cat-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--ink-2); min-width: 0; }
.cat-tag__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.cat-tag__icon svg { width: 18px; height: 18px; }
.cat-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-btn {
  position: relative; z-index: 2; display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; margin: -4px -6px -4px 0; border-radius: 999px; color: var(--muted);
}
.save-btn:hover { background: var(--surface-2); color: var(--sell); }
.save-btn svg { width: 21px; height: 21px; }
.save-btn[aria-pressed="true"] { color: var(--sell); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
.lcard__title { font-size: 1.04rem; font-weight: 700; line-height: 1.32; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lcard__meta { display: flex; align-items: center; gap: 5px; font-size: .84rem; color: var(--muted); }
.lcard__meta svg { width: 15px; height: 15px; flex: none; }
.lcard__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard__summary { font-size: .9rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.metrics { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: auto; }
.metrics > div { background: #FDFCF9; padding: 10px 10px 9px; min-width: 0; }
.metrics dt { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.metrics dd { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metrics > div:first-child dd { color: var(--brand); font-size: 1.12rem; }
.lcard__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lcard__foot .listed { margin-left: auto; font-size: .78rem; color: var(--muted); }
.lcard--mine { border-color: var(--sell); box-shadow: 0 0 0 3px var(--sell-tint); }

.card-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.browse > section { min-width: 0; }
.lcard { min-width: 0; }
.card-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px; }
.card-rail::-webkit-scrollbar { display: none; }
.card-rail > * { flex: 0 0 min(86%, 340px); scroll-snap-align: center; }

/* ───────── Forms ───────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: .9rem; font-weight: 700; }
.field__label .opt { font-weight: 500; color: var(--muted); }
.field__hint { font-size: .82rem; color: var(--muted); }
.field__error { display: none; font-size: .82rem; font-weight: 600; color: var(--danger); }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea, .field.is-invalid .input-group { border-color: var(--danger); background: var(--danger-tint); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--ink); /* never inherit — fields sit on dark panels too */
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus, .input-group:focus-within { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15, 91, 70, .14); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365726D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input-group { display: flex; align-items: stretch; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group__affix { display: grid; place-items: center; padding-inline: 12px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.input-group .input { border: 0; border-radius: 0; box-shadow: none !important; background: transparent; min-width: 0; }
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; font-size: .93rem; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); }
.check.is-invalid { color: var(--danger); }
.check.is-invalid input { outline: 2px solid var(--danger); outline-offset: 2px; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { position: relative; display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.radio-card input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.radio-card strong { display: block; font-size: .97rem; }
.radio-card span { font-size: .86rem; color: var(--ink-2); }

/* ───────── Hero (home) ───────── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(46, 150, 115, .55), transparent 62%),
    radial-gradient(700px 380px at -10% 110%, rgba(196, 70, 26, .28), transparent 60%),
    var(--brand-ink);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero__inner { position: relative; display: grid; gap: 36px; padding-block: 44px 96px; }
.hero__copy { display: flex; flex-direction: column; gap: 18px; }
.hero .eyebrow { color: #9FE0C7; }
.hero .h1 em { font-style: italic; color: #FFD9A8; font-weight: 500; }
.hero__lead { font-size: 1.08rem; color: rgba(255, 255, 255, .82); max-width: 52ch; }
.hero__ctas { display: grid; gap: 10px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; color: rgba(255, 255, 255, .8); }
.hero__trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust svg { width: 16px; height: 16px; color: #9FE0C7; }
.hero__cards { display: none; }

.search-card {
  position: relative; z-index: 2; margin-top: -64px;
  display: grid; gap: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.search-card .field__label { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ───────── Stats ───────── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; padding-block: 32px 8px; }
.stat__value { font-family: var(--font-display); font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 560; letter-spacing: -.02em; line-height: 1.1; }
.stat__label { font-size: .86rem; color: var(--muted); }

/* ───────── Category grid ───────── */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-tile { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 68px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.cat-tile__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.cat-tile__icon svg { width: 20px; height: 20px; }
.cat-tile strong { display: block; font-size: .9rem; line-height: 1.25; }
.cat-tile small { font-size: .78rem; color: var(--muted); }

/* ───────── Two paths (buyers / owners) ───────── */
.paths { display: grid; gap: 16px; }
.path { display: flex; flex-direction: column; gap: 20px; padding: 24px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.path--sell { background: #FFFAF6; border-color: #F1D9CC; }
.steps { display: grid; gap: 18px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: .95rem;
}
.path--sell .steps li::before { background: var(--sell-tint); color: var(--sell); }
.steps strong { display: block; font-size: 1rem; }
.steps p { font-size: .92rem; color: var(--ink-2); }

/* ───────── Confidentiality panel & estimator ───────── */
.split { display: grid; gap: 28px; align-items: start; }
.ticklist { display: grid; gap: 12px; }
.ticklist li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: .96rem; color: var(--ink-2); }
.ticklist svg { width: 22px; height: 22px; color: var(--brand); margin-top: 1px; }
.ticklist strong { color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.panel--dark { background: var(--brand-ink); border-color: transparent; color: #fff; }
.panel--dark .muted, .panel--dark .field__hint { color: rgba(255, 255, 255, .7); }
.panel--dark .field__label { color: #fff; }
.estimate { display: grid; gap: 4px; margin-top: 6px; padding: 16px; border-radius: var(--r); background: rgba(255, 255, 255, .08); }
.estimate__range { font-family: var(--font-display); font-size: clamp(1.5rem, 6.5vw, 2rem); font-weight: 560; letter-spacing: -.02em; color: #FFD9A8; line-height: 1.15; }

/* ───────── Pricing ───────── */
.pricing { display: grid; gap: 14px; }
.price-card { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.price-card__amount { font-family: var(--font-display); font-size: 2.5rem; font-weight: 560; letter-spacing: -.03em; line-height: 1; }
.price-card__amount small { font-family: var(--font-ui); font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* ───────── FAQ ───────── */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 16px 16px; color: var(--ink-2); font-size: .95rem; }

/* ───────── CTA band ───────── */
.cta-band { display: grid; gap: 14px; }
.cta-box { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px 22px; border-radius: var(--r-lg); color: #fff; }
.cta-box--buy { background: var(--brand); }
.cta-box--sell { background: var(--sell); }
.cta-box p { color: rgba(255, 255, 255, .86); }

/* ───────── Footer ───────── */
.site-footer { margin-top: 56px; background: #0B1F19; color: rgba(255, 255, 255, .72); font-size: .9rem; }
.site-footer__grid { display: grid; gap: 28px; padding-block: 40px 28px; }
.site-footer .brand { color: #fff; }
.site-footer .brand em { color: #7FD4B4; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.site-footer li + li { margin-top: 8px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal { padding-block: 0 28px; font-size: .8rem; color: rgba(255, 255, 255, .55); display: grid; gap: 8px; }
.site-footer__legal p:first-child { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; }

/* ───────── Page head ───────── */
.page-head { padding-block: 24px 16px; display: grid; gap: 6px; }
.page-head .h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); min-height: 36px; }
.crumbs a:hover { color: var(--brand); }
.crumbs svg { width: 16px; height: 16px; }

/* ───────── Browse (listings feed) ───────── */
.toolbar { position: sticky; top: var(--header-h); z-index: 30; background: rgba(250, 248, 243, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-block: 10px; }
.toolbar__row { display: flex; gap: 8px; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 40px; border-radius: 999px; min-height: 46px; }
.filter-btn { flex: none; }
.filter-btn .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .72rem; }
.browse { display: grid; gap: 20px; padding-block: 16px 24px; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.results-bar p { white-space: nowrap; }
.results-bar .select { width: auto; min-height: 40px; padding-block: 6px; font-size: .9rem; font-weight: 600; border-radius: 999px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.filters {
  position: fixed; inset: auto 0 0 0; z-index: 70;
  display: flex; flex-direction: column; max-height: 88dvh;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 50px rgba(0, 0, 0, .25);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
}
.filters.is-open { transform: none; visibility: visible; }
.filters__head { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter) 10px; border-bottom: 1px solid var(--line); }
.filters__head h2 { font-size: 1.1rem; font-weight: 800; }
.filters__body { overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter); display: grid; gap: 22px; }
.filters__foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.filter-group { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.filter-group legend, .filter-group__title { padding: 0; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-pill { position: relative; }
.opt-pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-pill span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.opt-pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt-pill input:focus-visible + span { outline: 3px solid rgba(15, 91, 70, .4); outline-offset: 2px; }
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(11, 31, 25, .5); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.backdrop.is-open { opacity: 1; visibility: visible; }

.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.empty__icon svg { width: 26px; height: 26px; }

/* ───────── Listing detail ───────── */
.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 24px; }
.detail__head { display: grid; gap: 12px; }
.detail__title { font-family: var(--font-display); font-size: clamp(1.55rem, 5.6vw, 2.35rem); font-weight: 560; letter-spacing: -.02em; line-height: 1.14; text-wrap: balance; }
.detail__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .9rem; color: var(--muted); }
.detail__sub span { display: inline-flex; align-items: center; gap: 5px; }
.detail__sub svg { width: 16px; height: 16px; }
.detail__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__actions { display: flex; gap: 8px; }
.keyfigs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.keyfig { background: var(--surface); padding: 14px 14px 13px; min-width: 0; }
.keyfig dt { display: flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.keyfig dd { font-size: clamp(1.2rem, 5.4vw, 1.5rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.keyfig small { display: block; font-size: .78rem; color: var(--muted); }
.keyfig--primary { background: var(--brand-ink); color: #fff; }
.keyfig--primary dt, .keyfig--primary small { color: rgba(255, 255, 255, .72); }
.block { display: grid; gap: 14px; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.block h2 { font-size: 1.14rem; font-weight: 800; letter-spacing: -.01em; }
.block p { color: var(--ink-2); }
.prose { display: grid; gap: 12px; }
.facts { display: grid; grid-template-columns: 1fr; }
.facts > div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; }
.dotlist { display: grid; gap: 9px; }
.dotlist li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: .95rem; }
.dotlist li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.chart { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 8px 4px 0; border-bottom: 1px solid var(--line-strong); }
.chart__group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 100%; }
.bar { position: relative; width: min(38px, 38%); border-radius: 6px 6px 0 0; min-height: 4px; }
.bar--rev { background: #BFD9CE; }
.bar--profit { background: var(--brand); }
.bar span { position: absolute; left: 50%; bottom: calc(100% + 4px); translate: -50% 0; font-size: .68rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chart__labels { display: flex; gap: 14px; padding: 6px 4px 0; }
.chart__labels span { flex: 1; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }
.note { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface-2); font-size: .88rem; color: var(--ink-2); }
.note svg { width: 20px; height: 20px; color: var(--muted); margin-top: 1px; }
.note--brand { background: var(--brand-tint); }
.note--brand svg { color: var(--brand); }
.note--sell { background: var(--sell-tint); }
.note--sell svg { color: var(--sell); }
.verify-list { display: grid; gap: 10px; }
.verify-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .92rem; }
.verify-list svg { width: 20px; height: 20px; margin-top: 1px; }
.verify-list .is-yes svg { color: var(--brand); }
.verify-list .is-no { color: var(--muted); }
.aside-card { display: grid; gap: 16px; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.aside-card__price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 560; letter-spacing: -.02em; line-height: 1.1; }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(20, 33, 29, .08);
}
.sticky-cta__price { flex: 1; min-width: 0; line-height: 1.2; }
.sticky-cta__price small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sticky-cta__price strong { font-size: 1.2rem; letter-spacing: -.02em; }
body.has-sticky-cta { padding-bottom: 76px; }

/* ───────── Dialog (bottom sheet on phones) ───────── */
dialog.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0;
  border: 0; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--ink); overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet::backdrop { background: rgba(11, 31, 25, .55); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 12px; border-bottom: 1px solid var(--line); }
.sheet__head h2 { font-size: 1.15rem; font-weight: 800; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter) calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }

/* ───────── Sell page ───────── */
.sell-hero { background: linear-gradient(180deg, #FFF4EC, var(--bg)); border-bottom: 1px solid var(--line); }
.sell-hero__inner { display: grid; gap: 18px; padding-block: 32px 28px; }
.assure { display: grid; gap: 10px; }
.assure li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--ink-2); }
.assure svg { width: 20px; height: 20px; flex: none; color: var(--sell); margin-top: 2px; }
.wizard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 20px 24px; }
.browse { grid-template-columns: minmax(0, 1fr); }
.stepper { display: grid; gap: 8px; }
.stepper__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .86rem; }
.stepper__meta strong { font-size: 1rem; }
.stepper__track { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.stepper__seg { height: 6px; border-radius: 999px; background: var(--line); }
.stepper__seg.is-done { background: var(--sell); }
.stepper__seg.is-current { background: linear-gradient(90deg, var(--sell) 50%, var(--line) 50%); }
.stepper__list { display: none; }
.step { display: grid; gap: 20px; padding: 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.step__head { display: grid; gap: 4px; }
.step__head h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 560; letter-spacing: -.02em; }
.wizard-nav {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px;
  margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 248, 243, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.wizard-nav .btn--grow { flex: 1; }
.draft-status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.draft-status svg { width: 15px; height: 15px; color: var(--brand); }
.insight { display: grid; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--brand-tint); font-size: .9rem; color: var(--ink-2); }
.insight strong { font-size: 1.05rem; color: var(--brand-ink); }
.review-list { display: grid; }
.review-list > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-list > div:last-child { border-bottom: 0; }
.review-list dt { font-size: .8rem; color: var(--muted); grid-column: 1; }
.review-list dd { font-weight: 600; font-size: .95rem; grid-column: 1; overflow-wrap: anywhere; }
.review-list button { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 40px; padding-inline: 8px; }
.order { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg); background: #FFFAF6; border: 1.5px solid #F1D9CC; }
.order__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.order__row--total { padding-top: 12px; border-top: 1px dashed var(--line-strong); font-weight: 800; font-size: 1.1rem; }
.order__perks { display: grid; gap: 6px; font-size: .88rem; color: var(--ink-2); }
.order__perks li { display: flex; gap: 8px; align-items: flex-start; }
.order__perks svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--sell); }
.pay-slot { display: grid; gap: 6px; padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); font-size: .88rem; color: var(--muted); }
.success { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 36px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); }
.success__icon svg { width: 32px; height: 32px; }
.success .steps { text-align: left; max-width: 460px; }

/* ───────── Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 100;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  max-width: min(560px, calc(100vw - 32px)); padding: 11px 18px; border-radius: 18px; overflow-wrap: anywhere;
  background: var(--ink); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-md);
  transition: opacity .2s, translate .2s;
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ───────── ≥ 520px ───────── */
@media (min-width: 520px) {
  .hero__ctas { grid-template-columns: auto auto; justify-content: start; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}

/* ───────── ≥ 720px (tablet) ───────── */
@media (min-width: 720px) {
  :root { --gutter: 24px; --header-h: 68px; }
  .section { padding-block: 80px; }
  .section__head { margin-bottom: 36px; }
  .search-card { grid-template-columns: 1fr 1fr auto; align-items: end; padding: 18px; }
  .stats { grid-template-columns: repeat(4, 1fr); padding-block: 44px 12px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; overflow: visible; margin-inline: 0; padding: 0; }
  .card-rail > * { flex: initial; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .paths, .pricing, .cta-band { grid-template-columns: 1fr 1fr; gap: 20px; }
  .path, .price-card { padding: 32px 28px; }
  .cta-box { padding: 40px 32px; }
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .keyfigs { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .facts > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; padding-bottom: 0; }
  .block { padding: 26px 24px; }
  .step { padding: 30px 28px; }
  dialog.sheet { width: min(540px, calc(100vw - 48px)); margin: auto; border-radius: 22px; }
  .sheet__head, .sheet__body { padding-inline: 24px; }
  .toast { bottom: 32px; }
  .wizard-nav { position: static; margin-inline: 0; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; justify-content: space-between; }
  .wizard-nav .btn--grow { flex: none; min-width: 220px; margin-left: auto; }
}

/* ───────── ≥ 1024px (desktop) ───────── */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .nav { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
  .header-cta { display: inline-flex; }
  .menu-btn, .mobile-menu { display: none !important; }
  .hero__inner { grid-template-columns: 1.1fr .9fr; align-items: center; padding-block: 72px 132px; }
  .hero__cards { display: block; position: relative; height: 400px; }
  .hero__cards .lcard { position: absolute; width: 330px; box-shadow: var(--shadow-lg); color: var(--ink); pointer-events: none; }
  .hero__cards .lcard:nth-child(1) { top: 0; right: 4%; rotate: 3deg; }
  .hero__cards .lcard:nth-child(2) { top: 132px; right: 30%; rotate: -4deg; z-index: 2; }
  .hero__cards .lcard__summary, .hero__cards .lcard__foot { display: none; }
  .search-card { margin-top: -76px; padding: 22px; }
  .card-grid--3, .card-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
  .panel { padding: 28px; }

  .browse { grid-template-columns: 288px 1fr; gap: 32px; align-items: start; padding-top: 24px; }
  .filter-btn, .backdrop, .filters__head .icon-btn, .filters__foot .btn--primary { display: none; }
  .filters {
    position: sticky; top: calc(var(--header-h) + 78px); inset-inline: auto; bottom: auto; z-index: 1;
    transform: none; visibility: visible; transition: none;
    max-height: calc(100dvh - var(--header-h) - 100px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: none;
  }
  .filters .opt-pill span { min-height: 34px; padding: 4px 11px; font-size: .82rem; }
  .filters .filter-options { gap: 6px; }
  .filters__head { padding: 16px 18px 12px; }
  .filters__body { padding: 16px 18px; }
  .filters__foot { grid-template-columns: 1fr; padding: 12px 18px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .browse .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .detail { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .detail__main { display: grid; gap: 20px; min-width: 0; }
  .detail__aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
  .sticky-cta { display: none; }
  body.has-sticky-cta { padding-bottom: 0; }

  .sell-hero__inner { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-block: 56px 48px; }
  .wizard { grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; padding-block: 36px 48px; }
  .stepper { position: sticky; top: calc(var(--header-h) + 24px); gap: 18px; }
  .stepper__track, .stepper__meta { display: none; }
  .stepper__list { display: grid; gap: 4px; counter-reset: s; }
  .stepper__list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 600; color: var(--muted); counter-increment: s; }
  .stepper__list li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); font-size: .82rem; font-weight: 800; }
  .stepper__list li.is-current { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
  .stepper__list li.is-current::before { background: var(--sell); color: #fff; }
  .stepper__list li.is-done { color: var(--ink-2); }
  .stepper__list li.is-done::before { content: "✓"; background: var(--sell-tint); color: var(--sell); }
}

@media (min-width: 1280px) {
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .cat-tile { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1023.98px) {
  .detail__main, .detail__aside { display: contents; }
  body.sheet-open { overflow: hidden; }
}

/* ───────── Accounts: sign-in, avatar, account menu ───────── */
.contents { display: contents; }
.auth-slot { display: flex; align-items: center; gap: 4px; }
.auth-signin, .account { display: none; }
.account { position: relative; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 999px; object-fit: cover; background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: .95rem; }
.avatar--sell { background: var(--sell-tint); color: var(--sell); }
.avatar svg { width: 18px; height: 18px; }
.avatar-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--brand-tint); }
.account__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 250px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-md); }
.account__who { display: grid; padding: 8px 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.account__who span { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; }
.account__menu a, .account__menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .93rem; text-align: left; }
.account__menu a:hover, .account__menu button:hover { background: var(--surface-2); }
.account__menu svg { width: 18px; height: 18px; color: var(--muted); }
.btn--google { background: #fff; border-color: #C9CDD2; color: #1F1F1F; font-weight: 600; }
.btn--google:hover { background: #F7F8F8; border-color: #9AA0A6; }
.signin { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 36px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.signin p { max-width: 42ch; }
.signin__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.signin__icon svg { width: 24px; height: 24px; }
.demo-bar { padding: 8px var(--gutter); background: var(--gold-tint); color: #5C4308; font-size: .82rem; text-align: center; border-bottom: 1px solid #EBDDB4; }
.mobile-menu button.btn { margin-top: 10px; }

/* ───────── Loading placeholders ───────── */
.skeleton { min-height: 250px; pointer-events: none; }
.skeleton span { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, #FBF9F4 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────── Messages (chat) ─────────
   App-like page: the window never scrolls, only the list and the thread do. */
body.page-chat { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
body.page-chat .site-header, body.page-chat .demo-bar { flex: none; }
.chat { flex: 1; min-height: 0; width: 100%; max-width: 1200px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); }
.chat__list { display: flex; flex-direction: column; min-height: 0; }
.chat__list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter) 12px; border-bottom: 1px solid var(--line); }
.conv-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.conv { display: grid; grid-template-columns: 40px minmax(0, 1fr) 10px; gap: 12px; align-items: center; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
.conv:hover { background: #FDFCF9; }
.conv.is-active { background: var(--brand-tint); }
.conv .avatar { width: 40px; height: 40px; }
.conv.is-active .avatar { background: #fff; }
.conv__main { display: grid; gap: 1px; min-width: 0; }
.conv__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.conv__top strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv__top time { flex: none; font-size: .76rem; color: var(--muted); }
.conv__listing { font-size: .8rem; font-weight: 600; color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv__preview { font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.is-unread .conv__preview { color: var(--ink); font-weight: 600; }
.conv__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--sell); visibility: hidden; }
.conv.is-unread .conv__dot { visibility: visible; }
.chat__thread { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat[data-view="list"] .chat__thread, .chat[data-view="thread"] .chat__list { display: none; }
.chat__placeholder { margin: auto; padding: 32px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); max-width: 420px; }
.chat__placeholder .signin { width: 100%; }
.thread__head { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px var(--gutter) 8px 6px; background: var(--surface); border-bottom: 1px solid var(--line); }
.thread__who { display: grid; min-width: 0; line-height: 1.3; }
.thread__who strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread__who a { font-size: .82rem; color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread__who a:hover { text-decoration: underline; }
.thread__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 16px var(--gutter) 20px; }
.thread__intro { display: grid; gap: 6px; margin: 0 auto 8px; max-width: 520px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: .84rem; color: var(--ink-2); text-align: center; }
.msg { display: grid; gap: 2px; max-width: min(78%, 520px); }
.msg p { padding: 9px 13px; border-radius: 16px 16px 16px 5px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { font-size: .7rem; color: var(--muted); padding-inline: 4px; }
.msg--mine { align-self: flex-end; justify-items: end; }
.msg--mine p { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 16px 16px 5px 16px; }
.thread__composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.thread__composer .textarea { min-height: 46px; max-height: 140px; padding: 10px 14px; border-radius: 22px; resize: none; }
.thread__composer .btn { flex: none; width: 46px; min-height: 46px; padding: 0; }

@media (min-width: 900px) {
  .chat { grid-template-columns: 340px minmax(0, 1fr); border-inline: 1px solid var(--line); }
  .chat__list { border-right: 1px solid var(--line); }
  .chat[data-view="list"] .chat__thread, .chat[data-view="thread"] .chat__list { display: flex; }
  .thread__back { display: none; }
  .thread__head { padding-left: var(--gutter); min-height: 60px; }
  .chat__list-head, .conv { padding-inline: 18px; }
}
@media (min-width: 1024px) {
  .auth-signin { display: inline-flex; }
  .account { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
