/* ── Liravira chat — ChatGPT-style add flow (shared pieces in components.css) ─ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --green: #16794c;
  --amber: #9a6a00;
  --red: #b42318;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--card);
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-size: 15px;
  line-height: 1.55;
}

/* ── Header ── */
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand-dot { display: none; }
.brand-name { font-size: 16px; font-weight: 700; }
.brand-name .wm { color: var(--accent); font-weight: 500; }   /* wordmark: Lira|vira split */
.brand-sub { color: var(--muted); font-size: 12px; }
.chat-head .lang-toggle { margin-left: auto; }

/* ── App shell: property rail + chat pane ── */
.app { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 250px; flex-shrink: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto;
}
.side-new {
  border: 1px dashed var(--accent); color: var(--accent); background: var(--card);
  border-radius: 10px; padding: 10px; font-family: var(--font); font-size: 13px;
  font-weight: 600; cursor: pointer; text-align: center;
}
.side-new:hover { background: #eff4ff; }
.side-list { display: flex; flex-direction: column; gap: 6px; }
.side-item {
  position: relative; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 9px 26px 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-family: var(--font);
}
.side-item:hover { border-color: #cbd5e1; }
.si-del {
  position: absolute; top: 6px; right: 6px; border: none; background: none;
  color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer;
  padding: 2px 5px; border-radius: 6px; opacity: 0;
}
.side-item:hover .si-del, .si-del:focus { opacity: 1; }
.si-del:hover { color: #b91c1c; background: #fee2e2; }
@media (hover: none) { .si-del { opacity: .55; } }
.side-item.active { border-color: var(--accent); background: #f5f8ff; }
.si-name { font-weight: 600; font-size: 13px; }
.si-sub { font-size: 11px; color: var(--muted); }

/* agency sub-chats nested under their property */
.side-sub {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  margin-left: 12px; padding: 7px 10px; cursor: pointer; font-family: var(--font);
  font-size: 12px; color: var(--ink);
}
.side-sub:hover { border-color: #cbd5e1; }
.side-sub.active { border-color: var(--accent); background: #f5f8ff; color: var(--accent); }
.side-sub.booked { border-left: 3px solid #25d366; }
.side-empty { font-size: 12px; color: var(--muted); padding: 6px; }

.pane { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane-head { border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; align-items: center; min-height: 50px; }
.pane-head:empty { display: none; }
.ph-row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 10px; }
.ph-title { font-weight: 700; font-size: 15px; }
.ph-sub { font-size: 12px; color: var(--muted); margin-left: 8px; }
.wa-btn {
  border: 1px solid #25d366; color: #128c3e; background: var(--card); border-radius: 18px;
  padding: 6px 13px; font-family: var(--font); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.wa-btn:hover { background: #eafff1; }
.wa-btn.on { background: #25d366; color: #fff; border-color: #25d366; }
.back-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 18px;
  padding: 6px 13px; font-family: var(--font); font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.back-btn:hover { border-color: #cbd5e1; }

@media (max-width: 759px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex-direction: row; align-items: center; gap: 8px;
    border-right: none; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 8px 10px;
  }
  .side-new { flex-shrink: 0; padding: 8px 12px; }
  .side-list { flex-direction: row; gap: 8px; }
  .side-item { flex-shrink: 0; min-width: 140px; }
}

/* ── Thread (single centered column, ChatGPT-like) ── */
.thread { flex: 1; overflow-y: auto; padding: 12px 0 6px; }
.row { padding: 6px 18px; max-width: 720px; margin: 0 auto; width: 100%; }

/* assistant: plain full-width text; user: light bubble on the right */
.row.bot .who, .row.user .who {
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin-bottom: 3px;
}
.row .text { white-space: pre-wrap; }
.row.user { display: flex; flex-direction: column; align-items: flex-end; }
.row.user .text {
  background: #eef2ff; border-radius: 14px; padding: 8px 13px;
  max-width: 85%;
}
.row.user .who { align-self: flex-end; }
.row.thinking .text { color: var(--muted); font-style: italic; }

/* ── Analysis result — dense: everything scannable on one screen ── */
.row.result { padding-top: 2px; padding-bottom: 2px; line-height: 1.25; }
.row.result .text { background: transparent; border: none; padding: 0; white-space: normal; }
.ans-head { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }

/* ── Headline: COMPUTED totals only; estimates noted, never merged in ── */
.sum {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px;
  padding-bottom: 13px; border-bottom: 1px solid var(--line);
}
.sum-item { display: inline-flex; align-items: baseline; gap: 8px; }
.sum-lbl { font-size: 12px; color: var(--muted); }
.sum-pos { font-size: 18px; font-weight: 650; color: var(--green); letter-spacing: -.3px; }
.sum-due { font-size: 18px; font-weight: 650; color: var(--ink); letter-spacing: -.3px; }
.sum-est { flex-basis: 100%; margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }

/* ── Category groups: no boxes, a quiet label + hairline, hairline-split rows ── */
.grp { margin-top: 18px; }
.grp-h {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.grp-n {
  margin-left: auto; letter-spacing: 0; color: var(--muted);
  background: var(--bg); border-radius: 999px; padding: 1px 8px;
}
.grp-items { display: flex; flex-direction: column; }

/* one alert row (namespaced .alert to avoid the chat-message .row) */
.alert { padding: 13px 0; }
.alert + .alert { border-top: 1px solid var(--line); }
.alert.is-info { opacity: .8; }
.alert-top { display: flex; align-items: baseline; gap: 14px; }
.alert-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }

.v { white-space: nowrap; font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.v-save { color: var(--green); }
.v-cost { color: var(--ink); }
.v-metric { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.v-est { color: var(--muted); }

.alert-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.chip { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip-over { background: #fdeceb; color: var(--red); }
.chip-soon { background: #fdf4e3; color: var(--amber); }
.chip-far  { background: var(--bg); color: var(--muted); }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px; }
.tag-info { background: var(--bg); color: var(--muted); }
.tag-est  { background: #fdf4e3; color: var(--amber); }
.tag-hero { background: #eaf6ee; color: var(--green); }
.tag-check { background: #eef3fd; color: var(--accent); }

/* "might apply" — certainty demoted, value NOT: full-size conditional number */
.alert.is-pending .alert-title { font-weight: 500; }
.v-pend { white-space: nowrap; }
.sum-pot {
  display: block; border: none; background: none; padding: 2px 0; margin-top: 2px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent);
  cursor: pointer; text-align: left;
}
.sum-pot:hover { text-decoration: underline; }
.teaser { font-size: 12.5px; color: var(--green); }

/* "already secured" — the trust strip */
.grp-secured .sec-row { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.sec-ok { color: var(--green); font-weight: 700; flex: none; }
.sec-title { flex: 1; min-width: 0; }
.watch-prep {
  border: none; background: none; padding: 0; font: inherit; font-size: 12px;
  color: var(--accent); cursor: pointer; white-space: nowrap;
}
.watch-prep:hover { text-decoration: underline; }
.il-amt.is-pend { color: var(--muted); }

/* watchlist strip — one quiet line per upcoming program */
.grp-watch .watch-row { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 13px; }
.watch-dot { color: var(--accent); flex: none; }
.watch-title { flex: 1; min-width: 0; color: var(--ink); opacity: .85; }
.watch-note { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }

/* payments — condensed block, visually quieter than savings */
.grp-pay { opacity: .85; }
.grp-pay .pay-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 13px; }
.pay-title { flex: 1; min-width: 0; color: var(--ink); opacity: .8; }
.pay-total { font-size: 13px; font-weight: 650; color: var(--ink); }

/* the single biggest quantified saving — gently lifted, not shouted */
.alert.is-hero { border-left: 3px solid var(--green); padding-left: 12px; border-radius: 4px; background: #fbfdfb; }

/* ── Blocks: every alert is a one-line tile that expands on tap ── */
details.blk > summary { list-style: none; }
details.blk > summary::-webkit-details-marker { display: none; }
.blk-sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.blk-sum .alert-title { flex: 1 1 auto; }
.blk-sum.blk-flat { cursor: default; }
.blk-chips { display: inline-flex; gap: 6px; align-items: baseline; }
details.blk > .blk-sum::after {
  content: "▸"; font-size: 10px; color: var(--muted); align-self: center;
  transition: transform .15s ease;
}
details.blk[open] > .blk-sum::after { transform: rotate(90deg); }
.blk-body { margin-top: 2px; }

/* ── Anonymous gate: value + body blurred, title readable, one veil per card ── */
.lock-wrap { position: relative; cursor: pointer; }
.lock-wrap > * { pointer-events: none; }        /* the whole card is one sign-up target */
.lock-wrap .v, .lock-wrap .blk-body { filter: blur(5px); user-select: none; }
.lock-wrap .alert-foot, .lock-wrap .watch-prep { visibility: hidden; }
.lock-veil {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: #eef3fd; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.gate-counts { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.gate-foot { margin-top: 16px; }
.gate-cta {
  border: none; border-radius: 10px; background: var(--accent); color: #fff;
  font-family: var(--font); font-size: 13px; font-weight: 650;
  padding: 9px 16px; cursor: pointer;
}
.gate-cta:hover { background: #1d4ed8; }
.sum-pot.gate-cta { background: none; color: var(--accent); padding: 2px 0; border-radius: 0; }
.sum-pot.gate-cta:hover { background: none; text-decoration: underline; }

/* 👁 the property is being watched (subscription) — the header badge is a
   toggle: ✕ stops watching, the "off" pill re-opens the subscribe flow */
.watch-badge {
  font-size: 11px; font-weight: 600; color: var(--green);
  background: #eaf6ee; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
button.watch-badge { border: none; cursor: pointer; font-family: var(--font); padding: 4px 11px; }
.watch-badge.is-on:hover { color: #b91c1c; background: #fee2e2; }
.watch-badge.is-off { color: var(--accent); background: #eef3fd; }
.watch-badge.is-off:hover { background: #dbe7fd; }

/* ── per-rule deep-dive: eligibility checklist + verdict ── */
.dd-verdict { font-size: 13px; font-weight: 600; margin: 2px 0 8px; }
.dd-v-eligible { color: var(--green); }
.dd-v-not_eligible { color: var(--red); }
.dd-v-needs_info { color: var(--muted); }
.dd-item { display: flex; gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.5; margin: 2px 0; }
.dd-item .dd-ic { font-weight: 700; width: 14px; text-align: center; flex: none; }
.dd-met .dd-ic { color: var(--green); }
.dd-unmet .dd-ic { color: var(--red); }
.dd-unmet { color: var(--ink); }
.dd-unknown { color: var(--muted); }

.alert-act { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 62ch; }
.alert-foot { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.alert-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 6px 13px; border-radius: 8px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.alert-btn:hover { border-color: var(--accent); color: var(--accent); }
.alert-btn:active { transform: translateY(1px); }
.alert-src { font-size: 12px; color: var(--muted); text-decoration: none; }
.alert-src:hover { color: var(--accent); text-decoration: underline; }

/* ── Collapsed "context" (routine taxes / FYI that isn't a saving or a live deadline) ── */
.ans-bg { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.ans-bg > summary {
  list-style: none; cursor: pointer; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.ans-bg > summary::-webkit-details-marker { display: none; }
.ans-bg > summary::before { content: "＋"; font-weight: 600; }
.ans-bg[open] > summary::before { content: "－"; }
.ans-bg > summary:hover { color: var(--ink); }
.ans-bg .alert { opacity: .82; }

/* ── Q&A answer (renderAnswer) — same calm row language ── */
.ans-item { padding: 10px 0; }
.ans-item + .ans-item { border-top: 1px solid var(--line); }
.ans-line { display: flex; align-items: baseline; gap: 10px; }
.ans-line .ans-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ans-line .ans-amt { white-space: nowrap; font-weight: 650; font-size: 14px; color: var(--ink); }
.ans-act { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ans-src { color: var(--muted); text-decoration: none; }
.ans-src:hover { color: var(--accent); text-decoration: underline; }

/* ── Specialist marketplace step ── */
.row.mkt .text { white-space: normal; }
.spec-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.spec-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.spec-main { display: flex; justify-content: space-between; align-items: baseline; }
.spec-name { font-weight: 600; font-size: 14px; }
.spec-rate { font-size: 12px; color: var(--amber); font-weight: 600; }
.spec-meta { font-size: 12px; color: var(--muted); margin: 2px 0 9px; }
.spec-go {
  border: none; background: var(--accent); color: #fff; font-family: var(--font);
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer;
}
.spec-go:hover { background: #1d4ed8; }
.spec-note { font-size: 11px; color: var(--muted); margin-top: 9px; }

/* ── Supplier contact card (after booking; reachable from the sub-tab) ── */
.contact-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-top: 6px; }
.cc-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.cc-row { font-size: 13px; margin: 3px 0; }
.cc-row a { color: var(--accent); text-decoration: none; }
.cc-row a:hover { text-decoration: underline; }
.cc-appt { color: var(--green); font-weight: 600; }
.cc-wa {
  display: inline-block; margin-top: 10px; background: #25d366; color: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.cc-wa:hover { background: #1eb858; }

/* ── Quick replies ── */
.quicks { max-width: 720px; margin: 4px auto 8px; padding: 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.quick {
  border: 1px solid var(--line); background: var(--card); padding: 9px 14px;
  border-radius: 20px; font-family: var(--font); font-size: 14px; cursor: pointer;
}
.quick:hover { border-color: #cbd5e1; background: #f9fafb; }
.quick:disabled { opacity: .5; cursor: default; }

/* ── Location step ── */
.loc-widget { margin-top: 10px; }
#chatmap { height: 220px; border: 1px solid var(--line); border-radius: 10px; }
.loc-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.loc-label { font-size: 13px; color: var(--muted); margin-right: auto; }

.watch-link { display: inline-block; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 600; }

/* ── Composer (pinned, rounded) ── */
.composer {
  display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line);
  max-width: 720px; margin: 0 auto; width: 100%; background: var(--card);
}
.composer input {
  flex: 1; border: 1px solid var(--line); border-radius: 22px; padding: 12px 16px;
  font-family: var(--font); font-size: 15px; outline: none;
}
.composer input:focus { border-color: var(--accent); }
.composer button {
  width: 42px; height: 42px; border: none; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.composer button:hover { background: #1d4ed8; }

/* ── Report card: the post-intake result as one scannable card ── */
.rc { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.rc-hero { padding: 14px 16px 12px; background: linear-gradient(180deg, #f5f8ff, rgba(245,248,255,0)); border-bottom: 1px solid var(--line); }
.rc-lbl { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rc-num { font-size: 26px; font-weight: 750; color: var(--green); line-height: 1.15; margin: 2px 0 6px; letter-spacing: -.4px; }
.rc-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rc-c.c-ready { color: var(--green); }
.rc-c.c-sec { color: var(--green); opacity: .8; }
.rc-c.c-chk { color: var(--accent); }
.rc-c.c-soon { color: #b45309; }
.rc-pot {
  border: none; background: none; color: var(--accent); font-family: var(--font);
  font-size: 12.5px; font-weight: 600; padding: 0; margin-top: 8px; cursor: pointer;
  text-align: left; display: block;
}
.rc-pot:hover { text-decoration: underline; }

.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px; }
.rc-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 10px 11px 9px; cursor: pointer; text-align: left; font-family: var(--font);
  min-height: 76px;
}
.rc-tile:hover { border-color: var(--accent); box-shadow: 0 1px 6px rgba(37, 99, 235, .12); }
.rc-tile.is-hero { border-color: var(--green); background: #fbfdfb; }
.rc-val {
  font-size: 15px; font-weight: 700; color: var(--green);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rc-val.is-cost { color: #b45309; }
.rc-val.is-est { opacity: .85; }
.rc-val.is-metric, .rc-val.is-pend { color: var(--accent); }
.rc-name {
  font-size: 12px; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-chips { display: flex; gap: 4px; margin-top: auto; padding-top: 3px; }
.rc-chip {
  font-size: 10.5px; font-weight: 650; border-radius: 999px; padding: 1px 7px;
  background: #eef2f7; color: var(--muted); white-space: nowrap;
}
.rc-chip.c-q { background: #eef3fd; color: var(--accent); }
.rc-chip.c-ok { background: #eaf6ee; color: var(--green); }
.rc-chip.c-hero { background: #fff7e0; color: #92400e; }
.rc-chip.c-due { background: #fef3c7; color: #92400e; }
.rc-chip.c-over { background: #fee2e2; color: #b91c1c; }

/* thin strips inside the card (opening-soon + payments + estimate note) */
.rc-strip { border-top: 1px solid var(--line); padding: 10px 14px; }
.rc-strip-h { font-size: 11.5px; font-weight: 700; color: #b45309; margin-bottom: 2px; }
.rc-watch .watch-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 13px; }
.rc .grp { margin: 0; border-top: 1px solid var(--line); padding: 10px 14px; }
.rc-est { font-size: 11px; color: var(--muted); margin: 0; padding: 8px 14px 10px; border-top: 1px solid var(--line); }

/* anonymous teaser: hook + named locks, whole card opens sign-up */
.rc-locked { padding: 16px; cursor: pointer; }
.lk-hook { font-weight: 650; font-size: 14px; margin: 0 0 3px; color: var(--ink); }
.lk-head { font-size: 13px; font-weight: 700; color: var(--green); margin: 0 0 10px; }
.lk-row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.lk-val { color: var(--green); white-space: nowrap; }
.lk-name { color: var(--ink); }
.lk-more { color: var(--muted); font-weight: 600; }
.rc-locked .gate-cta { margin-top: 12px; width: 100%; }

/* tile drill-down: the full story of one alert as its own chat card */
.alert.is-detail { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.det-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.det-body { font-size: 12.5px; color: #475569; margin: 8px 0 0; line-height: 1.45; }

/* ── Mimir: brand avatar ── */
.brand-avatar { width: 30px; height: 30px; border-radius: 50%; }

/* ── Mimir threads: bot rows carry his avatar ── */
.row.bot { display: flex; gap: 9px; align-items: flex-start; }
.row-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 2px; }
.row.bot .text { flex: 1; min-width: 0; }
.row.bot .loc-widget { flex: 1; min-width: 0; }

/* ── Sidebar: live opportunity sub-tabs under the active property ── */
.side-sub.st {
  display: flex; align-items: center; gap: 7px; width: calc(100% - 12px);
  animation: stIn .25s ease;
}
@keyframes stIn { from { opacity: 0; transform: translateX(-6px); } }
.st-ic { flex: none; font-size: 11px; font-weight: 700; width: 14px; text-align: center; }
.st-act .st-ic { color: var(--green); }
.st-pend .st-ic { color: var(--accent); }
.st-sec .st-ic { color: var(--green); opacity: .7; }
.st-watch .st-ic { color: #b45309; }
.st-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.st-val { flex: none; font-size: 11px; font-weight: 650; color: var(--green); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sub.st.is-preview { cursor: default; opacity: .75; }
.side-sub.st.active { border-color: var(--accent); background: #f5f8ff; color: var(--accent); }

/* ── Report: the document Mimir hands over ── */
.report { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.rp-body, .rp-qa { max-width: 760px; margin: 0 auto; }
.rp-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.rp-head img { width: 26px; height: 26px; border-radius: 50%; }
.rp-head span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-banner {
  background: #eaf6ee; color: var(--green); border-radius: 12px;
  font-size: 13px; font-weight: 600; padding: 10px 14px; margin-bottom: 12px;
}

/* the hire strip: conversion moment under an unlocked report */
.hire-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 14px; background: #f5f8ff;
  padding: 14px 16px; margin-top: 14px;
}
.hire-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.hire-txt { flex: 1; min-width: 220px; }
.hire-txt p { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.hire-txt span { font-size: 11.5px; color: var(--muted); }
.hire-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.save-only {
  border: none; background: none; color: var(--muted); font-family: var(--font);
  font-size: 12px; cursor: pointer; text-decoration: underline;
}
.save-only:hover { color: var(--ink); }

/* teaser extras: Mimir hook + dual CTA (buttons must stay clickable
   inside .lock-wrap, whose children are pointer-events:none) */
.lk-mimir { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lk-mimir img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.lk-ctas { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rc-locked .gate-cta, .rc-locked .cta-see { pointer-events: auto; }
.cta-see {
  border: none; background: none; color: var(--accent); font-family: var(--font);
  font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline;
}

/* report Q&A ("Pergunte ao Mimir") */
.rp-qa { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.qa-row { display: flex; gap: 8px; align-items: flex-start; }
.qa-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; margin-top: 2px; }
.qa-row .qa-text { font-size: 14px; line-height: 1.5; min-width: 0; }
.qa-row.user { justify-content: flex-end; }
.qa-row.user .qa-text { background: #eef2ff; border-radius: 14px; padding: 8px 13px; max-width: 85%; }
.qa-row.thinking .qa-text { color: var(--muted); font-style: italic; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 32px; }

/* [hidden] must beat the explicit display rules above */
.thread[hidden], .report[hidden], .composer[hidden] { display: none !important; }

/* ── Wizard: one question at a time (replaces the previous) ── */
.wizard { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 30px 18px 14px; }
.wz-card { width: min(600px, 100%); }
.wz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wz-avatar { width: 42px; height: 42px; border-radius: 50%; }
.wz-name { font-weight: 700; font-size: 14px; color: var(--muted); }
.wz-ack { font-size: 13.5px; color: var(--green); font-weight: 600; margin: 0 0 8px; }
.wz-q { font-size: 19px; font-weight: 650; line-height: 1.4; margin: 0 0 16px; }
.wz-opts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.wz-chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px;
  padding: 11px 18px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.wz-chip:hover { border-color: var(--accent); color: var(--accent); background: #f5f8ff; }
.wz-inrow { display: flex; gap: 8px; margin: 4px 0; }
.wz-inrow input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-family: var(--font); font-size: 14px; }
.wz-inrow input:focus { outline: none; border-color: var(--accent); }
.wz-inrow button { border: none; border-radius: 12px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; padding: 0 18px; cursor: pointer; font-family: var(--font); }
#chatmap { height: 220px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.loc-widget { margin-top: 4px; }
.loc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.loc-label { font-size: 13px; color: var(--muted); flex: 1; min-width: 120px; }
.wz-foot { width: min(600px, 100%); margin-top: auto; padding-top: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wz-teaser { font-size: 12.5px; font-weight: 650; color: var(--green); }
.wz-step { font-size: 11.5px; color: var(--muted); }
.wz-spin { width: 26px; height: 26px; border-radius: 50%; margin: 8px 0; border: 3px solid var(--line); border-top-color: var(--accent); animation: wzspin .8s linear infinite; }
@keyframes wzspin { to { transform: rotate(360deg); } }

/* ── Opportunity drawer: side panel (desktop) / bottom sheet (mobile) ── */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 94vw);
  background: var(--card); border-left: 1px solid var(--line); z-index: 900;
  display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(15,23,42,.14);
  animation: dwSlide .22s ease;
}
@keyframes dwSlide { from { transform: translateX(24px); opacity: .4; } }
.dw-veil { position: fixed; inset: 0; background: rgba(15,23,42,.28); z-index: 899; }
.dw-top { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none; }
.dw-avatar { width: 26px; height: 26px; border-radius: 50%; }
.dw-title { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-close { border: none; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.dw-close:hover { color: var(--ink); }
.dw-body { flex: 1; overflow-y: auto; padding: 14px 16px 22px; }
.dw-body .ans { max-width: none; }
.dw-body .alert.is-detail { border: none; padding: 0 0 12px; border-radius: 0; }
.dd-zone { padding-top: 6px; }
.dd-card { margin-top: 4px; }
.dd-think { color: var(--muted); font-style: italic; margin: 10px 0; }
.dd-plan-intro { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.dw-body .dw-q { font-size: 14.5px; font-weight: 650; margin: 12px 0 10px; }

@media (max-width: 759px) {
  .drawer { top: auto; left: 0; right: 0; width: 100%; height: 86vh; border-left: none; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; animation: dwSheet .24s ease; }
  @keyframes dwSheet { from { transform: translateY(40px); opacity: .5; } }
}

/* [hidden] must beat the display rules above */
.wizard[hidden], .report[hidden], .composer[hidden], .drawer[hidden], .dw-veil[hidden] { display: none !important; }
