/* BMOS DL v3 — fonte única de tokens e componentes para landing, painel, checkout e /kit.
   Regras: nenhum hex fora deste bloco :root; toda animação nasce de mudança de estado; reduced-motion mostra o quadro final.
   Inspirado nas regras do National Design Studio ("animation is communication, not decoration"; "clear enough to finish on the first try"). */

:root {
  /* cor — identidade: ameixa + orquídea (BRIEF), tinta e papel */
  --bm-ink: #1d1622; --bm-ink-2: #3a2f40; --bm-sub: #5f5566; --bm-faint: #8c8392;
  --bm-line: #e6dcea; --bm-line-2: #d9cddd; --bm-soft: #f3eef5; --bm-paper: #fbf9fc; --bm-card: #ffffff;
  --bm-plum: #4b2352; --bm-plum-2: #341739; --bm-orchid: #a24b9d; --bm-orchid-ink: #7d3579;
  --bm-lilac: #f5eef6; --bm-lilac-line: #e3d0e5; --bm-cream: #f7f2ea;
  --bm-ok: #1f7a55; --bm-ok-wash: #e6f4ee; --bm-ok-line: #b9e0cd;
  --bm-warn: #8a5d0c; --bm-warn-wash: #fbf1dc; --bm-warn-line: #ecd6a6;
  --bm-bad: #b3261e; --bm-bad-wash: #fbe9e7; --bm-bad-line: #f1c4bf;
  --bm-info: #2f5d9e; --bm-info-wash: #e9f0fa;
  --bm-on-dark: #fbf9fc; --bm-on-dark-sub: #c9bccf; --bm-dark: #160f19; --bm-dark-2: #221726; --bm-dark-line: #3a2c40;
  --bm-scrim: rgba(22, 15, 25, .42);
  --bm-white: #ffffff; --bm-term-k: #e2a6dc; --bm-term-s: #b9e0cd; --bm-term-n: #f3d08a; --bm-term-c: #8f8196;

  /* tipo — Instrument Serif (títulos), Geist (UI), Geist Mono (dados) */
  --bm-font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --bm-font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bm-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* espaço — grade de 4 pt */
  --bm-s1: 4px; --bm-s2: 8px; --bm-s3: 12px; --bm-s4: 16px; --bm-s5: 24px; --bm-s6: 32px; --bm-s7: 48px; --bm-s8: 64px; --bm-s9: 96px;
  /* raio */
  --bm-r1: 6px; --bm-r2: 10px; --bm-r3: 16px; --bm-r4: 24px; --bm-pill: 999px;
  /* sombra — tinta ameixa, nunca preto puro */
  --bm-sh1: 0 1px 2px rgba(29, 22, 34, .05), 0 1px 1px rgba(29, 22, 34, .03);
  --bm-sh2: 0 1px 2px rgba(29, 22, 34, .04), 0 8px 24px rgba(75, 35, 82, .08);
  --bm-sh3: 0 2px 6px rgba(29, 22, 34, .06), 0 24px 64px rgba(75, 35, 82, .18);
  /* movimento — curvas tiradas dos sites do NDS */
  --bm-d1: 120ms; --bm-d2: 200ms; --bm-d3: 320ms; --bm-d4: 480ms; --bm-d5: 800ms;
  --bm-ease-out: cubic-bezier(.16, 1, .3, 1);
  --bm-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --bm-ease: cubic-bezier(.215, .61, .355, 1);
  --bm-ease-in: cubic-bezier(.4, 0, 1, 1);
  --bm-focus: 0 0 0 3px rgba(162, 75, 157, .35);
  --bm-wrap: 1200px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bm-ink: #f4eef6; --bm-ink-2: #e4d9e8; --bm-sub: #b9abbf; --bm-faint: var(--bm-term-c);
  --bm-line: #34283a; --bm-line-2: #45364c; --bm-soft: #241a28; --bm-paper: #160f19; --bm-card: #1d1421;
  --bm-lilac: #2a1d2e; --bm-lilac-line: #4a3350; --bm-orchid-ink: var(--bm-term-k);
  --bm-ok: #5cc596; --bm-ok-wash: #14271f; --bm-ok-line: #285a43;
  --bm-warn: #e2b45a; --bm-warn-wash: #2a2111; --bm-warn-line: #5a4520;
  --bm-bad: #f08a80; --bm-bad-wash: #2c1513; --bm-bad-line: #5e2a25;
  --bm-info: #8fb4ea; --bm-info-wash: #18222f;
  --bm-sh1: 0 1px 2px rgba(0, 0, 0, .3); --bm-sh2: 0 8px 24px rgba(0, 0, 0, .35); --bm-sh3: 0 24px 64px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bm-paper); color: var(--bm-ink); font: 400 15px/1.55 var(--bm-font); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01', 'cv11'; }
