/* Frenum — controle de gastos
   Direção "ciano gelo": grafite frio à noite e uma luz ciano (a cor da logo), com um azul glacial
   como segunda luz. A cor aparece como luz e destaque, nunca como fundo de bloco.
   Tipografia: Bricolage Grotesque nos títulos (destaque na mesma família, em peso leve e na cor),
   Geist para interface e números tabulares, Geist Mono para cotações.
   Layout: barra superior fixa sobre uma coluna central de 1200px; cartões numa grade de 12 colunas
   que vira uma coluna abaixo de 900px; no celular as abas descem para uma barra flutuante na base. */
:root {
  --bg: #090c0d;
  --surface: #111517;
  --surface-2: #181d20;
  --surface-3: #242a2e;
  --line: rgba(215, 240, 245, .07);
  --line-2: rgba(215, 240, 245, .13);
  --fg: #eef5f6;
  --fg-2: #adbbbf;
  --muted: #86959a; /* 4,5:1 também sobre --surface-2 (era #74848a, 4,38:1) */
  --accent: #5edce8;
  --accent-2: #4f7cff;
  --logo-front-a: #d2f8fb; --logo-front-b: #5edce8; --logo-back-a: #0b4f58; --logo-back-b: #1b97a6;
  --edge: inset 0 1px 0 rgba(220, 245, 250, .05);
  --grain-opacity: .05;
  --accent-soft: rgba(94, 220, 232, .13);
  --pos: #3fd08f;
  --pos-soft: rgba(63, 208, 143, .12);
  --neg: #ff6b5e;
  --neg-soft: rgba(255, 107, 94, .12);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .13);
  --cta: #eef5f6;
  --cta-ink: #090c0d;
  --dot: rgba(215, 240, 245, .055);
  --glow: rgba(94, 220, 232, .08);
  --scrim: rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .75), 0 0 0 1px var(--line);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-xl: 26px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f0f3f4;
    --surface: #ffffff;
    --surface-2: #f3f6f7;
    --surface-3: #e1e7e9;
    --line: rgba(10, 30, 36, .08);
    --line-2: rgba(10, 30, 36, .14);
    --fg: #0f1719;
    --fg-2: #3e4c51;
    --muted: #637176; --edge: none; --grain-opacity: .035;
    --accent: #087886; --accent-2: #3559e0; --logo-front-a: #5edce8; --logo-front-b: #0a9fae; --logo-back-a: #05363d; --logo-back-b: #0b7380;
    --accent-soft: rgba(8, 124, 138, .1);
    --pos: #0c7c4d;
    --pos-soft: rgba(15, 154, 95, .1);
    --neg: #c73b30;
    --neg-soft: rgba(220, 67, 55, .09);
    --warn: #b87400;
    --warn-soft: rgba(194, 124, 0, .1);
    --cta: #0f1719;
    --cta-ink: #ffffff;
    --dot: rgba(10, 30, 36, .07);
    --glow: rgba(94, 220, 232, .2);
    --scrim: rgba(20, 20, 24, .42);
    --shadow-lg: 0 24px 50px -20px rgba(20, 20, 30, .28), 0 0 0 1px var(--line);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f0f3f4;
  --surface: #ffffff;
  --surface-2: #f3f6f7;
  --surface-3: #e1e7e9;
  --line: rgba(10, 30, 36, .08);
  --line-2: rgba(10, 30, 36, .14);
  --fg: #0f1719;
  --fg-2: #3e4c51;
  --muted: #637176; --edge: none; --grain-opacity: .035;
  --accent: #087886; --accent-2: #3559e0; --logo-front-a: #5edce8; --logo-front-b: #0a9fae; --logo-back-a: #05363d; --logo-back-b: #0b7380;
  --accent-soft: rgba(8, 124, 138, .1);
  --pos: #0c7c4d;
  --pos-soft: rgba(15, 154, 95, .1);
  --neg: #c73b30;
  --neg-soft: rgba(220, 67, 55, .09);
  --warn: #b87400;
  --warn-soft: rgba(194, 124, 0, .1);
  --cta: #0f1719;
  --cta-ink: #ffffff;
  --dot: rgba(10, 30, 36, .07);
  --glow: rgba(94, 220, 232, .2);
  --scrim: rgba(20, 20, 24, .42);
  --shadow-lg: 0 24px 50px -20px rgba(20, 20, 30, .28), 0 0 0 1px var(--line);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* Barras de rolagem: pílula fina e arredondada sobre trilho transparente, na mesma
   linguagem dos cartões. A borda transparente afasta a pílula das bordas do contêiner. */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--fg) 16%, transparent) padding-box;
  border: 3.5px solid transparent; border-radius: 999px; min-height: 44px;
}
@media (hover: hover) { ::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fg) 30%, transparent); } }
::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display: none; background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 18%, transparent) transparent; }
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pos-text { color: var(--pos); }
.neg-text { color: var(--neg); }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: -.01em; }
.num, .mono { font-variant-numeric: tabular-nums; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -.02em;
  text-wrap: balance;
  font-weight: 700;
}
p { margin: 0; }

.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at 10% -12%, var(--glow), transparent 70%),
    radial-gradient(var(--dot) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .25) 55%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, .25) 55%, transparent 90%);
}

/* ---------- Ticker ---------- */
.ticker {
  position: relative;
  height: 34px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-size: 12.5px;
}
.ticker::before, .ticker::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 1; pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee var(--dur, 70s) linear infinite;
}
.ticker.paused .ticker-track { animation-play-state: paused; }
@media (hover: hover) { .ticker:hover .ticker-track { animation-play-state: paused; } }
/* pausar/retomar a faixa por clique, toque ou teclado (o que se move sozinho precisa parar) */
.ticker-pause {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%; z-index: 2;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg-2); cursor: pointer;
}
@media (hover: hover) { .ticker-pause:hover { color: var(--fg); } }
.ticker-pause .ico { width: 12px; height: 12px; }
.ticker-group { display: flex; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 18px;
  white-space: nowrap; color: var(--muted);
}
.ticker-item b { color: var(--fg); font: 500 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.ticker-item em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker-item em.up { color: var(--pos); }
.ticker-item em.down { color: var(--neg); }
.ticker-item + .ticker-item { border-left: 1px solid var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  /* Fundo sólido: sem vidro fosco (o desfoque em tela cheia engasga a rolagem) e sem
     transparência (o texto que passa por baixo aparecia atrás do logo). */
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--fg);
}
.brand-mark { width: 30px; height: 30px; flex: none; overflow: visible; }
.brand-mark path { transition: transform .6s var(--spring), filter .4s var(--ease); }
@media (hover: hover) { .brand:hover .bm-top { transform: translateX(2px); } }
@media (hover: hover) { .brand:hover .bm-bot { transform: translateX(2px); } }
@media (hover: hover) { .brand:hover .bm-fold { filter: brightness(1.25); } }
.brand-word {
  font: 700 23px/1 var(--font-display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.055em;
  padding-bottom: 2px;
}

.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

/* ---------- Dock ----------
   Painel de vidro fosco flutuando embaixo. Os ícones são quadrados arredondados (a mesma forma dos
   ícones de categoria); --s é o tamanho que a mola do dock.js calcula pela distância do mouse.
   Os ícones crescem para cima, então o painel cresce junto sem empurrar a página. */
.dock {
  position: fixed; z-index: 50;
  left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  pointer-events: none;
}
.dock-panel {
  pointer-events: auto;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 9px 12px 12px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg), var(--edge);
}
.dock-item {
  position: relative; flex: none;
  display: flex; flex-direction: column; align-items: center;
  width: var(--s, 46px); height: var(--s, 46px);
  padding: 0; border: 0; background: none; color: var(--fg-2);
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dock-tile {
  position: relative;
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: 30%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: background-color .25s, color .25s, border-color .25s;
}
.dock-tile .ico { width: 44%; height: 44%; }
@media (hover: hover) { .dock-item:hover .dock-tile { color: var(--fg); border-color: var(--line-2); } }
.dock-item[aria-current="page"] { color: var(--accent); }
.dock-item[aria-current="page"] .dock-tile { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
/* ponto da seção atual, como no dock do macOS */
.dock-item[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: -8px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent);
  animation: dotIn .35s var(--ease) both;
}
@keyframes dotIn { from { transform: scale(0); } }
.dock-cta .dock-tile { background: var(--cta); color: var(--cta-ink); border-color: transparent; }
@media (hover: hover) { .dock-cta:hover .dock-tile { color: var(--cta-ink); background: color-mix(in srgb, var(--cta) 86%, var(--accent)); } }
.dock-sep { flex: none; align-self: stretch; width: 1px; margin: 6px 1px; background: var(--line-2); }
/* etiqueta acima do ícone, ao passar o mouse ou com o foco do teclado */
.dock-label {
  position: absolute; left: 50%; bottom: calc(100% + 12px);
  transform: translate(-50%, 4px) scale(.96);
  padding: 5px 9px; border-radius: 8px;
  background: #060808; color: #eef5f6; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6);
  font: 500 12px/1 var(--font-body); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .25s var(--ease);
}
.dock-item:focus-visible .dock-label { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (hover: hover) { .dock-item:hover .dock-label { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.dock-item:focus-visible { outline: none; }
.dock-item:focus-visible .dock-tile { outline: 2px solid var(--accent); outline-offset: 2px; }
.dock-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--neg); color: #fff;
  font: 700 10.5px/1 var(--font-body); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--surface);
}
.dock-badge.pop { animation: badgePop .5s cubic-bezier(.34, 1.56, .64, 1); }
.dock-label .l-short { display: none; }
@media (max-width: 760px) { .dock-label .l-long { display: none; } .dock-label .l-short { display: inline; } }
@keyframes badgePop { from { transform: scale(0); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  font: 500 14px var(--font-body);
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--spring), background-color .2s, border-color .2s, color .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .btn:hover { background: var(--surface-3); } }
.btn:active { transform: scale(.94); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--cta); color: var(--cta-ink); border-color: transparent; font-weight: 600; }
@media (hover: hover) { .btn-primary:hover { background: color-mix(in srgb, var(--cta) 86%, var(--accent)); } }
.btn-ghost { background: transparent; border-color: transparent; }
@media (hover: hover) { .btn-ghost:hover { background: var(--surface-2); } }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; }
.icon-btn { width: 40px; padding: 0; }
.icon-btn.btn-sm { width: 32px; }
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
.view {
  max-width: 1200px; margin: 0 auto;
  padding-top: 28px; padding-bottom: 130px; /* espaço para a dock */
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  outline: none;
}
.page { display: flex; flex-direction: column; gap: 18px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.page-title {
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1; letter-spacing: -.045em; font-weight: 700;
  font-variation-settings: "opsz" 96;
}
.page-title em, .label em { font-style: normal; }
/* destaque na mesma família: peso leve e a cor da marca */
.page-title em { font-weight: 300; color: var(--accent); letter-spacing: -.04em; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 6px;
  font-size: 12px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }
.col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  position: relative;
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.card-title { font: 650 16px/1.25 var(--font-display); letter-spacing: -.015em; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.label { font-size: 13px; font-weight: 500; color: var(--fg-2); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px;
}
.section-head h2 { font-size: 22px; letter-spacing: -.03em; }
.section-head p { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Entrada das páginas */
.reveal { animation: rise .65s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.no-reveal .reveal, .no-reveal .segbar, .no-reveal .inc-bar, .no-reveal .pace, .no-reveal .over-zone { animation: none; }
/* trocas de aba depois da primeira: a página só aparece, sem cascata */
.page-fade { animation: pageFade .15s ease-out both; }
@keyframes pageFade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* ---------- Pills, chips, badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2); color: var(--fg-2);
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill .ico { width: 13px; height: 13px; }
.pill.pos { background: var(--pos-soft); color: var(--pos); }
.pill.neg { background: var(--neg-soft); color: var(--neg); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-row.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: -2px; padding-inline: 2px; }
.chip-row.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg-2);
  font: 500 13px var(--font-body);
  white-space: nowrap; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--spring);
}
@media (hover: hover) { .chip:hover { color: var(--fg); border-color: var(--line-2); } }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--cta); color: var(--cta-ink); border-color: transparent; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.cat-ico {
  flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
  /* volta suave, sem passar do ponto; o efeito elástico fica só na entrada */
  transition: transform .3s var(--ease);
  /* fica sempre na própria camada: parado e animado são desenhados igual,
     então o ícone não "pula" meio pixel quando a animação termina */
  will-change: transform;
  backface-visibility: hidden;
}
.cat-ico .ico { width: 20px; height: 20px; }

.cur-badge {
  flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 18%, var(--surface-2));
  color: var(--c);
  font: 700 13px var(--font-display);
}

