/* ==========================================================================
   Simplifica Proteção — interface conversacional
   Mobile first · navy profundo + esmeralda · Sora (títulos) + IBM Plex Sans
   ========================================================================== */

:root {
  --navy-950: #060f1f;
  --navy-900: #0a1730;
  --navy-800: #0f2142;
  --navy-700: #183058;
  --navy-600: #24416f;
  --ink: #13203a;
  --ink-2: #33415c;
  --muted: #637089;
  --line: #e2e7ef;
  --line-2: #eef1f6;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --teal: #0fa28f;
  --teal-600: #0a8574;
  --teal-glow: #43e5c6;
  --teal-soft: #e2f6f1;
  --amber: #c97a12;
  --amber-soft: #fcf0de;
  --danger: #b93a26;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(10, 23, 48, .06), 0 1px 1px rgba(10, 23, 48, .04);
  --shadow-2: 0 10px 30px -12px rgba(10, 23, 48, .25), 0 2px 6px rgba(10, 23, 48, .06);
  --shadow-3: 0 30px 80px -30px rgba(6, 15, 31, .55);
  --display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal-600); }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--teal-glow); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- App shell ---------- */
.app {
  height: var(--app-h, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(1200px 420px at 85% -10%, rgba(67, 229, 198, .16), transparent 60%),
    radial-gradient(900px 380px at -10% 0%, rgba(36, 65, 111, .9), transparent 70%),
    linear-gradient(180deg, var(--navy-900) 0, var(--navy-900) 260px, var(--bg) 260px);
}

/* ---------- Topbar ---------- */
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 14px 0 16px;
  color: #fff;
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--teal-glow);
  background: linear-gradient(145deg, rgba(67, 229, 198, .18), rgba(67, 229, 198, .04));
  box-shadow: inset 0 0 0 1px rgba(67, 229, 198, .35), 0 0 24px -6px rgba(67, 229, 198, .6);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand-name b { font-weight: 600; color: var(--teal-glow); }

.topbar-actions { display: flex; align-items: center; gap: 4px; position: relative; }
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; min-width: 38px; padding: 0 10px;
  border: 0; border-radius: 12px;
  background: transparent; color: inherit;
  text-decoration: none;
  transition: background .2s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.icon-btn .btn-label { font-size: 13.5px; font-weight: 500; }
.icon-btn .dot { position: absolute; top: 7px; left: 23px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-glow); box-shadow: 0 0 0 2px var(--navy-900); }
.topbar .icon-btn circle { fill: currentColor; stroke: none; }
#btnReview circle { fill: none; stroke: currentColor; }

.menu {
  position: absolute; right: 0; top: 46px;
  min-width: 250px; padding: 6px;
  background: var(--surface); color: var(--ink);
  border-radius: 14px; box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  animation: pop .18s var(--ease);
}
.menu a, .menu button {
  text-align: left; padding: 11px 12px; border-radius: 10px;
  background: none; border: 0; color: var(--ink); font-size: 14.5px; text-decoration: none;
}
.menu a:hover, .menu button:hover { background: var(--line-2); }
.menu .danger { color: var(--danger); }