img, svg, video { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--bm-focus); border-radius: var(--bm-r1); }
::selection { background: var(--bm-lilac-line); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--bm-ink); color: var(--bm-paper); padding: 8px 12px; border-radius: var(--bm-r1); }
.skip:focus { left: 8px; }

/* ---------- tipo ---------- */
.d1, .d2, .d3, .d4 { font-family: var(--bm-font-display); font-weight: 400; letter-spacing: -.035em; line-height: .95; margin: 0; }
.d1 { font-size: clamp(52px, 7.4vw, 104px); letter-spacing: -.045em; }
.d2 { font-size: clamp(44px, 5.6vw, 76px); }
.d3 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1; }
.d4 { font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -.02em; }
.d1 em, .d2 em, .d3 em, .d4 em { font-style: italic; color: var(--bm-orchid); }
h1, .h1 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2, .h2 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; margin: 0; }
h3, .h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h4, .h4 { font-size: 15px; line-height: 1.35; font-weight: 600; margin: 0; }
p { margin: 0; }
.lead { font-size: 19px; line-height: 1.5; color: var(--bm-sub); max-width: 34em; }
.sub { color: var(--bm-sub); }
.muted { color: var(--bm-sub); }
.faint { color: var(--bm-faint); }
.sm { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: var(--bm-mono); font-feature-settings: 'zero'; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--bm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bm-orchid-ink); }
.roman { font-family: var(--bm-font-display); font-size: 28px; line-height: 1; color: var(--bm-orchid); letter-spacing: 0; text-transform: none; }
.link { color: var(--bm-orchid-ink); text-decoration: underline; text-decoration-color: var(--bm-lilac-line); text-underline-offset: 3px; transition: text-decoration-color var(--bm-d2) var(--bm-ease); }
.link:hover { text-decoration-color: currentColor; }
.ext::after { content: ' ↗'; font-size: .9em; }
code, .code { font-family: var(--bm-mono); font-size: 13px; background: var(--bm-soft); border: 1px solid var(--bm-line); border-radius: var(--bm-r1); padding: 1px 6px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--bm-wrap); margin: 0 auto; padding: 0 var(--bm-s6); }
@media (max-width: 720px) { .wrap { padding: 0 var(--bm-s4); } }
.row { display: flex; align-items: center; gap: var(--bm-s3); }
.row.wrapr { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--bm-s3); }
.stack.s1 { gap: var(--bm-s1); } .stack.s2 { gap: var(--bm-s2); } .stack.s4 { gap: var(--bm-s4); } .stack.s5 { gap: var(--bm-s5); } .stack.s6 { gap: var(--bm-s6); }
.grow { flex: 1 1 auto; }
.between { justify-content: space-between; }
.hr { height: 1px; background: var(--bm-line); border: 0; margin: var(--bm-s5) 0; }

/* ---------- emoji 3D e marcas ---------- */
.e3d { display: inline-block; flex: none; vertical-align: middle; object-fit: contain; image-rendering: auto; }
.e3d.tile { padding: 6px; background: var(--bm-lilac); border-radius: 28%; box-shadow: inset 0 0 0 1px var(--bm-lilac-line); }
.mk { display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; line-height: 0; }
.mk svg { display: block; }
.mk.tile { background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: 28%; padding: 6px; box-shadow: var(--bm-sh1); }
.agent { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.agent .mk { width: auto; }
.agents-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bm-s2) var(--bm-s4); }