/* ---------- Segmented ---------- */
.seg {
  position: relative;
  display: inline-flex; padding: 4px; gap: 0;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg button {
  position: relative; z-index: 1;
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: none; color: var(--fg-2);
  font: 500 13px var(--font-body); cursor: pointer;
  transition: color .3s;
}
.seg button[aria-checked="true"] { color: var(--fg); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .45s var(--spring), width .45s var(--spring);
}
.seg.lg button { height: 40px; padding: 0 22px; font-size: 14px; font-weight: 600; }
.seg.lg { display: flex; }
.seg.lg button { flex: 1; }

/* ---------- Rolling counter ----------
   .rd é a caixa de cada algarismo, no fluxo do texto, com o dígito final (.rd-v) dentro: largura,
   linha de base e espaçamento são sempre os do número de verdade. Enquanto rola, o dígito fica
   transparente e a fita (.rd-s) passa por cima. A janela não corta seco: um degradê vertical faz
   os dígitos sumirem e surgirem nas bordas, como num odômetro. A caixa ganha .3em de sobra em
   cada lado (padding com margem negativa, sem mexer no layout) porque, com o espaçamento negativo
   dos números grandes, o desenho do dígito passa um pouco da própria caixa. */
.roll-wrap { display: inline-block; white-space: nowrap; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rd { position: relative; display: inline-block; transition: opacity .35s var(--ease); }
.rs { transition: opacity .35s var(--ease); }
.rd.lead, .rs.lead { opacity: .22; }
.rd.mv {
  padding: 0 .3em; margin: 0 -.3em;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 85%, transparent);
}
.rd.mv .rd-v { color: transparent; }
.rd-s { position: absolute; left: .3em; right: .3em; top: 0; display: flex; flex-direction: column; will-change: transform; pointer-events: none; }
.rd-s > span { display: block; height: 1.15em; }

/* Modo privado */
.sensitive { transition: filter .45s var(--ease), opacity .45s var(--ease); }
[data-private="true"] .sensitive { filter: blur(.42em); opacity: .8; user-select: none; }

/* ---------- Hero (saldo) ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(520px 240px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-amount {
  margin: 8px 0 18px;
  font: 750 clamp(38px, 5.2vw, 56px)/1.05 var(--font-display);
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.hero-amount.is-neg { color: var(--neg); }
.flows { display: flex; flex-wrap: wrap; gap: 8px; }
.flow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px; color: var(--fg-2);
}
.flow i {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
}
.flow i .ico { width: 14px; height: 14px; }
.flow.in i { background: var(--pos-soft); color: var(--pos); }
.flow.out i { background: var(--neg-soft); color: var(--neg); }
.flow b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--fg-2); max-width: 44ch; }

.hero-ring { position: relative; display: grid; place-items: center; }

/* Medidor em meia-lua (UI.gauge): mesma família de marcações do mostrador do saldo */
.gauge-box { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.gauge { position: relative; width: 216px; padding-bottom: 20px; cursor: crosshair; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.hint-touch { display: none; }
@media (hover: none) { .hint-hover { display: none; } .hint-touch { display: inline; } }
.gauge svg { display: block; overflow: visible; }
.gauge line {
  stroke: color-mix(in srgb, var(--fg) 14%, transparent); stroke-width: 2.4; stroke-linecap: round;
  transform-box: fill-box; transform-origin: center; transform: scale(var(--sw, 1));
  transition: transform .3s var(--spring);
}
.gauge line.major:not(.on) { stroke: color-mix(in srgb, var(--fg) 28%, transparent); }
.gauge line.on { stroke: color-mix(in srgb, var(--accent) var(--t), var(--accent-2)); animation: tickOn .7s var(--ease) both; animation-delay: calc(.3s + var(--k) * 26ms); }
.gauge line.head { stroke: var(--accent); stroke-width: 3.4; filter: drop-shadow(0 0 4px var(--accent)); }
.no-reveal .gauge line.on { animation: none; }
.gauge-read {
  position: absolute; left: 0; right: 0; bottom: 20px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.gauge-read > b { font: 600 32px/1 var(--font-num); letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--fg); }
.gauge-end { position: absolute; bottom: 0; font-size: 11.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.gauge-end.l { left: 12px; transform: translateX(-50%); }
.gauge-end.r { right: 12px; transform: translateX(50%); }

/* Régua de progresso das metas (UI.ticks) */
.tick-row { display: flex; justify-content: space-between; align-items: center; height: 30px; cursor: crosshair; }
.tick-row i {
  width: 3px; height: 16px; border-radius: 2px;
  background: color-mix(in srgb, var(--fg) 13%, transparent);
  transform: scaleY(var(--sw, 1)); transition: transform .3s var(--spring);
}
.tick-row i.on { background: color-mix(in srgb, var(--c) calc(50% + var(--t) * .5), var(--surface-3)); }
.tick-row i.head { height: 26px; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }
.tick-row i.fresh { animation: tickFill .45s var(--ease) both; animation-delay: calc(.25s + var(--k) * 22ms); }
.no-reveal .tick-row i.fresh { animation: none; }
@keyframes tickFill { from { background: color-mix(in srgb, var(--fg) 13%, transparent); transform: scaleY(.55); box-shadow: none; } }

/* Mostrador de marcações do saldo (UI.dial) */
.dial { position: relative; width: var(--size); height: var(--size); flex: none; }
.dial svg { display: block; overflow: visible; }
.dial[data-swell]:focus-visible { border-radius: 50%; outline-offset: 4px; }
.gauge:focus-visible { border-radius: 18px; outline-offset: 6px; }
.dial[data-swell] { cursor: crosshair; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.dial line {
  stroke: color-mix(in srgb, var(--fg) 14%, transparent); stroke-width: 2.2; stroke-linecap: round;
  transform-box: fill-box; transform-origin: center; transform: scale(var(--sw, 1));
  transition: transform .3s var(--spring);
}
.dial line.on { stroke: color-mix(in srgb, var(--accent) var(--t), var(--accent-2)); animation: tickOn .7s var(--ease) both; animation-delay: calc(.35s + var(--k) * 26ms); }
.dial line.head { stroke: var(--accent); stroke-width: 3.2; filter: drop-shadow(0 0 4px var(--accent)); }
.no-reveal .dial line.on { animation: none; }
/* a marcação acende passando por um clarão: a frente da varredura fica visível correndo pelo anel */
@keyframes tickOn {
  0% { stroke: color-mix(in srgb, var(--fg) 14%, transparent); }
  35% { stroke: color-mix(in srgb, var(--accent) 45%, var(--fg)); }
}
.dial-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dial-prev { fill: var(--bg); stroke: var(--fg); stroke-width: 1.6; }
.dial-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
/* filhos diretos: o contador (UI.roll) monta o número com spans, que não podem herdar o estilo do rótulo */
.dial-center > b { font: 600 34px/1 var(--font-num); letter-spacing: -.045em; color: var(--fg); font-variant-numeric: tabular-nums; }
/* Rótulo sob o número: a mesma voz dos títulos (Bricolage, na cor da marca). Peso 400:
   o 300 fica fino demais abaixo de 18px; o ajuste óptico fica no automático (segue o tamanho). */
.dial-center > span, .gauge-read > span {
  margin-top: 5px; font: 400 17px/1.15 var(--font-display); letter-spacing: -.015em;
  color: var(--accent); white-space: nowrap;
}
.dial-center.probe > span, .gauge-read.probe > span { font-size: 15px; color: var(--fg); }
.dial-center.probe > b, .gauge-read.probe > b { color: var(--accent); }
.dial-cmp {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font-size: 13px; color: var(--fg-2); white-space: nowrap;
}
.dial-cmp b { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
/* mesmo desenho do marcador no anel, para ligar um ao outro */
.dial-cmp i { width: 8px; height: 8px; border-radius: 50%; border: 1.6px solid var(--fg); background: var(--bg); flex: none; }

/* ---------- Orçamento (barra segmentada) ---------- */
.budget-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.budget-total strong { font: 750 30px/1.1 var(--font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.budget-total > span { color: var(--muted); }
.segbar-wrap { position: relative; padding-top: 30px; }
.segbar {
  display: flex; gap: 3px;
  height: 16px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  animation: sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both .15s;
}
.segbar > span {
  flex: none; height: 100%;
  width: var(--w);
  background: var(--c);
  border-radius: 3px;
  transition: opacity .25s, filter .25s;
}
.segbar > span.over { background: repeating-linear-gradient(-45deg, var(--neg) 0 5px, color-mix(in srgb, var(--neg) 60%, transparent) 5px 10px); }
.segbar.focus > span:not(.hl) { opacity: .18; }
/* Barras: em vez de crescer a largura a partir de zero (o que refaz o layout a cada quadro e
   empurra os segmentos vizinhos), a barra já nasce no tamanho final e um recorte arredondado
   corre da esquerda para a direita revelando-a. */
@keyframes sweepIn {
  from { clip-path: inset(0 100% 0 0 round 999px); }
  to { clip-path: inset(0 0 0 0 round 999px); }
}
/* Marcadores sobre a barra: uma linha fina (tracejada para o ritmo ideal, cheia e vermelha para o
   limite), com um anel da cor do cartão que a separa dos segmentos, e um rótulo em pílula acima.
   Perto das pontas o rótulo se alinha pela borda em vez de centralizar e vazar do cartão. */
.pace {
  position: absolute; z-index: 2; pointer-events: none;
  left: var(--p); width: 2px; margin-left: -1px; border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--fg-2) 0 3px, transparent 3px 5px);
}
.segbar-wrap .pace { top: 26px; height: 24px; animation: paceIn .5s var(--ease) both .9s; }
.pace em {
  position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px;
  border-radius: 999px; background: var(--surface-2); color: var(--fg-2);
  font: 600 11px/1 var(--font-body); font-style: normal; white-space: nowrap;
}
.pace em b { font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.pace.at-end em { left: auto; right: -1px; transform: none; }
.pace.at-start em { left: -1px; transform: none; }
.pace.limit { background: var(--neg); box-shadow: 0 0 0 2px var(--surface); }
.pace.limit em { background: var(--neg-soft); color: var(--neg); }
/* o que passou do limite fica hachurado por cima dos segmentos */
.over-zone {
  position: absolute; top: 30px; height: 16px; left: var(--p); right: 0; z-index: 1; pointer-events: none;
  border-radius: 0 999px 999px 0;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--surface) 62%, transparent) 0 3px, transparent 3px 7px);
  animation: paceIn .5s var(--ease) both 1s;
}
@keyframes paceIn { from { opacity: 0; transform: translateY(3px); } }
.budget-foot { margin-top: 14px; font-size: 13.5px; color: var(--fg-2); }
.budget-foot b { color: var(--fg); font-variant-numeric: tabular-nums; }

.key-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 14px; padding: 10px 2px 0;
  border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--fg-2); font: 500 13px var(--font-body); cursor: pointer;
}
@media (hover: hover) { .key-toggle:hover { color: var(--fg); } }
.key-toggle .ico { width: 16px; height: 16px; transition: transform var(--sp-chevron-ms, .42s) var(--sp-chevron, var(--spring)); }
.key-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.key { height: 0; overflow: hidden; }
.key.open { height: auto; }
.key > div { opacity: 0; transition: opacity .2s cubic-bezier(.16, 1, .3, 1); }
.key.open > div { opacity: 1; transition-delay: .06s; }
.key-list { list-style: none; margin: 0; padding: 10px 0 0; display: flex; flex-direction: column; gap: 2px; }
.key-list li {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px;
  font-size: 13px; cursor: default;
  transition: background-color .2s;
}
.key-list li.hl { background: var(--surface-2); }
@media (hover: hover) { .key-list li:hover { background: var(--surface-2); } }
.key-list li i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.key-list li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.key-list li em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Donut ---------- */
.donut-body { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.donut { position: relative; flex: none; max-width: 100%; }
.donut svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.donut-seg { cursor: pointer; transition: stroke-dasharray 1.1s var(--ease), opacity .25s, stroke-width .3s var(--spring); outline: none; }
.donut-seg.dim { opacity: .2; }
.donut-seg.on { stroke-width: 26px !important; }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; padding: 30px;
}
.donut-k { font-size: 12px; color: var(--muted); }
.donut-v { font: 750 20px/1.2 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.donut-p { font-size: 12px; color: var(--fg-2); min-height: 18px; font-variant-numeric: tabular-nums; }
.donut-body { container-type: inline-size; }
.legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2px 6px; }
@container (min-width: 400px) { .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.legend li {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 6px 8px; border-radius: 10px; font-size: 13px; cursor: default;
}
@media (hover: hover) { .legend li:hover { background: var(--surface-2); } }
.legend li i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend li b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Barras agrupadas (Charts.groupBars) ---------- */
.gb { --h: 190px; position: relative; }
.gb-legend { display: flex; gap: 6px; margin: 0 0 14px; }
.gb-key {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: none;
  font-size: 12.5px; color: var(--fg-2); cursor: default;
}
.gb-key i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.gb-plot { position: relative; height: var(--h); margin-left: 42px; border-radius: 10px; }
.gb-plot:focus-visible { outline-offset: 6px; }
.gb-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.gb-grid span {
  position: absolute; right: calc(100% + 9px); top: -8px;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gb-row { position: absolute; inset: 0; display: flex; cursor: pointer; }
.gb-col {
  position: relative; flex: 1; min-width: 0;
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  border-radius: 10px;
}
/* faixa suave atrás do grupo apontado */
.gb-col::before {
  content: ""; position: absolute; inset: -6px 3px -4px; border-radius: 10px;
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  opacity: 0; transition: opacity .2s var(--ease);
}
.gb-col.on::before { opacity: 1; }
/* arredondada só na ponta do valor; a base fica reta na linha do zero */
.gb-bar {
  position: relative; width: min(28%, 26px); height: max(2px, var(--v));
  border-radius: 5px 5px 1.5px 1.5px; background: var(--c);
  transition: opacity .25s var(--ease), filter .2s;
}
.gb-col:not(.current) .gb-bar { opacity: .62; }
.gb-col.on .gb-bar { opacity: 1; filter: brightness(1.1); }
.gb[data-focus="0"] .gb-bar:not([data-s="0"]), .gb[data-focus="1"] .gb-bar:not([data-s="1"]) { opacity: .2; }
.gb-wait .gb-bar { clip-path: inset(100% 0 0 0); }
.gb-grow .gb-bar { animation: gbGrow .8s var(--ease) both; animation-delay: calc(min(var(--k) * 35ms, 400ms)); }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes gbGrow { from { clip-path: inset(100% 0 0 0 round 5px 5px 0 0); } to { clip-path: inset(0 0 0 0 round 5px 5px 1.5px 1.5px); } }
.gb-x { display: flex; margin: 9px 0 0 42px; }
.gb-x span { flex: 1; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); }
.gb-x span.current { color: var(--fg); font-weight: 600; }
.gb .chart-tip .gb-foot { margin-top: 4px; padding-top: 5px; border-top: 1px solid var(--line-2); }
.gb .chart-tip .gb-foot span { color: var(--fg-2); }

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  font-size: 12px; line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
  /* o resumo segue o ponto com um leve atraso de mola */
  transition: left .28s var(--spring), top .28s var(--spring), opacity .15s;
}
.chart-tip b { display: block; font: 700 14px var(--font-display); font-variant-numeric: tabular-nums; }
.chart-tip .row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.chart-tip .row i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chart-tip .row span { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.chart-tip .row strong { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Gráfico de linha ---------- */
.line-chart { position: relative; width: 100%; touch-action: pan-y; border-radius: 10px; cursor: crosshair; }
.line-chart:focus-visible { outline-offset: 6px; }
.line-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.line-chart .grid-line { stroke: var(--line); stroke-width: 1; }
.line-chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.line-chart .x-labels { transition: opacity .2s var(--ease); }
.line-chart .scrubbing .x-labels { opacity: .2; }
.line-chart .series { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .series.dashed { stroke-dasharray: 5 5; stroke-width: 1.6; opacity: .75; }
.line-chart .hair { stroke-width: 1.2; }
.line-chart .halo { opacity: .2; }
.line-chart .hover-dot { stroke: var(--surface); stroke-width: 2.5; }
.line-chart .x-pill rect { fill: var(--fg); }
.line-chart .x-pill text { fill: var(--bg); font: 600 11px var(--font-body); font-variant-numeric: tabular-nums; }
.line-chart .end-dot { stroke: var(--surface); stroke-width: 3; }
.line-chart .end-pulse { fill: none; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }

.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-2); margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.chart-legend i.dashed { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }

.spark { display: block; overflow: visible; }

/* ---------- Transações ---------- */
.tx-list { display: flex; flex-direction: column; gap: 2px; }
.tx {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px; margin: 0;
  border: 0; border-radius: 16px;
  background: none; color: inherit; text-align: left; cursor: pointer;
  transition: background-color .2s, transform .25s var(--ease);
  animation: rise .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 30ms);
}
.no-reveal .tx { animation: none; }
@media (hover: hover) { .tx:hover { background: var(--surface-2); } }
@media (hover: hover) { .tx:hover .cat-ico { transform: scale(1.08) rotate(-6deg); transition: transform .4s var(--spring); } }
.tx:active { transform: scale(.985); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-desc { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { font: 650 15px var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amt.in { color: var(--pos); }
.tx-group + .tx-group { margin-top: 6px; }
.tx-day {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 10px 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: .02em;
}
.tx-day span:last-child { font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search .ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; border-radius: 999px; background: var(--surface); }

.tx-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sum-box { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.sum-box span { display: block; font-size: 12px; color: var(--muted); }
.sum-box b { display: block; margin-top: 2px; font: 700 18px var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px 16px; text-align: center; color: var(--muted);
}
.empty .ico { width: 34px; height: 34px; color: var(--fg-2); }
.empty p { max-width: 36ch; }

.sample-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px;
  border-radius: var(--r-lg);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--accent-soft);
  font-size: 13.5px;
}
.sample-banner p { flex: 1 1 280px; color: var(--fg-2); }

/* ---------- Primeiros passos (contas novas) ---------- */
.onb {
  display: flex; flex-direction: column; gap: 18px; padding: 24px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: radial-gradient(640px 220px at 0% 0%, var(--accent-soft), transparent 70%), var(--surface);
}
.onb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.onb-k { margin: 0 0 6px; font-size: 13px; color: var(--fg-2); }
.onb-k b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.onb-title { margin: 0; font: 700 24px/1.12 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.onb-title em { font-style: normal; font-weight: 300; color: var(--accent); }
.onb-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.onb-bar span { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--fg) 12%, transparent); transition: background-color .5s var(--ease); }
.onb-bar span.on { background: var(--accent); }
.onb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.onb-step {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease);
}
.onb-step.next { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
.onb-step.done { opacity: .62; }
.onb-n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--fg) 28%, transparent);
  font: 600 12.5px var(--font-num); color: var(--fg-2);
}
.onb-step.next .onb-n { border-color: var(--accent); color: var(--accent); }
.onb-step.done .onb-n { border-color: var(--pos); background: var(--pos); color: var(--cta-ink); }
.onb-n .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.onb-step b { display: block; font-size: 14px; font-weight: 600; }
.onb-step p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-2); }
.onb-acts { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.onb-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--pos); }
.onb-ok .ico { width: 14px; height: 14px; }
.onb-alt { color: var(--muted); font-weight: 500; }
@media (max-width: 1100px) { .onb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .onb { padding: 18px; }
  .onb-title { font-size: 21px; }
  .onb-steps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  /* no celular cada passo vira uma linha: número, texto e botão lado a lado */
  .onb-step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 10px; padding: 12px 14px; }
  .onb-acts { grid-column: 2; margin-top: 0; }
  /* guia curto no celular: passo feito vira uma linha (o ✓ no número já diz que foi),
     e só o próximo passo mostra a explicação; os outros ficam com título e botão */
  .onb-step.done p, .onb-step.done .onb-acts { display: none; }
  .onb-step.done { align-items: center; padding-block: 10px; }
  .onb-step:not(.next):not(.done) p { display: none; }
}
/* "Lançar agora" leva até o campo de lançamento rápido e o destaca por um instante */
.quick-field.attn { animation: qAttn 1.4s var(--ease); }
@keyframes qAttn { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent), var(--edge); border-color: var(--accent); } }

