/* CMA + market statistics (feature: cma) */
.cma-pair { display: flex; gap: 6px; } .cma-pair input { min-width: 0; flex: 1; }
.cma-opts { margin: 4px 0 8px; } .cma-opts summary { cursor: pointer; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.cma-range { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 10px; margin: 10px 0; text-align: center; }
.cma-range > div { border: 1px solid #e8e6e1; border-radius: 12px; padding: 14px 8px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.cma-range > div.mid { border-color: #c9a84c; background: #fdfaf0; }
.cma-range span { font-size: .78rem; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.cma-range b { font-size: 1.35rem; } .cma-range .mid b { font-size: 1.7rem; color: #7a5a00; }
.cma-stats .stat-card b { font-size: 1.3rem; }
.cma-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cma-comps td { vertical-align: top; } .cma-comps tr.cma-off td { opacity: .45; }
.cma-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.cma-score { display: inline-block; min-width: 42px; text-align: center; font-weight: 700; font-size: .8rem; padding: 2px 6px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(201,168,76,.35) var(--s), rgba(0,0,0,.05) var(--s)); }
.cma-link { word-break: break-all; }
.cma-nudge { border-color: #c9a84c; background: #fdfaf0; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 4px 0; }
@media (max-width: 700px) { .cma-range { grid-template-columns: 1fr; } }

/* ---------- client report (standalone, printable) ---------- */
body.cma-report { margin: 0; background: #efece6; color: #1a1a1a; font: 15px/1.5 Inter, system-ui, sans-serif; }
.cma-report a { color: #7a5a00; }
.cma-report .muted { color: #666; } .cma-report .small { font-size: .85rem; } .cma-report .center { text-align: center; }
.cma-toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; justify-content: center; padding: 10px; background: #0b1f33; }
.cma-toolbar button, .cma-toolbar a { background: #c9a84c; color: #111; border: 0; border-radius: 8px; padding: 8px 14px; font: 600 .9rem Inter, sans-serif; text-decoration: none; cursor: pointer; }
.cma-page { max-width: 900px; margin: 20px auto; background: #fff; padding: 32px 36px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.cma-brand { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 3px solid #c9a84c; padding-bottom: 16px; }
.cma-agent { display: flex; gap: 14px; align-items: center; }
.cma-agent-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.cma-agent-name { font-size: 1.15rem; }
.cma-agency-logo { max-height: 64px; max-width: 180px; object-fit: contain; }
.cma-hero { padding: 18px 0 6px; }
.cma-tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #a88a3a; font-weight: 700; }
.cma-hero h1 { font-family: 'Playfair Display', serif; font-size: 1.9rem; margin: 4px 0; }
.cma-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.cma-facts li { background: #f4f1ea; border-radius: 20px; padding: 3px 12px; font-size: .85rem; }
.cma-result { margin: 18px 0; }
.cma-reco { text-align: center; background: #0b1f33; color: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.cma-reco span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #e4cc7a; }
.cma-reco b { font-size: 2rem; } .cma-reco small { display: block; opacity: .8; }
.cma-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.cma-kpis > div { background: #f8f6f1; border-radius: 10px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.cma-kpis b { font-size: 1.15rem; } .cma-kpis span { font-size: .78rem; color: #666; }
.cma-warn { background: #fff7e0; border: 1px solid #f0d78c; color: #6b4f00; border-radius: 8px; padding: 8px 12px; font-size: .85rem; margin: 8px 0 0; }
.cma-notes { background: #f8f6f1; border-left: 4px solid #c9a84c; padding: 10px 16px; border-radius: 6px; white-space: pre-line; }
.cma-report h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 22px 0 10px; }
.cma-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cma-card { display: flex; gap: 12px; border: 1px solid #e8e6e1; border-radius: 10px; overflow: hidden; break-inside: avoid; page-break-inside: avoid; }
.cma-card img, .cma-nophoto { width: 130px; min-height: 110px; object-fit: cover; background: #eee; flex-shrink: 0; }
.cma-card-body { padding: 8px 10px 8px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cma-card-title { font-size: .95rem; } .cma-card-title a { color: inherit; text-decoration: none; }
.cma-price { font-weight: 700; font-size: 1.05rem; } .cma-price small { font-weight: 400; color: #666; font-size: .75rem; }
.cma-st { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.cma-st-sold, .cma-st-rented { color: #2d7a4a; } .cma-st-pending { color: #a88a3a; }
.cma-foot { border-top: 1px solid #e8e6e1; margin-top: 24px; padding-top: 10px; }
@media (max-width: 700px) { .cma-page { padding: 18px 14px; margin: 0; border-radius: 0; } .cma-cards, .cma-kpis { grid-template-columns: 1fr; } .cma-brand { flex-direction: column; align-items: flex-start; } }
@media print {
  @page { size: letter; margin: 12mm; }
  body.cma-report { background: #fff; font-size: 12px; } .no-print { display: none !important; }
  .cma-page { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .cma-reco { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cma-range > div, .cma-kpis > div, .cma-facts li, .cma-notes, .cma-warn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cma-report a { color: inherit; text-decoration: none; }
}

/* ---------- public market statistics ---------- */
.cma-mkt { max-width: 1040px; }
.cma-crumbs { margin-bottom: 10px; } .cma-crumbs a { color: var(--accent-dark, #a88a3a); }
.cma-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0 22px; }
.cma-tiles > div { background: var(--card-bg, #fff); border: 1px solid var(--border, #e8e6e1); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.cma-tiles b { font-size: 1.9rem; color: var(--accent-dark, #a88a3a); line-height: 1.1; } .cma-tiles span { font-weight: 600; font-size: .9rem; } .cma-tiles small { color: var(--text-light, #666); }
.cma-mkt-card { margin-bottom: 18px; } .cma-mkt-card h2 { font-size: 1.25rem; margin-bottom: 10px; }
.cma-mkt-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cma-mkt-table th, .cma-mkt-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, #e8e6e1); text-align: left; white-space: nowrap; }
.cma-mkt-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-light, #666); }
.cma-split { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: #eee; margin: 6px 0 8px; }
.cma-split .sale, .cma-key.sale { background: #c9a84c; } .cma-split .rent, .cma-key.rent { background: #14304d; }
.cma-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.cma-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.cma-bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.cma-bar { width: 100%; max-width: 44px; background: #c9a84c; border-radius: 4px 4px 0 0; min-height: 1px; }
.cma-bars.alt .cma-bar { background: #14304d; }
.cma-bar-v { font-size: .72rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; }
.cma-bar-l { font-size: .68rem; color: var(--text-light, #666); margin-top: 4px; white-space: nowrap; }
.cma-list { list-style: none; padding: 0; margin: 0; columns: 3 220px; } .cma-list li { padding: 3px 0; break-inside: avoid; }
@media (max-width: 600px) { .cma-bars { gap: 2px; } .cma-bar-l { writing-mode: vertical-rl; transform: rotate(180deg); } .cma-bar-v { font-size: .6rem; } }