/* ---------- botões ---------- */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 18px; border-radius: var(--bm-r2); border: 1px solid transparent; font-weight: 600; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform var(--bm-d1) var(--bm-ease), background-color var(--bm-d2) var(--bm-ease), border-color var(--bm-d2) var(--bm-ease), box-shadow var(--bm-d2) var(--bm-ease), color var(--bm-d2) var(--bm-ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--bm-plum); color: var(--bm-white); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, var(--bm-sh1); }
.btn-primary:hover { background: var(--bm-plum-2); }
.btn-secondary { background: var(--bm-card); color: var(--bm-ink); border-color: var(--bm-line-2); }
.btn-secondary:hover { border-color: var(--bm-faint); }
.btn-ghost { background: transparent; color: var(--bm-ink); }
.btn-ghost:hover { background: var(--bm-soft); }
.btn-orchid { background: var(--bm-orchid); color: var(--bm-white); }
.btn-orchid:hover { background: var(--bm-orchid-ink); }
.btn-danger { background: var(--bm-card); color: var(--bm-bad); border-color: var(--bm-bad-line); }
.btn-sm { --h: 34px; padding: 0 12px; font-size: 13.5px; border-radius: var(--bm-r1); }
.btn-lg { --h: 54px; padding: 0 24px; font-size: 16px; border-radius: var(--bm-r2); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.busy { pointer-events: none; color: transparent !important; position: relative; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .25) rgba(255, 255, 255, .25); animation: bm-spin .8s linear infinite; }
.btn-secondary.busy::after, .btn-ghost.busy::after { border-color: var(--bm-plum) var(--bm-line) var(--bm-line); }
.btn.done { background: var(--bm-ok); border-color: var(--bm-ok); color: var(--bm-white); }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--bm-r2); border: 1px solid transparent; background: transparent; cursor: pointer; transition: background var(--bm-d2) var(--bm-ease); }
.iconbtn:hover { background: var(--bm-soft); }

/* ---------- pílulas, chips, status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--bm-pill); font-size: 12.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--bm-line); background: var(--bm-card); color: var(--bm-sub); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.nodot::before { display: none; }
.pill.ok, .pill.live { color: var(--bm-ok); background: var(--bm-ok-wash); border-color: var(--bm-ok-line); }
.pill.live::before { animation: bm-live 2.4s var(--bm-ease) infinite; }
.pill.warn, .pill.review, .pill.sending { color: var(--bm-warn); background: var(--bm-warn-wash); border-color: var(--bm-warn-line); }
.pill.review::before { background: transparent; border: 2px solid currentColor; border-right-color: transparent; width: 9px; height: 9px; animation: bm-spin 1.2s linear infinite; }
.pill.sending::before { animation: bm-blink 1s steps(2) infinite; }
.pill.bad, .pill.error { color: var(--bm-bad); background: var(--bm-bad-wash); border-color: var(--bm-bad-line); }
.pill.off { color: var(--bm-faint); background: var(--bm-soft); }
.pill.off::before { background: transparent; border: 1.5px solid currentColor; }
.pill.coming { color: var(--bm-sub); background: transparent; border-style: dashed; }
.pill.coming::before { display: none; }
.pill.brand { color: var(--bm-orchid-ink); background: var(--bm-lilac); border-color: var(--bm-lilac-line); }
.pill.test { color: var(--bm-plum); background: var(--bm-lilac); border-color: var(--bm-lilac-line); font-family: var(--bm-mono); font-size: 11px; letter-spacing: .06em; }
.pill.test::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--bm-pill); border: 1px solid var(--bm-line-2); background: var(--bm-card); font-size: 13.5px; cursor: pointer; text-decoration: none; transition: border-color var(--bm-d2) var(--bm-ease), background var(--bm-d2) var(--bm-ease); }
.chip:hover { border-color: var(--bm-faint); }
.chip[aria-pressed="true"], .chip.on { background: var(--bm-ink); border-color: var(--bm-ink); color: var(--bm-paper); }
.chip .n { font-family: var(--bm-mono); font-size: 12px; opacity: .7; }
.issue { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.issue::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.issue.red { color: var(--bm-bad); } .issue.amber { color: var(--bm-warn); } .issue.okk { color: var(--bm-ok); } .issue.info { color: var(--bm-faint); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--bm-line-2); }
.dots i.on { background: var(--bm-ok); } .dots i.rev { background: var(--bm-warn); } .dots i.err { background: var(--bm-bad); }

/* ---------- superfícies ---------- */
.card { background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: var(--bm-r3); box-shadow: var(--bm-sh1); }
.card.pad { padding: var(--bm-s5); }
.card.raise { box-shadow: var(--bm-sh2); }
.panel { background: var(--bm-soft); border-radius: var(--bm-r3); padding: var(--bm-s5); }
.well { background: var(--bm-lilac); border: 1px solid var(--bm-lilac-line); border-radius: var(--bm-r3); padding: var(--bm-s4) var(--bm-s5); }
.dark { background: var(--bm-dark); color: var(--bm-on-dark); }
.dark .muted, .dark .sub { color: var(--bm-on-dark-sub); }
.term { background: var(--bm-dark); color: var(--bm-on-dark); border-radius: var(--bm-r3); font: 13px/1.6 var(--bm-mono); overflow: hidden; box-shadow: var(--bm-sh3); }
.term .th { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--bm-dark-line); color: var(--bm-on-dark-sub); font-size: 12px; }
.term .th i { width: 10px; height: 10px; border-radius: 50%; background: var(--bm-dark-line); }
.term pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; }
.term .k { color: var(--bm-term-k); } .term .s { color: var(--bm-term-s); } .term .n { color: var(--bm-term-n); } .term .c { color: var(--bm-term-c); }

