/* ─── Mais Patrimônio · Site ─────────────────────────────────────────
   Paleta oficial:
   #0D3B8E Azul real profundo · #1E73FF Azul vivo · #60A5FA Azul claro
   #1F2937 Cinza azulado      · #E5E7EB Cinza claro
   Tipografia: Inter
   Mobile-first: no celular a navegação fica numa barra inferior, como app.
   ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy:      #0D3B8E;
  --navy-deep: #061A40;
  --blue:      #1E73FF;
  --sky:       #60A5FA;
  --ink:       #1F2937;
  --gray:      #E5E7EB;

  --bg:        #F3F6FB;
  --surface:   #FFFFFF;
  --muted:     #64748B;
  --blue-tint: #EAF2FF;

  --grad: linear-gradient(135deg, #1E73FF 0%, #0D3B8E 100%);
  --grad-text: linear-gradient(90deg, #1E73FF 0%, #60A5FA 100%);

  --radius: 16px;
  --shadow: 0 1px 2px rgba(13,59,142,.06), 0 8px 24px rgba(13,59,142,.08);
  --shadow-hover: 0 2px 4px rgba(13,59,142,.08), 0 14px 32px rgba(13,59,142,.14);

  --topbar-h: 64px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
  overflow-x: hidden;
  /* espaço para a barra inferior no celular */
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
}

/* Números alinhados só onde há valores: no Inter, tabular-nums também alarga o hífen ("e-mail") */
input, table, output, .num { font-variant-numeric: tabular-nums; }

a { color: var(--blue); }
img { display: block; max-width: 100%; }

.icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: #fff; color: var(--navy); font-weight: 700;
  padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }

/* ─── Topo fixo ────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,26,64,.92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(96,165,250,.14);
  color: #fff;
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 40px; height: 40px; flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(30,115,255,.35)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; white-space: nowrap; }
.brand-name b, .grad {
  /* padding evita que o degradê corte o pé/acento das letras */
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: .08em;
}
.brand-name b { font-weight: 800; }
/* Exceção aprovada pelo Leonardo: destaque amarelo no título da calculadora */
.grad-gold {
  background: linear-gradient(90deg, #FFE27A 0%, #FFC21A 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: .08em;
}
.brand-tag {
  font-size: 9px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  opacity: .7; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-desktop { display: none; }

.topbar-yt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(30,115,255,.14);
  color: #CFE2FF;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.topbar-yt:hover { background: rgba(30,115,255,.28); color: #fff; }
.topbar-yt .icon { width: 18px; height: 18px; }
.topbar-yt span { display: none; }

/* ─── Barra inferior (celular) ─────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--gray);
  box-shadow: 0 -6px 20px rgba(13,59,142,.06);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  text-decoration: none;
  position: relative;
}
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--blue); }
.tabbar a[aria-current="page"]::before {
  content: ''; position: absolute; top: 0; left: 50%;
  width: 28px; height: 3px; margin-left: -14px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #123f93 0%, var(--navy-deep) 55%, #040f27 100%);
  color: #fff;
  padding: 40px 16px 112px;
}
.hero-glow {
  position: absolute;
  right: -30%; bottom: -50%;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(30,115,255,.35) 0%, rgba(30,115,255,0) 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(115deg, transparent 0 48%, rgba(96,165,250,.07) 48% 52%, transparent 52% 100%);
  background-size: 220px 220px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 16px;
}
.hero h1 {
  text-wrap: balance;
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.hero-content > p {
  font-size: 16px;
  color: rgba(255,255,255,.75);
  max-width: 600px;
  margin: 0 auto;
}
.hero-content > p strong { color: #fff; font-weight: 600; }

.hero-actions {
  display: flex; flex-direction: column; gap: 12px;
  margin: 28px auto 0;
  max-width: 420px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 24px;
  border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s, background .2s, border-color .2s;
}
.btn .icon { width: 20px; height: 20px; transition: transform .2s; }
.btn-primary {
  border: none;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30,115,255,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(30,115,255,.4); filter: brightness(1.05); }
.btn-primary:hover .icon-arrow { transform: translateX(3px); }
/* Exceção pedida pelo Leonardo: botão de inscrição no vermelho do YouTube */
.btn-youtube {
  border: none;
  background: linear-gradient(135deg, #FF3333 0%, #FF0000 45%, #B80000 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,0,0,.28);
}
.btn-youtube:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255,0,0,.38); filter: brightness(1.06); }
.btn-ghost {
  border: 1.5px solid rgba(96,165,250,.4);
  background: rgba(255,255,255,.04);
  color: #fff;
}
.btn-ghost:hover { border-color: var(--sky); background: rgba(30,115,255,.14); }

.pillars {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 32px;
}
.pillars li {
  display: flex; align-items: center; gap: 10px;
  text-align: left;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(96,165,250,.18);
}
.pillars .icon {
  width: 36px; height: 36px; padding: 8px;
  border-radius: 50%;
  background: rgba(30,115,255,.2);
  color: var(--sky);
}
.pillars span { display: flex; flex-direction: column; font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.35; }
.pillars small { font-size: inherit; }
.pillars b { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #fff; }

/* ─── Conteúdo ─────────────────────────────────────────────────── */
.container {
  position: relative; z-index: 2;
  max-width: 1120px;
  margin: -72px auto 0;
  padding: 0 16px 48px;
}

.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section-head { margin-bottom: 18px; }
.section-head h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--navy);
}
.section-head p { color: var(--muted); font-size: 15px; margin-top: 6px; max-width: 640px; }

.card {
  background: var(--surface);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Ferramentas */
.tools { display: grid; gap: 16px; }
.tool {
  display: flex; flex-direction: column;
  padding: 22px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tool-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--blue-tint);
  color: var(--blue);
}
.tool-icon .icon { width: 26px; height: 26px; }
.tool .tool-icon { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(30,115,255,.3); }
.badge {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  background: var(--blue-tint); color: var(--navy);
}
.tool h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.25; }
.tool p { font-size: 14.5px; color: var(--muted); margin-top: 6px; flex: 1; }
.tool-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px;
  font-size: 15px; font-weight: 700; color: var(--blue);
}
.tool-link .icon { width: 18px; height: 18px; transition: transform .2s; }
.tool:hover .tool-link .icon { transform: translateX(3px); }

