/* ==========================================================================
   Radar Ibovespa · sistema visual
   Referências: Wealthsimple (menu flutuante, pílulas, tipografia geométrica),
   Stripe e Betterment (contenção, cartões limpos, muito respiro).
   ========================================================================== */

:root {
  color-scheme: light;
  --ground: #F3F2EF; --surface: #FFFFFF; --surface2: #F6F5F2; --thumb: #FFFFFF;
  --ink: #111214; --ink2: #3F4247; --muted: #6B6F76;
  --line: #E7E5E0; --line2: #D9D6CF; --track: #ECEAE5;
  --accent: #3E5FD8; --up: #0A8754; --down: #C53D33; --con: #C9C6BF;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 10px 30px -12px rgba(17, 18, 20, .10);
  --shadow-lg: 0 2px 6px rgba(17, 18, 20, .05), 0 24px 48px -20px rgba(17, 18, 20, .22);
  --scroll: #CFCBC3; --scroll-hover: #A9A49B;
  /* Todas as fotos recebem o mesmo tom azulado, para nenhuma destoar do site */
  --photo-filter: grayscale(1) sepia(.28) hue-rotate(182deg) saturate(1.3) contrast(1.04);
  --photo-hover: grayscale(.1) saturate(.95);
  --glow1: 20%; --glow2: 12%; --glow3: 10%; --dots: 9%;
  --radius: 22px; --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: var(--display);
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0C0D0F; --surface: #15171A; --surface2: #1C1F23; --thumb: #2B2F36;
    --ink: #F2F3F5; --ink2: #C3C7CE; --muted: #8E939C;
    --line: #23262B; --line2: #32363D; --track: #272B31;
    --accent: #93A8FF; --up: #3DD68C; --down: #FF7B72; --con: #3A3E45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -14px rgba(0, 0, 0, .55);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 28px 56px -18px rgba(0, 0, 0, .7);
    --scroll: #3A3E45; --scroll-hover: #555A63;
    --photo-filter: grayscale(1) sepia(.28) hue-rotate(182deg) saturate(1.3) contrast(1.06) brightness(.78);
    --photo-hover: grayscale(.1) saturate(.95) brightness(.9);
    --glow1: 18%; --glow2: 10%; --glow3: 9%; --dots: 7%;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.6 var(--sans);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* Fundo ambiente: brilhos suaves nas cores do site e uma grade de pontos discreta no topo,
   para as seções parecerem parte de um mesmo espaço. Fica atrás de tudo e não recebe cliques. */
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(60vw 42vw at 6% -8%, color-mix(in srgb, var(--accent) var(--glow1), transparent), transparent 70%),
    radial-gradient(48vw 36vw at 98% 2%, color-mix(in srgb, var(--up) var(--glow2), transparent), transparent 70%),
    radial-gradient(70vw 40vw at 50% 112%, color-mix(in srgb, var(--accent) var(--glow3), transparent), transparent 70%);
}
body::after {
  background-image: radial-gradient(color-mix(in srgb, var(--ink) var(--dots), transparent) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 25%, transparent 75%);
}
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
figure { margin: 0; }
.wrap { max-width: 1560px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); }
main:focus { outline: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-hover); }
::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; } }