/* ---------- tabela ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font: 500 12px/1.2 var(--bm-font); color: var(--bm-faint); padding: 10px 12px; border-bottom: 1px solid var(--bm-line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--bm-line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--bm-d1) var(--bm-ease); }
.tbl tbody tr:hover { background: var(--bm-paper); }
.tbl .r { text-align: right; }
.tbl .thumb { width: 40px; height: 40px; border-radius: var(--bm-r1); object-fit: cover; background: var(--bm-soft); border: 1px solid var(--bm-line); display: block; }
.tbl tr.sel { background: var(--bm-lilac); }
@media (max-width: 720px) {
  .tbl.stackm thead { display: none; }
  .tbl.stackm tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--bm-line); }
  .tbl.stackm td { border: 0; padding: 0; }
}

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13.5px; font-weight: 500; color: var(--bm-ink-2); }
.hint { font-size: 12.5px; color: var(--bm-faint); }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--bm-r2); border: 1px solid var(--bm-line-2); background: var(--bm-card); font-size: 15px; transition: border-color var(--bm-d2) var(--bm-ease), box-shadow var(--bm-d2) var(--bm-ease); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--bm-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--bm-orchid); box-shadow: var(--bm-focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--bm-bad); background: var(--bm-bad-wash); }
.err { font-size: 13px; color: var(--bm-bad); display: flex; gap: 6px; align-items: flex-start; }
.err:empty { display: none; }
.err::before { content: '!'; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--bm-bad); color: var(--bm-white); font: 700 11px/16px var(--bm-font); text-align: center; margin-top: 1px; }
.urlbar { display: flex; gap: 8px; padding: 6px; background: var(--bm-card); border: 1px solid var(--bm-line-2); border-radius: calc(var(--bm-r2) + 6px); box-shadow: var(--bm-sh2); transition: border-color var(--bm-d2) var(--bm-ease), box-shadow var(--bm-d2) var(--bm-ease); }
.urlbar:focus-within { border-color: var(--bm-orchid); box-shadow: var(--bm-focus), var(--bm-sh2); }
.urlbar .input { border: 0; box-shadow: none !important; background: transparent; font-size: 17px; }
@media (max-width: 560px) { .urlbar { flex-direction: column; } .urlbar .btn { width: 100%; } }
/* interruptor */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--bm-pill); background: var(--bm-line-2); transition: background var(--bm-d2) var(--bm-ease); }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bm-white); box-shadow: var(--bm-sh1); transition: transform var(--bm-d3) var(--bm-ease-spring); }
.switch input:checked + span { background: var(--bm-ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--bm-focus); }
/* opção em cartão (rádio) */
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--bm-line-2); border-radius: var(--bm-r2); background: var(--bm-card); cursor: pointer; transition: border-color var(--bm-d2) var(--bm-ease), background var(--bm-d2) var(--bm-ease); }
.opt:has(input:checked) { border-color: var(--bm-orchid); background: var(--bm-lilac); }
.opt input { accent-color: var(--bm-plum); margin-top: 3px; }