/* Atalhos */
.shortcuts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.shortcut {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.shortcut .tool-icon { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.shortcut .tool-icon .icon { width: 22px; height: 22px; }
.shortcut-text { flex: 1; min-width: 0; }
.shortcut-text b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.shortcut-text span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.shortcut > .icon { color: #9AB3D9; width: 20px; height: 20px; transition: transform .2s, color .2s; }
.shortcut:hover > .icon { color: var(--blue); transform: translateX(3px); }

/* Canal */
.channel {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(120% 120% at 100% 0%, #123f93 0%, var(--navy-deep) 60%, #040f27 100%);
  color: #fff;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.channel::after {
  content: ''; position: absolute; right: -120px; bottom: -160px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(30,115,255,.35) 0%, rgba(30,115,255,0) 65%);
  pointer-events: none;
}
.channel-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; }
.channel-logo { width: 72px; height: 72px; filter: drop-shadow(0 6px 18px rgba(30,115,255,.45)); }
.channel h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.channel p { color: rgba(255,255,255,.72); font-size: 15px; margin-top: 8px; max-width: 520px; }
.channel-actions { display: flex; flex-direction: column; gap: 12px; }

/* ─── Páginas internas e textos legais ─────────────────────────── */
.hero-page { padding-top: 36px; padding-bottom: 104px; }
.hero-page h1 { font-size: clamp(32px, 5vw, 48px); }
.hero-date { margin-top: 14px !important; font-size: 13px !important; color: rgba(255,255,255,.55) !important; }

.container-narrow { max-width: 860px; }

.legal-summary { padding: 22px; margin-bottom: 16px; }
.legal-summary h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); margin-bottom: 14px; }
.legal-summary ul { list-style: none; display: grid; gap: 14px; }
.legal-summary li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.legal-summary li b { color: var(--ink); font-weight: 700; }
.legal-summary .icon {
  width: 36px; height: 36px; padding: 8px;
  border-radius: 10px;
  background: var(--blue-tint); color: var(--blue);
}

.legal { padding: 22px; font-size: 15px; line-height: 1.7; color: #374151; }
.legal section { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--gray); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.legal h2 {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.35;
  color: var(--navy);
  margin-bottom: 12px;
}
.legal h2 span {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.legal h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 18px 0 6px; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 10px 0 10px 4px; padding-left: 18px; }
.legal li { margin-top: 6px; }
.legal li::marker { color: var(--blue); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { font-weight: 500; overflow-wrap: anywhere; }

.legal-toc h2 { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.legal-toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; margin: 0; padding: 0; }
.legal-toc li { counter-increment: toc; margin: 0; }
.legal-toc a {
  display: flex; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.legal-toc a::before { content: counter(toc); min-width: 18px; color: var(--blue); font-weight: 700; }
.legal-toc a:hover { background: var(--blue-tint); color: var(--navy); }

.legal-alert {
  margin-top: 14px !important;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blue-tint);
  border-left: 4px solid var(--blue);
  color: var(--ink);
}
.legal-contact {
  display: flex; flex-direction: column; gap: 4px;
  margin: 14px 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--gray);
  background: #F8FAFD;
}

@media (min-width: 700px) {
  .legal-toc ol { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}
@media (min-width: 900px) {
  .hero-page { padding-top: 56px; padding-bottom: 128px; }
  .legal-summary { padding: 32px; }
  .legal { padding: 40px; }
}

/* ─── Livros ───────────────────────────────────────────────────── */
.section-head-onhero h2 { color: #fff; }
.section-head-onhero p { color: rgba(255,255,255,.7); }

/* Trilha "Comece por aqui" */
.features { display: grid; gap: 14px; }
.feature {
  display: flex; gap: 16px; align-items: stretch;
  padding: 16px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.feature-cover {
  flex-shrink: 0; width: 104px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  border-radius: 12px;
  background: radial-gradient(120% 100% at 50% 0%, #EAF2FF 0%, #DCE8FB 100%);
}
.feature-cover img, .book-cover img {
  width: 100%; height: auto; max-height: 100%;
  object-fit: contain;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 1px 2px rgba(6,26,64,.2), 0 10px 22px rgba(6,26,64,.28);
  transition: transform .25s;
}
.feature:hover .feature-cover img, .book:hover .book-cover img { transform: translateY(-4px) rotate(-1.5deg); }
.feature-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feature-step {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-tint);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 8px;
}
.feature-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--navy); }
.feature-author { font-size: 13px; color: var(--muted); margin-top: 2px; }
.feature-why { font-size: 13.5px; color: var(--ink); line-height: 1.45; margin-top: 8px; flex: 1; }

.book-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; margin-top: 12px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 14px; font-weight: 700;
  transition: background .2s, color .2s, box-shadow .2s;
}
.book-cta .icon { width: 16px; height: 16px; transition: transform .2s; }
.feature:hover .book-cta, .book:hover .book-cta { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(30,115,255,.3); }
.feature:hover .book-cta .icon, .book:hover .book-cta .icon { transform: translateX(3px); }

/* Filtros */
.book-tools {
  position: sticky; top: var(--topbar-h); z-index: 20;
  margin: 0 -16px 8px;
  padding: 10px 16px;
  background: rgba(243,246,251,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: grid; gap: 10px;
}
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 2px 16px;
  scroll-padding: 0 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid var(--gray); border-radius: 999px;
  background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip span {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--bg); color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.chip:hover { border-color: var(--sky); }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(30,115,255,.25); }
.chip[aria-pressed="true"] span { background: rgba(255,255,255,.2); color: #fff; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  border: 1px solid var(--gray); border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,115,255,.15); }
.search .icon { width: 20px; height: 20px; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--ink);
}
.search input::placeholder { color: #94A3B8; }

.books-count { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0 12px; }

/* Grade de livros */
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.book {
  display: flex; flex-direction: column;
  padding: 12px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.book:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.book-cover {
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18%;
  border-radius: 10px;
  background: radial-gradient(120% 100% at 50% 0%, #EAF2FF 0%, #DCE8FB 100%);
  margin-bottom: 12px;
  overflow: hidden;
}
.book-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--blue); }
.book-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--ink);
  margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-author { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.book-why { display: none; }
.book .book-cta { margin-top: auto; }
.book-author { margin-bottom: 12px; }

.books-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 32px 16px; color: var(--muted); }
.books-empty b { color: var(--ink); }
.books-empty[hidden] { display: none; }

.affiliate-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blue-tint);
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.affiliate-note .icon { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }

@media (min-width: 600px) {
  .books { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .book { padding: 14px; }
  .book-why {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13px; color: var(--muted); line-height: 1.45;
    margin: -4px 0 14px;
  }
  .book-tools { grid-template-columns: 1fr 260px; align-items: center; }
  .chips { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 900px) {
  .features { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .feature { flex-direction: column; padding: 20px; }
  .feature-cover { width: auto; height: 240px; padding: 20px; }
  .feature-cover img { width: auto; height: 100%; }
  .feature-title { font-size: 19px; }
  .book-tools { margin: 0 -24px 8px; padding: 12px 24px; }
  .books { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1100px) {
  .books { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ─── Calculadora ──────────────────────────────────────────────── */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }

.calc-form { padding: 20px; min-width: 0; }
.calc-form-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); margin-bottom: 16px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.label-row label { margin-bottom: 0; }

.input-box {
  display: flex; align-items: center;
  height: 52px;
  border: 1.5px solid var(--gray); border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.input-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,115,255,.15); }
.input-box input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 14px;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
}
.input-box input::placeholder { color: #A0AEC0; font-weight: 500; }
.input-prefix, .input-suffix {
  flex-shrink: 0;
  display: flex; align-items: center; align-self: stretch;
  padding: 0 14px;
  background: #F6F8FC;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.input-prefix { border-right: 1px solid var(--gray); }
.input-suffix { border-left: 1px solid var(--gray); }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.field-error { font-size: 13px; font-weight: 600; color: #D93A3A; margin-top: 6px; }
.field-error:empty { display: none; }
.has-error .input-box { border-color: #D93A3A; }
.has-error .input-box:focus-within { box-shadow: 0 0 0 3px rgba(217,58,58,.15); }

.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: 10px; background: #EEF2F8;
}
.segmented button {
  height: 32px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 3px rgba(13,59,142,.15); }

/* Destaque: aumento anual */
.field-growth {
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid #C9DCFF;
  background: linear-gradient(180deg, #F2F7FF 0%, #FFFFFF 100%);
}
.growth-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.field-growth .growth-head label { margin: 0; flex: 1; min-width: 0; }
.growth-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--grad); color: #fff;
}
.growth-icon .icon { width: 18px; height: 18px; }
.badge-strong { background: var(--grad); color: #fff; }
.growth-text { margin: 0 0 12px; }
.quick { display: flex; gap: 8px; margin-top: 10px; }
.quick-btn {
  flex: 1; height: 40px;
  border: 1px solid var(--gray); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.quick-btn:hover { border-color: var(--sky); }
.quick-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.growth-preview {
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 12px;
}
.growth-preview li {
  display: flex; flex-direction: column;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface); border: 1px solid #DCE8FB;
  font-size: 11.5px; color: var(--muted); line-height: 1.3;
}
.growth-preview li b { font-size: 13.5px; color: var(--navy); font-variant-numeric: tabular-nums; }
.growth-preview .growth-gap { border: 0; background: none; padding: 0 2px; font-size: 16px; }
.growth-preview .growth-note { flex-basis: 100%; border: 0; background: none; padding: 0; font-size: 12.5px; }

.calc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.calc-actions .btn { width: 100%; }
.btn-secondary { border: 1.5px solid var(--gray); background: var(--surface); color: var(--muted); font-size: 15px; }
.btn-secondary:hover { color: var(--navy); border-color: var(--navy); }
.calc-note { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 10px; }

/* Resultados */
.calc-results { display: grid; gap: 16px; min-width: 0; outline: none; scroll-margin-top: calc(var(--topbar-h) + 12px); }
#calc-conteudo { display: grid; gap: 16px; min-width: 0; }
#calc-conteudo[hidden] { display: none; }
.calc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.calc-empty[hidden] { display: none; }
.calc-empty .icon { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); margin-bottom: 6px; }
.calc-empty b { color: var(--ink); font-size: 16px; }

.result-hero {
  position: relative; overflow: hidden;
  border: 1px solid rgba(96,165,250,.22);
  border-radius: var(--radius);
  padding: 22px;
  background: radial-gradient(120% 140% at 100% 0%, #123f93 0%, var(--navy-deep) 60%, #040f27 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.result-hero::after {
  content: ""; position: absolute; right: -80px; top: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(30,115,255,.4) 0%, rgba(30,115,255,0) 65%);
  pointer-events: none;
}
.result-hero-label { position: relative; display: block; font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--sky); }
.result-hero-value {
  position: relative; display: block;
  font-size: clamp(34px, 9vw, 52px); font-weight: 900; letter-spacing: -.035em; line-height: 1.1;
  margin: 6px 0 8px;
  overflow-wrap: anywhere;
}
.result-hero-sub { position: relative; display: block; font-size: 14px; color: rgba(255,255,255,.75); }

.stats { display: grid; gap: 12px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.key-line { height: 3px; width: 16px; border-radius: 2px; }

.insight { display: flex; gap: 14px; padding: 18px; border-color: #C9DCFF; background: linear-gradient(180deg, #F2F7FF 0%, #FFFFFF 100%); }
.insight[hidden] { display: none; }
.insight-icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--grad); color: #fff; }
.insight-icon .icon { width: 20px; height: 20px; }
.insight > div { min-width: 0; flex: 1; }
.insight > div > b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.insight p { font-size: 14px; color: var(--ink); margin-top: 4px; }
.compare { display: grid; gap: 8px; margin-top: 14px; }
.compare-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rotulo valor" "barra barra";
  align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink);
}
.compare-row > span:first-child { grid-area: rotulo; }
.compare-row > .compare-bar { grid-area: barra; }
.compare-row > b { grid-area: valor; }
.compare-row b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.compare-bar { height: 10px; border-radius: 999px; background: #E8EEF8; overflow: hidden; }
.compare-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .4s; }
.compare-row.is-muted { color: var(--muted); }
.compare-row.is-muted .compare-bar i { background: #94A3B8; }

/* Gráficos */
.chart-card { padding: 18px; min-width: 0; }
.chart-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.chart-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; font-size: 13px; color: var(--ink); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li[hidden], .legend[hidden] { display: none; }
.chart-box { position: relative; width: 100%; min-height: 200px; border-radius: 8px; }
.chart { position: relative; touch-action: pan-y; }
.chart-svg { display: block; overflow: visible; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart-hit { cursor: crosshair; }
.chart .bar { transition: opacity .15s; }
.chart .bar.is-dim { opacity: .45; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0B1730; color: #fff;
  box-shadow: 0 8px 24px rgba(6,26,64,.3);
  font-size: 12.5px;
}
.chart-tip[hidden] { display: none; }
.chart-tip-title { font-size: 12px; font-weight: 600; color: #A9C4EE; margin-bottom: 6px; }
.chart-tip-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; white-space: nowrap; }
.chart-tip-row i { width: 12px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.chart-tip-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-tip-row span { color: #A9C4EE; }
.chart-tip-row.is-strong b { font-size: 14px; }
.chart-empty { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 14px; }

.chart-pair { display: grid; gap: 16px; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 12px; }
.chart-donut { width: 200px; }
.donut-seg { cursor: pointer; transition: opacity .15s; outline: none; }
.donut-seg:hover, .donut-seg:focus { opacity: .85; }
.legend-col { flex-direction: column; gap: 10px; width: 100%; margin: 0; }
.legend-col li { display: grid; grid-template-columns: 12px 1fr auto; column-gap: 10px; align-items: center; }
.legend-col li b { font-variant-numeric: tabular-nums; }
.legend-col li small { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }

/* Tabela */
.table-card { padding: 0; overflow: hidden; }
.table-card summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  font-size: 15px; font-weight: 700; color: var(--navy);
  cursor: pointer; list-style: none;
}
.table-card summary::-webkit-details-marker { display: none; }
.table-card summary::after { content: "+"; font-size: 20px; font-weight: 600; color: var(--blue); }
.table-card[open] summary::after { content: "\2212"; }
.table-scroll { overflow-x: auto; border-top: 1px solid var(--gray); max-height: 420px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.data-table th, .data-table td { padding: 10px 14px; text-align: right; border-bottom: 1px solid #EEF2F8; }
.data-table th:first-child { text-align: left; }
.data-table thead th { position: sticky; top: 0; background: #F6F8FC; font-size: 12px; font-weight: 700; color: var(--muted); }
.data-table tbody th { font-weight: 700; color: var(--ink); }
.data-table td:last-child { font-weight: 700; color: var(--navy); }

.calc-disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blue-tint);
  font-size: 13px; color: var(--muted); line-height: 1.55;
}
.calc-disclaimer .icon { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }

@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calc-actions { flex-direction: row; }
  .calc-actions .btn-primary { flex: 2; }
  .calc-actions .btn-secondary { flex: 1; }
  .donut-wrap { flex-direction: row; justify-content: center; gap: 28px; }
  .legend-col { width: auto; min-width: 220px; }
  .result-hero { padding: 28px; }
  .compare-row { grid-template-columns: 130px 1fr auto; grid-template-areas: "rotulo barra valor"; }
}
@media (min-width: 1000px) {
  .calc-layout { grid-template-columns: 390px minmax(0, 1fr); gap: 24px; }
  .calc-form { padding: 24px; }
  .calc-actions { flex-direction: column; }
  .calc-actions .btn-primary, .calc-actions .btn-secondary { flex: none; }
  .chart-card { padding: 22px; }
  .chart-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-pair .donut-wrap { flex-direction: column; }
  .chart-pair .legend-col { width: 100%; min-width: 0; }
}

/* ─── Ferramentas ──────────────────────────────────────────────── */
.container-tools { max-width: 960px; }

/* Topo sem card sobreposto: o conteúdo começa abaixo da faixa escura */
.hero-page.hero-compact { padding-bottom: 48px; }
.container.container-tools { margin-top: 0; }

.filter-bar { margin-top: 20px; }
.filter-bar[hidden] { display: none; }

.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tool-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tool-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.tool-row .tool-icon { width: 48px; height: 48px; flex-shrink: 0; background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(30,115,255,.25); }
.tool-row .tool-icon .icon { width: 24px; height: 24px; }
.tool-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tool-row-body .book-tag { line-height: 1.2; }
.tool-row-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.tool-row-desc {
  font-size: 13.5px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.meta-free { font-size: 12px; font-weight: 600; color: var(--blue); }
.tool-row-meta .badge { height: 22px; font-size: 11px; }
.tool-row-arrow { width: 20px; height: 20px; color: #9AB3D9; transition: transform .2s, color .2s; }
.tool-row:hover .tool-row-arrow { color: var(--blue); transform: translateX(3px); }

.noscript-list { list-style: none; display: grid; gap: 10px; padding: 18px; margin-top: 24px; }
.tools-disclaimer { margin-top: 32px; }

@media (min-width: 700px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .tool-row { align-items: flex-start; padding: 20px; }
  .tool-row-arrow { align-self: center; }
  .hero-page.hero-compact { padding-bottom: 64px; }
  .container.container-tools { margin-top: 0; }
}

/* ─── Formulários: peças extras ────────────────────────────────── */
.field-label-static { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.segmented-full { display: flex; width: 100%; }
.segmented-full button { flex: 1; height: 40px; font-size: 14px; }
.quick-wrap { flex-wrap: wrap; }
.quick-wrap { gap: 6px; }
.quick-wrap .quick-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; height: 36px; font-size: 13.5px; }
.form-section {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--gray);
}
.link-btn {
  border: 0; background: none; padding: 4px 0;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--blue);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.input-box input[type="date"] { font-variant-numeric: tabular-nums; min-height: 100%; -webkit-appearance: none; appearance: none; }
.input-box input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-6 .stat-value { font-size: 19px; }
.chart-foot { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.table-title { padding: 16px 18px; font-size: 15px; font-weight: 700; color: var(--navy); }
@media (max-width: 599px) {
  .table-open .data-table { font-size: 12.5px; }
  .table-open .data-table th, .table-open .data-table td { padding: 9px 8px; }
  .table-open .data-table th:first-child { padding-left: 14px; }
  .table-open .data-table td:last-child { padding-right: 14px; }
  .table-open .data-table th:nth-child(2), .table-open .data-table td:nth-child(2) { display: none; }
}
.cell-sub { display: none; }
@media (max-width: 599px) {
  .cell-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
}

@media (min-width: 600px) {
  .stats.stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-6 .stat-value { font-size: 21px; }
}

/* ─── Como usar e perguntas frequentes (todas as ferramentas) ──── */
.guide-wrap { margin-top: 48px; display: grid; gap: 40px; }
.guide h2, .faq h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--navy);
  margin-bottom: 14px;
}
.guide h2 .icon, .faq h2 .icon { width: 22px; height: 22px; color: var(--blue); }
.guide-steps { list-style: none; counter-reset: passo; display: grid; gap: 12px; }
.guide-steps li {
  counter-increment: passo;
  position: relative;
  padding: 16px 16px 16px 58px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--gray);
  font-size: 14.5px; line-height: 1.55; color: var(--muted);
}
.guide-steps li::before {
  content: counter(passo);
  position: absolute; left: 16px; top: 14px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-tint); color: var(--blue);
  font-size: 13px; font-weight: 800;
}
.guide-steps b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.guide-logic {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--blue-tint);
  font-size: 14.5px; line-height: 1.6; color: var(--ink);
}
.guide-logic strong { color: var(--navy); }

.faq-list { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--gray); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--gray); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px;
  font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4;
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  margin-top: -5px;
  transform: rotate(45deg);
  transition: transform .2s, margin .2s;
}
.faq-item[open] summary::after { margin-top: 5px; transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--navy); }
.faq-answer { padding: 0 18px 18px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.faq-answer p + p { margin-top: 10px; }
.faq-answer strong { color: var(--ink); font-weight: 600; }

@media (min-width: 900px) {
  .guide-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-steps li { padding: 18px 18px 18px 60px; }
}

/* ─── Comparador de renda fixa ─────────────────────────────────── */
.form-section-hint { margin: -4px 0 12px; }
.auto-taxas { margin-bottom: 16px; }
.btn-auto {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px;
  border: 1.5px solid #C9DCFF; border-radius: 12px;
  background: var(--blue-tint);
  font: inherit; font-size: 14.5px; font-weight: 700; color: var(--navy);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.btn-auto:hover:not(:disabled) { background: #DCE9FF; border-color: var(--blue); }
.btn-auto:disabled { cursor: progress; opacity: .8; }
.btn-auto .icon { width: 18px; height: 18px; color: var(--blue); }
.btn-auto.is-loading .icon { animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.auto-status { font-size: 12.5px; line-height: 1.5; margin-top: 8px; color: var(--muted); }
.auto-status:empty { display: none; }
.auto-status.is-ok { color: var(--muted); }
.auto-status.is-erro { color: #D93A3A; font-weight: 600; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.field-grid .field { margin-bottom: 14px; min-width: 0; }
.field-grid .input-box input { padding: 0 10px; }
.field-grid .input-suffix { padding: 0 10px; font-size: 13px; }
@media (max-width: 599px) {
  .field-grid .input-box input { font-size: 15px; padding: 0 8px; }
  .field-grid .input-suffix { padding: 0 8px; font-size: 12px; }
}
.label-opcional { font-weight: 500; color: var(--muted); font-size: 12.5px; }

.rf-lista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.rf-linha {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--gray);
  background: #F8FAFD;
}
.rf-linha.has-error { border-color: #F3B4B4; }
.rf-linha-topo { display: flex; align-items: center; gap: 8px; }
.rf-num {
  width: 26px; height: 26px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: 12.5px; font-weight: 800;
}
.rf-select {
  flex: 1; min-width: 0; height: 44px;
  padding: 0 34px 0 12px;
  border: 1.5px solid var(--gray); border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E73FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
@media (max-width: 599px) { .rf-select { font-size: 14px; padding-left: 10px; } }
.rf-select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,115,255,.15); }
.rf-remover {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent;
  color: #94A3B8; cursor: pointer;
}
.rf-remover:hover:not(:disabled) { color: #D93A3A; background: #FDECEC; }
.rf-remover:disabled { opacity: .35; cursor: default; }
.rf-remover .icon { width: 18px; height: 18px; }
.rf-linha-campos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.rf-linha, .rf-linha .input-box { min-width: 0; }
.rf-linha .input-box { height: 46px; }
.rf-linha .input-box input { font-size: 16px; }
.rf-nome input { font-weight: 500; }
.rf-taxa[hidden] { display: none; }
.rf-poupanca { font-size: 13px; color: var(--muted); padding: 4px 2px; }
.rf-erro { margin-top: 6px; }

.btn-add-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; margin-top: 10px;
  border: 1.5px dashed #B9CDEE; border-radius: 12px;
  background: transparent;
  font: inherit; font-size: 14.5px; font-weight: 700; color: var(--blue);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.btn-add-row:hover { background: var(--blue-tint); border-color: var(--blue); }
.btn-add-row .icon { width: 18px; height: 18px; }
.btn-add-row[hidden] { display: none; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 16px; font-size: 13.5px; color: var(--ink); line-height: 1.45; cursor: pointer; }
/* Caixa de seleção arredondada, no padrão da marca */
.check input {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; flex-shrink: 0; margin: 0;
  border: 2px solid #B9CDEE; border-radius: 7px;
  background: var(--surface) no-repeat center / 14px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check input:hover { border-color: var(--blue); }
.check input:checked {
  border-color: var(--blue);
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.result-hero-name { position: relative; display: block; font-size: 17px; font-weight: 700; color: #fff; margin-top: 4px; }
.result-hero-name + .result-hero-value { margin-top: 2px; }

.rf-ranking { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.rf-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--gray);
}
.rf-item.is-best { border-color: #9CC2FF; background: linear-gradient(180deg, #F2F7FF 0%, #FFFFFF 100%); }
.rf-pos {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #EEF2F8; color: var(--muted);
  font-size: 13px; font-weight: 800;
}
.rf-item.is-best .rf-pos { background: var(--grad); color: #fff; }
.rf-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rf-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rf-nome-item { font-size: 15px; font-weight: 700; color: var(--ink); min-width: 0; }
.rf-valor { font-size: 15px; font-weight: 800; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rf-desc { font-size: 13px; color: var(--muted); }
.rf-barra { display: block; height: 8px; margin: 4px 0 2px; border-radius: 999px; background: #EEF2F8; overflow: hidden; }
.rf-barra i { display: block; height: 100%; border-radius: 999px; background: #60A5FA; transition: width .4s; }
.rf-item.is-best .rf-barra i { background: var(--grad); }
.rf-meta { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ─── Glossário ────────────────────────────────────────────────── */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-bottom: 18px; font-size: 13px; color: rgba(255,255,255,.6); }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: rgba(255,255,255,.4); }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--sky); }

/* Índice */
.container-gl { max-width: 960px; }
/* Letras: 2 linhas de 13 no celular e no tablet, 1 linha de 26 em telas largas */
.gl-letras {
  display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px;
  margin: 4px 0 8px;
}
.gl-letras button, .gl-letras span {
  height: 34px; min-width: 0;
  display: block; text-align: center; line-height: 34px;
  border-radius: 9px;
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.gl-letras button {
  padding: 0; font-family: inherit; cursor: pointer;
  color: var(--navy); background: var(--surface); border: 1px solid var(--gray); line-height: 32px;
  transition: background .2s, color .2s, border-color .2s;
}
.gl-letras button:hover { border-color: var(--blue); color: var(--blue); }
.gl-letras button[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(30,115,255,.3); }
.gl-letras button:disabled { color: #C2CCDA; background: transparent; border-color: transparent; box-shadow: none; cursor: default; }
.gl-letras span { color: #C2CCDA; }
@media (min-width: 900px) {
  .gl-letras { grid-template-columns: repeat(26, minmax(0, 1fr)); }
}
.gl-letra { margin-top: 28px; scroll-margin-top: calc(var(--topbar-h) + 140px); }
.gl-letra[hidden] { display: none; }
.gl-letra h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 900; color: var(--navy); margin-bottom: 12px;
}
.gl-letra h2::after { content: ""; flex: 1; height: 1px; background: var(--gray); }
.gl-lista { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gl-lista li[hidden] { display: none; }
.gl-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.gl-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.gl-item-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gl-item-corpo b { font-size: 16px; font-weight: 700; color: var(--ink); }
.gl-item-corpo span {
  font-size: 13.5px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gl-item > .icon { width: 18px; height: 18px; color: #9AB3D9; flex-shrink: 0; transition: transform .2s, color .2s; }
.gl-item:hover > .icon { color: var(--blue); transform: translateX(3px); }

/* Página do termo */
.container-termo { max-width: 800px; }
.hero-term h1 { font-size: clamp(30px, 5vw, 46px); }
.hero-term .hero-content > p { font-size: 15px; color: rgba(255,255,255,.65); }
.term-article { padding: 24px 20px; font-size: 17px; line-height: 1.75; color: #2B3545; }
.term-resumo {
  margin-bottom: 8px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--blue-tint);
  border-left: 4px solid var(--blue);
}
.term-resumo span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.term-resumo p { font-size: 17.5px; line-height: 1.65; color: var(--ink); font-weight: 500; }
.term-article h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--navy); margin: 30px 0 10px; }
.term-article p + p, .term-article ul + p { margin-top: 14px; }
.term-article ul { margin: 10px 0 0 4px; padding-left: 20px; }
.term-article li { margin-top: 6px; }
.term-article li::marker { color: var(--blue); }
.term-article a { color: var(--blue); font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.term-article strong { color: var(--ink); font-weight: 650; }
.term-box { margin-top: 24px; padding: 18px 20px; border-radius: 14px; font-size: 16px; line-height: 1.7; }
.term-box > b { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.term-box > b .icon { width: 18px; height: 18px; }
.term-exemplo { background: #F6F8FC; border: 1px solid var(--gray); }
.term-exemplo > b { color: var(--navy); }
.term-atencao { background: #FFF9EB; border: 1px solid #F5DFA6; }
.term-atencao > b { color: #8A6100; }

.term-cta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 28px; padding: 16px 18px;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, #123f93 0%, var(--navy-deep) 70%);
  color: #fff; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.term-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6,26,64,.3); }
.term-cta .tool-icon { width: 44px; height: 44px; flex-shrink: 0; background: var(--grad); color: #fff; }
.term-cta .tool-icon .icon { width: 22px; height: 22px; }
.term-cta span.txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.term-cta small { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--sky); }
.term-cta b { font-size: 16px; font-weight: 700; }
.term-cta em { font-style: normal; font-size: 13.5px; color: rgba(255,255,255,.72); line-height: 1.45; }
.term-cta > .icon { width: 20px; height: 20px; color: var(--sky); flex-shrink: 0; }

.term-fontes { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--gray); font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.term-fontes b { color: var(--ink); }
.term-fontes ul { margin: 6px 0 10px; padding-left: 18px; }
.term-fontes li { margin-top: 3px; }
.term-fontes a { color: var(--blue); font-weight: 500; }

.term-rel { margin-top: 32px; }
.term-rel h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.term-rel ul { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.term-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.term-nav a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--gray);
  text-decoration: none; min-width: 0;
}
.term-nav a:hover { border-color: var(--blue); }
.term-nav small { font-size: 12px; color: var(--muted); }
.term-nav b { font-size: 14.5px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-nav .proximo { text-align: right; grid-column: 2; }
.term-todos { display: block; text-align: center; margin-top: 18px; font-size: 14.5px; font-weight: 700; color: var(--blue); text-decoration: none; }
.term-todos:hover { text-decoration: underline; }

@media (min-width: 700px) {
  .gl-lista, .term-rel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-article { padding: 40px 48px; }
}

/* ─── Análise de ações ─────────────────────────────────────────── */
.container-acoes, .container-acao { max-width: 1040px; }
.ac-secao { margin-top: 18px; }
.card.ac-secao { padding: 20px 18px; }
.ac-secao h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.ac-secao-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.ac-secao-topo p, .ac-sub { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.ac-secao-topo h2 + p { flex-basis: 100%; }

/* Topo da página da ação */
.hero-acao h1 { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ac-ticker { font-size: clamp(38px, 8vw, 56px); }
.ac-h1-nome { font-size: clamp(17px, 3.4vw, 22px); font-weight: 700; letter-spacing: -.01em; color: rgba(255,255,255,.85); }
.ac-irmaos { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ac-irmaos .chip { background: rgba(255,255,255,.08); border-color: rgba(96,165,250,.4); color: #fff; text-decoration: none; }

/* Avisos */
.ac-aviso { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: var(--blue-tint); border: 1px solid #CFE0FF; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.ac-aviso .icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); margin-top: 1px; }
.ac-aviso a { color: var(--blue); font-weight: 600; }
.ac-alerta { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #F6F8FC; border: 1px solid var(--gray); font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.ac-alerta .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--navy); margin-top: 1px; }
.ac-nota { margin-top: 22px; font-size: 12.5px; line-height: 1.6; color: var(--muted); text-align: center; }
.ac-nota a, .ac-odbl a { color: var(--blue); }
.ac-vazio { padding: 22px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.ac-vazio[hidden] { display: none; }

/* Resumo */
.ac-desc { margin-top: 10px; font-size: 15px; line-height: 1.65; color: #2B3545; }
.ac-resumo { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 14px; border-top: 1px solid var(--gray); }
.ac-resumo div { padding: 10px 0; border-bottom: 1px solid #EEF2F8; min-width: 0; }
.ac-resumo dt { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.ac-resumo dd { margin-top: 2px; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
.ac-resumo a { color: var(--blue); }

/* Cards de indicadores */
.ac-grupos { display: grid; gap: 16px; }
.ac-grupo h3 { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ac-inds { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ac-ind {
  width: 100%; min-height: 72px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 12px 12px 11px; text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--gray); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.ac-ind:hover { border-color: #C9DCFF; box-shadow: var(--shadow); }
.ac-ind:focus-visible { outline: 3px solid rgba(30,115,255,.35); outline-offset: 2px; }
.ac-ind-nome { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.ac-ind-nome .icon { width: 15px; height: 15px; flex-shrink: 0; color: #9AB3D9; }
.ac-ind b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.ac-ind.is-neg b { color: var(--ink); }
.ac-ind.is-nd b, .ac-ind.is-na b { font-size: 14px; font-weight: 700; color: #94A3B8; }
.ac-pendentes { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #C9D6EA; font-size: 13px; line-height: 1.7; color: var(--muted); }
.ac-pendentes .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--sky); margin-top: 2px; }
.ac-pendentes .ac-ind-link { font-weight: 600; color: var(--navy); }

/* Controles e gráficos */
.ac-controles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ac-select select {
  height: 40px; padding: 0 36px 0 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy);
  border: 1.5px solid var(--gray); border-radius: 10px; max-width: 100%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; -webkit-appearance: none;
}
.ac-select select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,115,255,.15); }
.ac-pendente p { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.ac-pendente .icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--sky); }

/* Tabelas */
.ac-tabela-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ac-tabela-wrap:focus-visible { outline: 3px solid rgba(30,115,255,.3); }
.ac-tabela { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; white-space: nowrap; }
.ac-tabela th, .ac-tabela td { padding: 10px 12px; border-bottom: 1px solid #EEF2F8; text-align: right; }
.ac-tabela thead th { font-size: 12px; font-weight: 700; color: var(--muted); background: #F6F8FC; }
.ac-tabela th:first-child { text-align: left; position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 #EEF2F8; }
.ac-tabela thead th:first-child { background: #F6F8FC; z-index: 3; }
.ac-tabela tbody th { font-weight: 600; color: var(--ink); }
.ac-tabela .num { font-variant-numeric: tabular-nums; }
.ac-demo tbody tr:hover th, .ac-demo tbody tr:hover td { background: #F8FAFE; }

.ac-tabela-card { padding: 0; overflow: hidden; }
.ac-lista tbody th a { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.ac-lista tbody th b { font-size: 14.5px; color: var(--blue); }
.ac-lista tbody th span { font-size: 12px; font-weight: 500; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ac-lista tbody th small { display: block; font-size: 11px; font-weight: 500; color: #94A3B8; }
.ac-lista .ac-col-setor { text-align: left; font-size: 12.5px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; display: none; }
.ac-lista tr[hidden] { display: none; }
.ac-ordenar { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.ac-ordenar:hover, .ac-ordenar.is-ativo { color: var(--blue); }
.ac-ordenar.is-ativo::after { content: " ↓"; }
th[aria-sort="ascending"] .ac-ordenar.is-ativo::after { content: " ↑"; }
.ac-mais { display: flex; margin: 14px auto; }
.ac-mais[hidden] { display: none; }

.ac-filtros { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 8px; }
.ac-filtros .ac-select select { width: 100%; height: 48px; border-radius: 14px; }
.ac-atalhos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 4px; }
.ac-atalho { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s; }
.ac-atalho:hover { box-shadow: var(--shadow-hover); border-color: #C9DCFF; }
.ac-atalho > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--grad); color: #fff; flex-shrink: 0; }
.ac-atalho span { display: flex; flex-direction: column; gap: 2px; }
.ac-atalho b { font-size: 15px; color: var(--navy); }
.ac-atalho small { font-size: 13px; color: var(--muted); }

/* Fontes, metodologia e rodapé da página */
.ac-fontes { margin-top: 10px; padding-left: 18px; font-size: 14px; line-height: 1.65; color: #2B3545; }
.ac-fontes li + li { margin-top: 8px; }
.ac-fontes a { color: var(--blue); }
.ac-fontes .ac-odbl { font-size: 12.5px; color: var(--muted); }
.ac-acoes-rodape { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.ac-metodo-grupo { margin-top: 26px; }
.ac-metodo-grupo h2 { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.ac-metodo-grupo .faq-item { background: var(--surface); border: 1px solid var(--gray); border-radius: 12px; margin-top: 8px; }
.ac-metodo-grupo .faq-item + .faq-item { border-top: 1px solid var(--gray); }
.ac-metodo-grupo summary small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.ac-metodo div { padding: 6px 0; }
.ac-metodo dt { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--navy); }
.ac-metodo dd { margin-top: 2px; }
.ac-metodo-grupo .faq-answer a { color: var(--blue); font-weight: 600; }
.ac-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--blue-tint); color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }

/* Janela de explicação */
.ac-dialog { margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(6,26,64,.35); color: var(--ink); }
.ac-dialog::backdrop { background: rgba(6,26,64,.55); }
.ac-dialog-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 8px; position: sticky; top: 0; background: var(--surface); }
.ac-dialog-topo h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); line-height: 1.3; }
.ac-dialog-fechar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--gray); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--muted); }
.ac-dialog-fechar .icon { width: 18px; height: 18px; }
.ac-dialog-corpo { padding: 4px 18px 20px; font-size: 14.5px; line-height: 1.6; }
.ac-dialog-corpo dl div { padding: 8px 0; border-bottom: 1px solid #EEF2F8; }
.ac-dialog-corpo dt { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.ac-dialog-motivo { padding: 10px 12px; border-radius: 10px; background: #F6F8FC; border: 1px solid var(--gray); font-weight: 600; margin-bottom: 4px; }
.ac-dialog-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.ac-dialog-links a { color: var(--blue); font-weight: 600; }

/* Comparador */
.ac-selecionadas { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ac-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--cor, var(--blue)); }
.ac-chip b { font-size: 14px; color: var(--navy); }
.ac-chip button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--muted); }
.ac-chip button:hover { background: var(--blue-tint); color: var(--navy); }
.ac-chip .icon { width: 16px; height: 16px; }
.ac-busca-cmp { position: relative; }
.ac-sugestoes { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--gray); box-shadow: var(--shadow-hover); max-height: 320px; overflow-y: auto; }
.ac-sugestoes[hidden] { display: none; }
.ac-sugestoes li { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.ac-sugestoes li:hover, .ac-sugestoes li[aria-selected="true"] { background: var(--blue-tint); }
.ac-sugestoes b { color: var(--navy); font-size: 14px; min-width: 56px; }
.ac-sugestoes span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-cmp thead th { white-space: normal; min-width: 104px; border-top: 3px solid var(--cor, transparent); }
.ac-cmp thead th a { display: block; font-size: 15px; font-weight: 800; color: var(--blue); text-decoration: none; }
.ac-cmp thead th small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); max-width: 150px; margin-left: auto; }
.ac-cmp tbody th, .ac-cmp thead th:first-child { white-space: normal; width: 34%; min-width: 118px; max-width: 170px; line-height: 1.35; }
.ac-cmp .ac-cmp-grupo { position: static; max-width: none; width: auto; text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--navy); background: #F6F8FC; }
.ac-cmp td.is-max { background: var(--blue-tint); color: var(--navy); font-weight: 700; }
.ac-cmp td.is-nd, .ac-cmp td.is-na { color: #94A3B8; }
.ac-ind-link { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline dotted #9AB3D9; text-underline-offset: 3px; }
.ac-ind-link:hover { color: var(--blue); }
.ac-legenda { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ac-legenda span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--cor); margin-right: 6px; vertical-align: middle; }
#cmp-graficos .ac-select { display: block; margin: 10px 0 12px; }
#cmp-resultado[hidden], #cmp-graficos[hidden] { display: none; }

@media (min-width: 600px) {
  .card.ac-secao { padding: 24px; }
  .ac-inds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ac-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .ac-filtros { grid-template-columns: minmax(0, 1fr) 260px; }
  .ac-so-celular { display: none; }
  .ac-atalhos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-acoes-rodape { flex-direction: row; justify-content: center; }
}
@media (min-width: 900px) {
  .ac-inds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ac-lista .ac-col-setor { display: table-cell; }
  .ac-lista tbody th span { max-width: 240px; }
}

/* ─── Rodapé ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.6);
  padding: 36px 16px 32px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 28px;
}
.brand-footer { color: #fff; }
.brand-footer img { width: 36px; height: 36px; }
.brand-footer .brand-name { font-size: 16px; }
.footer-note { margin-top: 16px; font-size: 13px; max-width: 420px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; list-style: none; }
.footer-links a, .footer-social a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 14px; }
.footer-links a:hover, .footer-social a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(96,165,250,.25);
  background: rgba(30,115,255,.1);
}
.footer-social .icon { width: 20px; height: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(96,165,250,.14);
  padding-top: 20px;
  font-size: 12.5px; line-height: 1.7;
}
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-legal { font-size: 12px; line-height: 1.65; color: rgba(255,255,255,.5); margin-bottom: 10px; max-width: 980px; }
.footer-legal strong { color: rgba(255,255,255,.75); font-weight: 600; }
.footer-copy { margin-top: 14px; }

/* ─── Celular ──────────────────────────────────────────────────── */
@media (max-width: 599px) {
  /* slogan não cabe ao lado do nome: fica só no rodapé */
  .topbar .brand-tag { display: none; }

  /* pilares lado a lado, compactos, mesma largura */
  .pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
  .pillars li { flex-direction: column; justify-content: flex-start; text-align: center; gap: 8px; padding: 12px 6px; }
  .pillars span { align-items: center; font-size: 11px; }
  .pillars b { font-size: 10.5px; letter-spacing: .8px; }
  .pillars span > b + * { display: none; }
}

/* ─── Telas maiores ────────────────────────────────────────────── */
@media (min-width: 600px) {
  .hero-actions { flex-direction: row; max-width: none; justify-content: center; }
  .channel-actions { flex-direction: row; }
  .shortcuts { grid-template-columns: repeat(2, 1fr); }
  .topbar-yt span { display: inline; }
  .topbar-yt { padding: 0 16px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  :root { --topbar-h: 76px; }
  .topbar-inner { padding: 0 24px; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 19px; }

  .nav-desktop { display: flex; align-items: center; gap: 4px; list-style: none; }
  .nav-desktop a {
    display: block;
    padding: 8px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.72);
    font-size: 14.5px; font-weight: 600;
    text-decoration: none;
    transition: color .2s, background .2s;
  }
  .nav-desktop a:hover { color: #fff; background: rgba(255,255,255,.06); }
  .nav-desktop a[aria-current="page"] { color: #fff; background: rgba(30,115,255,.22); }

  .hero { padding: 72px 24px 140px; }
  .hero-content > p { font-size: 18px; }
  .container { padding: 0 24px 72px; margin-top: -88px; }
  .section { margin-top: 64px; }

  .tools { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .tools > .tool:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tool { padding: 28px; }
  .shortcuts { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .shortcut { padding: 20px; }

  .channel { padding: 44px; }
  .channel-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .channel-text { display: flex; align-items: center; gap: 24px; }
  .channel-logo { width: 88px; height: 88px; flex-shrink: 0; }
  .channel-actions { flex-shrink: 0; flex-direction: column; min-width: 260px; }

  .site-footer { padding: 48px 24px 36px; }
  .footer-inner { grid-template-columns: 1.4fr 1fr auto; align-items: start; }
  .footer-bottom { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Números dentro de círculos: a altura da linha é igual à do círculo, em pixels
   inteiros, para o número nunca ficar meio pixel acima ou abaixo do centro */
.legal h2 span, .guide-steps li::before, .rf-num, .rf-pos {
  display: block;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.legal h2 span, .guide-steps li::before { line-height: 28px; }
.rf-num { line-height: 26px; font-size: 13px; }
.rf-pos { line-height: 30px; }

/* Menu do topo: nomes nunca quebram linha; em telas médias, o slogan sai do topo */
.nav-desktop a { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1140px) {
  .topbar .brand-tag { display: none; }
  .nav-desktop a { padding: 8px 10px; }
}

/* Texto em degradê: o degradê só pinta dentro da caixa do texto. Com o espaçamento
   negativo dos títulos, a última letra passa da caixa e ficava cortada. A folga à
   direita (compensada pela margem negativa) e o "clone" em cada linha resolvem. */
.grad, .grad-gold, .brand-name b {
  padding-right: .12em;
  margin-right: -.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


/* Manual do Investidor: cada frase do texto do topo cabe em uma linha.
   O tamanho acompanha a largura real da área do texto (cqi), que já desconta
   margens e barra de rolagem; a frase mais longa tem cerca de 29 vezes a letra. */
.hero-content:has(> p.hero-sub-2l) { container-type: inline-size; }
.hero-content > p.hero-sub-2l { font-size: min(16px, calc(3.3vw - 1.2px)); }
@supports (font-size: 1cqi) {
  .hero-content > p.hero-sub-2l { font-size: min(16px, calc(100cqi / 30.5)); }
}
@media (min-width: 900px) {
  .hero-content > p.hero-sub-2l { font-size: min(18px, calc(100cqi / 30.5)); }
}