/* Acessibilidade (Lei 13.146/2015): foco visível, atalho para o conteúdo */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--ground); font-size: 14px; }
.skip:focus { top: 12px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4, .big, .quote, .phrase, .quote-price, .pick-line p, .scen-pct .num, .rates .v, .stats3 .v,
.sim-row-head .total, .big-price, .goal-title, .gloss dt, .brand, .out-title { font-family: var(--display); }
h1 { margin: 0; font-size: clamp(40px, 5.2vw, 68px); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; max-width: 900px; }
h2 { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.h1-sm { font-size: clamp(36px, 4.2vw, 54px); }
.eyebrow { margin: 0 0 16px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { margin: 20px 0 0; max-width: 640px; font-size: 17px; color: var(--ink2); }
.sub { margin: 0 0 22px; font-size: 13.5px; color: var(--muted); }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); } .accent { color: var(--accent); }
.quote { margin: 0; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.18; letter-spacing: -.025em; }
.quote-sm { font-size: clamp(21px, 2vw, 26px); line-height: 1.25; }
.credit { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }

/* ---------- Faixa de cotações (animada por JS: contínua, sem saltos) ---------- */
.ticker { position: relative; display: flex; height: 36px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ticker-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-group { display: flex; }
.tick { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; background: none;
  font: inherit; color: var(--ink); white-space: nowrap; position: relative; }
.tick + .tick::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
button.tick { cursor: pointer; transition: background-color .2s ease; }
button.tick:hover { background: var(--surface2); }
.tick b { font-weight: 600; letter-spacing: .02em; }
.tick .p { color: var(--ink2); }
.ticker-pause { flex: none; width: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0;
  border-left: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.ticker-pause:hover { color: var(--ink); }

/* ---------- Cabeçalho: barra flutuante e translúcida ---------- */
/* O fundo do cabeçalho esconde o conteúdo que rola por trás da faixa e se dissolve
   embaixo, para a barra flutuante continuar parecendo solta sobre a página. */
header { position: sticky; top: 0; z-index: 20; padding-bottom: 14px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ground) 96%, transparent) 0%,
    color-mix(in srgb, var(--ground) 96%, transparent) 58%, transparent 100%); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  margin-top: 12px; padding: 8px 8px 8px 22px; border: 1px solid var(--line); border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px);
  transition: box-shadow .3s ease, background-color .3s ease; }
@media (min-width: 1100px) { .bar { border-radius: 999px; } }
header.scrolled .bar { box-shadow: var(--shadow-lg); }
.brand { font-size: 21px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { color: var(--ink); }

/* Abas: seletor em pílula com destaque que desliza */
.tabs { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface2);
  overflow-x: auto; scrollbar-width: none; order: 3; flex: 1 1 100%; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .tabs { order: 0; flex: 0 1 auto; } }
.tab { position: relative; z-index: 1; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .25s ease; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tab-indicator { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 0 0 1px var(--line);
  transition: transform .45s var(--ease), width .45s var(--ease); }
.status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
#statusText { margin-right: 6px; }
/* No celular: marca e botões numa linha só, abas logo abaixo, tudo mais compacto */
@media (max-width: 640px) {
  header { padding-bottom: 8px; }
  .bar { margin-top: 8px; padding: 8px; gap: 8px; border-radius: 20px; }
  .brand { font-size: 19px; padding-left: 8px; }
  .status { gap: 6px; }
  #statusText, .status .dot { display: none; }
  .icon-btn { width: 36px; height: 36px; }
  .tab { min-height: 34px; padding: 0 13px; font-size: 13.5px; }
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--con); flex: none; }
.dot.open { background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 20%, transparent); }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 0; border-radius: 50%; background: var(--surface2); color: var(--ink2); transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.icon-btn:hover { background: var(--track); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .5; cursor: default; }

/* ---------- Seções ---------- */
.hero { padding: 48px 0 8px; }
.block { padding: 56px 0 0; }
@media (max-width: 640px) { .hero { padding: 32px 0 0; } .block { padding: 40px 0 0; } }