/* ---------- abas e segmentos ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bm-line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; color: var(--bm-sub); font-weight: 500; text-decoration: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--bm-d2) var(--bm-ease), border-color var(--bm-d2) var(--bm-ease); }
.tabs .on, .tabs [aria-selected="true"] { color: var(--bm-ink); border-bottom-color: var(--bm-plum); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bm-soft); border-radius: var(--bm-r2); border: 1px solid var(--bm-line); }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--bm-sub); cursor: pointer; text-decoration: none; transition: background var(--bm-d2) var(--bm-ease), color var(--bm-d2) var(--bm-ease); }
.seg .on, .seg [aria-pressed="true"] { background: var(--bm-card); color: var(--bm-ink); box-shadow: var(--bm-sh1); }

/* ---------- passos ---------- */
.steps { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--bm-faint); }
.steps i { width: 22px; height: 4px; border-radius: 2px; background: var(--bm-line-2); transition: background var(--bm-d3) var(--bm-ease), width var(--bm-d3) var(--bm-ease-out); }
.steps i.done { background: var(--bm-ok); }
.steps i.now { background: var(--bm-plum); width: 36px; }
.progress { height: 6px; border-radius: 3px; background: var(--bm-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--bm-plum), var(--bm-orchid)); border-radius: inherit; transition: width var(--bm-d4) var(--bm-ease-out); }

/* ---------- números ---------- */
.ribbon { display: flex; flex-wrap: wrap; gap: var(--bm-s5) var(--bm-s7); }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.stat b { font: 400 40px/1 var(--bm-font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--bm-sub); }
.spark { display: block; height: 28px; width: 96px; }
.spark path { fill: none; stroke: var(--bm-orchid); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bar { height: 8px; border-radius: 4px; background: var(--bm-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bm-plum); border-radius: inherit; transform-origin: left; animation: bm-grow var(--bm-d5) var(--bm-ease-out) both; }

/* ---------- estados ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: var(--bm-s7) var(--bm-s5); }
.empty .e3d { width: 72px; height: 72px; }
.empty p { color: var(--bm-sub); max-width: 32em; }
.sk { position: relative; overflow: hidden; background: var(--bm-soft); border-radius: var(--bm-r1); color: transparent !important; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: bm-shimmer 1.4s var(--bm-ease) infinite; }
.testbar { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 6px 12px; background: var(--bm-lilac); color: var(--bm-plum); font-size: 12.5px; border-bottom: 1px solid var(--bm-lilac-line); }
.testbar b { font: 600 11px/1 var(--bm-mono); letter-spacing: .08em; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--bm-r2); background: var(--bm-soft); font-size: 14px; }
.note.warn { background: var(--bm-warn-wash); color: var(--bm-warn); }
.note.bad { background: var(--bm-bad-wash); color: var(--bm-bad); }
.note.ok { background: var(--bm-ok-wash); color: var(--bm-ok); }

/* ---------- toast (pill-drop) ---------- */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--bm-pill); background: var(--bm-ink); color: var(--bm-paper); font-size: 14px; font-weight: 500; box-shadow: var(--bm-sh3); animation: bm-pill-drop var(--bm-d3) var(--bm-ease-spring) both; }
.toast .e3d { width: 22px; height: 22px; }
.toast.out { animation: bm-pill-up var(--bm-d2) var(--bm-ease-in) both; }

/* ---------- gaveta e diálogo (top layer) ---------- */
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); border: 0; padding: 0; background: var(--bm-card); color: var(--bm-ink); box-shadow: var(--bm-sh3); }
dialog.drawer[open] { animation: bm-drawer-in var(--bm-d3) var(--bm-ease-out) both; }
dialog.modal { border: 0; padding: 0; border-radius: var(--bm-r3); width: min(480px, calc(100vw - 32px)); background: var(--bm-card); color: var(--bm-ink); box-shadow: var(--bm-sh3); }
dialog.modal[open] { animation: bm-pop var(--bm-d3) var(--bm-ease-spring) both; }
dialog::backdrop { background: var(--bm-scrim); animation: bm-fade var(--bm-d2) var(--bm-ease) both; }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--bm-line); }
.dlg-b { padding: 20px; }

