/* Antes do Play: visual de software (Geist, neutros zinco, roxo da marca). A calculadora é uma "janela de app". */
:root {
  --bg: #FFFFFF;
  --bg-2: #FAFAFA;
  --surface: #FFFFFF;
  --ink: #27272A;
  --heading: #09090B;
  --muted: #71717A;
  --faint: #A1A1AA;
  --line: #E4E4E7;
  --line-2: #F0F0F2;
  --soft: #F4F4F5;
  --accent: #5B3DF5;
  --accent-2: #C026D3;
  --accent-ink: #FFFFFF;
  --accent-soft: #F1EEFF;
  --ring: rgb(91 61 245 / .22);
  --solid: #09090B;
  --solid-ink: #FFFFFF;
  --seg-on: #FFFFFF;
  --good: #047857; --good-soft: #ECFDF5; --good-line: #A7F3D0;
  --warn: #B45309; --warn-soft: #FFFBEB; --warn-line: #FDE68A;
  --bad: #DC2626; --bad-soft: #FEF2F2; --bad-line: #FECACA;
  --shadow-sm: 0 1px 2px rgb(9 9 11 / .05);
  --shadow: 0 1px 2px rgb(9 9 11 / .04), 0 24px 48px -24px rgb(9 9 11 / .18);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090B; --bg-2: #0C0C0E; --surface: #111113; --ink: #D4D4D8; --heading: #FAFAFA; --muted: #A1A1AA; --faint: #71717A;
    --line: #27272A; --line-2: #18181B; --soft: #1C1C1F; --accent: #9F8CFF; --accent-2: #E879F9; --accent-ink: #0B0614;
    --accent-soft: rgb(159 140 255 / .12); --ring: rgb(159 140 255 / .3); --solid: #FAFAFA; --solid-ink: #09090B; --seg-on: #27272A;
    --good: #34D399; --good-soft: rgb(52 211 153 / .1); --good-line: rgb(52 211 153 / .3);
    --warn: #FBBF24; --warn-soft: rgb(251 191 36 / .1); --warn-line: rgb(251 191 36 / .3);
    --bad: #F87171; --bad-soft: rgb(248 113 113 / .1); --bad-line: rgb(248 113 113 / .3);
    --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / .02), 0 30px 60px -30px rgb(0 0 0 / .9); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090B; --bg-2: #0C0C0E; --surface: #111113; --ink: #D4D4D8; --heading: #FAFAFA; --muted: #A1A1AA; --faint: #71717A;
  --line: #27272A; --line-2: #18181B; --soft: #1C1C1F; --accent: #9F8CFF; --accent-2: #E879F9; --accent-ink: #0B0614;
  --accent-soft: rgb(159 140 255 / .12); --ring: rgb(159 140 255 / .3); --solid: #FAFAFA; --solid-ink: #09090B; --seg-on: #27272A;
  --good: #34D399; --good-soft: rgb(52 211 153 / .1); --good-line: rgb(52 211 153 / .3);
  --warn: #FBBF24; --warn-soft: rgb(251 191 36 / .1); --warn-line: rgb(251 191 36 / .3);
  --bad: #F87171; --bad-soft: rgb(248 113 113 / .1); --bad-line: rgb(248 113 113 / .3);
  --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / .02), 0 30px 60px -30px rgb(0 0 0 / .9); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3 { color: var(--heading); margin: 0; line-height: 1.1; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.label { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.muted { color: var(--muted); }
.note-sm { font-size: 13px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--heading);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.solid { background: var(--solid); color: var(--solid-ink); border-color: var(--solid); }
.btn.solid:hover { opacity: .88; background: var(--solid); }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.icon-only { width: 36px; padding: 0; }
.btn.full { width: 100%; }

/* Topo */
.top {
  position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1200px; margin: 0 auto; height: 60px; display: flex; align-items: center; gap: 24px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; font-weight: 600; font-size: 15.5px; letter-spacing: -0.02em; white-space: nowrap; }
.logo { width: 28px; height: 28px; flex: none; }
.logo .lg-bg { fill: #5B3DF5; }
.logo .lg-paper { fill: #FFFFFF; }
.logo .lg-play { fill: #5B3DF5; stroke: #5B3DF5; }
.nav { display: none; gap: 4px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--heading); background: var(--soft); }
.top-actions { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } .top-actions { margin-left: 0; } }
@media (max-width: 560px) { #shareBtn span { display: none; } #shareBtn { width: 36px; padding: 0; } }
@media (max-width: 380px) { #installBtn span { display: none; } #installBtn { width: 36px; padding: 0; } }

/* Abertura */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-2); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center -1px; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; left: 50%; top: -220px; width: min(1100px, 140vw); height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent) 55%, transparent);
  pointer-events: none; filter: blur(10px);
}
.hero-in {
  position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; display: grid; justify-items: center; gap: 22px;
  padding: 72px max(16px, env(safe-area-inset-right, 0px)) 72px max(16px, env(safe-area-inset-left, 0px));
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; text-decoration: none; box-shadow: var(--shadow-sm);
}
.pill-tag { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.hero h1 { font-size: clamp(2.6rem, 7.6vw, 4.9rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; max-width: 13ch; }
.grad { background: linear-gradient(95deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.lede { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); max-width: 58ch; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.trust { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 13.5px; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 16px; height: 16px; color: var(--good); }

/* Estrutura */
.wrap {
  max-width: 1200px; margin: 0 auto; display: grid; gap: 104px;
  padding: 48px max(16px, env(safe-area-inset-right, 0px)) 120px max(16px, env(safe-area-inset-left, 0px));
}

/* Janela da calculadora */
.app { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.app-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); border-radius: 18px 18px 0 0;
}
.app-title { display: flex; align-items: center; gap: 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; }
.dots i:nth-child(3) { background: #28C840; }
.presets, .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.presets button, .seg button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color .15s, color .15s;
}
.presets button:hover, .seg button:hover { color: var(--heading); }
.presets button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--heading); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--line); }
.seg button { height: 26px; padding: 0 10px; font-size: 12.5px; }
@media (max-width: 560px) {
  .app-title { display: none; }
  .app-bar { padding: 10px; }
  .presets { width: 100%; }
  .presets button { flex: 1; }
}

.app-body { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .app-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); } }
.inputs { padding: 20px; display: grid; gap: 22px; align-content: start; }
@media (min-width: 980px) { .inputs { padding: 24px; } }
.group { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.group + .group { border-top: 1px solid var(--line); padding-top: 20px; }
.group legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.group legend + .fields { clear: both; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; align-content: start; }
.field.span2 { grid-column: 1 / -1; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 20px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.25; }
.help {
  flex: none; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--faint); font-size: 10.5px; font-weight: 600; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.help:hover { color: var(--heading); border-color: var(--faint); }
.help[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.input {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: color-mix(in srgb, var(--faint) 60%, var(--line)); }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.input input, .input select {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--heading);
  font-family: var(--sans); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.input select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.input.select::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); pointer-events: none; }