/* ---------- Destaques ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stats > div { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 700 18px/1.2 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats dd small { display: block; font: 500 12px var(--font-body); color: var(--fg-2); letter-spacing: 0; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fxmini { display: flex; flex-direction: column; gap: 6px; }
.fxmini > div {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 12px 9px 9px; border-radius: var(--r-md); background: var(--surface-2);
}
.fxmini span.nm { font-size: 13px; color: var(--fg-2); }
.fxmini b { font: 700 15px var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

.skel {
  display: inline-block; min-width: 60px; height: 1em; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 20%, var(--surface-3) 50%, var(--surface-2) 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  vertical-align: middle;
}
.skel-block { display: block; width: 100%; height: 100%; min-height: 120px; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Orçamentos ---------- */
.bsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bsum > div { padding: 4px 6px; min-width: 0; }
.bsum > div > span { display: block; font-size: 12.5px; color: var(--muted); }
.bsum b { display: block; margin-top: 4px; font: 750 24px/1.15 var(--font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }

.bcat { display: flex; flex-direction: column; gap: 14px; }
.bcat-head { display: flex; align-items: center; gap: 12px; }
.bcat-head > div { flex: 1; min-width: 0; }
.bcat-head h3 { font-size: 15px; letter-spacing: -.015em; }
.bcat-head p { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); }
.progress > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--w); max-width: 100%;
  border-radius: inherit;
  background: var(--c);
  transition: width .6s var(--ease), background-color .3s;
  animation: sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both;
}
.progress.over > span { background: var(--neg); }
.progress .pace { top: -4px; bottom: -4px; width: 1.5px; }
.no-anim .progress > span, .no-anim.progress > span { animation: none; }

.tick-slider {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 0;
  touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: ew-resize;
  outline: none;
}
.ts-track { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; justify-content: space-between; border-radius: 8px; }
.ts-track i {
  width: 2px; height: 16px; border-radius: 2px;
  background: var(--surface-3);
  transition: background-color .15s, transform .3s var(--spring);
}
.ts-track i.on { background: var(--fg-2); }
.ts-track i.edge { background: var(--accent); transform: scaleY(1.55); }
.tick-slider.dragging .ts-track i.edge { transform: scaleY(1.9); }
.tick-slider:focus-visible .ts-track { outline: 2px solid var(--accent); outline-offset: 4px; }
.ts-value { min-width: 96px; text-align: right; font: 650 14px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.goal { display: flex; flex-direction: column; gap: 10px; transition: transform .35s var(--spring), border-color .3s; }
.goal.done { border-color: color-mix(in srgb, var(--pos) 40%, transparent); }
.goal-top { display: flex; justify-content: space-between; align-items: flex-start; }
.goal-pct { display: flex; align-items: baseline; gap: 7px; margin: 0; }
.goal-pct > b { font: 600 36px/1 var(--font-num); letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--fg); }
.goal-pct > span { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.goal.done .goal-pct > b { color: var(--c); }
.goal-name { font-size: 17px; letter-spacing: -.02em; margin-top: 4px; }
.goal-amt { font-size: 13.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.goal-amt b { color: var(--fg); font-weight: 650; }
.goal-plan { font-size: 12.5px; }
.goal-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.goal-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 230px;
  border: 1.5px dashed var(--line-2); background: transparent;
  color: var(--fg-2); cursor: pointer; font: 600 14px var(--font-body);
  transition: border-color .2s, color .2s, background-color .2s;
}
@media (hover: hover) { .goal-new:hover { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); } }
.goal-new .ico { width: 26px; height: 26px; }

/* ---------- Mercado ---------- */
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--pos); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s var(--ease) infinite; }
.live-dot.off { background: var(--warn); }
.live-dot.off::after { animation: none; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3); opacity: 0; } }