/* ---------- orbe do agente ---------- */
.orb { --o: 28px; position: relative; width: var(--o); height: var(--o); flex: none; border-radius: 50%; display: inline-block; vertical-align: middle;
  background: radial-gradient(circle at 34% 30%, var(--bm-white) 0 8%, rgba(255, 255, 255, 0) 30%), radial-gradient(circle at 50% 55%, var(--bm-orchid) 0 40%, var(--bm-plum) 72%, var(--bm-plum-2) 100%);
  box-shadow: inset 0 -3px 6px rgba(22, 15, 25, .35), inset 0 2px 4px rgba(255, 255, 255, .35), 0 4px 12px rgba(75, 35, 82, .25); }
.orb::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--bm-orchid); opacity: 0; }
.orb[data-state="idle"] { animation: bm-breathe 4s var(--bm-ease) infinite; }
.orb[data-state="listening"]::after { animation: bm-ring 1.2s var(--bm-ease-out) infinite; }
.orb[data-state="thinking"] { animation: bm-think 1.1s var(--bm-ease) infinite; }
.orb[data-state="thinking"]::after { opacity: .7; border-color: var(--bm-orchid) transparent transparent transparent; animation: bm-spin .9s linear infinite; }
.orb[data-state="talking"] { animation: bm-talk .5s var(--bm-ease) infinite alternate; }
.orb[data-state="error"] { filter: grayscale(.6); }
.orb.lg { --o: 64px; } .orb.xl { --o: 120px; } .orb.sm { --o: 20px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--bm-faint); animation: bm-typing 1.2s var(--bm-ease) infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }

