/* PRO X — design system
   Dark navy/charcoal base, gold accent for value & trust, emerald for positive signals.
   RTL-first (Hebrew). Rubik for all text. */

:root {
  --bg: #0a0a0a;
  --bg-alt: #0d0d0d;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --border: rgba(212, 175, 55, 0.16);
  --text: #f5f5f3;
  --text-muted: #b7b3a9;
  --text-dim: #837f76;
  --gold: #d4af37;
  --gold-soft: #e9c766;
  --gold-grad: linear-gradient(135deg,#fdf0b8 0%,#e9c766 28%,#d4af37 52%,#a5750f 78%,#8a6112 100%);
  --emerald: #2ecc8f;
  --red: #ef5a5a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 10px 30px -10px rgba(212,175,55,0.35);
  --container: 1280px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, rgba(232, 176, 75, 0.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(46, 204, 143, 0.06), transparent 35%);
  color: var(--text);
  font-family: 'Heebo', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background .3s var(--ease);
}
.site-header.scrolled { background: rgba(6,6,6,0.9); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 24px;
}

.logo-lockup { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 56px; width: auto; }

.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-accent {
  color: var(--gold);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--gold-soft);
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: -6px;
  height: 2px;
  background: var(--gold-grad);
  border-radius: 2px;
}

.pill {
  background: rgba(212,175,55,0.14);
  color: var(--gold-soft);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212,175,55,0.3);
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.btn-outline-gold {
  background: rgba(212,175,55,0.06);
  border: 1px solid var(--gold);
  color: var(--gold-soft);
}
.btn-outline-gold:hover { background: rgba(212,175,55,0.14); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin-inline: auto;
  background: var(--gold-soft);
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
  padding: 0;
}

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

.inline-form {
  display: inline;
}

/* body needs top padding to clear the fixed header everywhere except the
   photographic hero (home page), which sits behind it on purpose and
   accounts for the header height in its own internal padding instead */
