:root {
  --accent: #5b3df5;
  --accent-soft: #efebff;
  --ink: #1d1b2f;
  --ink-2: #4b4a5e;
  --ink-3: #8b8a9c;
  --line: #ecebf2;
  --bg: #ffffff;
  --bg-2: #f6f6fa;
  --side: #f7f7f9;
  --sector: #d97706;
  --good: #15803d;
  --bad: #c2410c;
  --shadow: 0 1px 3px rgba(29, 27, 47, .08), 0 8px 28px rgba(29, 27, 47, .12);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { flex: none; }

.app { display: grid; grid-template-columns: 264px 440px 1fr; grid-template-rows: 100vh; height: 100vh; }
.app > * { min-height: 0; }
/* collapsed menu: a slim rail that keeps the toggle, new conversation, explore and the profile */
@media (min-width: 861px) {
  .app.collapsed { grid-template-columns: 56px 440px 1fr; }
  .app.collapsed .brand, .app.collapsed .label, .app.collapsed .history, .app.collapsed .profile .who, .app.collapsed .profile .chev { display: none; }
  .app.collapsed .side-top { justify-content: center; padding: 12px 0 8px; }
  .app.collapsed .side-nav { align-items: center; padding: 4px 0 6px; }
  .app.collapsed .nav-item { width: 40px; padding: 0; justify-content: center; }
  .app.collapsed .side-bottom { margin-top: auto; display: flex; justify-content: center; padding: 8px 0; }
  .app.collapsed .profile { width: auto; padding: 4px; }
  .app.collapsed .menu { left: 8px; right: auto; width: 260px; bottom: 56px; }
}

.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: rgba(29, 27, 47, .06); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- sidebar ---------- */
.sidebar { position: relative; z-index: 5; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 14px; }
.brand { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 20px; height: 20px; color: var(--accent); align-self: center; }
.brand small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.side-nav { padding: 4px 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; cursor: pointer; font-weight: 500; text-align: left; white-space: nowrap; }
.nav-item svg { width: 18px; height: 18px; color: var(--ink-2); }
.nav-item:hover, .nav-item.on { background: rgba(29, 27, 47, .06); }
.history { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 12px; }
.history .group { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 14px 10px 4px; }
.thread { display: flex; align-items: center; gap: 4px; border-radius: 9px; padding: 0 4px 0 10px; cursor: pointer; }
.thread:hover, .thread.on { background: rgba(29, 27, 47, .06); }
.thread .t { flex: 1; min-width: 0; padding: 8px 0; }
.thread .t b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .t small { display: block; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.thread .del { opacity: 0; width: 28px; height: 28px; }
.thread:hover .del { opacity: 1; }
.history .empty { color: var(--ink-3); font-size: 12.5px; padding: 12px 10px; line-height: 1.5; }
.side-bottom { position: relative; border-top: 1px solid var(--line); padding: 8px; }
.profile { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 10px; padding: 8px; cursor: pointer; text-align: left; }
.profile:hover { background: rgba(29, 27, 47, .06); }
.avatar-round { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.profile .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile .who small { color: var(--ink-3); font-size: 11.5px; }
.profile .chev { width: 16px; height: 16px; color: var(--ink-3); }
.menu { position: absolute; left: 8px; right: 8px; bottom: 60px; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20; }
.menu button, .menu label { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 8px; padding: 9px 10px; cursor: pointer; text-align: left; font-size: 13.5px; }
.menu button:hover, .menu label:hover { background: var(--bg-2); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu .danger { color: #b91c1c; }
.switch { margin-left: auto; width: 32px; height: 18px; border-radius: 9px; background: #d4d3de; position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(14px); }

/* ---------- panel ---------- */
.panel { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: var(--bg); }
.panel-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.panel-head .h { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-head .h small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.composer-wrap { flex: none; padding: 8px 14px 10px; border-top: 1px solid transparent; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; }
.chips::-webkit-scrollbar { display: none; }
.chips:empty { display: none; }
.chip {
  flex: none; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; white-space: nowrap;
  background: var(--bg); color: var(--ink-2); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { color: var(--ink); border-color: #d9d7e6; background: #fbfbfe; }
.chip .spark { color: var(--accent); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid #dddbe7; border-radius: 22px; background: var(--bg); box-shadow: 0 2px 10px rgba(29, 27, 47, .06); }
.composer:focus-within { border-color: #c9c2fb; box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font-size: 14.5px; line-height: 1.45; padding: 6px 0; max-height: 160px; }
.composer textarea::placeholder { color: var(--ink-3); }
.send { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.send svg { width: 18px; height: 18px; }
.send:disabled { background: #cfcbe8; cursor: default; }
.disclaimer { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 6px; }

/* cards */
.section { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.title { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.25; }
.subtitle { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.muted { color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.loading { padding: 22px 18px; color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kpi { background: var(--bg-2); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.kpi .l { font-size: 11.5px; color: var(--ink-2); line-height: 1.25; }
.kpi .v { font-size: 18px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.kpi .d.good { color: var(--good); } .kpi .d.bad { color: var(--bad); }
.kpi.hl { background: #fff7ed; } .kpi.hl .v { color: #9a3412; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
select.sort { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--bg); font-size: 12.5px; color: var(--ink-2); }
.rows { list-style: none; margin: 0 -8px; padding: 0; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.row:hover { background: var(--bg-2); }
.row .main { flex: 1; min-width: 0; }
.row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .metric { text-align: right; flex: none; }
.row .metric b { display: block; font-variant-numeric: tabular-nums; }
.row .metric span { font-size: 11px; color: var(--ink-3); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
svg.sparkline { width: 56px; height: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--bg-2); margin: 8px 6px 0 0; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.timeline li:last-child { border: 0; }
.timeline .yr { color: var(--ink-3); width: 36px; font-variant-numeric: tabular-nums; }
.timeline .vac { color: var(--bad); } .timeline .none { color: var(--ink-3); font-style: italic; } .timeline .changed { font-weight: 600; }
.chart { width: 100%; height: 150px; display: block; }
.chart text { font-size: 10px; fill: var(--ink-3); font-family: Inter, sans-serif; }
.legend-inline { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.legend-inline i { display: inline-block; width: 14px; height: 2px; background: var(--accent); vertical-align: middle; margin-right: 6px; }
.legend-inline i.city { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }
.change { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.change .dot { margin-top: 5px; }
.change .who { font-weight: 500; }
.change .was { font-size: 12px; color: var(--ink-3); }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0 0; font-size: 13px; font-weight: 500; }
.sector-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sector-row:last-child { border: 0; }
.sector-row small { display: block; color: var(--ink-3); margin-top: 2px; }
.aid-note { margin-top: 10px; padding: 10px 12px; background: #fff7ed; border-radius: 10px; font-size: 12.5px; color: #7c2d12; line-height: 1.45; }
.sources { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.cov-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cov-row:last-child { border: 0; }

/* conversation */
.welcome { padding: 28px 22px 10px; }
.welcome h2 { font-size: 21px; margin: 0 0 6px; }
.welcome p { color: var(--ink-2); margin: 0 0 18px; line-height: 1.5; }
.own-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; background: var(--accent-soft); }
.own-card .eyebrow { margin-bottom: 4px; }
.own-card p { color: var(--ink); margin: 0; font-size: 14px; }
.own-card .primary-btn { width: auto; display: inline-block; margin-right: 12px; }
.starters { display: grid; gap: 8px; }
.starter { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 10px 12px; cursor: pointer; line-height: 1.4; }
.starter:hover { background: var(--bg-2); }
.starter b { display: block; font-weight: 600; font-size: 13px; }
.starter span { color: var(--ink-3); font-size: 12.5px; }
.turn { padding: 16px 18px 6px; }
.bubble { margin-left: auto; width: fit-content; max-width: 88%; background: var(--bg-2); padding: 9px 13px; border-radius: 16px; line-height: 1.45; font-size: 14px; }
.understood { font-size: 12.5px; color: var(--ink-2); border-left: 2px solid var(--accent); padding: 2px 0 2px 10px; margin: 14px 0 10px; line-height: 1.45; }
.understood b { color: var(--ink); font-weight: 600; }
.answer { white-space: pre-wrap; line-height: 1.6; font-size: 14.5px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; margin-top: 12px; }
.badge.ok { background: #e7f6ec; color: #15803d; } .badge.gen { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: #fff4e0; color: #b45309; } .badge.err { background: #fde8e8; color: #b91c1c; } .badge.none { background: var(--bg-2); color: var(--ink-3); }
.thinking { color: var(--ink-3); margin-top: 14px; font-size: 14px; }
.thinking::after { content: "…"; animation: dots 1.2s steps(3, end) infinite; }
@keyframes dots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } }
.answer-chart { margin-top: 12px; padding: 8px 10px 6px; border: 1px solid var(--line); border-radius: 10px; }
.on-map { display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 0 8px; font-size: 12px; color: var(--ink-2); border: 0; background: none; cursor: pointer; padding: 0; }
.on-map:hover { color: var(--accent); }
details.data { margin-top: 10px; font-size: 12.5px; }
details.data > summary { cursor: pointer; color: var(--accent); font-weight: 500; list-style: none; }
details.data > summary::-webkit-details-marker { display: none; }
details.data > summary::before { content: "▸ "; } details.data[open] > summary::before { content: "▾ "; }
.result { margin-top: 10px; }
.result h4 { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.result h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tablewrap { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 5px 7px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); white-space: nowrap; }
td { padding: 5px 7px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; background: var(--bg-2); border-radius: 8px; padding: 8px; overflow: auto; white-space: pre-wrap; margin: 6px 0 0; }
.error { color: #b91c1c; font-size: 12.5px; }
.no-sql details.data { display: none; }

/* spaces to fill */
.primary-btn.secondary { background: var(--accent-soft); color: var(--accent); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; color: #9a3412; background: #fff7ed; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.mix { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.mix:last-child { border-bottom: 0; }
.mix-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.mix-head b { font-variant-numeric: tabular-nums; }
.mix-bars { height: 6px; border-radius: 3px; background: var(--bg-2); margin: 2px 0; overflow: hidden; }
.mix-bars span { display: block; height: 100%; border-radius: 3px; }
.mix-bars .here { background: var(--accent); }
.mix-bars .ref { background: #b8b6c8; }

/* aid files */
.lead { color: var(--ink-2); line-height: 1.55; margin: 0; }
.primary-btn { display: block; width: 100%; margin-top: 12px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; padding: 10px 12px; cursor: pointer; }
.primary-btn:hover { filter: brightness(1.08); }
.progress { height: 5px; border-radius: 3px; background: var(--bg-2); margin: 5px 0 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); }
.status-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-2); margin: 14px 0 8px; }
.merchant { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.merchant:last-child { border-bottom: 0; }
.merchant .m-main { flex: 1; min-width: 0; cursor: pointer; }
.merchant .m-main:hover .who { color: var(--accent); }
.merchant .who { font-weight: 600; }
.merchant .who small { font-weight: 400; color: var(--ink-3); }
.merchant .was { font-size: 12px; color: var(--ink-3); }
.merchant .why { font-size: 12px; color: #92400e; margin-top: 2px; }
.status-select { flex: none; font-size: 12px; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--bg); max-width: 150px; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 6px 10px 6px 0; width: 38%; vertical-align: top; position: static; background: none; border-bottom: 1px solid var(--line); white-space: normal; }
.kv td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.checks { list-style: none; margin: 4px 0 0; padding: 0; }
.checks li { padding: 6px 0 6px 26px; position: relative; font-size: 13px; line-height: 1.45; border-bottom: 1px dashed var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks li > span:first-child { position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.ok-mark { background: #e7f6ec; color: #15803d; } .no-mark { background: #fde8e8; color: #b91c1c; } .q-mark { background: #fff4e0; color: #b45309; }
.invite { font-size: 12.5px; line-height: 1.5; background: var(--bg-2); }
.notes { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; font-size: 13px; }

/* printable portrait */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.p-line { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.p-line b { color: var(--ink); }
@media (max-width: 520px) { .two-col { grid-template-columns: 1fr; } }

@media print {
  @page { size: letter; margin: 14mm; }
  .portrait .section { padding: 10px 0; break-inside: avoid; }
  .portrait .chart { height: 130px; }
  html, body { overflow: visible; height: auto; }
  .sidebar, .mapzone, .composer-wrap, .panel-head .icon-btn, .no-print, .floating, .layers, .scrim { display: none !important; }
  .app, .app.collapsed { display: block !important; height: auto; position: static; }
  .panel { position: static !important; height: auto !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; display: block; }
  .panel-body { overflow: visible; }
  .kpis { grid-template-columns: repeat(3, 1fr) !important; }
  .two-col { grid-template-columns: 1fr 1fr !important; }
  .panel-head { border-bottom: 2px solid var(--ink); }
}

/* ---------- map ---------- */
.mapzone { position: relative; min-width: 0; }
#map { position: absolute; inset: 0; }
.floating { position: absolute; top: 12px; left: 12px; z-index: 4; background: var(--bg); box-shadow: var(--shadow); width: 40px; height: 40px; border-radius: 12px; }
.place-search { position: absolute; top: 12px; left: 12px; z-index: 4; width: min(360px, calc(100% - 90px)); display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--bg); border-radius: 21px; box-shadow: var(--shadow); }
.place-search > svg { width: 17px; height: 17px; color: var(--ink-3); }
.place-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.place-results { position: absolute; top: 48px; left: 0; right: 0; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: 60vh; overflow-y: auto; }
.place-results .rows { margin: 0; }
.layers { position: absolute; right: 12px; bottom: 28px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.layers .group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.layers .chip { box-shadow: 0 1px 4px rgba(29, 27, 47, .14); border: 0; }
.layers .chip[aria-pressed="false"] { opacity: .5; }
.layers .chip .count { color: var(--ink-3); font-weight: 400; }
.sector-swatch { width: 12px; height: 12px; border: 1.5px dashed var(--sector); border-radius: 3px; background: rgba(217, 119, 6, .12); }
.assoc-swatch { width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 3px; background: rgba(91, 61, 245, .08); }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); font-family: Inter, sans-serif; font-size: 13px; }
.maplibregl-ctrl-group { border-radius: 10px !important; box-shadow: var(--shadow) !important; }

/* ---------- small screens: drawer + bottom sheet ---------- */
.scrim { display: none; }
.sheet-handle { display: none; }
@media (max-width: 860px) {
  .app, .app.collapsed { display: block; position: relative; }
  .mapzone { position: fixed; inset: 0; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform .25s ease; visibility: visible !important; }
  .app.drawer .sidebar { transform: none; }
  .app.drawer .scrim { display: block; position: fixed; inset: 0; background: rgba(26, 24, 40, .35); z-index: 25; }
  .panel { position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; z-index: 10; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(29, 27, 47, .14); border: 0; transition: height .25s ease; }
  .app.sheet-full .panel { height: 90vh; }
  .sheet-handle { display: grid; place-items: center; width: 100%; height: 18px; border: 0; background: none; cursor: pointer; flex: none; padding: 0; }
  .sheet-handle span { width: 40px; height: 4px; border-radius: 2px; background: #d4d3de; }
  .panel-head { min-height: 44px; padding-top: 2px; }
  .floating { display: grid !important; }
  .place-search, .app.collapsed .place-search { left: 62px; width: calc(100% - 74px); }
  .layers { bottom: calc(52vh + 10px); }
  .layers .group:not(:first-child) { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

/* sign-in question, asked in the conversation the first time someone signed out asks something */
.gate { margin-top: 14px; padding: 14px 16px; border: 1px solid #ddd6fe; border-radius: 14px; background: var(--accent-soft); }
.gate p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-2); }
.gate label { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.4; margin-bottom: 10px; color: var(--ink); }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: 0; }
.gate-row input:focus { border-color: #c9c2fb; box-shadow: 0 0 0 3px #fff; }
.gate-row button { font: inherit; font-weight: 600; font-size: 14px; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; flex: none; }
.gate-err { color: #b91c1c; font-size: 13px; margin-top: 8px; }
.gate small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 8px; }