/* ---------- fio (loja → agente) ---------- */
.wire path { fill: none; stroke: var(--bm-lilac-line); stroke-width: 2; }
.wire path.flow { stroke: var(--bm-orchid); stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
.wire.on path.flow { animation: bm-draw var(--bm-d4) var(--bm-ease-out) forwards; }
.wire circle.dot { fill: var(--bm-orchid); }

/* ---------- check que se desenha ---------- */
.checkmark { width: 56px; height: 56px; }
.checkmark circle { fill: var(--bm-ok-wash); stroke: var(--bm-ok); stroke-width: 2; }
.checkmark path { fill: none; stroke: var(--bm-ok); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: bm-draw var(--bm-d4) var(--bm-ease-out) .12s forwards; }

/* ---------- entrada (fade-blur do NDS) ---------- */
/* entrada: opacidade + 10 px para blocos; desfoque leve só em títulos (texto grande) — blur em bloco grande trava a GPU */
[data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity var(--bm-d4) var(--bm-ease), transform var(--bm-d4) var(--bm-ease-out); transition-delay: calc(min(var(--i, 0), 6) * 50ms); }
:is(.d1, .d2, .d3, .d4, h1, h2, .lead)[data-reveal] { filter: blur(5px); transition-property: opacity, transform, filter; }
[data-reveal].in { opacity: 1; filter: none; transform: none; }
.pop { animation: bm-pop var(--bm-d3) var(--bm-ease-spring) both; }
.bump { animation: bm-bump 550ms var(--bm-ease-spring); }
.fadein { animation: bm-fade-blur var(--bm-d3) var(--bm-ease) both; }

/* ---------- keyframes ---------- */
@keyframes bm-spin { to { transform: rotate(360deg); } }
@keyframes bm-blink { 50% { opacity: .25; } }
@keyframes bm-live { 50% { opacity: .35; transform: scale(.75); } } /* só opacidade e transform: não repinta */
@keyframes bm-fade { from { opacity: 0; } }
@keyframes bm-fade-blur { from { opacity: 0; filter: blur(4px); transform: translateY(4px); } }
@keyframes bm-pop { from { opacity: 0; transform: scale(.94) translateY(6px); } }
@keyframes bm-bump { 30% { transform: scale(1.22); } 60% { transform: scale(.94); } }
@keyframes bm-pill-drop { from { opacity: 0; transform: translateY(-24px) scale(.9); } }
@keyframes bm-pill-up { to { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes bm-drawer-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes bm-shimmer { to { transform: translateX(100%); } }
@keyframes bm-grow { from { transform: scaleX(0); } }
@keyframes bm-draw { to { stroke-dashoffset: 0; } }
@keyframes bm-breathe { 50% { transform: scale(1.05); } }
@keyframes bm-think { 50% { transform: scale(.92); filter: brightness(1.15); } }
@keyframes bm-talk { to { transform: scale(1.1); } }
@keyframes bm-ring { from { opacity: .8; transform: scale(.9); } to { opacity: 0; transform: scale(1.5); } }
@keyframes bm-typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- View Transitions ----------
   Entre páginas: barra do topo e menu ficam parados; só o conteúdo (main) faz um fade curto, sem desfoque.
   Dentro da página (bm.vt): a classe .vt-local desliga o fade do main e só anima o que tiver view-transition-name próprio. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
main#main { view-transition-name: bm-main; }
.atop { view-transition-name: bm-atop; } .aside { view-transition-name: bm-aside; } .mtop { view-transition-name: bm-mtop; } .mnavbar { view-transition-name: bm-mnav; }
::view-transition-group(bm-atop), ::view-transition-group(bm-aside), ::view-transition-group(bm-mtop), ::view-transition-group(bm-mnav) { animation: none; }
::view-transition-old(bm-atop), ::view-transition-old(bm-aside), ::view-transition-old(bm-mtop), ::view-transition-old(bm-mnav) { animation: none; opacity: 0; }
::view-transition-new(bm-atop), ::view-transition-new(bm-aside), ::view-transition-new(bm-mtop), ::view-transition-new(bm-mnav) { animation: none; }
::view-transition-group(bm-main) { animation: none; }
::view-transition-old(bm-main) { animation: bm-vt-out 120ms var(--bm-ease-in) both; }
::view-transition-new(bm-main) { animation: bm-vt-in 220ms var(--bm-ease-out) both; }
.vt-local::view-transition-old(bm-main), .vt-local::view-transition-new(bm-main) { animation: none; }
@keyframes bm-vt-out { to { opacity: 0; } }
@keyframes bm-vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- reduced motion: quadro final ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; filter: none; transform: none; }
  .wire path.flow { stroke-dashoffset: 0; }
  .checkmark path { stroke-dashoffset: 0; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- marketing ---------- */
.mtop { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bm-paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--bm-d2) var(--bm-ease), height var(--bm-d2) var(--bm-ease); }
.mtop.scrolled { border-bottom-color: var(--bm-line); }
.mtop .wrap { display: flex; align-items: center; gap: var(--bm-s5); height: 68px; transition: height var(--bm-d2) var(--bm-ease); }
.mtop.scrolled .wrap { height: 56px; }
.mtop nav { display: flex; gap: 2px; }
.mtop nav a { padding: 8px 12px; border-radius: var(--bm-r1); text-decoration: none; color: var(--bm-sub); font-size: 14.5px; font-weight: 500; transition: color var(--bm-d2) var(--bm-ease), background var(--bm-d2) var(--bm-ease); }
.mtop nav a:hover, .mtop nav a.on { color: var(--bm-ink); background: var(--bm-soft); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 17px; color: var(--bm-ink); }
.mfoot { border-top: 1px solid var(--bm-line); padding: var(--bm-s7) 0 var(--bm-s6); margin-top: var(--bm-s9); font-size: 14px; }
.mfoot a { color: var(--bm-sub); text-decoration: none; display: block; padding: 3px 0; }
.mfoot a:hover { color: var(--bm-ink); }
.fgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--bm-s5); }
.credits { margin-top: var(--bm-s6); padding-top: var(--bm-s4); border-top: 1px solid var(--bm-line); color: var(--bm-faint); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.menubtn { display: none; }
@media (max-width: 900px) {
  .mtop nav, .mtop .hide-m { display: none; }
  .menubtn { display: inline-grid; }
  .fgrid { grid-template-columns: 1fr 1fr; }
}
.section { padding: var(--bm-s9) 0; }
@media (max-width: 720px) { .section { padding: var(--bm-s8) 0; } }
.sechead { display: flex; flex-direction: column; gap: var(--bm-s3); margin-bottom: var(--bm-s7); max-width: 760px; }
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; }
@media (max-width: 720px) { .sticky-cta.show { display: block; animation: bm-pill-drop var(--bm-d3) var(--bm-ease-spring) both; } }