body { padding-top: 84px; }
body.home { padding-top: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s, border-color .15s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #201400;
  box-shadow: 0 8px 24px -8px rgba(232, 176, 75, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 10px 30px -8px rgba(232, 176, 75, 0.7);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

/* ---------- Hero (photographic) ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 84px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('/public/img/hero-bg.jpg');
  background-size: cover;
  background-position: right center;
  z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0.32) 45%, rgba(5,5,5,0.12) 75%, rgba(5,5,5,0) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 60px 100px;
}
.hero-content {
  max-width: 620px;
  margin-inline-start: auto;
}
.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 22px;
}
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(18px,2vw,22px);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-desc {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 36px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero-btn:hover { transform: translateY(-3px); }
.hero-btn-dark { background: rgba(20,20,20,0.85); }
.hero-btn-dark:hover { box-shadow: var(--shadow); }
.hero-btn-gold { background: var(--gold-grad); border-color: transparent; }
.hero-btn-gold:hover { box-shadow: var(--shadow-gold); }
.hero-btn-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.14);
}
.hero-btn-gold .hero-btn-icon { background: rgba(0,0,0,0.14); }
.hero-btn-icon svg { width: 18px; height: 18px; fill: var(--gold-soft); }
.hero-btn-gold .hero-btn-icon svg { fill: #141414; }
.hero-btn-text { display: flex; flex-direction: column; text-align: right; }
.hero-btn-text strong { font-size: 14.5px; color: var(--text); }
.hero-btn-gold .hero-btn-text strong { color: #141414; }
.hero-btn-text small { font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.hero-btn-gold .hero-btn-text small { color: rgba(20,20,20,0.65); }

/* ---------- Stats bar — floating card overlapping the hero photo ---------- */
.stats { position: relative; }
.stats-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 36px;
  margin-top: -64px;
  margin-bottom: 48px;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: 20px;
  border-inline-start: 1px solid var(--border);
}
.stat-item:first-child { border-inline-start: none; }
.stat-icon { width: 34px; height: 34px; flex-shrink: 0; fill: var(--gold); }
.stat-text { display: flex; flex-direction: column; }
.stat-num { font-size: clamp(22px,2.4vw,30px); font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ---------- Home "businesses for sale" preview section ---------- */
.home-listings { padding-block: 90px; }
.home-listings .section-head { margin-bottom: 12px; }
.home-listings h2 { font-size: clamp(26px,3vw,34px); }

/* ---------- Cards & Passport ---------- */

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

.passport-preview {
  padding: 28px;
}

.passport-full {
  padding: 36px;
  margin: 32px auto;
  max-width: 720px;
}

.passport-head {
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge-verified {
  background: rgba(46, 204, 143, 0.14);
  color: var(--emerald);
  border: 1px solid rgba(46, 204, 143, 0.35);
  margin-bottom: 12px;
}

.passport-head h3, .passport-head h1 {
  margin: 0;
  font-size: 24px;
}

.passport-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.passport-gallery img {
  width: 100%; height: 100px; object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.passport-gallery img:first-child {
  grid-column: span 2; grid-row: span 2; height: 208px;
}

.passport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.passport-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.value {
  font-size: 18px;
  font-weight: 700;
}

.value.positive {
  color: var(--emerald);
}

.value.negative {
  color: var(--red);
}

.passport-footer {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 20px;
  flex-wrap: wrap;
}

.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 176, 75, 0.18), transparent 70%);
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.score-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.score-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.narrative {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.narrative p {
  color: var(--text-muted);
  margin: 0;
}

.valuation-history {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.valuation-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.owner-actions, .lead-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.lead-form {
  display: block;
}

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

.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--border);
  background: #000;
}

.footer-inner p {
  margin: 0 0 6px;
  font-size: 14px;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo { height: 38px; }
.site-footer p { font-size: 12.5px; color: var(--text-dim); margin: 0; max-width: 640px; }

/* ---------- Page / forms ---------- */

.page {
  padding: 48px 24px 80px;
}

.page.narrow {
  max-width: 560px;
}

.page h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 36px 0 16px;
}

.dashboard-section {
  margin-bottom: 40px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.form legend {
  padding: 0 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 14px;
  color: var(--text) !important;
  margin: 6px 0;
}

.checkbox input {
  width: auto;
}

.account-type-picker {
  display: flex;
  gap: 12px;
  border: none;
  padding: 0;
}
.account-type-picker legend {
  padding: 0 0 8px;
  font-size: 14px;
  color: var(--text-muted);
  width: 100%;
}
.account-type-option {
  flex: 1;
  cursor: pointer;
  margin: 0 !important;
}
.account-type-option input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.account-type-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.account-type-card strong { color: var(--text); font-size: 15px; }
.account-type-card small { color: var(--text-muted); font-size: 12.5px; }
.account-type-option input:checked + .account-type-card {
  border-color: var(--gold);
  background: rgba(212,175,55,0.08);
}
.account-type-option input:checked + .account-type-card strong { color: var(--gold-soft); }
.account-type-option input:focus-visible + .account-type-card { outline: 2px solid var(--gold); outline-offset: 2px; }

.valuation-preview {
  margin-top: 18px;
  padding: 20px;
}

.valuation-preview .label {
  display: block;
  margin-bottom: 12px;
}

.valuation-preview-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.photo-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.photo-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.photo-item .badge { position: absolute; top: 8px; right: 8px; margin: 0; }
.photo-item-actions {
  display: flex; gap: 6px; padding: 8px;
  background: var(--surface);
}
.photo-item-actions form { flex: 1; }
.photo-item-actions .btn { width: 100%; }

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.filters input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font: inherit;
}

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 4px;
}

.alert-error {
  background: rgba(239, 90, 90, 0.12);
  border: 1px solid rgba(239, 90, 90, 0.35);
  color: #ff9d9d;
}

.alert-success {
  background: rgba(46, 204, 143, 0.12);
  border: 1px solid rgba(46, 204, 143, 0.35);
  color: var(--emerald);
}

.payment-card { padding: 32px; text-align: center; margin: 24px 0; }
.payment-amount { font-size: 40px; font-weight: 800; color: var(--gold-soft); margin-bottom: 4px; }
.payment-instructions { text-align: right; margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.payment-instructions h3 { font-size: 15px; margin-bottom: 8px; }
.payment-instructions p { color: var(--text-muted); font-size: 14px; margin: 0; }
.payment-status { margin-top: 20px; }

/* ---------- Listing / match grids ---------- */

.listing-grid,
.match-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.match-list {
  grid-template-columns: repeat(2, 1fr);
}

.listing-card,
.match-card {
  display: block;
  padding: 22px;
  transition: border-color .15s, transform .15s;
}

.listing-card:hover,
.match-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.listing-card-photo {
  height: 150px;
  margin: -22px -22px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}

.listing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.score-pill {
  background: rgba(232, 176, 75, 0.14);
  color: var(--gold);
  border: 1px solid rgba(232, 176, 75, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
}

.listing-card h3,
.match-card h3 {
  font-size: 18px;
  margin: 4px 0;
}

.listing-price {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-score-badge {
  display: inline-block;
  background: rgba(46, 204, 143, 0.14);
  color: var(--emerald);
  border: 1px solid rgba(46, 204, 143, 0.35);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.match-grid .value {
  font-size: 15px;
}

/* ---------- Chat widget (site-wide) ---------- */
.chat-widget {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.chat-teaser {
  position: relative;
  background: #f7f5f0;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius) var(--radius) 4px var(--radius);
  padding: 12px 40px 12px 16px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: var(--shadow);
  cursor: pointer;
  animation: slideIn .5s var(--ease) .6s both, bob 5s ease-in-out 1.2s infinite;
}
.chat-teaser strong { font-size: 13.5px; color: #141414; }
.chat-teaser span { font-size: 11.5px; color: #5a564c; }
.chat-teaser-close {
  position: absolute; top: 8px; inset-inline-start: 8px;
  width: 20px; height: 20px;
  border: none; background: transparent;
  color: #8a8578;
  font-size: 16px; line-height: 1;
  cursor: pointer;
}
@keyframes slideIn { from{ opacity:0; transform: translateY(10px);} to{ opacity:1; transform:translateY(0);} }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }
.chat-widget.hide-teaser .chat-teaser { display: none; }

.chat-launcher {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #101010;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform .25s var(--ease);
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher .icon-chat {
  width: 70%; height: 70%;
  object-fit: contain;
  position: absolute;
  transition: opacity .2s, transform .2s;
}
.chat-launcher .icon-close {
  width: 22px; height: 22px;
  fill: none; color: var(--gold-soft);
  position: absolute;
  opacity: 0; transform: rotate(-90deg) scale(.6);
  transition: opacity .2s, transform .2s;
}
.chat-widget.open .chat-launcher .icon-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat-widget.open .chat-launcher .icon-close { opacity: 1; transform: rotate(0) scale(1); }
.chat-launcher-dot {
  position: absolute;
  bottom: 2px; inset-inline-end: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #3ecb6b;
  border: 2px solid #101010;
}
.chat-widget.open .chat-launcher-dot { display: none; }

.chat-panel[hidden] { display: none; }
.chat-panel {
  position: absolute;
  bottom: 76px;
  inset-inline-end: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: panelIn .3s var(--ease) both;
}
@keyframes panelIn { from{ opacity:0; transform: translateY(16px) scale(.97);} to{ opacity:1; transform:translateY(0) scale(1);} }

.chat-panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(212,175,55,0.14), transparent);
  border-bottom: 1px solid var(--border);
}
.chat-header-logo { width: 32px; height: 32px; }
.chat-header-text { display: flex; flex-direction: column; gap: 2px; }
.chat-header-text strong { font-size: 14px; }
.chat-status { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 5px; }
.chat-status i { width: 6px; height: 6px; border-radius: 50%; background: #3ecb6b; display: inline-block; }
.chat-close {
  margin-inline-start: auto;
  width: 28px; height: 28px;
  border: none; background: rgba(255,255,255,0.06);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.55;
  animation: msgIn .25s var(--ease) both;
}
@keyframes msgIn { from{ opacity:0; transform: translateY(6px);} to{ opacity:1; transform:translateY(0);} }
.chat-msg.bot { align-self: flex-start; background: rgba(255,255,255,0.05); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--gold-grad); color: #141414; font-weight: 500; border-bottom-right-radius: 4px; }
.chat-msg.error { align-self: flex-start; background: rgba(200,60,60,0.15); border: 1px solid rgba(200,60,60,0.3); color: #ff9a9a; }

.chat-typing { display: flex; gap: 4px; padding: 0 20px 10px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: typingBounce 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%,60%,100%{ transform: translateY(0); opacity:.5;} 30%{ transform: translateY(-5px); opacity:1;} }

.chat-input-row { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s;
}
.chat-input-row input:focus { border-color: var(--gold); }
.chat-send {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .2s;
}
.chat-send:hover { transform: scale(1.08); }
.chat-send svg { width: 16px; height: 16px; fill: #141414; transform: scaleX(-1); }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Accessibility widget ---------- */
.a11y-widget {
  position: fixed;
  bottom: 24px;
  inset-inline-start: 24px;
  z-index: 998;
}
.a11y-launcher {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #101010;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .25s var(--ease);
}
.a11y-launcher:hover { transform: scale(1.06); }
.a11y-launcher svg { width: 26px; height: 26px; fill: var(--gold-soft); }

.a11y-panel[hidden] { display: none; }
.a11y-panel {
  position: absolute;
  bottom: 64px;
  inset-inline-start: 0;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panelIn .3s var(--ease) both;
}
.a11y-panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(212,175,55,0.14), transparent);
  border-bottom: 1px solid var(--border);
}
.a11y-panel-header strong { font-size: 14px; }
.a11y-panel-header .chat-close { margin-inline-start: auto; }
.a11y-panel-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.a11y-btn-group { display: flex; gap: 6px; }
.a11y-btn-group button {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700; font-size: 13px;
  cursor: pointer;
}
.a11y-toggle-btn, .a11y-reset-btn {
  display: block; width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit; font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.a11y-toggle-btn[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(212,175,55,0.08);
}
.a11y-reset-btn { color: var(--text-muted); text-align: center; }
.a11y-statement-link { text-align: center; font-size: 12.5px; color: var(--gold-soft); padding-top: 4px; }

/* ---- applied accessibility modes (html.a11y-*) ---- */
html.a11y-text-1 { font-size: 108%; }
html.a11y-text-2 { font-size: 118%; }
html.a11y-text-3 { font-size: 130%; }
html.a11y-contrast { filter: contrast(1.25) brightness(1.05); }
html.a11y-contrast body { background: #000; }
html.a11y-grayscale { filter: grayscale(1); }
html.a11y-contrast.a11y-grayscale { filter: grayscale(1) contrast(1.25) brightness(1.05); }
html.a11y-underline-links a { text-decoration: underline !important; }
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* ---------- Admin ---------- */
.admin-nav {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin: 20px 0 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.admin-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.admin-nav a:hover { color: var(--text); }
.admin-nav a.active {
  color: var(--gold-soft);
  border-color: rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.08);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.admin-stat-card {
  padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-stat-card .value { font-size: 28px; font-weight: 800; color: var(--text); }
.admin-stat-card .label { font-size: 12.5px; color: var(--text-muted); }
.admin-stat-card.highlight { border-color: var(--gold); }
.admin-stat-card.highlight .value { color: var(--gold-soft); }

.admin-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-filter-tabs a {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.admin-filter-tabs a.active { color: var(--gold-soft); border-color: var(--gold); background: rgba(212,175,55,0.08); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 12.5px; background: var(--surface-2); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table select {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 6px 8px; font: inherit; font-size: 13px;
}

.lead-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
}
.lead-status-new { background: rgba(232,176,75,0.14); color: var(--gold-soft); }
.lead-status-contacted { background: rgba(90,150,220,0.14); color: #7fb2f0; }
.lead-status-qualified { background: rgba(46,204,143,0.14); color: var(--emerald); }
.lead-status-won { background: rgba(46,204,143,0.25); color: var(--emerald); }
.lead-status-lost { background: rgba(239,90,90,0.14); color: var(--red); }

.lead-list { display: flex; flex-direction: column; gap: 14px; }
.lead-card { padding: 18px 22px; }
.lead-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.lead-message { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; color: var(--text-muted); margin: 10px 0; }
.lead-update-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lead-update-form select,
.lead-update-form input[type="text"] {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 8px 10px; font: inherit; font-size: 13px;
}
.lead-update-form input[type="text"] { flex: 1; min-width: 160px; }

.buyer-graph { display: flex; flex-direction: column; gap: 16px; }
.buyer-node { padding: 20px 24px; }
.buyer-node-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.buyer-node-matches { display: flex; flex-direction: column; gap: 8px; }
.match-edge {
  display: grid;
  grid-template-columns: 160px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.match-edge:hover { background: var(--surface-2); }
.match-edge-name { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-edge-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.match-edge-bar span { display: block; height: 100%; background: var(--gold-grad); border-radius: 3px; }
.match-edge-score { font-size: 12.5px; font-weight: 700; color: var(--gold-soft); text-align: left; }

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

@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    top: 84px; inset-inline: 0;
    background: rgba(6,6,6,0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ease);
  }
  .main-nav.open { max-height: 500px; overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 24px 20px; }
  .main-nav li { width: 100%; border-bottom: 1px solid var(--border); }
  .main-nav a { display: flex; width: 100%; padding-block: 14px; }
  .nav-toggle { display: flex; }

  .hero-content { max-width: none; text-align: center; margin-inline: 0; }
  .hero-title { align-items: center; }
  .hero-buttons { justify-content: center; }
  .hero-btn-text { text-align: right; }
  .hero-bg { background-position: center; }
  .hero-scrim { background: linear-gradient(180deg, rgba(5,5,5,0.55), rgba(5,5,5,0.92)); }

  .stats-inner { grid-template-columns: repeat(2,1fr); margin-inline: 16px; }
  .stat-item:nth-child(3) { border-inline-start: none; }

  .listing-grid,
  .match-list {
    grid-template-columns: 1fr;
  }

  .admin-stat-grid { grid-template-columns: repeat(2,1fr); }
  .match-edge { grid-template-columns: 100px 1fr 36px; gap: 8px; }

  .header-inner {
    height: 72px;
  }
  body { padding-top: 72px; }
  .main-nav { top: 72px; }
}

@media (max-width: 560px) {
  .stats-inner { grid-template-columns: repeat(2,1fr); gap: 20px 14px; margin-inline: 12px; padding: 24px 20px; }
  .stat-item { padding-inline: 0; border: none !important; }
  .chat-panel { width: calc(100vw - 32px); }
  .hero-buttons { flex-direction: column; align-items: stretch; }
}

@media (prefers-color-scheme: light) {
  /* This product is intentionally a single dark "trading floor" theme in both modes. */
}