/* Painéis: listas e conteúdos agrupados em superfícies arredondadas */
.panel, .cols > div, .table-box, .sim-form, .example, .legal-note, .story-list {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.cols > div { min-width: 0; padding: 26px 26px 18px; }
.cols > div > h2 { font-size: 22px; }

.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card { flex: 1 1 260px; min-width: 0; padding: 26px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease; }
.card[data-stock] { cursor: pointer; }
.card[data-stock]:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .grid4, .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid4, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bolsa: painel principal ---------- */
#bolsa > .hero { margin-top: 20px; padding: clamp(28px, 4vw, 56px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow); }
.hero-row { display: flex; flex-wrap: wrap; gap: 32px 80px; align-items: flex-end; }
.hero-row > :first-child { flex: 999 1 520px; min-width: 0; }
.hero-row > :last-child { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.big { margin: 0; font-size: clamp(64px, 9vw, 120px); font-weight: 700; line-height: .95; letter-spacing: -.05em; }
.phrase { margin: 22px 0 0; max-width: 620px; font-size: clamp(19px, 1.8vw, 24px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.split { display: flex; height: 8px; gap: 4px; }
.split > div { min-width: 4px; border-radius: 999px; }
.legend { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.legend b { font-weight: 600; }
.quote-head { display: flex; align-items: center; gap: 12px; }
.quote-price { font-size: 30px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.quote-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-top: 16px; }

/* Linhas de ação: botões inteiros, com resposta ao passar o mouse */
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; }
button.row { width: calc(100% + 16px); margin: 0 -8px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
button.row:hover { background: var(--surface2); }
button.row:active { transform: scale(.995); }
.row + .row { box-shadow: 0 -1px 0 var(--line); }
.row:hover + .row, .row:hover { box-shadow: none; }
.row .who { flex: 1 1 auto; min-width: 0; }
.row .tk, .row .nm { display: block; }
.tk { margin: 0; font-weight: 600; letter-spacing: .01em; }
.nm { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .px { width: 96px; text-align: right; color: var(--ink2); }
.row .ch { min-width: 84px; padding: 4px 10px; border-radius: 999px; text-align: right; font-weight: 600; font-size: 13.5px; }
.row .ch.up { background: color-mix(in srgb, var(--up) 12%, transparent); }
.row .ch.down { background: color-mix(in srgb, var(--down) 12%, transparent); }

.logo { position: relative; overflow: hidden; width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex;
  align-items: center; justify-content: center; background: var(--surface2); border: 1px solid var(--line);
  color: var(--ink2); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.drawer .logo { width: 52px; height: 52px; font-size: 14px; }

/* Tabela */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
input[type=search], select, input[type=text], input[type=password], input[type=number] {
  font: inherit; font-size: 14px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=search] { min-width: min(320px, 100%); }
.table-box { overflow: auto; max-height: 640px; padding: 6px 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { position: sticky; top: -6px; z-index: 1; background: var(--surface); font-weight: 600; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
th button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
th button:hover { color: var(--ink); }
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: var(--surface2); }
.num { text-align: right; }
.tk-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
.tk-btn:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Preço que acabou de mudar pisca na cor da direção */
.flash-up { animation: flashUp 1.8s ease; }
.flash-down { animation: flashDown 1.8s ease; }
@keyframes flashUp { from { background-color: color-mix(in srgb, var(--up) 22%, transparent); } }
@keyframes flashDown { from { background-color: color-mix(in srgb, var(--down) 22%, transparent); } }

/* ---------- Fotos com frases ---------- */
.shot { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
  filter: var(--photo-filter); transition: filter .6s ease, transform .8s var(--ease); }
.media:hover .shot, .news-card:hover .shot, .lead:hover .shot { filter: var(--photo-hover); }
.feature-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.feature-split > .media { grid-column: 1 / span 6; grid-row: 1; aspect-ratio: 4 / 3; position: relative; }
.feature-split > .copy { grid-column: 8 / span 5; grid-row: 1; min-width: 0; }
.feature-split.flip > .media { grid-column: 7 / span 6; aspect-ratio: 4 / 5; }
.feature-split.flip > .copy { grid-column: 1 / span 5; }
@media (max-width: 900px) {
  .feature-split > .media, .feature-split > .copy, .feature-split.flip > .media, .feature-split.flip > .copy { grid-column: 1 / -1; grid-row: auto; }
  .feature-split.flip > .media { aspect-ratio: 4 / 3; }
}
.tag-over { position: absolute; left: -36px; bottom: 36px; max-width: 320px; margin: 0; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  font: 600 19px/1.35 var(--display); letter-spacing: -.01em; }
@media (max-width: 900px) { .tag-over { left: 14px; right: 14px; bottom: 14px; max-width: none; font-size: 17px; } }
.feature-overlap { position: relative; margin-top: 48px; padding-bottom: 72px; }
.feature-overlap > .media { height: 440px; }
.card-over { position: absolute; bottom: 0; right: 40px; width: min(460px, 70%); padding: 30px 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.feature-overlap.left .card-over { right: auto; left: 40px; }
.card-over .muted { margin: 12px 0 0; font-size: 14.5px; }
@media (max-width: 760px) {
  .feature-overlap { padding-bottom: 0; }
  .feature-overlap > .media { height: 240px; }
  .card-over, .feature-overlap.left .card-over { position: relative; left: auto; right: auto; width: auto; margin: -40px 14px 0; padding: 22px; }
}

/* ---------- Botões e links de ação ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600;
  transition: background-color .2s ease, transform .2s ease, border-color .2s ease; }
.btn:hover { border-color: var(--ink2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.linkline { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin-top: 12px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--surface2); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background-color .2s ease, transform .2s ease; }
.linkline:hover { background: var(--track); color: var(--ink); }
.linkline:active { transform: scale(.97); }
.linkline:disabled { opacity: .5; cursor: default; }
.textbtn { min-height: 44px; border: 0; background: none; padding: 0; font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px; }
.textbtn:hover { color: var(--ink); }
.mini { min-height: 38px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; }
.mini:hover { border-color: var(--ink2); }
.badge { display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--surface2);
  border: 1px solid var(--line2); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; vertical-align: 2px; }

/* ---------- Notícias ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 28px 0 8px; }
.chip { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 500; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.chip:hover { border-color: var(--line2); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.lead { display: flex; flex-wrap: wrap; gap: 28px 48px; margin-top: 28px; padding: clamp(18px, 2.5vw, 28px); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.lead .lead-img { flex: 1 1 460px; min-width: 0; }
.lead .lead-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.lead .lead-text { flex: 1 1 400px; min-width: 0; padding: 8px; }
.lead h3 { margin: 0; font-size: clamp(26px, 2.8vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.kicker { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.news-card { padding: 14px 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card > :not(figure) { margin-left: 6px; margin-right: 6px; }
.news-card .media-169 { aspect-ratio: 16 / 9; margin-bottom: 16px; }
.news-card .shot { border-radius: 14px; }
.news-card .textbtn { margin-top: 6px; }
.news-card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.news-card .kicker { margin-bottom: 8px; }
.reading { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface2); font-size: 14.5px; color: var(--ink2); }
.reading b { color: var(--ink); font-weight: 600; }
.legal ul { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 10px; max-width: 820px; color: var(--ink2); }
.meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.title-link { text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
#newsList { padding: 6px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.story { display: flex; flex-wrap: wrap; gap: 4px 40px; padding: 20px 0; align-items: baseline; }
.story + .story { border-top: 1px solid var(--line); }
.story > :first-child { flex: 1 1 180px; margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.story > :last-child { flex: 999 1 560px; min-width: 0; }
.story h4 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }

/* ---------- Análise ---------- */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps li { display: flex; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.steps .n, .howto .n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 700 14px/1 var(--display); }
.steps p { margin: 0; color: var(--ink2); }
.steps b { color: var(--ink); font-weight: 600; }
.scen { flex: 1 1 480px; padding: 28px; gap: 18px; }
.scen-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.scen-head h3 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.scen-pct { text-align: right; flex: none; }
.scen-pct p { margin: 0; }
.scen-pct .k, .tone-k { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tone-k { margin: 0; }
.scen-pct .num { margin-top: 4px; font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.scen-pct .from { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.effects { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .howto { grid-template-columns: minmax(0, 1fr); } }
.howto li { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.howto .n { margin-bottom: 14px; }
.howto b { display: block; margin-bottom: 6px; font-weight: 700; }
.howto p { margin: 0; font-size: 14.5px; color: var(--ink2); }
.example { margin-top: 20px; padding: 26px 30px; }
.example p { margin: 0; }
.info .ex-title { margin: 16px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mini-heads { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.mini-heads li { font-size: 14px; line-height: 1.45; }
.mini-heads a { text-decoration: none; }
.mini-heads a:hover { text-decoration: underline; }
.mini-heads span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.plain { margin: 0; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface2); font-size: 16px; line-height: 1.5; color: var(--ink); }
.yours { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.yours label { font-size: 13px; color: var(--muted); }
.yours output { font-weight: 700; font-family: var(--display); }
.yours input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); min-height: 28px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Previsões ---------- */
.factors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.factor { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.factor p { margin: 0; }
.factor .what { font-weight: 600; }
.factor .why { margin-top: 4px; font-size: 14px; color: var(--ink2); }
.meter { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.meter + .meter { border-top: 1px solid var(--line); }
.meter .label { flex: 0 0 190px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter .track { flex: 1 1 auto; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter .track div { height: 8px; border-radius: 999px; }
.meter .val { flex: 0 0 56px; text-align: right; font-weight: 700; }
@media (max-width: 640px) { .meter .label { flex-basis: 120px; } }
.pick-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pick-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pick-line p { margin: 0; font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }

/* ---------- Simulador ---------- */
.sim { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-start; }
.sim-form { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 28px; position: sticky; top: 140px; }
@media (max-width: 1000px) { .sim-form { position: static; } }
.sim-out { flex: 999 1 560px; min-width: 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field .q { display: flex; align-items: center; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
/* Carteira: uma linha por ação, com busca, peso e remover */
.pick-head, .pick-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; gap: 8px; align-items: center; }
.pick-head { margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pick-row input[type=text] { width: 100%; min-width: 0; text-overflow: ellipsis; }
.pick-weight { display: flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease; }
.pick-weight:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.pick-weight input[type=number] { width: 100%; min-width: 0; min-height: 42px; padding: 0 2px 0 12px; border: 0; background: transparent; box-shadow: none; text-align: right; }
.pick-weight span { padding-right: 12px; color: var(--muted); font-size: 13px; }
.pick-row .icon-btn:disabled { visibility: hidden; }
#addPick { align-self: flex-start; }
.field input[type=number] { width: 100%; }
.field select { width: 100%; }
.field .hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.step-n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; margin-right: 10px;
  border-radius: 50%; background: var(--ink); color: var(--ground); font-size: 12px; font-weight: 700; }
.money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease; }
.money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.money span { padding-left: 16px; color: var(--muted); font-size: 14px; }
.money input[type=number] { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; box-shadow: none; }
.range-line { display: flex; align-items: center; gap: 14px; }
.range-line input { flex: 1 1 auto; accent-color: var(--accent); min-height: 28px; }
.range-line output { flex: 0 0 72px; text-align: right; font-weight: 700; }
.seg { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface2); }
.seg button { flex: 1 1 0; min-height: 38px; border: 0; border-radius: 999px; background: none; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }
.seg button[aria-pressed="true"] { background: var(--thumb); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.adv { border-top: 1px solid var(--line); }
.adv summary { display: flex; align-items: center; gap: 6px; min-height: 52px; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary::after { content: '+'; margin-left: auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface2); font-size: 18px; font-weight: 400; color: var(--muted); transition: transform .3s var(--ease); }
.adv[open] summary::after { transform: rotate(45deg); }
.adv-body { display: flex; flex-direction: column; gap: 22px; padding: 6px 0 4px; }
.rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rates > div { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.rates p { margin: 0; }
.rates .k { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rates .v { margin-top: 8px; font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -.035em; }
@media (max-width: 760px) { .rates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compose { margin: 24px 0 0; }
.compose-bar { display: flex; height: 12px; gap: 4px; margin-bottom: 10px; }
.compose-bar > div { min-width: 4px; border-radius: 999px; }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; }
.tip { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 0; padding: 16px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 14px; color: var(--ink2); }
.tip svg { flex: none; margin-top: 1px; color: var(--accent); }
.out-title { margin: 48px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.sim-row { margin-top: 12px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sim-row.best { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.sim-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sim-row-head h3 { margin: 0; font-size: 16px; font-weight: 700; font-family: var(--sans); }
.sim-row-head .total { font-size: 28px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.sim-row .desc { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
.sim-bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.sim-bar div { height: 8px; border-radius: 999px; background: var(--up); transition: width .6s var(--ease); }
.sim-row.best .sim-bar div { background: var(--ink); }
.sim-row .detail { margin: 10px 0 0; font-size: 13px; color: var(--ink2); }
.mini-steps { list-style: none; counter-reset: passo; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.mini-steps li { counter-increment: passo; display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--ink2); }
.mini-steps li::before { content: counter(passo); flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 700 13px/1 var(--display); }
.mini-steps b { color: var(--ink); font-weight: 600; }
.goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
@media (max-width: 1000px) { .goals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .goals { grid-template-columns: minmax(0, 1fr); } }
.goal { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 22px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .25s ease; }
.goal:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.goal[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
.goal-icon { width: 42px; height: 42px; margin-bottom: 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  display: flex; align-items: center; justify-content: center; color: var(--accent); }
.goal-title { font-size: 18px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.goal-text { font-size: 13.5px; color: var(--ink2); }
.goal-vals { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts b { font-weight: 600; font-size: 14px; }
.info summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600;
  list-style: none; color: var(--accent); }
.info summary::-webkit-details-marker { display: none; }
.info summary::after { content: '›'; font-size: 18px; transition: transform .25s var(--ease); }
.info[open] summary::after { transform: rotate(90deg); }
.info p { margin: 2px 0 6px; max-width: 680px; color: var(--ink2); font-size: 14.5px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.stats3 > div { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.stats3 p { margin: 0; }
.stats3 .k { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats3 .v { margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
@media (max-width: 560px) { .stats3 { grid-template-columns: minmax(0, 1fr); } }
.odds { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.stock-card { margin-top: 12px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stock-card h3 { display: flex; align-items: center; gap: 12px; margin: 0; font: 700 16px/1.3 var(--sans); }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 28px 0 0; }
@media (max-width: 760px) { .gloss { grid-template-columns: minmax(0, 1fr); } }
.gloss div { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.gloss dt { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.gloss dd { margin: 6px 0 0; color: var(--ink2); font-size: 14.5px; }

/* ---------- Avisos, páginas legais e rodapé ---------- */
.legal-note { margin: 28px 0 0; padding: 16px 20px; font-size: 13.5px; line-height: 1.55; color: var(--ink2); max-width: 900px; box-shadow: none; }
.legal-note b { color: var(--ink); font-weight: 600; }
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 32px; }
.doc h2 { margin: 40px 0 10px; font-size: 24px; }
.doc p, .doc li { color: var(--ink2); }
.doc ul { padding-left: 20px; display: grid; gap: 8px; }
.fill { padding: 0 4px; border-radius: 4px; background: var(--track); color: var(--ink); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding: 28px 0 72px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
section footer { margin-top: 56px; }
.err { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--down) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--down) 35%, transparent); color: var(--down); font-size: 14px; }

/* ---------- Diálogos ---------- */
dialog { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); padding: 32px;
  max-width: 480px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog::backdrop { background: rgba(10, 11, 13, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h2 { margin-bottom: 12px; }
dialog label { display: block; margin-top: 18px; font-size: 13px; color: var(--muted); }
dialog input, dialog select { width: 100%; margin-top: 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }

/* Guia de boas-vindas */
dialog.tour { max-width: 920px; padding: 0; overflow: hidden; }
.tour-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.tour-media { min-height: 480px; }
.tour-media .shot { border-radius: 0; }
.tour-body { padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 14px; }
.tour-body h2 { margin: 0; font-size: 32px; letter-spacing: -.03em; }
.tour-body p { margin: 0; }
.tour-text { color: var(--ink2); font-size: 15.5px; }
.tour-tip { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface2); font-size: 15px; font-weight: 500; }
.tour-dots { display: flex; gap: 6px; margin-top: auto; padding-top: 16px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line2); transition: width .3s var(--ease), background-color .3s ease; }
.tour-dots i.on { width: 24px; background: var(--ink); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tour-actions > div { display: flex; gap: 8px; }
@media (max-width: 720px) {
  .tour-grid { grid-template-columns: minmax(0, 1fr); }
  .tour-media { min-height: 0; height: 180px; }
  .tour-body { padding: 24px; }
  .tour-body h2 { font-size: 26px; }
}

/* Detalhe da ação: gaveta que desliza da direita */
dialog.drawer { margin: 8px 8px 8px auto; width: min(520px, calc(100% - 16px)); max-width: 100%; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px);
  padding: 22px 28px 36px; border-radius: 26px; overflow-y: auto; animation: drawerIn .45s var(--ease); }
@keyframes drawerIn { from { opacity: 0; transform: translateX(56px); } }
@media (max-width: 560px) { dialog.drawer { padding: 18px 20px 28px; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.drawer h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.big-price { margin: 0; font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.spark { position: relative; margin: 24px 0 8px; padding: 16px; border-radius: 18px; background: var(--surface2); }
.spark svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; margin-top: 10px; }
.spark-tip { position: absolute; top: 30px; transform: translateX(-50%); padding: 5px 10px; border-radius: 8px; background: var(--ink);
  color: var(--ground); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; }

/* ---------- Movimento ---------- */
[role="tabpanel"].enter { animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fade { from { opacity: 0; } }
/* Com "reduzir movimento" no sistema, nada se desloca: só esmaece. A faixa de cotações segue
   rodando devagar, sempre com o botão de pausa (WCAG 2.2.2). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; }
  [role="tabpanel"].enter, dialog[open], dialog.drawer { animation-name: fade; }
  .card[data-stock]:hover, .goal:hover, .news-card:hover { transform: none; }
}
