:root {
  --bg: #f7f5f1;
  --card: #ffffff;
  --text: #1d2420;
  --muted: #69716c;
  --line: #e6e2da;
  --accent: #0f6b53;
  --accent-2: #e9f3ef;
  --gold: #c8892b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 6px 18px rgba(20, 30, 25, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; margin: 0; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #cfc9bd; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 20px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: default; }
input, select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(15, 107, 83, .25); border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }

/* Header */
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a:not(.btn) { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.topnav a:not(.btn):hover, .topnav a.active { background: var(--accent-2); color: var(--accent); }

/* Hero + search */
.hero { background: linear-gradient(160deg, #0f6b53 0%, #134e3f 60%, #1b3b31 100%); color: #fff; padding: 46px 0 70px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); max-width: 720px; }
.hero p { color: #d3e7df; font-size: 17px; max-width: 640px; margin: 12px 0 0; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: #e5f1ec; font-size: 14px; }
.search {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-top: -40px; position: relative; display: grid; gap: 14px;
}
.seg { display: inline-flex; background: #f0ede7; border-radius: 10px; padding: 3px; }
.seg button { border: none; background: none; font: inherit; padding: 8px 18px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.search-row { display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.chips { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 13px; font: inherit; cursor: pointer; min-width: 44px; }
.chip.on { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }

/* Results */
.results-head { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 14px; gap: 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 20px; }
.results-head select { width: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; margin-bottom: 40px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .12s; }
.card:hover { transform: translateY(-2px); }
.card-img { aspect-ratio: 4 / 3; background: #ece8e0; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-tag { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 600; }
.card-photos { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.price { font-size: 20px; font-weight: 700; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.specs { font-weight: 500; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #b3ab9c; font-size: 42px; background: linear-gradient(135deg, #efebe3, #e3ddd1); }
.placeholder.big { font-size: 80px; }
.empty-box { background: var(--card); border-radius: var(--radius); padding: 36px; text-align: center; box-shadow: var(--shadow); margin-bottom: 40px; }
.empty-box p { margin: 6px 0 16px; }
.more { display: flex; justify-content: center; margin: -16px 0 40px; }

/* Property page */
.back { display: inline-block; margin: 20px 0 14px; text-decoration: none; }
.prop { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-bottom: 48px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #ece8e0; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 92px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .7; border: 2px solid transparent; }
.thumbs img.on { opacity: 1; border-color: var(--accent); }
.prop-side { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.prop-side h1 { font-size: 22px; }
.prop-side .price { font-size: 28px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.note { font-size: 13px; color: var(--muted); background: #f6f3ee; border-radius: 10px; padding: 10px 12px; }
.desc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-top: 18px; white-space: pre-wrap; }

/* Chat widget */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 30; border: none; cursor: pointer;
  background: var(--accent); color: #fff; border-radius: 999px; padding: 14px 20px; font: inherit; font-weight: 600;
  display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 24px rgba(15, 107, 83, .35);
}
.chat {
  position: fixed; right: 22px; bottom: 22px; z-index: 31; width: 380px; height: min(600px, calc(100vh - 44px));
  background: var(--card); border-radius: 18px; box-shadow: 0 16px 48px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { background: var(--accent); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.chat-sub { font-size: 12px; color: #cfe5dc; }
.icon-btn { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; padding: 4px 8px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f4f1ec; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.bubble.op { align-self: flex-start; background: #fff7e8; border-bottom-left-radius: 4px; }
.bubble .who { font-size: 11px; color: var(--gold); font-weight: 600; margin-bottom: 2px; }
.bubble img { border-radius: 10px; margin-bottom: 4px; max-height: 220px; object-fit: cover; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { resize: none; max-height: 120px; }
.chat-form .btn { padding: 0 14px; }
.typing { display: flex; gap: 4px; padding: 0 16px 8px; background: #f4f1ec; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #a9b3ae; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Modal, toast, footer */
dialog { border: none; border-radius: 16px; padding: 0; width: min(460px, 94vw); }
dialog::backdrop { background: rgba(20, 30, 25, .5); }
.modal-in { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.modal-in h3 { font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.success { text-align: center; padding: 10px 0; }
.success .big-ico { font-size: 44px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; }
.footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: 14px; }
.footer-in { display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 900px) {
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row .chips-wrap { grid-column: 1 / -1; }
  .search-row .btn { grid-column: 1 / -1; }
  .prop { grid-template-columns: 1fr; }
  .prop-side { position: static; }
}
@media (max-width: 520px) {
  .chat { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .fab-text { display: none; }
  .topnav a:not(.btn) { padding: 8px; }
}

/* Seller badge: owner vs specialist */
.seller-tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; }
.seller-tag:empty { display: none; }
.seller-tag.owner { background: #15803d; }
.seller-tag.specialist { background: #475569; }

/* ---- v2: search with seller + price range ---- */
.search-row { grid-template-columns: auto auto 1.4fr 1fr 1fr auto; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.range input { min-width: 0; }
@media (max-width: 1100px) {
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row .chips-wrap, .search-row .btn { grid-column: 1 / -1; }
}

/* Favorites */
.fav-btn { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: #b9bdb9; font-size: 18px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: transform .15s, color .15s; z-index: 2; }
.fav-btn:hover { transform: scale(1.08); color: #e0526b; }
.fav-btn.on, .fav-inline.on { color: #e0526b; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e0526b; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.badge[hidden] { display: none; }
.page { padding-top: 8px; padding-bottom: 40px; }
.page-title { font-size: 28px; margin: 10px 0 6px; }
.psqm { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.sub { font-size: 19px; margin: 26px 0 10px; }

/* Property page extras */
.gallery-main { position: relative; }
.gallery-main.zoomable { cursor: zoom-in; }
.g-count, .g-zoom { position: absolute; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 999px; pointer-events: none; }
.g-count { left: 10px; }
.g-zoom { right: 10px; }
.side-actions { display: flex; justify-content: flex-end; gap: 4px; margin: -8px -8px -10px 0; }
.side-actions .icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); font-size: 17px; color: #7a817c; background: #fff; }
.side-actions .icon-btn:hover { color: var(--accent); }
#similar { margin-top: 10px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,11,.94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; user-select: none; }
.lb-close, .lb-nav { position: absolute; border: none; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; }
.lb-close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 20px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 32px; line-height: 1; }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #ddd; font-size: 14px; }

/* Mortgage calculator */
.calc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-top: 18px; }
.calc .sub { margin-top: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-out { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 10px; }
.calc-out div { background: #f6f3ee; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.calc-out span { font-size: 12px; color: var(--muted); }
.calc-out div:first-child { background: var(--accent-2); }
.calc-out div:first-child b { color: var(--accent); font-size: 18px; }

/* Sell page */
.sell-grid { display: grid; grid-template-columns: 1fr 420px; gap: 32px; align-items: start; }
.sell .lead { font-size: 17px; color: var(--muted); }
.checks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-2); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.card-form { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card-form.success { text-align: center; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (max-width: 900px) {
  .sell-grid { grid-template-columns: 1fr; }
  .calc-grid, .calc-out { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .fav-label { display: none; }
  .topnav { gap: 2px; font-size: 14px; }
}
.sell-short { display: none; }
@media (max-width: 520px) {
  #agency-name { display: none; }
  .sell-long { display: none; }
  .sell-short { display: inline; }
  .topnav a:not(.btn) { padding: 7px 8px; }
}

/* ---- AI assistant v3 ---- */
.ai-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); max-width: 720px; margin: 18px 0 14px; }
.ai-search .ai-ico { font-size: 18px; }
.ai-search input { flex: 1; border: none; outline: none; font-size: 16px; padding: 10px 4px; background: transparent; min-width: 0; }
.ai-search .btn { white-space: nowrap; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: #f4f1ec; border-top: 1px solid var(--line); }
.chat-suggest .chip { padding: 7px 11px; font-size: 13px; border-radius: 999px; color: var(--accent); border-color: #cfe3da; }
.chat-suggest .chip:hover { background: var(--accent-2); }
.chat-card { align-self: flex-start; display: flex; gap: 10px; width: 88%; background: #fff; border-radius: 12px; overflow: hidden;
  text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid transparent; }
.chat-card:hover { border-color: #cfe3da; }
.chat-card img, .chat-card .placeholder { width: 96px; height: 76px; object-fit: cover; flex: none; font-size: 26px; }
.chat-card span { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px 7px 0; font-size: 13px; line-height: 1.3; min-width: 0; }
.chat-card b { font-size: 14px; color: var(--accent); }
.chat-card em { font-style: normal; font-size: 12px; color: var(--muted); margin-top: auto; }
.chat-teaser { position: fixed; right: 22px; bottom: 92px; z-index: 60; width: 280px; background: #fff; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 14px;
  animation: teaser-in .35s ease-out; }
.chat-teaser[hidden] { display: none; }
.chat-teaser span { color: var(--muted); font-size: 13px; }
.chat-teaser::after { content: ""; position: absolute; right: 34px; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.teaser-x { position: absolute; top: 6px; right: 6px; border: none; background: none; color: #9aa09c; cursor: pointer; font-size: 13px; padding: 4px; }
@keyframes teaser-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
  .ai-search { flex-wrap: wrap; padding: 8px; }
  .ai-search input { flex-basis: calc(100% - 30px); }
  .ai-search .btn { width: 100%; }
  .chat-teaser { right: 12px; left: 12px; width: auto; bottom: 84px; }
}

/* ---- v4: the AI agent is the main screen ---- */
.ai-hero { padding: 40px 0 56px; }
.ai-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 40px; align-items: center; }
.ai-hero h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; margin-top: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .02em; color: #cfe5dc;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
.ai-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: ai-pulse 2s infinite; vertical-align: middle; }
@keyframes ai-pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.ai-steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; counter-reset: s; }
.ai-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; }
.ai-steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; }
.ai-steps li:last-child::before { content: "⚖"; background: #c8892b; }
.ai-steps b { font-size: 16px; }
.ai-steps span { color: #b9d6ca; font-size: 14px; }

/* docked chat inside the hero */
.chat-dock { min-width: 0; }
.chat.docked { position: static; width: 100%; height: min(600px, 78vh); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08); }
.chat.docked #chat-close { display: none; }
.chat.docked .chat-head { padding: 16px 18px; }
.chat.docked .chat-head b { font-size: 16px; }
.chat.docked .chat-form textarea { font-size: 15px; }
.catalog-title { font-size: 22px; margin: 34px 0 14px; }
.catalog-title .muted { font-weight: 400; font-size: 16px; }
.ai-hero + .wrap .search { margin-top: 0; }

/* floating agent button on other pages */
.chat-fab { padding: 15px 22px; font-size: 15px; animation: fab-glow 2.6s ease-in-out infinite; }
@keyframes fab-glow { 0%, 100% { box-shadow: 0 8px 24px rgba(15,107,83,.35); } 50% { box-shadow: 0 8px 34px rgba(15,107,83,.6), 0 0 0 6px rgba(15,107,83,.12); } }
.btn.ai-ask { border-color: var(--accent); color: var(--accent); font-weight: 600; }

@media (max-width: 960px) {
  .ai-hero-in { grid-template-columns: 1fr; gap: 24px; }
  .ai-steps { grid-template-columns: repeat(3, 1fr); }
  .ai-steps li { grid-template-columns: 1fr; text-align: left; }
  .ai-steps li::before { grid-row: auto; margin-bottom: 6px; }
}
@media (max-width: 620px) {
  .ai-hero { padding: 22px 0 32px; }
  .ai-hero p { font-size: 15px; }
  .ai-steps { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
  .ai-steps li { grid-template-columns: 30px 1fr; }
  .ai-steps li::before { grid-row: span 2; width: 30px; height: 30px; margin: 0; }
  .chat.docked { height: 72vh; border-radius: 16px; }
}

.chat.docked { color: var(--text); text-align: left; }
.chat.docked .chat-head { color: #fff; }
@media (max-width: 620px) {
  /* phone: headline -> the agent -> explanation, so the chat input is on the first screen */
  .ai-hero-in { display: flex; flex-direction: column; gap: 14px; }
  .ai-hero-text { display: contents; }
  .ai-hero .eyebrow { order: 1; align-self: flex-start; font-size: 12px; }
  .ai-hero h1 { order: 2; font-size: 27px; margin: 0; }
  .chat-dock { order: 3; }
  .ai-hero p { order: 4; margin: 4px 0 0; }
  .ai-steps { order: 5; }
  .chat.docked { height: 62vh; }
}

/* messages must never shrink when the conversation gets long */
.chat-msgs > * { flex-shrink: 0; }

/* ---- Services ---- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 18px 0 40px; }
.svc-grid.compact { grid-template-columns: repeat(4, 1fr); margin-bottom: 10px; }
.svc-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.svc-card h3 { font-size: 17px; margin: 4px 0 0; }
.svc-card p { color: var(--muted); font-size: 14px; margin: 0 0 6px; flex: 1; }
.svc-card .btn { align-self: flex-start; }
.svc-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-2); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.svc-tag { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-2); padding: 3px 8px; border-radius: 999px; }
.svc-tag.law { color: #8a5a14; background: #fbf0dc; }
.svc-strip { margin-top: 8px; }
.svc-strip-head { display: flex; align-items: baseline; justify-content: space-between; }
.more-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.svc-previews { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-previews img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
@media (max-width: 1000px) { .svc-grid.compact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc-grid.compact { grid-template-columns: 1fr; } .svc-card p { font-size: 13px; } }