.ind-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ind {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
  transition: transform .35s var(--spring), border-color .2s;
}
@media (hover: hover) { .ind:hover { transform: translateY(-3px); border-color: var(--line-2); } }
.ind-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-val { font: 750 19px/1.15 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ind-sub { min-height: 24px; display: flex; align-items: center; font-size: 12px; color: var(--fg-2); }

.chart-title { display: flex; align-items: center; gap: 12px; }
.chart-title .cur-badge { width: 40px; height: 40px; font-size: 17px; }
.chart-value { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: -4px 0 6px; }
.chart-value strong { font: 750 32px/1.1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.chart-slot { position: relative; min-height: 260px; }
.chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.chart-stats > div { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); min-width: 0; }
.chart-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.chart-stats b { font: 650 14px var(--font-display); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 0 -10px; padding: 0 10px; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data th {
  padding: 8px; text-align: left; white-space: nowrap;
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.data td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr { transition: background-color .2s; }
.data tbody tr.clickable { cursor: pointer; }
@media (hover: hover) { .data tbody tr:hover { background: var(--surface-2); } }
.data tbody tr.active { background: var(--accent-soft); }
.data .r { text-align: right; }
.data td:first-child { border-radius: 12px 0 0 12px; }
.data td:last-child { border-radius: 0 12px 12px 0; }
.asset { display: flex; align-items: center; gap: 10px; }
.asset img { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); }
.asset b { display: block; font-weight: 600; font-size: 13.5px; }
.asset small { display: block; color: var(--muted); font-size: 11.5px; }
.flash-up { animation: flashUp 1.4s var(--ease); }
.flash-down { animation: flashDown 1.4s var(--ease); }
@keyframes flashUp { 0%, 20% { color: var(--pos); background: var(--pos-soft); } }
@keyframes flashDown { 0%, 20% { color: var(--neg); background: var(--neg-soft); } }
td.flash-up, td.flash-down { border-radius: 8px; }

.range-wrap { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.data td small.sub { display: block; font-size: 11px; color: var(--muted); font-family: var(--font-body); }
.range { position: relative; width: 56px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.range i {
  position: absolute; top: 50%; left: var(--p);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fg); border: 2px solid var(--surface);
  transform: translate(-50%, -50%);
  transition: left .6s var(--ease);
}

.swap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.swap-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px;
  padding: 14px 14px 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.swap-box:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.swap-lab { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.swap-input, .swap-out {
  min-width: 0; width: 100%;
  padding: 0; border: 0; outline: none; background: none; color: var(--fg);
  font: 700 26px/1.25 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.swap-sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.swap-btn {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 13px; border: 4px solid var(--surface);
  background: var(--surface-3); color: var(--fg);
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  transition: transform .55s var(--spring), background-color .2s;
}
@media (hover: hover) { .swap-btn:hover { background: var(--cta); color: var(--cta-ink); } }
.swap-btn .ico { width: 18px; height: 18px; }
.swap-rate { margin-top: 12px; font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.cur-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 10px 0 5px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-3); color: var(--fg);
  font: 600 14px var(--font-body); cursor: pointer;
  transition: transform .25s var(--spring), border-color .2s;
}
@media (hover: hover) { .cur-pill:hover { border-color: var(--line-2); } }
.cur-pill:active { transform: scale(.95); }
.cur-pill .ico { width: 14px; height: 14px; color: var(--muted); }
.quick-amts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.sim-inputs { display: grid; gap: 6px; margin-bottom: 16px; }
.sim-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; }
.sim-row > span { font-size: 13px; color: var(--fg-2); }
.sim-res { display: flex; flex-direction: column; gap: 8px; }
.sim-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2);
}
.sim-item.best { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.sim-item h3 { font: 650 14px var(--font-display); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-item p { font-size: 12px; color: var(--muted); }
.sim-item .val { text-align: right; }
.sim-item .val b { display: block; font: 700 17px var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sim-item .val > span { font-size: 12px; color: var(--pos); font-variant-numeric: tabular-nums; }
.sim-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.sim-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); transition: width .7s var(--ease); }
.fine { margin-top: 14px; font-size: 12px; color: var(--muted); max-width: 70ch; }

.stock-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.stock-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
@media (hover: hover) { .stock-list li:hover { background: var(--surface-2); } }
.tick-badge {
  display: grid; place-items: center;
  height: 30px; padding: 0 8px; min-width: 62px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
  font: 500 12px var(--font-mono);
}
.stock-list .nm { min-width: 0; }
.stock-list .nm b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-list .nm small { color: var(--muted); font-size: 11.5px; }
.stock-list .px { text-align: right; }
.stock-list .px b { display: block; font: 650 14px var(--font-display); font-variant-numeric: tabular-nums; }

.sources { font-size: 12px; color: var(--muted); max-width: 90ch; line-height: 1.6; }
.sources a { color: var(--fg-2); }
.error-note { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: 13px; }

/* ---------- Formulários ---------- */
.input {
  width: 100%; min-width: 0; height: 46px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  font: 500 15px var(--font-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="date"].input, input[type="month"].input { color-scheme: inherit; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.form-actions .btn-primary { margin-left: auto; }
.form-error { min-height: 0; font-size: 13px; color: var(--neg); }
.form-error:empty { display: none; }

.amount-field {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 10px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.amount-field:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.amount-field input {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: none; color: var(--fg);
  font: 750 36px/1.2 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.amount-field input::placeholder { color: var(--surface-3); }
.amount-field.out input { color: var(--fg); }
.amount-field.in input { color: var(--pos); }
.conv-note { margin-top: -8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-2); }
.conv-note .input { width: 110px; height: 34px; font-size: 13px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cat-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2); font: 500 12px var(--font-body);
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .25s var(--spring);
}
@media (hover: hover) { .cat-opt:hover { color: var(--fg); } }
.cat-opt:active { transform: scale(.95); }
.cat-opt[aria-checked="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--surface-2));
  color: var(--fg);
}
.cat-opt[aria-checked="true"] .cat-ico { transform: scale(1.1) rotate(-8deg); transition: transform .4s var(--spring); }
.cat-opt .cat-ico { width: 34px; height: 34px; border-radius: 11px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--surface); background: var(--c);
  box-shadow: 0 0 0 1px var(--line-2);
  cursor: pointer; transition: transform .25s var(--spring), box-shadow .2s;
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--fg); transform: scale(1.1); }

.hold-btn {
  position: relative; overflow: hidden;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--neg) 38%, transparent);
  background: var(--neg-soft); color: var(--neg);
  font: 600 14px var(--font-body);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform .3s var(--spring);
}
.hold-fill { position: absolute; inset: 0; background: var(--neg); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.hold-btn.holding { transform: scale(.97); }
.hold-btn.holding .hold-fill { transform: scaleX(1); transition: transform var(--hold, 1100ms) linear; }
.hold-label { position: relative; display: inline-flex; align-items: center; gap: 8px; transition: color .35s; }
.hold-label .ico { width: 17px; height: 17px; }
.hold-btn.holding .hold-label { color: #fff; transition: color var(--hold, 1100ms) ease-in; }

/* ---------- Sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: var(--scrim);
  opacity: 0; transition: opacity .35s var(--ease);
}
/* O painel não rola: a alça e o cabeçalho ficam parados e só o corpo rola. Assim a barra de
   rolagem nasce abaixo do cabeçalho, longe dos cantos arredondados, como uma pílula fina. */
.sheet {
  position: relative;
  display: flex; flex-direction: column;
  width: min(580px, 100%);
  max-height: min(92vh, 900px);
  overflow: hidden;
  padding-top: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform .5s var(--ease);
}
.sheet-grip { flex: none; width: 40px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 6px auto 4px; }
.sheet-head {
  position: relative; z-index: 3; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 22px 2px;
  background: var(--surface);
  cursor: grab; touch-action: none;
}
/* o conteúdo some suavemente sob o cabeçalho ao rolar, em vez de ser cortado seco */
.sheet-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px);
  mask-image: linear-gradient(to bottom, transparent, #000 14px);
}
.sheet-body::-webkit-scrollbar-track { margin: 14px 0 26px; }
.sheet-head h2 { font-size: 20px; letter-spacing: -.03em; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet.dragging { transition: none; }
.set-group { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.set-group:first-child { border-top: 0; padding-top: 0; }
.set-group h3 { font-size: 14px; letter-spacing: -.01em; }
.set-group p { font-size: 13px; color: var(--muted); }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn-col .btn { justify-content: flex-start; }

/* ---------- Menu ---------- */
.menu {
  position: fixed; z-index: 90;
  min-width: 230px; max-height: 320px; overflow-y: auto;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: pop .22s var(--ease);
}
.menu::-webkit-scrollbar-track { margin: 12px 0; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 10px;
  background: none; color: var(--fg); text-align: left; cursor: pointer;
}
.menu button:focus-visible { background: var(--surface-3); outline: none; }
@media (hover: hover) { .menu button:hover { background: var(--surface-3); outline: none; } }
.menu button[aria-selected="true"] { background: var(--surface-3); }
.menu button small { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 50%; z-index: 100;
  bottom: calc(104px + env(safe-area-inset-bottom, 0px)); /* acima da dock */
  width: min(400px, calc(100vw - 32px)); height: 0;
  transform: translateX(-50%);
}
.toast {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 10px 10px 10px 16px;
  border-radius: 16px;
  background: var(--surface-3); color: var(--fg);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  transform: translateY(calc(var(--i, 0) * -10px)) scale(calc(1 - var(--i, 0) * .05));
  transition: transform .45s var(--spring), opacity .3s;
  animation: toastIn .5s var(--spring);
}
.toast.stack-hidden { opacity: 0; pointer-events: none; }
.toast.leaving { opacity: 0; transform: translateY(16px) scale(.92); }
@media (hover: hover) { .toasts:hover .toast:not(.leaving) { transform: translateY(calc(var(--i, 0) * (-100% - 8px))); } }
@media (hover: hover) { .toasts:hover .toast.stack-hidden { opacity: 1; pointer-events: auto; } }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-2); flex: none; }
.toast-dot.ok { background: var(--pos); }
.toast-dot.err { background: var(--neg); }
.toast-dot.warn { background: var(--warn); }
.toast-msg { flex: 1; min-width: 0; }
.toast-action {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--cta); color: var(--cta-ink); font: 600 13px var(--font-body); cursor: pointer;
}
.toast-x {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin-left: -4px;
  border: 0; border-radius: 50%; background: none; color: var(--fg-2); cursor: pointer;
}
@media (hover: hover) { .toast-x:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); color: var(--fg); } }
.toast-x .ico { width: 15px; height: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(110%) scale(.9); } }

#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 120; }

/* Troca de tema com revelação circular */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

.chip .cur-badge.mini { width: 20px; height: 20px; font-size: 10px; margin-left: -6px; }

/* ---------- Mês ---------- */
.month-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.month-label {
  min-width: 132px; text-align: center;
  font: 600 14px var(--font-display); letter-spacing: -.01em;
  overflow: hidden;
}
.month-label > span { display: inline-block; }
/* Cascata: as letras antigas saem de onde estavam e as novas chegam, da esquerda para a direita */
.cas { position: relative; white-space: pre; }
.cas-old { position: absolute; top: 0; left: 50%; display: flex; transform: translateX(-50%); pointer-events: none; }
.cas .cn, .cas .co { display: inline-block; white-space: pre; animation-delay: calc(var(--ci) * 24ms); }
.cas .cn { animation: casIn var(--sp-swap-ms, .45s) var(--sp-swap, var(--ease)) both; animation-delay: calc(60ms + var(--ci) * 24ms); }
.cas .co { animation: casOut .26s cubic-bezier(.55, 0, 1, .45) both; animation-delay: calc(var(--ci) * 24ms); }
.cas.up .cn { animation-name: casInUp; }
.cas.up .co { animation-name: casOutUp; }
@keyframes casIn { from { opacity: 0; transform: translateY(-80%); filter: blur(3px); } }
@keyframes casOut { to { opacity: 0; transform: translateY(80%); filter: blur(3px); } }
@keyframes casInUp { from { opacity: 0; transform: translateY(80%); filter: blur(3px); } }
@keyframes casOutUp { to { opacity: 0; transform: translateY(-80%); filter: blur(3px); } }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .ind-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
  .auto-6 { grid-column: span 6; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-ring { justify-self: start; }
}

@media (max-width: 760px) {
  .topbar-inner { height: 58px; }
  /* a faixa de cotações sai do celular: a aba Mercado mostra tudo, e o saldo sobe para a 1ª tela */
  .ticker { display: none; }
  /* Início: Retrospectiva vira botão-ícone ao lado do mês, numa linha só */
  .head-actions.dash-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; width: 100%; gap: 8px; }
  .dash-actions .month-switch { flex: 1; min-width: 0; justify-content: space-between; }
  .dash-actions .wrapped-btn { flex: none; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .dash-actions .wrapped-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* campos com 16px: abaixo disso o Safari do iPhone dá zoom na página ao tocar */
  .input, .quick .quick-input, .conv-note .input { font-size: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-ring { justify-self: center; }
  /* no celular a dock vira a barra do app: largura toda, nomes sempre visíveis, sem ampliação */
  .dock { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .dock-panel { justify-content: space-between; align-items: center; gap: 0; padding: 7px 6px; border-radius: 24px; }
  /* min-content: "Lançamentos" ganha os poucos pixels que precisa e os outros dividem o resto (cabe até em 320px) */
  .dock-item { flex: 1 1 0; width: auto; height: auto; min-width: min-content; gap: 4px; padding: 2px 0; }
  .dock-tile { width: 42px; height: 32px; border-radius: 12px; background: transparent; border-color: transparent; }
  .dock-tile .ico { width: 21px; height: 21px; }
  .dock-label {
    position: static; transform: none; opacity: 1; padding: 0; background: none; box-shadow: none;
    color: inherit; font-size: 10.5px; font-weight: 500; letter-spacing: -.01em;
    display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
  .dock-item[aria-current="page"]::after { display: none; }
  .dock-item[aria-current="page"] .dock-label { color: var(--fg); font-weight: 600; }
  .dock-cta .dock-tile { width: 46px; height: 34px; }
  .dock-cta .dock-label { color: var(--fg-2); }
  .dock-sep { margin: 8px 2px; }
  .view { padding-top: 20px; padding-bottom: 120px; }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .auto-6 { grid-column: 1 / -1; }
  .card { padding: 18px; border-radius: 22px; }
  .tx-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tx-summary .sum-box:last-child { grid-column: 1 / -1; }
  .ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .sim-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chart-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .page-head { align-items: flex-start; }
  .month-label { min-width: 118px; }
}

@media (max-width: 420px) {
  .bsum b { font-size: 20px; }
  .dock-label { font-size: 10px; }
  .top-actions .btn { width: 36px; }
}

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

/* =========================================================================
   Frenum — camada visual (referências: motionsites.ai, fintech)
   ========================================================================= */

/* Números: Geist com algarismos tabulares em todos os valores grandes */
.hero-amount, .gauge-read > b, .budget-total strong, .donut-v, .tx-amt, .sum-box b, .stats dd,
.fxmini b, .bsum b, .ts-value, .goal-pct, .ind-val, .chart-value strong, .chart-stats b,
.swap-input, .swap-out, .sim-item .val b, .stock-list .px b, .amount-field input, .chart-tip b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums; /* a propriedade em vez da etiqueta crua: funciona também na fonte reserva */
}
.stats dd small { font-family: var(--font-body); }

/* Granulação de filme por cima de tudo.
   Parada e sem modo de mistura: antes ela se mexia e usava "overlay", o que obrigava o
   navegador a recompor a página inteira a cada quadro (caro em telas grandes). Agora é uma
   camada fixa que a placa de vídeo só sobrepõe, com o mesmo aspecto de textura. */
.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  opacity: calc(var(--grain-opacity) * .7);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='1 1'/></feComponentTransfer></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  transform: translateZ(0);
}

/* Borda de luz sutil nos cartões */
.card { box-shadow: var(--edge); }

/* Hero: a luz cresce com a taxa de poupança do mês */
.hero { background: var(--surface); isolation: isolate; min-height: 280px; }
.hero-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
/* As luzes são degradês radiais (já nascem suaves) em vez de círculos desfocados: mover um
   degradê é só deslocar uma camada pronta, enquanto o desfoque era refeito a cada quadro. */
.hero-glow i { position: absolute; border-radius: 50%; will-change: transform; }
.hero-glow i:nth-child(1) {
  width: 520px; height: 520px; right: -180px; top: -260px;
  background: radial-gradient(closest-side, var(--accent), transparent);
  opacity: calc(.14 + var(--save, .3) * .34);
  animation: drift1 16s ease-in-out infinite alternate;
}
.hero-glow i:nth-child(2) {
  width: 440px; height: 440px; right: 60px; bottom: -290px;
  background: radial-gradient(closest-side, var(--accent-2), transparent);
  opacity: calc(.1 + var(--save, .3) * .24);
  animation: drift2 21s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-90px, 50px) scale(1.18); } }