/* ---------- Consentimento ---------- */
.consent {
  flex: none; z-index: 15;
  margin: 0 12px 8px; padding: 10px 12px;
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: rgba(255, 255, 255, .08); color: #dfe7f3;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  font-size: 12.5px;
}
.consent p { margin: 0; flex: 1 1 220px; }
.consent div { display: flex; gap: 6px; }
.consent .chip { color: #fff; border-color: rgba(255, 255, 255, .25); background: transparent; }
.consent .chip-solid { background: var(--teal); border-color: var(--teal); }

/* ---------- Palco ---------- */
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.hero {
  flex: none;
  padding: 6px 20px 22px;
  color: #fff;
  overflow: hidden;
  transition: max-height .45s var(--ease), opacity .3s var(--ease), padding .45s var(--ease);
  max-height: 420px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 5px 11px 5px 9px;
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  color: #cfe9e3;
  border-radius: 999px; background: rgba(67, 229, 198, .08); box-shadow: inset 0 0 0 1px rgba(67, 229, 198, .22);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-glow); box-shadow: 0 0 0 0 rgba(67, 229, 198, .6); animation: pulse 2.4s infinite; }
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(27px, 7.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 12px;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(92deg, #ffffff 0%, var(--teal-glow) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 0 14px; color: #b9c6da; font-size: 15.5px; max-width: 44ch; }
.ai-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #91a2bd; font-size: 12.5px; max-width: 52ch; }
.ai-note svg { flex: none; width: 16px; height: 16px; fill: var(--teal-glow); margin-top: 1px; }

.app.started .hero { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }

/* ---------- Área de trabalho ---------- */
.workspace { flex: 1; min-height: 0; display: flex; }

.chat {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px -24px rgba(0, 0, 0, .5);
  position: relative;
}

/* Progresso conceitual */
.progress {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.progress-track { display: flex; gap: 4px; flex: none; }
.progress-track span { width: 18px; height: 5px; border-radius: 99px; background: var(--line); transition: background .4s var(--ease), width .4s var(--ease); }
.progress-track span.done { background: var(--teal); }
.progress-track span.current { width: 30px; background: linear-gradient(90deg, var(--teal), var(--teal-glow)); }
.progress-label { font-size: 13px; color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-label small { color: var(--muted); font-weight: 400; }

.dev-banner { flex: none; margin: 8px 16px 0; padding: 5px 10px; border-radius: 8px; background: var(--amber-soft); color: #7a4a08; font-size: 12px; text-align: center; }

/* Conversa */
.log {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 18px 14px 10px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.msg { display: flex; gap: 10px; margin: 0 0 14px; animation: rise .38s var(--ease) both; }
.msg.user { justify-content: flex-end; }
.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 10px; margin-top: 2px;
  display: grid; place-items: center;
  background: var(--navy-800); color: var(--teal-glow);
}
.avatar svg { width: 19px; height: 19px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.bubble {
  position: relative;
  max-width: min(86%, 560px);
  padding: 11px 15px;
  border-radius: 6px 18px 18px 18px;
  background: var(--surface);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-2);
  font-size: 15.5px; line-height: 1.55;
  overflow-wrap: anywhere;
}
.bubble p { margin: 0 0 .6em; }
.bubble p:last-child { margin-bottom: 0; }
.bubble strong { font-weight: 600; color: var(--navy-800); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--navy-800); white-space: nowrap; }
.msg.user .bubble {
  background: linear-gradient(160deg, var(--navy-700), var(--navy-800));
  color: #f2f6fc;
  border-radius: 18px 6px 18px 18px;
  box-shadow: 0 6px 16px -10px rgba(10, 23, 48, .6);
}
.msg.user .bubble .money { color: #fff; }
.fix {
  align-self: center; flex: none;
  opacity: 0; border: 0; background: transparent; color: var(--muted);
  font-size: 12px; padding: 6px 8px; border-radius: 8px; transition: opacity .2s;
}
.msg.user:hover .fix, .msg.user:focus-within .fix, .fix:focus-visible { opacity: 1; }
@media (hover: none) { .fix { opacity: .7; } }

.note {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 2px auto 16px; max-width: 520px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--teal-soft); color: #0b5a4f; font-size: 14px;
  animation: rise .38s var(--ease) both;
}
.note svg { flex: none; width: 17px; height: 17px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cartão do diagnóstico */
.dx {
  max-width: min(100%, 600px);
  margin: 0 0 16px;
  border-radius: 22px; overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  animation: rise .5s var(--ease) both;
}
.dx-head {
  position: relative;
  padding: 18px 18px 16px;
  color: #fff;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(67, 229, 198, .28), transparent 65%),
    linear-gradient(150deg, var(--navy-700), var(--navy-900));
}
.dx-kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-glow); font-weight: 600; }
.dx-title { margin: 0 0 14px; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.dx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dx-stat.feature { grid-column: 1 / -1; order: -1; }
.dx-stat.feature b { font-size: 24px; }
.dx-stat { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.dx-stat.feature { background: rgba(67, 229, 198, .14); box-shadow: inset 0 0 0 1px rgba(67, 229, 198, .4); }
.dx-stat span { display: block; font-size: 11px; color: #a9b8cf; }
.dx-stat b { display: block; margin-top: 2px; font-family: var(--display); font-size: clamp(14px, 4vw, 17px); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-body { padding: 16px 18px 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.dx-body p { margin: 0 0 .8em; }
.dx-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 18px 18px; }

/* Indicador de digitação */
.typing { display: flex; gap: 10px; margin: 0 0 14px; align-items: center; animation: rise .3s var(--ease) both; }
.typing .bubble { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--muted); font-size: 13.5px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); opacity: .35; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }

/* Respostas rápidas + composer */
.composer-wrap {
  flex: none;
  padding: 6px 12px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, rgba(243, 245, 249, 0), var(--bg) 22%);
}
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cfe9e3;
  background: var(--surface);
  color: var(--teal-600);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition: background .2s var(--ease), transform .15s var(--ease), border-color .2s;
  animation: rise .35s var(--ease) both;
}
.chip:hover { background: var(--teal-soft); border-color: var(--teal); }
.chip:active { transform: scale(.97); }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 6px 6px 6px 16px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line);
  transition: box-shadow .2s var(--ease);
}
.composer:focus-within { box-shadow: var(--shadow-2), inset 0 0 0 1.5px var(--teal); }
.composer textarea {
  flex: 1; min-height: 40px; max-height: 132px;
  padding: 9px 0; border: 0; outline: none; resize: none; background: transparent;
  font-size: 16px; line-height: 1.4;
}
.composer textarea::placeholder { color: #98a3b6; }
.send {
  flex: none; width: 42px; height: 42px; border-radius: 15px; border: 0;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--teal), var(--teal-600)); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(15, 162, 143, .9);
  transition: transform .15s var(--ease), opacity .2s, filter .2s;
}
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.send:disabled { opacity: .35; box-shadow: none; filter: grayscale(.3); cursor: default; }
.send:not(:disabled):active { transform: scale(.94); }
.fineprint { margin: 7px 4px 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.fineprint a { color: var(--muted); }

/* ---------- Painel "O que já entendi" (gaveta no celular) ---------- */
.insight {
  position: fixed; z-index: 40;
  left: 0; right: 0; bottom: 0;
  max-height: 86%;
  display: flex; flex-direction: column;
  padding: 18px 18px calc(16px + var(--safe-b));
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-3);
  transform: translateY(105%);
  transition: transform .4s var(--ease);
  overflow-y: auto;
}
.insight.open { transform: translateY(0); }
.insight-head { display: flex; align-items: center; justify-content: space-between; }
.insight h2 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.insight .icon-btn { color: var(--ink-2); }
.insight .icon-btn:hover { background: var(--line-2); }
.insight-sub { margin: 4px 0 14px; color: var(--muted); font-size: 13px; }
.facts { display: flex; flex-direction: column; gap: 16px; }
.facts-empty { padding: 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; }
.facts-empty ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.facts-empty li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--ink-2); counter-increment: s; }
.facts-empty li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-600); font-weight: 600; font-size: 13px; }
.facts-empty li b { display: block; color: var(--ink); font-weight: 600; }
.fact-group h3 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact {
  width: 100%;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 10px; margin: 0 -10px;
  width: calc(100% + 20px);
  border: 0; border-radius: 10px; background: transparent; text-align: left;
  transition: background .2s;
}
.fact:hover { background: var(--line-2); }
.fact .k { font-size: 13.5px; color: var(--ink-2); }
.fact .v { font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact .v small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.fact.flash { animation: flash 1.2s var(--ease); }
.fact-edit { display: flex; gap: 6px; padding: 6px 0 10px; animation: rise .25s var(--ease) both; }
.fact-edit input, .fact-edit select {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15px;
}
.fact-edit input:focus, .fact-edit select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.declined { font-size: 12.5px; color: var(--muted); }
.insight-cta { margin-top: 18px; }

.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(6, 15, 31, .45); backdrop-filter: blur(2px); animation: fade .25s var(--ease); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px;
  border-radius: 14px; border: 0;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(150deg, var(--teal), var(--teal-600)); color: #fff; box-shadow: 0 10px 22px -10px rgba(15, 162, 143, .9); width: 100%; }
.btn-ghost { background: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-dark { background: var(--navy-800); color: #fff; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-wa { background: #128c4a; color: #fff; box-shadow: 0 10px 22px -12px rgba(18, 140, 74, .9); }
.btn-wa svg { fill: currentColor; stroke: none; }

/* ---------- Relatório ---------- */
.report {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: sheet .45s var(--ease) both;
}
.report-bar {
  flex: none; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; color: #fff; background: var(--navy-900);
}
.report-bar .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.report-bar-title { font-family: var(--display); font-weight: 600; font-size: 15px; }
.report-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(40px + var(--safe-b)); }
.r-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

.r-hero {
  color: #fff;
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(67, 229, 198, .22), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  padding: 8px 0 72px;
}
.r-meta { margin: 0 0 14px; font-size: 12.5px; color: #93a5c1; }
.r-meta b { color: #cfe9e3; font-weight: 500; }
.seg {
  display: inline-grid; grid-auto-flow: column; gap: 2px;
  padding: 3px; border-radius: 12px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  margin-bottom: 18px; max-width: 100%;
}
.seg button {
  border: 0; background: transparent; color: #b9c6da;
  padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500;
  transition: background .25s var(--ease), color .25s;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--navy-900); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); }
.r-top { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.r-label { margin: 0; font-size: 13px; color: #a9b8cf; }
.r-big {
  margin: 4px 0 8px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 10vw, 56px); line-height: 1.02; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.r-sub { margin: 0; color: #c5d1e3; font-size: 14px; }
.r-sub b { color: #fff; font-weight: 600; }
.ring { width: 112px; height: 112px; }
.ring text { font-family: var(--display); font-weight: 600; }
.r-desc { margin: 16px 0 0; color: #a9b8cf; font-size: 13.5px; max-width: 60ch; }

.r-cards { margin-top: -48px; display: grid; gap: 14px; }
.card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  padding: 18px;
}
.card h2 { margin: 0 0 4px; font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card .sub { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }

.stack { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin: 6px 0 4px; }
.stack span { height: 100%; transition: width .6s var(--ease); }
.stack-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rows { display: flex; flex-direction: column; }
.row { border-top: 1px solid var(--line-2); }
.row summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 12px 1fr auto 16px; gap: 10px; align-items: center;
  padding: 12px 0;
}
.row summary::-webkit-details-marker { display: none; }
.row .sw { width: 10px; height: 10px; border-radius: 3px; }
.row .lbl { font-size: 14.5px; color: var(--ink); }
.row .val { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14.5px; white-space: nowrap; }
.row .val.neg { color: var(--teal-600); }
.row .chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform .25s var(--ease); }
.row[open] .chev { transform: rotate(180deg); }
.row p { margin: -4px 0 12px 22px; font-size: 13.5px; color: var(--muted); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 2px; border-top: 2px solid var(--ink); font-weight: 600; }
.total b { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.premises { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.premises li { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.obs { margin: 10px 0 0; font-size: 13px; color: #7a4a08; background: var(--amber-soft); padding: 10px 12px; border-radius: 12px; }

.chart { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.chart .lbl-strong { fill: var(--ink); font-weight: 600; }
.compare { display: grid; grid-template-columns: 1fr; gap: 8px; }
.compare button {
  text-align: left; border: 0; padding: 12px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s, background .2s;
}
.compare button[aria-pressed="true"] { background: var(--teal-soft); box-shadow: inset 0 0 0 1.5px var(--teal); }
.compare .n, .compare .g, .compare .bar, .compare small { display: block; }
.compare .n { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.compare .g { display: block; margin: 4px 0 6px; font-family: var(--display); font-weight: 600; font-size: clamp(14px, 4.2vw, 19px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare .bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.compare .bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.compare small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.life { display: grid; gap: 10px; }
.life-item { padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.life-item h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.life-item h3 svg { width: 18px; height: 18px; fill: none; stroke: var(--teal-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.life-item p.big { color: var(--ink); }
.life-item .big { margin: 8px 0 4px; font-family: var(--display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.life-item .big small { font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 400; }
.life-item p { margin: 0; font-size: 13px; color: var(--muted); }
.meter { margin-top: 10px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--amber); }

.recs { display: grid; gap: 12px; }
.rec { padding: 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pill.alta { background: var(--amber-soft); color: #8a5207; }
.pill.media { background: var(--teal-soft); color: #0b5a4f; }
.pill.baixa { background: var(--line-2); color: var(--muted); }
.rec h3 { margin: 8px 0 6px; font-size: 16px; font-weight: 600; }
.rec p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.rec .cov { font-size: 12.5px; color: var(--muted); }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-2); align-items: flex-start; }
.steps i { flex: none; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; font-style: normal; font-size: 10px; font-weight: 700; }
.steps i.ok { background: var(--teal); color: #fff; }
.steps i.wait { background: var(--line); color: var(--muted); }
.alert { margin-top: 10px; font-size: 12.5px; color: #7a4a08; }

.adjust { display: grid; gap: 16px; }
.adjust label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.adjust .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.range-row { display: flex; gap: 12px; align-items: center; }
.range-row output { min-width: 64px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
input[type="range"] { flex: 1; accent-color: var(--teal); height: 28px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.switch span { font-size: 14px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--teal); }
.switch input:checked::after { transform: translateX(18px); }
.updating { opacity: .55; transition: opacity .2s; }

.list { margin: 0; padding: 0 0 0 18px; color: var(--ink-2); font-size: 13.5px; }
.list li { margin-bottom: 6px; }
.cta-card {
  color: #fff; text-align: left;
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(67, 229, 198, .22), transparent 60%),
    linear-gradient(150deg, var(--navy-700), var(--navy-900));
}
.cta-card h2 { color: #fff; }
.cta-card p { color: #c5d1e3; margin: 6px 0 16px; font-size: 14.5px; }
.cta-actions { display: grid; gap: 8px; }
.cta-actions .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); z-index: 60;
  transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px;
  background: var(--navy-900); color: #fff; font-size: 14px;
  box-shadow: var(--shadow-3);
  animation: rise .3s var(--ease) both;
  max-width: calc(100% - 32px);
}

.only-mobile { display: inline-flex; }
@media (max-width: 440px) { .topbar-actions .btn-label { display: none; } .brand-name { font-size: 14.5px; } }

/* ---------- Telas médias e grandes ---------- */
@media (min-width: 720px) {
  .compare { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .dx { margin-left: 40px; }
  .dx-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dx-stat.feature { grid-column: auto; order: 0; }
  .dx-stat.feature b { font-size: inherit; }
  .hero { padding: 18px 32px 30px; }
  .log { padding: 22px 26px 12px; }
  .composer-wrap { padding: 6px 24px calc(14px + var(--safe-b)); }
  .progress { padding: 16px 26px 12px; }
  .r-wrap { padding: 0 24px; }
  .life { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .app {
    background:
      radial-gradient(1200px 520px at 80% -10%, rgba(67, 229, 198, .14), transparent 60%),
      radial-gradient(900px 480px at 0% 0%, rgba(36, 65, 111, .85), transparent 70%),
      linear-gradient(180deg, var(--navy-900) 0, var(--navy-900) 340px, var(--bg) 340px);
  }
  .topbar { height: 68px; padding: 0 32px; max-width: 1240px; width: 100%; margin: 0 auto; }
  .stage { max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 32px 24px; }
  .hero { padding: 18px 0 30px; display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 40px; align-items: end; }
  .hero .eyebrow, .hero h1 { grid-column: 1; }
  .hero .eyebrow { justify-self: start; }
  .hero h1 { margin-bottom: 0; max-width: 18ch; }
  .lede { grid-column: 2; grid-row: 2; margin: 0 0 10px; }
  .ai-note { grid-column: 2; grid-row: 3; }
  .app.started .hero { max-height: 420px; opacity: 1; padding: 6px 0 22px; }
  .app.started .hero h1 { font-size: 30px; }
  .app.started .lede, .app.started .eyebrow { display: none; }
  .app.started .ai-note { grid-row: 1; align-self: end; }
  .workspace { gap: 24px; }
  .chat { border-radius: 26px; box-shadow: var(--shadow-3); overflow: hidden; }
  .insight {
    position: sticky; top: 0; transform: none;
    flex: none; width: 340px; max-height: 100%;
    border-radius: 26px; box-shadow: var(--shadow-2);
    padding: 22px;
    align-self: stretch;
  }
  .only-mobile { display: none; }
  #btnReview { display: none; }
  .scrim { display: none; }
  .bubble { font-size: 15.5px; }
  .r-cards { grid-template-columns: 1fr 1fr; }
  .r-cards .span-2 { grid-column: span 2; }
}

/* ---------- Animações ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(67, 229, 198, .55); } 70% { box-shadow: 0 0 0 8px rgba(67, 229, 198, 0); } 100% { box-shadow: 0 0 0 0 rgba(67, 229, 198, 0); } }
@keyframes flash { 0% { background: var(--teal-soft); } 100% { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .stage, .report-bar, .toast { display: none !important; }
  .report { position: static; }
}

/* Abertura e conversa */
.app:not(.started) { background: radial-gradient(circle at 78% 28%, #173f4e 0, transparent 36%), linear-gradient(145deg, #08162c, #112a46); }
.app:not(.started) .workspace, .app:not(.started) #btnReview, .app:not(.started) #btnReport { display: none; }
.app:not(.started) .stage { overflow-y: auto; }
.app:not(.started) .hero { max-height: none; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 38px; padding: 36px 24px 48px; overflow: visible; }
.hero-content { max-width: 720px; }
.app:not(.started) .hero h1 { max-width: 15ch; font-size: clamp(37px, 6vw, 68px); line-height: 1.08; margin: 0 0 22px; }
.app:not(.started) .lede { max-width: 52ch; color: #d0dce8; font-size: clamp(16px, 2vw, 19px); line-height: 1.65; margin-bottom: 26px; }
.start-button { border: 0; border-radius: 12px; background: #43e5c6; color: #09243a; padding: 16px 22px; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.start-button span { margin-left: 18px; font-size: 20px; }
.start-button:hover { background: #83f1dc; }
.hero-footnote { color: #b5c7d7; font-size: 13px; margin: 18px 0 0; }
.hero-card { border: 1px solid rgba(180,245,230,.24); background: rgba(255,255,255,.06); border-radius: 24px; padding: 28px; max-width: 390px; box-shadow: 0 24px 60px rgba(0,0,0,.14); }
.hero-card-top { display:flex; align-items:center; gap:12px; color:#a9e9da; font-size:11px; font-weight:600; letter-spacing:.12em; }
.hero-card-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:14px; background:rgba(67,229,198,.15); color:#69efd4; font-size:21px; }
.hero-card p { font-family:var(--display); font-size:24px; line-height:1.3; margin:30px 0 24px; }
.hero-card-line { height:1px; background:rgba(255,255,255,.16); margin-bottom:16px; }
.hero-card small { color:#b5c7d7; }
.app.started .hero { display:none; }
.chat-header { display:flex; align-items:center; gap:12px; padding:14px 18px; background:#fff; border-bottom:1px solid var(--line); border-radius:24px 24px 0 0; }
.chat-header-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:var(--navy-800); color:var(--teal-glow); font-family:var(--display); font-weight:700; }
.chat-header strong, .chat-header span { display:block; }
.chat-header strong { font-size:15px; }
.chat-header span { font-size:12px; color:var(--muted); }
.avatar { border-radius:50%; }
.log { background:#edf2f3; }
@media (min-width: 1024px) {
  .app:not(.started) .hero { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr); align-items:center; gap:80px; padding:48px 0 80px; }
  .app.started .hero { display:none; }
}
@media (max-height: 650px) and (max-width: 1023px) { .app:not(.started) .hero { justify-content:flex-start; } .hero-card { display:none; } }