/* ---------- painel (shell) ---------- */
.appb { min-height: 100vh; }
.atop { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--bm-s3); height: 56px; padding: 0 var(--bm-s5); background: color-mix(in srgb, var(--bm-paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--bm-line); }
.storesw { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--bm-r2); border: 1px solid var(--bm-line); background: var(--bm-card); font-weight: 600; font-size: 14px; text-decoration: none; }
.search { display: flex; align-items: center; gap: 8px; width: 260px; height: 36px; padding: 0 12px; border-radius: var(--bm-r2); background: var(--bm-soft); border: 1px solid var(--bm-line); color: var(--bm-faint); font-size: 13.5px; }
.search kbd { margin-left: auto; font: 11px var(--bm-mono); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--bm-line-2); background: var(--bm-card); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bm-plum); color: var(--bm-white); font-weight: 600; font-size: 13px; border: 0; cursor: pointer; }
.alayout { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 56px); }
.aside { position: sticky; top: 56px; height: calc(100vh - 56px); display: flex; flex-direction: column; gap: 2px; padding: var(--bm-s4) var(--bm-s3); border-right: 1px solid var(--bm-line); overflow-y: auto; }
.aside a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--bm-r2); text-decoration: none; color: var(--bm-ink-2); font-size: 14.5px; font-weight: 500; transition: background var(--bm-d1) var(--bm-ease), color var(--bm-d1) var(--bm-ease); }
.aside a:hover { background: var(--bm-soft); }
.aside a.on { background: var(--bm-card); color: var(--bm-ink); box-shadow: var(--bm-sh1); border: 1px solid var(--bm-line); padding: 7px 9px; }
.aside a .e3d { width: 22px; height: 22px; }
.aside a .cnt { margin-left: auto; font: 500 11.5px var(--bm-mono); color: var(--bm-faint); }
.aside a .cnt.bad { color: var(--bm-bad); }
.aside .sep { height: 1px; background: var(--bm-line); margin: var(--bm-s3) 6px; }
.aside .minor a { font-size: 13.5px; color: var(--bm-sub); padding: 6px 10px; }
.amain { min-width: 0; padding: var(--bm-s6) var(--bm-s6) var(--bm-s9); max-width: 1240px; width: 100%; }
.pagehead { display: flex; align-items: flex-end; gap: var(--bm-s4); flex-wrap: wrap; margin-bottom: var(--bm-s6); }
.pagehead .grow { min-width: 200px; }
.mnavbar { display: none; }
@media (max-width: 900px) {
  .alayout { grid-template-columns: 1fr; }
  .aside, .search { display: none; }
  .amain { padding: var(--bm-s5) var(--bm-s4) 96px; }
  .atop { padding: 0 var(--bm-s4); }
  .mnavbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: color-mix(in srgb, var(--bm-paper) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--bm-line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mnavbar a, .mnavbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; min-height: 48px; justify-content: center; text-decoration: none; font-size: 11px; color: var(--bm-sub); background: none; border: 0; }
  .mnavbar .on { color: var(--bm-ink); font-weight: 600; }
  .mnavbar .e3d { width: 24px; height: 24px; }
}

/* ---------- shell no mobile: barra enxuta, TEST em faixa, alvos de 44 px ---------- */
.storesw .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtest { display: none; }
@media (max-width: 900px) {
  .atop { gap: 6px; }
  .atop .logo span { display: none; }
  .atop > .pill { display: none; }
  .mtest { display: flex; }
  .storesw { min-width: 0; max-width: 56vw; min-height: 44px; }
  .atop .iconbtn, .atop .avatar { width: 44px; height: 44px; }
  .mtop .logo { min-height: 44px; }
  .mtop .btn-sm { --h: 44px; }
}
@media (max-width: 720px) {
  .btn-sm { --h: 44px; }
  .atop .logo, .logo { min-height: 44px; }
}