@keyframes drift2 { to { transform: translate(70px, -40px) scale(.88); } }
.hero .label { font-size: 15px; }
.hero .label em { color: var(--fg); font-weight: 600; }
.hero-amount {
  margin: 10px 0 20px;
  font-size: clamp(44px, 6.2vw, 74px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1;
}

/* Gráfico de pontos (painel de LEDs) */
.dots-chart { position: relative; }
.dots-chart svg { display: block; width: 100%; overflow: visible; }
.dots-chart .dot { transition: fill-opacity .6s var(--ease); }
.dots-chart .col { cursor: crosshair; }
.dots-chart .col-hit { fill: transparent; }
.dots-chart.focus .col:not(.hl) .dot { fill-opacity: .06 !important; transition-duration: .2s; }
.dots-chart .avg-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 5; }
.dots-chart .avg-label { fill: var(--accent); font: 600 11px var(--font-body); }
.dots-chart .x-label { fill: var(--muted); font: 500 11px var(--font-body); font-variant-numeric: tabular-nums; }

/* Linhas luminosas */
.line-chart .series:not(.dashed) { filter: drop-shadow(0 3px 10px color-mix(in srgb, var(--glow-c, transparent) 55%, transparent)); }

/* =========================================================================
   Funções novas: lançamento rápido, futuro, mercado × dinheiro, importação, retrospectiva
   ========================================================================= */

/* ---------- Lançamento rápido ---------- */
.quick { display: flex; flex-direction: column; gap: 10px; }
.quick-field {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--edge);
  transition: border-color .25s, box-shadow .25s;
}
.quick-field:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--edge); }
.quick-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.quick-ico .ico { width: 17px; height: 17px; }
.quick-input { flex: 1; min-width: 0; height: 40px; border: 0; outline: none; background: none; color: var(--fg); font: 500 15px var(--font-body); }
.quick-input::placeholder { color: var(--muted); }
.quick-kbd { font: 500 11px var(--font-mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; }
.quick.has-text .quick-kbd { display: none; }
.quick-go { flex: none; }
/* campo vazio: "Lançar" não faz nada, então fica discreto; com texto, volta a ser o principal
   (assim o "Novo" da dock é o único botão cheio da tela até a pessoa digitar) */
.quick:not(.has-text) .quick-go { background: transparent; color: var(--fg-2); border-color: var(--line-2); font-weight: 500; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.quick-chips:empty { display: none; }
.qc-wrap { display: inline-flex; }
.qc-wrap.pop { animation: chipPop .4s var(--spring); }
@keyframes chipPop { from { opacity: 0; transform: translateY(6px) scale(.92); } }
.qc {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500; color: var(--fg-2); white-space: nowrap;
}
.qc .ico { width: 14px; height: 14px; }
.qc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.qc-strong { color: var(--fg); font-weight: 650; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.qc-out { color: var(--fg); }
.qc-in { color: var(--pos); background: var(--pos-soft); border-color: transparent; }
.qc-miss { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.qc-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.qc-ghost { background: transparent; }
.qc-btn { cursor: pointer; color: var(--fg); border-style: dashed; font-family: var(--font-body); }
@media (hover: hover) { .qc-btn:hover { border-color: var(--accent); } }
.quick.shake .quick-field { animation: shake .4s var(--ease); border-color: var(--warn); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Alerta e botão da retrospectiva ---------- */
.alert-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--r-lg);
  background: var(--neg-soft); color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--neg) 35%, transparent);
  text-decoration: none; font-size: 14px;
  transition: transform .3s var(--spring);
}
@media (hover: hover) { .alert-banner:hover { transform: translateY(-2px); } }
.alert-banner > .ico { width: 20px; height: 20px; color: var(--neg); flex: none; }
.alert-banner span:first-of-type { flex: 1 1 240px; }
.alert-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--neg); font-weight: 600; }
.alert-cta .ico { width: 16px; height: 16px; }

.wrapped-btn {
  position: relative; isolation: isolate; overflow: hidden;
  border-color: transparent;
  background: var(--surface);
}
/* borda em degradê cônico, recortada pelo botão. Dá uma volta ao abrir a página e outra ao
   passar o mouse; parada, fica o degradê (girando sem fim, puxava o olho na tela mais usada) */