.input select option { background: var(--surface); color: var(--heading); }
.pre, .suf { font-size: 13px; color: var(--faint); font-weight: 500; }
.hint { font-size: 13px; line-height: 1.5; color: var(--ink); background: var(--accent-soft); border-radius: 8px; padding: 9px 11px; }

/* Resultado */
.result { min-width: 0; padding: 20px; display: grid; gap: 16px; align-content: start; background: var(--bg-2); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; }
@media (min-width: 980px) {
  .result { border-top: 0; border-left: 1px solid var(--line); border-radius: 0 0 18px 0; padding: 24px; position: sticky; top: 61px; align-self: start; }
}
.r-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.r-main { display: grid; gap: 2px; min-width: 0; }
.kpi-xl { font-size: clamp(2.3rem, 6vw, 3.2rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-xl.pos { color: var(--good); }
.kpi-xl.neg { color: var(--bad); }
.status {
  display: inline-flex; align-items: center; gap: 7px; flex: none; white-space: nowrap;
  height: 28px; padding: 0 11px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.status.good { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.status.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.status.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.bar { display: grid; gap: 8px; }
.track { position: relative; height: 8px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: var(--good); transition: width .3s cubic-bezier(.2,.8,.2,1), background-color .3s; }
.fill.warn { background: var(--warn); }
.fill.bad { background: var(--bad); }
.mark { position: absolute; top: -1px; bottom: -1px; left: calc(100% / 1.5); width: 2px; background: var(--heading); opacity: .5; }
.bar-legend { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis > div { display: grid; gap: 2px; min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.kpis .label { font-size: 12.5px; }
.kpis b { font-size: clamp(1rem, 3.6vw, 1.3rem); font-weight: 600; letter-spacing: -0.03em; color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis b.pos { color: var(--good); }
.kpis b.neg { color: var(--bad); }
.reading { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 16px 6px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); }
.panel-head .label { font-size: 13.5px; color: var(--heading); font-weight: 600; }
.ledger, .lines { display: grid; }
.ledger .l, .lines .l { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; font-size: 14px; border-top: 1px dashed var(--line); }
.ledger .l:first-child, .lines .l:first-child { border-top: 0; }
.l .v { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--heading); white-space: nowrap; letter-spacing: -0.02em; }
.l .d { display: block; font-size: 12.5px; color: var(--muted); }
.ledger .minus .v { color: var(--muted); }
.ledger .plus .v { color: var(--heading); }
.ledger .total { border-top: 1px solid var(--heading); font-weight: 600; color: var(--heading); }
.ledger .total .v { font-weight: 500; font-size: 14.5px; }
.ledger .total.pos .v { color: var(--good); }
.ledger .total.neg .v { color: var(--bad); }

/* Seções */
.sec { display: grid; gap: 28px; min-width: 0; }
.sec-head { display: grid; gap: 10px; max-width: 640px; }
.eyebrow { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.sec-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.04em; }
.sec-head p { color: var(--muted); font-size: 16px; }
.sec.two { grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 860px) { .sec.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 24px; display: grid; gap: 12px; align-content: start; min-width: 0; box-shadow: var(--shadow-sm); }
.card h2 { font-size: 1.4rem; letter-spacing: -0.03em; margin-bottom: 4px; }

.scen { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .scen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sc {
  text-align: left; cursor: pointer; display: grid; gap: 10px; padding: 20px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sc:hover { border-color: color-mix(in srgb, var(--faint) 60%, var(--line)); transform: translateY(-1px); }
.sc[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc h3 { font-size: 16px; letter-spacing: -0.02em; }
.sc .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: -0.02em; }
.sc-num { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.1; }
.sc-num.pos { color: var(--good); }
.sc-num.neg { color: var(--bad); }
.sc .small { font-size: 13px; }
.sc .status { height: 24px; font-size: 12px; padding: 0 9px; }

.goal { margin-top: 4px; }
.goal .input { max-width: 260px; }
.goal-out { display: grid; gap: 10px; font-size: 15px; }
.goal-out .ans { font-size: 16px; color: var(--heading); }
.goal-out b { color: var(--heading); font-weight: 600; }
.goal-out .small { font-size: 13px; }
.rules { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; font-size: 14.5px; }
.rules li::before {
  content: counter(r); width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; color: var(--heading); background: var(--soft); border: 1px solid var(--line);
}
.rules b { font-family: var(--mono); font-weight: 500; font-size: 13.5px; color: var(--heading); white-space: nowrap; }

/* Tabela de checkouts */
.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.co-table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 14px; }
.co-table th, .co-table td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.co-table thead th { border-top: 0; background: var(--bg-2); font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; padding-block: 11px; }
.co-table tbody tr:hover td, .co-table tbody tr:hover th { background: var(--bg-2); }
.co-table th[scope="row"] { position: sticky; left: 0; z-index: 1; min-width: 140px; background: var(--surface); color: var(--heading); font-weight: 600; }
.co-table tbody tr.on th, .co-table tbody tr.on td { background: var(--accent-soft); }
.co-table .fee { font-family: var(--mono); font-size: 13.5px; color: var(--heading); white-space: nowrap; letter-spacing: -0.02em; }
.co-table .small { font-size: 12.5px; }
.co-table .src { display: block; width: fit-content; margin-top: 4px; font-size: 12.5px; font-weight: 500; }
.co-table .conf { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 99px; }
.use {
  height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--heading);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.use:hover { background: var(--soft); }
tr.on .use { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Perguntas */
.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: 16px; font-weight: 500; color: var(--heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 18px; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 70ch; }
.faq details p b { color: var(--heading); font-weight: 600; }

/* Rodapé */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-in {
  max-width: 1200px; margin: 0 auto; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted);
  padding: 32px max(16px, env(safe-area-inset-right, 0px)) calc(110px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--heading); font-weight: 600; margin-bottom: 4px; }
.foot-brand .logo { width: 22px; height: 22px; }
@media (min-width: 980px) { .foot-in { padding-bottom: 40px; } }

/* Barra fixa no celular */
.dock {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px;
  border-radius: 16px; background: var(--solid); color: var(--solid-ink); box-shadow: 0 16px 40px -12px rgb(0 0 0 / .45);
  transition: transform .25s ease, opacity .25s ease;
}
.dock.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }
.dock .status { height: 24px; font-size: 12px; padding: 0 9px; }
.dock-num { display: grid; line-height: 1.15; margin-right: auto; min-width: 0; }
.dock-num small { font-size: 11px; opacity: .65; font-weight: 500; }
.dock-num b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.02em; }
.dock-btn { background: var(--accent); color: #fff; text-decoration: none; font-weight: 500; font-size: 13.5px; padding: 9px 12px; border-radius: 10px; white-space: nowrap; }
@media (min-width: 980px) { .dock { display: none; } }

/* Aviso e janela */
.toast {
  position: fixed; z-index: 40; left: 50%; top: calc(72px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -12px);
  background: var(--solid); color: var(--solid-ink); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); box-shadow: 0 12px 32px -12px rgb(0 0 0 / .4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet { border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 380px; width: calc(100vw - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sheet::backdrop { background: rgb(0 0 0 / .5); backdrop-filter: blur(2px); }
.sheet h2 { font-size: 1.25rem; margin-bottom: 12px; letter-spacing: -0.02em; }
.sheet ol { padding-left: 1.2em; margin: 0 0 18px; display: grid; gap: 6px; }

@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .kpis > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; }
  .kpis > div:first-child { border-top: 0; }
  .kpis .label { font-size: 14px; }
  .kpis b { font-size: 1.1rem; }
}
@media (max-width: 340px) { .fields { grid-template-columns: minmax(0, 1fr); } }