.wrapped-btn::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -2;
  width: 140%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(var(--accent), var(--accent-2), transparent 40%, var(--accent));
  animation: spinRing 1.4s var(--ease) .4s 1 both;
}
@media (hover: hover) { .wrapped-btn:hover::before { animation: spinRingAgain 1.1s var(--ease) 1; } }
.wrapped-btn::after { content: ""; position: absolute; inset: 1.5px; z-index: -1; border-radius: inherit; background: var(--surface); }
.wrapped-btn .ico { color: var(--accent); }
@keyframes spinRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spinRingAgain { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- Seu dinheiro e o mercado ---------- */
.mm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mm-cell {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); min-width: 0;
}
.mm-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mm-k .ico { width: 15px; height: 15px; }
.mm-v { font: 600 30px/1.1 var(--font-num); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.mm-v small { font-size: 14px; color: var(--muted); letter-spacing: 0; margin-left: 2px; font-weight: 500; }
.mm-cell p { font-size: 13px; color: var(--fg-2); line-height: 1.55; }
.mm-cell p b { color: var(--fg); font-weight: 600; }
.mm-cell .pill { margin-top: auto; text-decoration: none; }
.mm-spark { position: absolute; right: 14px; top: 16px; opacity: .9; }
@media (max-width: 900px) { .mm-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Transações: tags, agendados, horas ---------- */
.tx-tag {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; vertical-align: 1px;
  height: 18px; padding: 0 6px; border-radius: 6px;
  background: var(--surface-3); color: var(--fg-2);
  font: 600 10.5px var(--font-body); letter-spacing: .02em;
}
.tx-tag .ico { width: 11px; height: 11px; }
.tx.scheduled { opacity: .62; }
.tx.scheduled .tx-amt { font-style: italic; }
.tx-sched { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--line-2); }
.tx-sched .tx-day span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.tx-sched .tx-day .ico { width: 14px; height: 14px; }
.tx-amt.hrs { color: var(--accent); }

/* ---------- Formulário: horas, parcelas, conta fixa ---------- */
.hours-note, .form-info {
  display: flex; align-items: flex-start; gap: 8px; margin-top: -6px;
  font-size: 13px; color: var(--fg-2);
}
.hours-note .ico, .form-info .ico { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.hours-note b { color: var(--fg); }
.form-info { margin-top: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-soft); }
.opt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px dashed var(--line-2); background: transparent; color: var(--fg-2);
  font: 500 13px var(--font-body); cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.opt .ico { width: 16px; height: 16px; }
@media (hover: hover) { .opt:hover { color: var(--fg); border-color: var(--accent); } }
.opt[aria-pressed="true"] { border-style: solid; border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.inst-step { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.inst-step b { min-width: 34px; text-align: center; font: 650 15px var(--font-num); font-variant-numeric: tabular-nums; }
.inst-step small { color: var(--muted); font-size: 12px; padding-right: 6px; }

/* ---------- Futuro ---------- */
.fut-now { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fut-bal { font: 600 clamp(34px, 4vw, 46px)/1.05 var(--font-num); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.fut-mini { display: grid; gap: 8px; width: 100%; margin: 4px 0; }
.fut-mini > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.fut-mini dt { font-size: 12.5px; color: var(--muted); }
.fut-mini dd { margin: 0; font: 600 15px var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
.fut-mini dd small { display: block; font: 500 11px var(--font-body); color: var(--muted); }

.tl-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--fg-2); }
.tl-ico .ico { width: 17px; height: 17px; }
.tl-ico.k-fatura { background: var(--accent-soft); color: var(--accent); }
.tl-ico.k-fixa { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
.tlx-card .tl-ico:not(.k-fatura):not(.k-fixa) { background: var(--surface-3); }

.bill-open { display: flex; flex-direction: column; gap: 8px; }
.bill-total { font: 600 36px/1.1 var(--font-num); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.bill-cycle { margin-top: 4px; }
.bill-comp { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--fg-2); margin-top: 4px; }
.bill-comp span { display: inline-flex; align-items: center; gap: 6px; }
.bill-comp i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.bill-comp b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.bill-next { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.bill-next li { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; font-size: 13.5px; }
.bill-next span { display: flex; flex-direction: column; }
.bill-next small { font-size: 11.5px; color: var(--muted); }
.bill-next b { font: 600 15px var(--font-num); font-variant-numeric: tabular-nums; }

.commit { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: end; }
.cm-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.cm-pct { font: 600 13px var(--font-num); color: var(--fg-2); }
.cm-bar { position: relative; width: 100%; max-width: 74px; height: 170px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.cm-stack { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.cm-stack i { display: block; width: 100%; background: var(--c); transform-origin: bottom; animation: grow 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.cm-income { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--pos); z-index: 2; }
.cm-col b { font: 600 13.5px var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-col small { font-size: 11.5px; color: var(--muted); margin-top: -4px; }
@media (max-width: 600px) { .commit { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; } }

.inst-list, .rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.inst-list li, .rule-list li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
@media (hover: hover) { .inst-list li:hover, .rule-list li:hover { background: var(--surface-2); } }
.pi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pi-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-main small { font-size: 12px; color: var(--muted); }
.pi-main .progress { height: 5px; margin-top: 6px; }
.pi-val { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pi-val b { font: 650 15px var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pi-val b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.pi-val > small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rule-list li > b { font: 600 14.5px var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rule-list .pi-main b { white-space: normal; overflow: visible; }

/* ---------- Importação ---------- */
.imp { display: flex; flex-direction: column; gap: 14px; }
.imp-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 28px 16px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-2); background: var(--surface-2);
  cursor: pointer; transition: border-color .2s, background-color .2s;
}
.imp-drop.loaded { border-color: var(--accent); background: var(--accent-soft); }
@media (hover: hover) { .imp-drop:hover { border-color: var(--accent); background: var(--accent-soft); } }
.imp-drop .ico { width: 28px; height: 28px; color: var(--accent); }
.imp-drop b { font-weight: 600; }
.imp-drop span { font-size: 12.5px; color: var(--muted); }
.imp-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.imp-note { font-size: 12.5px; color: var(--muted); }
.imp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.imp-head > div { display: flex; flex-direction: column; }
.imp-head span { font-size: 12.5px; color: var(--muted); }
.imp-tip { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--fg-2); margin: 4px 0 2px; }
.imp-tip .ico { width: 15px; height: 15px; color: var(--accent); }
.imp-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.imp-row {
  display: grid; grid-template-columns: auto 44px minmax(0, 1fr) 130px auto; align-items: center; gap: 10px;
  padding: 7px 6px; border-radius: 12px; font-size: 13px;
  border-left: 3px solid var(--c);
}
.imp-row.off { opacity: .45; }
.imp-check { width: 17px; height: 17px; accent-color: var(--accent); }
.imp-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.imp-desc { min-width: 0; display: flex; flex-direction: column; }
.imp-desc b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-desc small { font-size: 11px; color: var(--muted); }
.imp-cat { height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: 500 12.5px var(--font-body); padding: 0 6px; min-width: 0; }
.imp-amt { font: 600 13.5px var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.imp-amt.in { color: var(--pos); }
@media (max-width: 600px) {
  .imp-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .imp-date { display: none; }
  .imp-cat { grid-column: 2 / 4; }
}

/* ---------- Retrospectiva ---------- */
html.wr-open, html.wr-open body { overflow: hidden; }
.wr {
  position: fixed; inset: 0; z-index: 140;
  display: flex; flex-direction: column;
  background: #070a0b; color: #eef5f6;
  opacity: 0; transform: scale(1.02);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
}
.wr.open { opacity: 1; transform: none; }
.wr-glow { position: absolute; inset: 0; pointer-events: none; }
/* luzes da retrospectiva: degradês radiais (sem desfoque) que só se deslocam entre as cenas */
.wr-glow i { position: absolute; border-radius: 50%; opacity: .5; transition: transform 1.6s var(--ease); will-change: transform; }
.wr-glow i:nth-child(1) { width: 80vmax; height: 80vmax; right: -30vmax; top: -40vmax; background: radial-gradient(closest-side, #5edce8, transparent); opacity: .34; }
.wr-glow i:nth-child(2) { width: 75vmax; height: 75vmax; left: -35vmax; bottom: -40vmax; background: radial-gradient(closest-side, #4f7cff, transparent); opacity: .32; }
.wr-glow i:nth-child(3) { width: 44vmax; height: 44vmax; left: 34%; top: 38%; background: radial-gradient(closest-side, #5edce8, transparent); opacity: .1; }
.wr[data-scene="money"] .wr-glow i:nth-child(1) { transform: translate(-10vmax, 12vmax); }
.wr[data-scene="category"] .wr-glow i:nth-child(2) { transform: translate(20vmax, -10vmax); }
.wr[data-scene="day"] .wr-glow i:nth-child(1) { transform: translate(-30vmax, 40vmax) scale(.8); }
.wr[data-scene="hours"] .wr-glow i:nth-child(3) { transform: scale(2); }
.wr[data-scene="compare"] .wr-glow i:nth-child(2) { transform: translate(40vmax, -20vmax); }
.wr[data-scene="final"] .wr-glow i:nth-child(1) { transform: translate(-20vmax, 10vmax) scale(1.2); }
.wr-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.wr-progress { flex: 1; display: flex; gap: 5px; }
.wr-progress span { flex: 1; height: 3px; border-radius: 3px; background: rgba(238, 245, 246, .18); overflow: hidden; }
.wr-progress i { display: block; height: 100%; width: 0; background: #eef5f6; border-radius: inherit; }
.wr-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(238, 245, 246, .1); color: #eef5f6; cursor: pointer; }
@media (hover: hover) { .wr-btn:hover { background: rgba(238, 245, 246, .2); } }
.wr-btn .ico { width: 18px; height: 18px; }
.wr-hit { position: absolute; top: 70px; bottom: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; }
.wr-prev { left: 0; width: 30%; }
.wr-next { right: 0; width: 70%; }
.wr-stage {
  position: relative; z-index: 2; flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  pointer-events: none;
}
.wr-stage button, .wr-stage input, .wr-stage label, .wr-stage a { pointer-events: auto; }
.wr-slide { width: min(680px, 100%); display: flex; flex-direction: column; gap: 18px; }
.wr-center { align-items: center; text-align: center; }
.wr-in { animation: wrIn .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 140ms + 80ms); }
@keyframes wrIn { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }
.wr-logo svg path { transform-box: fill-box; }
.wr-logo .wm-top { animation: wmTop 1.1s var(--spring) both .1s; }
.wr-logo .wm-fold { animation: wmFold 1.1s var(--ease) both .25s; transform-origin: top; }
.wr-logo .wm-bot { animation: wmBot 1.1s var(--spring) both .4s; }
@keyframes wmTop { from { transform: translateX(-30px); opacity: 0; } }
@keyframes wmFold { from { transform: scaleY(0); opacity: 0; } }
@keyframes wmBot { from { transform: translateX(30px); opacity: 0; } }
.wr-eyebrow { font: 600 13px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #5edce8; }
.wr-title { font: 700 clamp(38px, 7vw, 72px)/1 var(--font-display); letter-spacing: -.05em; color: #eef5f6; font-variation-settings: "opsz" 96; }
.wr-title.wr-xl { font-size: clamp(54px, 11vw, 120px); }
.wr-title em { font-style: normal; font-weight: 300; color: #5edce8; }
.wr-sub { font-size: 17px; color: rgba(238, 245, 246, .7); max-width: 42ch; }
.wr-num { font: 600 clamp(48px, 9vw, 96px)/1 var(--font-num); letter-spacing: -.055em; font-variant-numeric: tabular-nums; color: #eef5f6; }
.wr-num.wr-good { color: #3fd08f; }
.wr-num.wr-bad { color: #ff6b5e; }
.wr-pair { display: flex; flex-direction: column; gap: 4px; }
/* só o rótulo: um seletor "span" solto pegava também as peças do número que rola e o encolhia */
.wr-pair > span { font-size: 15px; color: rgba(238, 245, 246, .6); }
.wr-line { font-size: clamp(18px, 2.6vw, 24px); line-height: 1.4; color: rgba(238, 245, 246, .85); max-width: 32ch; }
.wr-line em { font-style: normal; color: #5edce8; font-weight: 600; }
.wr-line b { color: #eef5f6; }
.wr-small { font-size: 13px; color: rgba(238, 245, 246, .5); }
.wr-cat { display: flex; align-items: center; gap: 16px; }
.wr-cat-ico { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.wr-cat-ico .ico { width: 36px; height: 36px; }
.wr-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wr-bars li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: 14px; color: rgba(238, 245, 246, .8); }
.wr-bars i { height: 10px; border-radius: 10px; background: rgba(238, 245, 246, .08); overflow: hidden; }
.wr-bars b { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); animation: sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both; animation-delay: calc(.55s + var(--k) * 110ms); }
.wr-bars em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.wr-dots { display: flex; gap: 3px; height: 92px; align-items: stretch; }
.wr-dots span { flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.wr-dots i { width: 7px; height: 7px; max-width: 100%; border-radius: 50%; background: rgba(238, 245, 246, .1); }
.wr-dots i.on { background: rgba(238, 245, 246, .85); animation: dotOn .5s var(--ease) both; animation-delay: calc(.6s + var(--k) * 12ms); }
.wr-dots span.hl i.on { background: #5edce8; box-shadow: 0 0 10px #5edce8; }
@keyframes dotOn { from { background: rgba(238, 245, 246, .1); } }
.wr-moves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wr-moves li { display: flex; align-items: center; gap: 12px; font-size: 18px; padding: 12px 16px; border-radius: 16px; background: rgba(238, 245, 246, .06); }
.wr-moves li .ico { width: 20px; height: 20px; }
.wr-moves li.up .ico { color: #ff6b5e; }
.wr-moves li.down .ico { color: #3fd08f; }
.wr-moves li span { flex: 1; }
.wr-final { align-items: center; text-align: center; gap: 14px; }
.wr-poster { width: min(320px, 70vw); aspect-ratio: 1080 / 1350; max-width: 100%; border-radius: 18px; overflow: hidden; background: rgba(238, 245, 246, .06); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); display: grid; place-items: center; }
.wr-poster img { width: 100%; height: 100%; display: block; }
.wr-poster { position: relative; }
.wr-poster .wait-block { height: 100%; border-radius: 0; background: transparent; }
.wr-poster .ldr { color: #5edce8; }
.wr-poster .shimmer-text { background-image: linear-gradient(100deg, rgba(238, 245, 246, .45) 40%, #eef5f6 50%, rgba(238, 245, 246, .45) 60%); }
.wr-poster .tilt-glare { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 55%); }
.wr-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(238, 245, 246, .75); cursor: pointer; }
.wr-toggle input { width: 17px; height: 17px; accent-color: #5edce8; }
.wr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wr .btn { background: rgba(238, 245, 246, .1); color: #eef5f6; border-color: transparent; }
.wr .btn-primary { background: #eef5f6; color: #070a0b; }
@media (max-height: 700px) { .wr-poster { width: min(240px, 60vw); } }

/* ---------- Renda ativa e passiva ---------- */
.inc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.inc-split { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inc-row { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.inc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.inc-k { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.inc-k i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.inc-top b { font: 600 20px var(--font-num); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.inc-row small { font-size: 12.5px; color: var(--muted); padding-left: 18px; }
.inc-bar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-top: 4px; animation: sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both .2s; }
.inc-bar span { width: var(--w); background: var(--c); border-radius: 3px; }
.inc-legend { font-size: 12.5px; color: var(--fg-2); }
.inc-free {
  /* o texto precisa de ~240px; sem espaço, desce para baixo do medidor */
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 22px;
  padding: 18px; border-radius: var(--r-lg);
  background: radial-gradient(260px 160px at 0% 0%, var(--accent-soft), transparent 70%), var(--surface-2);
}
.inc-ring { position: relative; flex: none; display: grid; place-items: center; }
.inc-free-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 240px; }
.inc-free-text h3 { font-size: 17px; letter-spacing: -.02em; }
.inc-free-text p { font-size: 13.5px; color: var(--fg-2); line-height: 1.55; }
.inc-free-text p b { color: var(--fg); }
@media (max-width: 900px) { .inc-grid { grid-template-columns: minmax(0, 1fr); } }

.cat-group { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.cat-group:first-child { margin-top: 0; }
.cat-group b { font-size: 12.5px; color: var(--fg-2); font-weight: 600; }

/* A barra da renda: as duas partes já nascem no tamanho certo e um recorte corre da esquerda
   para a direita, logo depois que o bloco termina de entrar. Sem trilho de fundo, para que a
   parte ainda não revelada não apareça como uma caixa vazia. */
.wr-split { display: flex; gap: 4px; height: 16px; max-width: 520px; }
.wr-split span { flex: none; width: calc(var(--w) - 2px); background: var(--c); border-radius: 999px; }
.wr-split.wr-in {
  animation: wrIn .9s var(--ease) both, sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both;
  animation-delay: calc(var(--d, 0) * 140ms + 80ms), calc(var(--d, 0) * 140ms + 420ms);
}

/* ---------- Investimentos nos bancos ----------
   Lista com colunas fixas por área: nada muda de lugar quando a tela estreita. */
.offer-cols, .offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 96px 150px 104px 32px;
  grid-template-areas: "head rate gross net value more";
  column-gap: 16px; align-items: center;
}
.offer-cols {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 500; color: var(--muted);
}
.offer-cols .c-head { grid-area: head; }
.offer-cols .c-rate { grid-area: rate; }
.offer-cols .c-gross { grid-area: gross; text-align: right; }
.offer-cols .c-net { grid-area: net; text-align: right; }
.offer-cols .c-value { grid-area: value; text-align: right; }
/* Acordeão com mola (ideia do Bouncy Accordion do beUI): as linhas formam um bloco único,
   arredondado só nas pontas. A linha aberta se solta do bloco com um respiro em cima e
   embaixo, ganha cantos redondos, e as vizinhas arredondam o lado que ficou livre; margens,
   cantos e altura seguem a mesma mola, então tudo quica junto. */
.offer-list { list-style: none; margin: 12px 0 0; padding: 0; }
.offer {
  --rr: 20px;
  position: relative;
  grid-template-areas: "head rate gross net value more" "detail detail detail detail detail detail";
  row-gap: 0;
  margin: 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 0;
  transition:
    margin var(--sp-bouncy-ms, .55s) var(--sp-bouncy, var(--spring)),
    border-radius var(--sp-bouncy-ms, .55s) var(--sp-bouncy, var(--spring)),
    background-color .25s, box-shadow .35s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 28ms);
}
.offer + .offer::before {
  content: ""; position: absolute; top: 0; left: 62px; right: 14px; height: 1px;
  background: var(--line); transition: opacity .2s;
}
.offer:first-child { border-top-left-radius: var(--rr); border-top-right-radius: var(--rr); }
.offer:last-child { border-bottom-left-radius: var(--rr); border-bottom-right-radius: var(--rr); }
.offer:has(+ .offer.open) { border-bottom-left-radius: var(--rr); border-bottom-right-radius: var(--rr); }
.offer.open + .offer { border-top-left-radius: var(--rr); border-top-right-radius: var(--rr); }
.offer.open {
  margin: 12px 0; border-radius: var(--rr);
  box-shadow: 0 0 0 1px var(--line-2), 0 24px 44px -30px rgba(0, 0, 0, .75);
}
.offer.open:first-child { margin-top: 0; }
.offer.open:last-child { margin-bottom: 0; }
.offer.open::before, .offer.open + .offer::before { opacity: 0; }
.no-reveal .offer { animation: none; }
@media (hover: hover) { .offer:hover { background: color-mix(in srgb, var(--surface-2) 92%, var(--fg)); } }
@media (hover: hover) { .offer.open:hover { background: var(--surface-2); } }
.offer.baseline { opacity: .78; }
.offer-head { grid-area: head; display: flex; align-items: center; gap: 12px; min-width: 0; }
.offer-badge {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font: 700 12.5px var(--font-display); letter-spacing: -.02em;
  background: var(--surface-3); color: var(--fg-2);
}
.offer-badge.g-digital { background: color-mix(in srgb, var(--accent) 15%, var(--surface-3)); color: var(--accent); }
.offer-badge.g-tesouro { background: color-mix(in srgb, var(--accent-2) 18%, var(--surface-3)); color: var(--accent-2); }
.offer-badge svg { width: 20px; height: 20px; }
/* Logo do banco: quadrado com a cor da marca; o raio do quadrado recorta os cantos do ícone. */
.offer-badge.logo { position: relative; overflow: hidden; background: var(--logo-bg); }
.offer-badge.logo img { width: var(--logo-fit, 100%); height: var(--logo-fit, 100%); object-fit: contain; display: block; }
.offer-badge.logo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
:root[data-theme="light"] .offer-badge.logo::after { box-shadow: inset 0 0 0 1px rgba(15, 23, 25, .1); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .offer-badge.logo::after { box-shadow: inset 0 0 0 1px rgba(15, 23, 25, .1); } }
.offer-name { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.offer-name b { font-weight: 650; font-size: 14.5px; }
.offer-name > span { font-size: 13px; color: var(--muted); }
.offer-name .pill { height: 20px; font-size: 11px; align-self: center; }
.offer-rate {
  grid-area: rate; justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font: 600 12.5px var(--font-num); white-space: nowrap; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.offer-rate .ico { width: 13px; height: 13px; color: var(--muted); }
@media (hover: hover) { .offer-rate:hover { border-color: var(--accent); } }
.offer-rate.edited { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.offer-rate.static { cursor: default; background: transparent; border-color: transparent; padding-left: 0; color: var(--fg-2); }
.offer-gross { grid-area: gross; }
.offer-net { grid-area: net; }
.offer-value { grid-area: value; }
.offer-y { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; min-width: 0; }
.offer-y small { display: none; font-size: 11px; color: var(--muted); }
.offer-y b { font: 650 15.5px var(--font-num); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-net b { color: var(--pos); }
.offer-y em { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; min-height: 14px; }
.offer-bar { display: block; width: 100%; max-width: 120px; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.offer-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--pos); animation: sweepIn var(--sp-sweep-ms, 1.1s) var(--sp-sweep, var(--ease)) both .2s; }
.offer.baseline .offer-bar span { background: var(--fg-2); }
.offer-more {
  grid-area: more; justify-self: end;
  width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--muted); cursor: pointer;
}
@media (hover: hover) { .offer-more:hover { background: var(--surface-3); color: var(--fg); } }
.offer-more .ico { width: 16px; height: 16px; transition: transform var(--sp-chevron-ms, .42s) var(--sp-chevron, var(--spring)); }
.offer.open .offer-more .ico { transform: rotate(180deg); }
/* A altura é animada em JS com a mola (Motion.expand); aqui ficam só os dois estados. */
.offer-detail { grid-area: detail; height: 0; overflow: hidden; }
.offer.open .offer-detail { height: auto; }
.offer-detail > div { opacity: 0; transition: opacity .18s cubic-bezier(.16, 1, .3, 1); }
.offer.open .offer-detail > div { opacity: 1; transition-delay: .07s; }
.offer-detail p { font-size: 12.5px; color: var(--fg-2); line-height: 1.5; max-width: 80ch; padding-left: 50px; }
.offer-detail p:first-child { padding-top: 12px; }
.offer-detail p:last-child { padding-bottom: 4px; }
.offer-detail p + p { margin-top: 4px; color: var(--muted); }
.offer-detail b { font-weight: 600; color: var(--fg); }
.of-sources { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.of-sources summary { cursor: pointer; color: var(--fg-2); width: max-content; }
.of-sources ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.of-sources a { color: var(--fg-2); }

/* Telas médias e celular: cabeçalho some, cada linha mostra os rótulos */
@media (max-width: 1040px) {
  .offer-cols { display: none; }
  .offer {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 32px;
    grid-template-areas:
      "head  head head  more"
      "rate  rate rate  rate"
      "gross net  value value"
      "detail detail detail detail";
    row-gap: 10px;
    padding: 14px 12px;
  }
  .offer-y { align-items: flex-start; text-align: left; align-self: start; }
  .offer-y small { display: block; }
  .offer-detail p { padding-left: 0; }
  .offer-detail p:first-child { padding-top: 0; }
  .offer + .offer::before { left: 14px; }
}

/* =========================================================================
   Movimento (js/motion.js e js/timeline.js)
   ========================================================================= */

/* Títulos: palavra por palavra, subindo de um desfoque. O cabeçalho não sobe mais inteiro;
   o título entra pelas palavras, o sobretítulo se embaralha e os botões chegam depois. */
.words .tw {
  display: inline-block; white-space: pre;
  animation:
    twRise var(--sp-text-ms, .9s) var(--sp-text, var(--ease)) both,
    twFade .85s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--wd, 0ms) + var(--wi) * 90ms);
}
@keyframes twRise { from { transform: translateY(40%); } }
@keyframes twFade { from { opacity: 0; filter: blur(12px); } }
.page-head.reveal { animation: none; }
.page-head .head-actions { animation: rise .7s var(--ease) both .3s; }
.no-reveal .page-head .head-actions { animation: none; }

/* Brilho que segue o ponteiro nos cartões que inclinam */
.tilt-glare {
  position: absolute; inset: 0; z-index: 6; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--fg) 13%, transparent), transparent 55%);
  opacity: 0; transition: opacity .45s var(--ease);
}
.tilting .tilt-glare { opacity: 1; }
.tilting-3d { will-change: transform; }

/* Carregadores */
.ldr { display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); color: var(--accent); }
.ldr svg { display: block; overflow: visible; }
.ldr-comet { position: relative; width: 100%; height: 100%; animation: ldrSpin .9s linear infinite; }
.ldr-comet i {
  position: absolute; top: 50%; left: 50%;
  width: calc(var(--s) * .2 * (1 - var(--k) * .13)); aspect-ratio: 1; border-radius: 50%;
  background: currentColor; opacity: calc(1 - var(--k) * .16);
  transform: translate(-50%, -50%) rotate(calc(var(--k) * -15deg)) translateY(calc(var(--s) * -.4));
}
@keyframes ldrSpin { to { transform: rotate(360deg); } }
.ldr-dots { display: flex; align-items: center; gap: calc(var(--s) * .14); }
.ldr-dots i { width: calc(var(--s) * .22); aspect-ratio: 1; border-radius: 50%; background: currentColor; animation: ldrDot 1s cubic-bezier(.77, 0, .175, 1) infinite; }
.ldr-dots i:nth-child(2) { animation-delay: .16s; }
.ldr-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes ldrDot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(calc(var(--s) * -.3)); opacity: 1; } }
.ldr-calm { width: 60%; height: 60%; border-radius: 50%; background: currentColor; animation: ldrCalm 1.4s ease-in-out infinite; }
@keyframes ldrCalm { 50% { opacity: .35; } }

/* Texto de espera com um brilho que atravessa as letras */
.shimmer-text {
  background: linear-gradient(100deg, var(--muted) 40%, var(--fg) 50%, var(--muted) 60%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: textSweep 2.4s linear infinite;
}
@keyframes textSweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.wait-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 140px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
  font-size: 12.5px; font-weight: 500;
}
.btn .ldr { margin: -2px 0; }

/* ---------- Linha do tempo (Futuro) ---------- */
.tl-card .card-head { margin-bottom: 4px; }
.tl-nav { display: flex; align-items: center; gap: 4px; }
.tl-count { min-width: 52px; text-align: center; font: 600 12.5px var(--font-num); color: var(--muted); font-variant-numeric: tabular-nums; }
.tlx { position: relative; margin: 0 -22px -22px; }
.tlx-stage {
  position: relative; height: 330px; overflow: hidden;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.tlx-stage.dragging { cursor: grabbing; }
.tlx-months { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; pointer-events: none; }
.tlx-month {
  position: absolute; left: 0; top: calc(var(--fs, 96px) * .06);
  font: 650 var(--fs, 96px)/1 var(--font-display); font-variation-settings: "opsz" 96;
  letter-spacing: -.06em; white-space: nowrap;
  color: color-mix(in srgb, var(--fg) 7%, transparent);
}
.tlx-cables { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.tlx-cables line { stroke: color-mix(in srgb, var(--fg) 16%, transparent); stroke-width: 1; }
.tlx-ticks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.tlx-gap { position: absolute; left: 0; top: 0; display: flex; align-items: center; }
.tlx-gap i { display: block; width: 1px; border-radius: 1px; background: color-mix(in srgb, var(--fg) 20%, transparent); }
.tlx-gap i.mid { background: color-mix(in srgb, var(--fg) 42%, transparent); }
.tlx-track { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.tlx-item { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; will-change: transform; }
.tlx-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px 14px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, .7);
}
.tlx-veil { position: absolute; inset: -1px; background: var(--surface); pointer-events: none; }
.tlx-hit { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: none; border-radius: 22px; cursor: pointer; }
.tlx-stage.dragging .tlx-hit { cursor: grabbing; }
.tlx-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tlx-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tlx-when { height: 22px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--surface-3); color: var(--fg-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tlx-when.soon { background: var(--accent-soft); color: var(--accent); }
.tlx-date { font-size: 12px; color: var(--muted); }
.tlx-title { font: 650 16px/1.25 var(--font-display); letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlx-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlx-amt { margin-top: 8px; font: 600 26px/1.1 var(--font-num); letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlx-after {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.tlx-after span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlx-after b { flex: none; font: 600 13px var(--font-num); color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlx-after b.neg-text { color: var(--neg); }
@media (max-width: 760px) { .tlx { margin: 0 -18px -18px; } .tlx-stage { height: 320px; border-radius: 0 0 22px 22px; } }

/* ---------- Galeria em leque (Seus meses) ----------
   Ideia do Cool Slide Gallery do Lightswind UI: a perspectiva fica no palco e cada cartão recebe
   o próprio transform 3D (gallery.js); a ordem de cima para baixo vem do z-index. */
.months-card .card-head { margin-bottom: 0; }
.cg { position: relative; }
.cg-stage { position: relative; perspective: 1500px; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.cg.dragging .cg-stage { cursor: grabbing; }
.cg-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-lg); }
.cg-card {
  position: absolute; left: 50%; top: 50%;
  aspect-ratio: 1080 / 1350; border-radius: 20px; overflow: hidden;
  background: #0b0f10;
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .85), 0 0 0 1px var(--line-2);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.cg.dragging .cg-card { transition: transform .12s linear; }
.cg-media { width: 100%; height: 100%; }
.cg-media img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; animation: cgImg .5s var(--ease) both; }
@keyframes cgImg { from { opacity: 0; transform: scale(1.04); } }
.cg-media .wait-block { height: 100%; border-radius: 0; background: transparent; }
.cg-media .ldr { color: #5edce8; }
.cg-media .shimmer-text { background-image: linear-gradient(100deg, rgba(238, 245, 246, .45) 40%, #eef5f6 50%, rgba(238, 245, 246, .45) 60%); }
.cg-veil { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s cubic-bezier(.22, 1, .36, 1); }
.cg-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  height: 24px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px;
  background: rgba(6, 8, 8, .66);
  color: #eef5f6; font: 600 11px/1 var(--font-body); letter-spacing: .01em;
}
.cg-card.is-active { cursor: pointer; }
.cg-arrow {
  position: absolute; top: 50%; z-index: 200; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--fg); cursor: pointer; transition: opacity .2s, background-color .2s;
}
@media (hover: hover) { .cg-arrow:hover { background: var(--surface-2); } }
.cg-arrow:disabled { opacity: 0; pointer-events: none; }
.cg-arrow .ico { width: 18px; height: 18px; }
.cg-arrow.prev { left: 4px; }
.cg-arrow.next { right: 4px; }
.cg-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.cg-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: width .4s var(--ease), background-color .25s; }
.cg-dots button[aria-selected="true"] { width: 22px; background: var(--accent); }
.months-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2);
}
.mc-title b { display: block; font: 650 15px/1.3 var(--font-display); letter-spacing: -.01em; }
.mc-title span { font-size: 12.5px; color: var(--muted); }
.months-cap dl { display: flex; gap: 24px; margin: 0; }
.months-cap dt { font-size: 11.5px; color: var(--muted); }
.months-cap dd { margin: 0; font: 650 16px var(--font-num); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .months-cap dl { gap: 16px; } .cg-arrow { display: none; } }

/* ---------- Cartões ----------
   A frente do cartão é desenhada em CSS e escala pelo próprio tamanho: o cartão é um contêiner
   e os textos usam cqw (porcentagem da largura), então o mesmo desenho serve de 64px a 300px. */
.ccard {
  position: relative; container-type: inline-size; isolation: isolate;
  width: 100%; aspect-ratio: 1.586; border-radius: 5.4% / 8.6%; overflow: hidden;
  background: var(--cc-bg); color: var(--cc-fg); text-align: left;
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.cc-in { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 6.4cqw 7cqw 6cqw; }
.cc-top, .cc-mid, .cc-bot { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; min-width: 0; }
.cc-mark { font: 700 7.6cqw/1 var(--font-display); letter-spacing: -.035em; white-space: nowrap; }
/* logo de verdade do banco (cards.js); a altura vem de cada logo em % da largura do cartão */
.cc-logo { display: inline-flex; align-items: center; gap: 2.2cqw; height: var(--lh, 9cqw); min-width: 0; }
.cc-logo img { display: block; height: 100%; width: auto; max-width: 46cqw; object-fit: contain; -webkit-user-drag: none; }
.cc-logo.m-white img { filter: brightness(0) invert(1); }
.cc-logo.m-invert img { filter: invert(1); }
/* logo "pintada": o desenho é máscara e a cor vem do cartão (o dourado dos Ourocard novos) */
.cc-ink-logo {
  display: block; height: 100%; background: var(--cc-ink, var(--cc-fg));
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: left center; mask-position: left center;
}.cc-logo.has-img .cc-mark { display: none; }
.cc-word { font: 700 6.8cqw/1 var(--font-display); letter-spacing: -.035em; color: var(--cc-fg); white-space: nowrap; }.cc-m-nu { font-size: 12.5cqw; letter-spacing: -.08em; }
.cc-m-heavy { font-size: 10cqw; font-weight: 800; letter-spacing: -.05em; }
.cc-m-caps { font-size: 4.4cqw; letter-spacing: .2em; text-transform: uppercase; }
.cc-m-box { font-size: 4.8cqw; font-weight: 800; letter-spacing: -.02em; padding: 1.7cqw 1.9cqw; border-radius: 1.6cqw; background: var(--cc-fg); color: #121212; }
.cc-status, .cc-nick {
  font: 600 3.7cqw/1 var(--font-body); padding: 1.9cqw 3.3cqw; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--cc-fg) 20%, transparent); color: var(--cc-fg);
}
.cc-status.closed { background: rgba(255, 107, 94, .9); color: #fff; }
.cc-chip { position: relative; flex: none; width: 11cqw; aspect-ratio: 1.3; border-radius: 1.8cqw; background: linear-gradient(135deg, #f5e19c, #c79f45 55%, #ead08a); box-shadow: inset 0 0 0 .35cqw rgba(0, 0, 0, .2); }
.cc-chip::before { content: ""; position: absolute; left: 0; right: 0; top: 30%; bottom: 30%; border-top: .3cqw solid rgba(0, 0, 0, .28); border-bottom: .3cqw solid rgba(0, 0, 0, .28); }
.cc-chip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: .3cqw solid rgba(0, 0, 0, .28); }
.cc-chip.silver { background: linear-gradient(135deg, #f2f4f6, #9aa3ab 55%, #dfe3e7); }
.cc-label { flex: 1; min-width: 0; text-align: center; font: 600 3.7cqw/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; color: var(--cc-ink, inherit); }
.cc-nfc { flex: none; width: 6.4cqw; height: 6.4cqw; opacity: .85; }
.cc-f { min-width: 0; }
.cc-f small { display: block; margin-bottom: .8cqw; font: 600 2.8cqw/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.cc-f b { display: block; font: 600 4.5cqw/1.1 var(--font-mono); letter-spacing: .02em; white-space: nowrap; }
.cc-free { margin-left: auto; text-align: right; }
.cc-net { flex: none; display: flex; align-items: center; justify-content: flex-end; min-width: 12cqw; }
.cc-mc { width: 13cqw; height: auto; display: block; }
.cc-visa-img { display: block; height: 5.8cqw; width: auto; -webkit-user-drag: none; }
.cc-elo { display: inline-flex; align-items: center; gap: .7cqw; font: 800 6.4cqw/1 var(--font-display); letter-spacing: -.03em; }
.cc-elo i { width: 1.9cqw; aspect-ratio: 1; border-radius: 50%; }
.cc-elo i:nth-child(1) { background: #ffcb05; } .cc-elo i:nth-child(2) { background: #00a4e0; } .cc-elo i:nth-child(3) { background: #ef4123; }
.cc-amex { font: 800 3.5cqw/1 var(--font-body); letter-spacing: .06em; padding: 1.6cqw 1.8cqw; border-radius: 1cqw; background: #2e77bc; color: #fff; }
.cc-sheen { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .12) 44%, transparent 58%); }

/* seção Cartões (Futuro) */
.cards-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs-total { display: block; margin-top: 8px; font: 600 clamp(30px, 3.6vw, 42px)/1.05 var(--font-num); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.cards-actions { display: flex; align-items: center; gap: 4px; }
.cards-row {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -22px; padding: 20px 22px 24px; scroll-padding-inline: 22px; scrollbar-width: none;
}
.cards-row::-webkit-scrollbar { display: none; }
.cs-item {
  flex: none; width: min(300px, 76vw); padding: 0; border: 0; background: none; cursor: pointer;
  scroll-snap-align: start; border-radius: 16px;
  transition: opacity .3s, filter .3s, transform .45s var(--ease);
}
.cs-item[aria-selected="false"] { opacity: .55; filter: saturate(.75); transform: scale(.955); }
@media (hover: hover) { .cs-item[aria-selected="false"]:hover { opacity: .85; } }
.cs-item[aria-selected="true"] { outline: 2px solid var(--accent); outline-offset: 5px; }
.cs-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.cs-add {
  flex: none; width: min(210px, 56vw); height: calc(min(300px, 76vw) / 1.586); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 16px;
  border: 1.5px dashed var(--line-2); border-radius: 16px; background: transparent; color: var(--fg-2); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
@media (hover: hover) { .cs-add:hover { border-color: var(--accent); background: var(--accent-soft); } }
.cs-add .ico { width: 22px; height: 22px; }
.cs-add b { font-size: 14px; color: var(--fg); }
.cs-add small { font-size: 12px; color: var(--muted); text-align: center; }
.cards-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cd-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.cd-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.cd-row b { color: var(--fg); font: 600 14px var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-row b small { font: 500 12px var(--font-body); color: var(--muted); }
.cd-block .progress { height: 8px; }
.cd-block .bill-next { margin: 0; }
.cd-block .bill-comp { margin: 0; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--accent); font: 600 12.5px var(--font-body); cursor: pointer; }
.link-btn .ico { width: 14px; height: 14px; }
@media (max-width: 900px) { .cards-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .cards-row { margin: 0 -18px; padding-inline: 18px; scroll-padding-inline: 18px; } }

/* formulário do cartão */
.cf-preview { width: min(300px, 100%); margin: 0 auto 6px; }
.cf-search { position: relative; }
.cf-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.cf-search .input { padding-left: 36px; }
.cf-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 8px; padding: 2px; }
.cf-models::-webkit-scrollbar-track { margin: 6px 0; }
.cf-bank { grid-column: 1 / -1; margin-top: 8px; font: 600 11px var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cf-bank:first-child { margin-top: 2px; }
.cf-model { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--fg-2); font-size: 11.5px; line-height: 1.25; text-align: left; cursor: pointer; transition: background-color .2s, border-color .2s; }
@media (hover: hover) { .cf-model:hover { background: var(--surface-2); } }
.cf-model[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.ccard.mini { box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .09); }
.ccard.mini .cc-f { visibility: hidden; } /* na miniatura o final do cartão vai ao lado, em texto */

/* escolha do cartão no lançamento */
.card-pick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.cp-opt { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--fg); text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s; }
.cp-opt .ccard { width: 62px; flex: none; }
.cp-opt > span { display: flex; flex-direction: column; }
.cp-opt b { font-size: 13px; font-weight: 600; }
.cp-opt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cp-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cp-add { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px dashed var(--line-2); border-radius: 14px; background: none; color: var(--fg-2); font-size: 13px; cursor: pointer; }
.cp-add .ico { width: 16px; height: 16px; }

/* ---------- Conta e sincronização ---------- */
.acct-btn { position: relative; }
.acct-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px var(--bg); transform: scale(0); transition: transform .3s var(--spring), background-color .3s; }
.acct-btn[data-state="ok"] .acct-dot { background: var(--pos); transform: scale(1); }
.acct-btn[data-state="sync"] .acct-dot { background: var(--accent); transform: scale(1); animation: acctPulse 1s ease-in-out infinite; }
.acct-btn[data-state="error"] .acct-dot { background: var(--neg); transform: scale(1); }
@keyframes acctPulse { 50% { opacity: .35; } }
.acct { display: flex; flex-direction: column; gap: 14px; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.acct-avatar { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 18px var(--font-display); }
.acct-head b { display: block; font-size: 14.5px; font-weight: 600; word-break: break-all; }
.acct-state { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.acct-state[data-state="ok"] { color: var(--pos); }
.acct-state[data-state="error"] { color: var(--neg); }
.acct-text { font-size: 13.5px; color: var(--fg-2); line-height: 1.5; }
.acct .form { margin-top: 2px; }
.acct .form-actions { justify-content: space-between; align-items: center; }
/* ---------- Portão (app.html sem login) ----------
   Cobre o app inteiro (acima da barra e da dock, abaixo de janelas e avisos). Enquanto a sessão
   é conferida, só a marca dobrando a fita; sem login, a tela de entrar ou criar conta. */
.gate { display: none; }
[data-auth] .gate {
  display: grid; position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background:
    radial-gradient(700px 420px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--bg);
}
html[data-auth] { overflow: hidden; }
.gate-splash { place-self: center; width: 64px; height: 64px; }
.gate-splash svg { width: 100%; height: 100%; overflow: visible; }
.gate-splash .bm-top { animation: gTop .8s var(--ease) both .1s; }
.gate-splash .bm-fold { transform-origin: 6px 5px; animation: gFold .7s var(--ease) both; }
.gate-splash .bm-bot { animation: gTop .8s var(--ease) both .22s; }
.gate-splash svg { animation: gBreathe 1.8s ease-in-out infinite alternate 1s; }
@keyframes gTop { from { transform: translateX(10px); opacity: 0; } }
@keyframes gFold { from { transform: scaleY(0); } }
@keyframes gBreathe { to { opacity: .55; } }
.gate-wrap {
  width: min(100%, 440px); margin: auto; padding: 32px 20px 28px;
  display: flex; flex-direction: column; gap: 22px;
}
.gate-brand { display: inline-flex; align-items: center; gap: 10px; align-self: center; text-decoration: none; }
.gate-brand svg { width: 34px; height: 34px; }
.gate-brand span { font: 700 24px/1 var(--font-display); letter-spacing: -.05em; }
.gate-card {
  padding: 28px 26px 24px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg), var(--edge);
  animation: rise .6s var(--ease) both;
}
.gate-title { margin: 0; font: 700 30px/1.05 var(--font-display); letter-spacing: -.045em; font-variation-settings: "opsz" 48; }
.gate-title em { font-style: normal; font-weight: 300; color: var(--accent); }
.gate-sub { margin: 8px 0 20px; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.gate-form .form { margin-top: 16px; }
.gate-down p { font-size: 14px; color: var(--fg-2); margin: 0 0 14px; }
.gate-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.gate-foot a { font-size: 13px; color: var(--muted); text-underline-offset: 3px; }
@media (hover: hover) { .gate-foot a:hover { color: var(--fg-2); } }

/* Senha: botão de mostrar dentro do campo e a lista de regras que se marca ao digitar */
.pw-wrap { position: relative; }
.pw-wrap .input { width: 100%; padding-right: 46px; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s;
}
@media (hover: hover) { .pw-eye:hover { color: var(--fg); background: var(--surface-2); } }
.pw-eye .ico { width: 18px; height: 18px; }
.pw-rules { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px 16px; }
.pw-rules[hidden] { display: none; }
.pw-rules li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); transition: color .25s var(--ease); }
.pw-rules i {
  position: relative; flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--fg) 28%, transparent);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.pw-rules i::after {
  content: ""; position: absolute; left: 3.6px; top: 1.2px; width: 3.4px; height: 6.6px;
  border: solid var(--cta-ink); border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) scale(0); transition: transform .3s var(--spring);
}
.pw-rules li.ok { color: var(--fg-2); }
.pw-rules li.ok i { background: var(--pos); border-color: var(--pos); }
.pw-rules li.ok i::after { transform: rotate(45deg) scale(1); }
.pw-rules li.miss { color: var(--neg); }
.pw-rules li.miss i { border-color: var(--neg); }

/* Aceite dos termos no cadastro: caixa própria sobre o checkbox nativo (mantém teclado e leitor de tela) */
.consent {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.5; color: var(--fg-2); cursor: pointer;
  transition: border-color .2s var(--ease);
}
.consent a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.consent input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 20px; height: 20px; margin: 0; border-radius: 6px; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--fg) 34%, transparent); background: var(--surface);
  display: grid; place-items: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.consent input::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px;
  border: solid var(--cta-ink); border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg) scale(0); transition: transform .28s var(--spring);
}
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent input:checked::after { transform: rotate(45deg) scale(1); }
.consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent.invalid { border-color: var(--neg); }
.consent.invalid input { border-color: var(--neg); }
.acct-danger { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.acct-danger h3 { margin: 0; font-size: 14px; font-weight: 600; }
.acct-danger p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.acct-danger [data-del] { align-self: stretch; margin-top: 4px; }
.acct-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 0; }
.acct-legal a { font-size: 12.5px; color: var(--muted); text-underline-offset: 3px; }
@media (hover: hover) { .acct-legal a:hover { color: var(--fg-2); } }
.set-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.set-links a { color: var(--accent); font-weight: 600; font-size: 13.5px; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.form-ok { font-size: 13px; color: var(--pos); line-height: 1.45; }
.form-ok:empty { display: none; }
.acct-choice { display: flex; flex-direction: column; gap: 14px; }

/* fatura em painel */
.bill-sheet .bs-card { width: min(280px, 82%); margin: 0 auto 14px; }
.bs-sum { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 12px; text-align: center; }
.bs-sum span { font-size: 12.5px; color: var(--muted); }
.bs-sum b { font: 600 30px/1.15 var(--font-num); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bs-sum small { font-size: 12px; color: var(--muted); }
