/* ============================================================
   ATHENVEST — Portal UI (modelo "portal de conteúdo")
   Carregar DEPOIS de colors_and_type.css e portal.css.
   Header de duas linhas + busca, faixa de índices, destaques,
   rankings, notícias, ferramentas, página de ativo rica,
   comparador, calculadora de proventos.
   ============================================================ */

/* ===== Header de portal (1 linha — estilo Investidor10) ===== */
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px;
  border-radius: var(--r-md); background: var(--brand); color: var(--fg-onBrand); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.topbar { display: flex; align-items: center; gap: 12px; height: 60px; }
.topbar .logo { flex-shrink: 0; }
.topbar .logo img { height: 24px; }
.mainnav { display: flex; align-items: center; gap: 1px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { font-size: 13.5px; font-weight: 500; color: var(--fg-muted); padding: 7px 10px; border-radius: var(--r-md);
  white-space: nowrap; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.mainnav a:hover { color: var(--fg); background: var(--bg-hover); }
.mainnav a.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
/* dropdown Ferramentas */
.nav-tools { position: relative; flex-shrink: 0; }
.nav-tools-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--fg-muted);
  background: transparent; border: 0; padding: 7px 10px; border-radius: var(--r-md); cursor: pointer; transition: all var(--dur) var(--ease); white-space: nowrap; }
.nav-tools-btn:hover { color: var(--fg); background: var(--bg-hover); }
.nav-tools-btn.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.nav-tools-btn > i:first-child { width: 16px; height: 16px; }
.nav-tools-btn .caret { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.nav-tools-btn.menu-open .caret { transform: rotate(180deg); }
.nav-tools-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 304px; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 6px; z-index: 70; display: none; }
.nav-tools-menu.open { display: block; }
.nav-tools-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: var(--r-md); }
.nav-tools-menu a:hover { background: var(--bg-hover); }
.nav-tools-menu a.on { background: var(--brand-soft); }
.nav-tools-menu .nt-ic { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.nav-tools-menu .nt-ic i { width: 17px; height: 17px; }
.nav-tools-menu .nt-tx { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; min-width: 0; }
.nav-tools-menu .nt-tx b { font-size: 13.5px; }
.nav-tools-menu .nt-tx span { font-size: 11.5px; color: var(--fg-muted); }
.search-pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 6px;
  z-index: 60; display: none; }
.search-pop.open { display: block; }
.sp-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-md); }
.sp-row:hover { background: var(--bg-hover); }
.sp-id { line-height: 1.25; flex: 1; }
.sp-id b { font-family: var(--font-mono); font-size: 13.5px; }
.sp-id span { display: block; font-size: 12px; color: var(--fg-muted); }
.sp-tag { font-size: 11px; font-weight: 600; color: var(--fg-muted); background: var(--bg-inset); padding: 3px 8px; border-radius: var(--r-pill); }
.sp-empty { padding: 14px; font-size: 13.5px; color: var(--fg-subtle); text-align: center; }
.site-header .theme-toggle { width: 36px; height: 36px; flex-shrink: 0; }
.site-header .nav-link-text { flex-shrink: 0; }
.mobile-menu-btn, .mobile-nav { display: none; }
.client-menu { position: relative; flex-shrink: 0; }
.client-menu-btn { display: inline-flex; align-items: center; gap: 7px; max-width: 190px; height: 38px; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); background: var(--bg-surface); color: var(--fg); padding: 0 11px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.client-menu-btn span { overflow: hidden; text-overflow: ellipsis; }
.client-menu-btn i { width: 16px; height: 16px; flex-shrink: 0; }
.client-menu-btn .caret { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.client-menu-btn.menu-open .caret { transform: rotate(180deg); }
.client-menu-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; display: none; width: 248px; padding: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: var(--sh-3); }
.client-menu-pop.open { display: block; }
.client-menu-pop a, .client-menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; border: 0;
  border-radius: var(--r-md); background: transparent; color: var(--fg-muted); padding: 0 11px; text-align: left; font-size: 13.5px; font-weight: 600; }
.client-menu-pop a:hover, .client-menu-pop button:hover { background: var(--bg-hover); color: var(--fg); }
.client-menu-pop i { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }

/* ===== Faixa de índices (compacta, inline — estilo Investidor10) ===== */
.idx-strip { border-bottom: 1px solid var(--border); background: var(--bg-inset); }
.idx-row { display: flex; justify-content: safe center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.idx-row::-webkit-scrollbar { display: none; }
.idx-chip { display: flex; align-items: center; gap: 8px; padding: 7px 18px; border-right: 1px solid var(--border); flex-shrink: 0; white-space: nowrap; font-size: 12.5px; }
.idx-chip .nm { color: var(--fg-subtle); font-weight: 700; letter-spacing: 0.03em; }
.idx-chip .v { font-family: var(--font-mono); font-weight: 600; color: var(--fg); }
.idx-chip .ch { font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; }

/* ===== Portal: busca/hero ===== */
.portal-hero { padding: 46px 0 30px; text-align: center; position: relative; overflow-x: clip; overflow-y: visible; z-index: 1; }
.portal-hero .hero-glow { width: 620px; height: 480px; top: -200px; left: 50%; transform: translateX(-50%); }
.portal-hero h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.02em;
  line-height: 1.1; margin: 0 auto; max-width: 720px; position: relative; }
.portal-hero h1 em { font-style: italic; color: var(--brand); }
.portal-hero p { color: var(--fg-muted); font-size: 18px; margin: 16px auto 0; max-width: 580px; position: relative; }
.hero-actions { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.bigsearch { position: relative; max-width: 620px; margin: 28px auto 0; display: flex; align-items: center; gap: 12px;
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: 6px 6px 6px 18px;
  box-shadow: var(--sh-2); }
.bigsearch > i { width: 20px; height: 20px; color: var(--fg-subtle); }
.bigsearch input { flex: 1; border: 0; background: transparent; color: var(--fg); font-size: 16px; outline: none; padding: 14px 0; }
.bigsearch input::placeholder { color: var(--fg-subtle); }
.bigsearch .search-pop { top: calc(100% + 10px); max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; text-align: left; }
.hero-tags { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-subtle); position: relative; }
.hero-tags a { color: var(--fg-muted); font-family: var(--font-mono); font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--bg-surface); border: 1px solid var(--border); }
.hero-tags a:hover { color: var(--fg); border-color: var(--border-strong); }

/* ===== Portal sections ===== */
.psec { padding: 36px 0; }
.psec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.psec-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; margin: 0;
  display: flex; align-items: center; gap: 10px; }
.psec-head h2 i { width: 21px; height: 21px; color: var(--brand); }
.psec-head .sub { color: var(--fg-muted); font-size: 14px; margin: 4px 0 0; }
.psec-head .gold-i i { color: var(--gold); }
.home-start { padding-top: 22px; }
.decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.decision-card { position: relative; display: flex; min-height: 248px; flex-direction: column; align-items: flex-start; padding: 22px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-surface); box-shadow: var(--card-shadow);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.decision-card:hover { transform: translateY(-2px); border-color: var(--border-brand); }
.decision-card > i { width: 25px; height: 25px; color: var(--brand); margin: 18px 0 16px; }
.decision-card h3 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 1.25; }
.decision-card p { margin: 9px 0 18px; color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; }
.decision-card > span:last-child { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--brand); font-size: 13px; font-weight: 700; }
.decision-card > span:last-child i { width: 15px; height: 15px; }
.decision-step { position: absolute; top: 18px; right: 18px; font-family: var(--font-mono); color: var(--fg-subtle); font-size: 12px; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; color: var(--fg-muted); font-size: 12.5px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row i { width: 15px; height: 15px; color: var(--brand); }

/* segmented tabs (movers, etc.) */
.seg { display: inline-flex; gap: 4px; background: var(--bg-inset); padding: 4px; border-radius: var(--r-md); }
.seg button { border: 0; background: transparent; color: var(--fg-muted); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer; transition: all var(--dur) var(--ease); display: inline-flex; gap: 7px; align-items: center; }
.seg button i { width: 15px; height: 15px; }
.seg button.on { background: var(--brand); color: var(--fg-onBrand); }
.seg.gold button.on { background: var(--gold); color: #211803; }

/* ===== Grid de cards genérico ===== */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--card-shadow); padding: 22px; }
.card-pad-0 { padding: 0; overflow: hidden; }
.col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.col3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }

/* ===== Movers / destaque mini-rows ===== */
.mover-list { display: flex; flex-direction: column; }
.mover { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); transition: background var(--dur-fast) var(--ease); cursor: pointer; }
.mover:last-child { border-bottom: 0; }
.mover:hover { background: var(--bg-hover); }
.mover-empty { padding: 18px; color: var(--fg-subtle); font-size: 13px; text-align: center; }
.mover .glyph { width: 34px; height: 34px; }
.mover .m-id { flex: 1; line-height: 1.25; min-width: 0; }
.mover .m-id b { font-family: var(--font-mono); font-size: 13.5px; }
.mover .m-id span { display: block; font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover .m-pr { text-align: right; line-height: 1.3; }
.mover .m-pr .p { font-family: var(--font-mono); font-size: 13.5px; }
.mover .m-pr .c { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }

/* ===== IBOV home chart ===== */
.ibov-card { margin-top: 20px; padding: 0; overflow: hidden; }
.ibov-head { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.ibov-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ibov-title b { display: block; font-family: var(--font-display); font-size: 18px; line-height: 1.1; }
.ibov-title span:not(.ibov-icon) { display: block; color: var(--fg-muted); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibov-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.ibov-icon i { width: 18px; height: 18px; }
.ibov-quote { text-align: right; line-height: 1.25; }
.ibov-quote strong { display: block; font-family: var(--font-display); font-size: 24px; letter-spacing: -0.01em; }
.ibov-quote span { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 700; margin-top: 2px; }
.ibov-tabs { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--bg-inset); }
.ibov-tabs button { width: 42px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-muted); cursor: pointer; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.ibov-tabs button:hover { color: var(--fg); background: var(--bg-hover); }
.ibov-tabs button.on { background: var(--brand); color: var(--fg-onBrand); }
.ibov-chart-wrap { position: relative; padding: 12px 18px 18px; touch-action: pan-y; }
.ibov-chart { display: block; width: 100%; height: 320px; box-sizing: border-box; overflow: visible; }
.ibov-tooltip { position: absolute; z-index: 3; display: none; min-width: 126px; pointer-events: none; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); box-shadow: var(--sh-2); padding: 8px 10px; line-height: 1.25; }
.ibov-tooltip.show { display: block; }
.ibov-tooltip b { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--fg); }
.ibov-tooltip span { display: block; margin-top: 3px; font-size: 12px; color: var(--fg-muted); white-space: nowrap; }

/* ===== Ranking mini-cards (home) ===== */
.rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rank-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--card-shadow); }
.rank-card .rc-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.rank-card .rc-head .ic { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.rank-card .rc-head .ic.gold { background: var(--gold-soft); color: var(--gold); }
.rank-card .rc-head .ic i { width: 17px; height: 17px; }
.rank-card .rc-head b { font-size: 14.5px; display: block; line-height: 1.25; }
.rank-card .rc-head span { display: block; font-size: 11.5px; color: var(--fg-subtle); }
.rank-row { display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--border); transition: background var(--dur-fast) var(--ease); cursor: pointer; }
.rank-row:hover { background: var(--bg-hover); }
.rank-row .pos { font-family: var(--font-mono); font-size: 12px; color: var(--fg-subtle); width: 16px; flex-shrink: 0; }
.rank-row .glyph { width: 28px; height: 28px; font-size: 10px; }
.rank-row .rr-id { flex: 1; font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.rank-row .rr-v { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.rank-foot { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; }
.rank-method { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--border-brand); border-radius: var(--r-lg);
  padding: 24px; background: linear-gradient(145deg, var(--brand-soft), var(--bg-surface)); box-shadow: var(--card-shadow); }
.rank-method h3 { margin: 10px 0 0; font-family: var(--font-serif); font-size: 24px; line-height: 1.2; }
.rank-method p { margin: 12px 0; color: var(--fg-muted); font-size: 13.5px; line-height: 1.6; }
.rank-method ol { display: grid; gap: 8px; margin: 4px 0 20px; padding: 0; list-style: none; color: var(--fg-muted); font-size: 13px; }
.rank-method li { display: flex; align-items: center; gap: 9px; }
.rank-method li b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--brand); color: var(--fg-onBrand); font-family: var(--font-mono); font-size: 10px; }
.rank-method .btn { margin-top: auto; }

/* ===== Notícias ===== */
.news-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.news-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--card-shadow);
  padding: 22px; display: flex; flex-direction: column; cursor: pointer; transition: border-color var(--dur) var(--ease); }
.news-card:hover { border-color: var(--border-strong); }
.news-card.feat { grid-row: span 2; background: var(--bg-surface); }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.news-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); }
.news-card.feat .news-cat { color: var(--gold); }
.news-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-subtle); }
.news-time { font-size: 12px; color: var(--fg-subtle); }
.news-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.28; letter-spacing: -0.01em; margin: 0; text-wrap: pretty; }
.news-card.feat h3 { font-family: var(--font-serif); font-size: 26px; line-height: 1.18; }
.news-card p { color: var(--fg-muted); font-size: 14px; margin: 10px 0 0; flex: 1; text-wrap: pretty; }
.news-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; color: var(--fg-subtle); }
.news-ticker { font-family: var(--font-mono); font-weight: 600; color: var(--fg-muted); background: var(--bg-inset); padding: 3px 8px; border-radius: var(--r-sm); }
.news-decision { display: grid; gap: 3px; margin-top: 13px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--bg-inset); font-size: 12px; line-height: 1.45; }
.news-decision b, .news-next b { color: var(--fg); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.news-decision span { color: var(--fg-muted); }
.news-next { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--fg-muted); font-size: 12px; line-height: 1.45; }
.news-next > i { width: 15px; height: 15px; margin-top: 1px; color: var(--gold); flex-shrink: 0; }
.news-next span { display: grid; gap: 2px; }

/* ===== Tool cards ===== */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--card-shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 4px; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tool-card:hover { border-color: var(--border-brand); transform: translateY(-2px); }
.tool-card .t-ic { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.tool-card .t-ic i { width: 22px; height: 22px; }
.tool-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; }
.tool-card p { color: var(--fg-muted); font-size: 14px; margin: 6px 0 12px; flex: 1; }

/* ===== Acesso aberto (home) ===== */
.open-band { background: linear-gradient(120deg, var(--brand-deep), #14402F); border: 1px solid var(--border-brand); border-radius: var(--r-2xl);
  padding: 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; overflow: hidden; position: relative; }
.open-band .pb-owl { position: absolute; right: -30px; bottom: -50px; width: 260px; opacity: 0.08; }
.open-band h2 { font-family: var(--font-serif); font-weight: 600; font-size: 30px; color: #fff; margin: 10px 0 0; line-height: 1.12; }
.open-band p { color: rgba(236,244,239,0.82); font-size: 15.5px; margin: 12px 0 0; max-width: 420px; }
.open-band .eyebrow { color: #E6C879; }
.open-feats { display: flex; flex-direction: column; gap: 12px; position: relative; }
.open-feat { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md); padding: 13px 15px; color: #ECF4EF; font-size: 14.5px; font-weight: 500; }
.open-feat i { width: 18px; height: 18px; color: #E6C879; flex-shrink: 0; }

/* ============================================================
   PÁGINA DE ATIVO (ficha rica, densa)
   ============================================================ */
.crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-muted); padding: 20px 0 0; flex-wrap: wrap; }
.crumb a:hover { color: var(--fg); }
.crumb i { width: 13px; height: 13px; }
.ficha-head { display: flex; align-items: flex-start; gap: 18px; padding: 18px 0 22px; flex-wrap: wrap; }
.ficha-glyph { width: 58px; height: 58px; border-radius: var(--r-md); display: grid; place-items: center; font-family: var(--font-mono);
  font-weight: 700; font-size: 19px; color: #fff; flex-shrink: 0; }
.ficha-id h1 { font-family: var(--font-mono); font-weight: 600; font-size: 27px; letter-spacing: 0.01em; margin: 0; }
.ficha-id .nm { color: var(--fg-muted); font-size: 14.5px; margin-top: 2px; }
.ficha-id .meta-tags { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.sec-tag { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px; }
.sec-tag.muted { color: var(--fg-muted); background: var(--bg-inset); }
.sec-tag i { width: 13px; height: 13px; }
.ficha-price { margin-left: auto; text-align: right; }
.ficha-price .p { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -0.01em; }
.ficha-price .v { font-family: var(--font-mono); font-weight: 600; font-size: 14px; margin-top: 2px; }
.ficha-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.act-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--fg-muted);
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 8px 13px; cursor: pointer; transition: all var(--dur) var(--ease); }
.act-btn:hover { color: var(--fg); border-color: var(--fg-subtle); background: var(--bg-hover); }
.act-btn i { width: 15px; height: 15px; }

.ficha-grid { display: grid; grid-template-columns: 1fr 332px; gap: 24px; padding: 8px 0 70px; align-items: start; }
.ficha-grid .card + .card { margin-top: 20px; }
.card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0 0 16px; display: flex; align-items: center; gap: 9px; }
.card h3 i { width: 18px; height: 18px; color: var(--brand); }
.card h3 .h3-note { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--fg-subtle); }

/* indicator grid (denso) */
.ind-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.ind { background: var(--bg-surface); padding: 14px 15px; }
.ind .k { font-size: 11.5px; color: var(--fg-muted); display: flex; align-items: center; gap: 5px; }
.ind .k i { width: 12px; height: 12px; color: var(--fg-subtle); }
.ind .v { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin-top: 4px; letter-spacing: -0.01em; }
.ind .v.mono { font-family: var(--font-mono); font-size: 17px; }
.ind .v.pos { color: var(--pos); } .ind .v.neg { color: var(--neg); }
.ind .sub { font-size: 11px; color: var(--fg-subtle); margin-top: 2px; }

/* range bar (min/max 52s) */
.range { margin-top: 4px; }
.range-track { height: 6px; border-radius: var(--r-pill); background: var(--bg-inset); position: relative; margin: 10px 0 7px; }
.range-track .fill { position: absolute; height: 100%; border-radius: var(--r-pill); background: var(--brand); }
.range-track .dot { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 2px solid var(--bg-surface); transform: translate(-50%, -50%); }
.range-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }

/* quality breakdown bars (agora aberto) */
.bar-row { display: grid; grid-template-columns: 132px 1fr 40px; align-items: center; gap: 12px; margin-bottom: 13px; font-size: 13.5px; color: var(--fg-muted); }
.bar-row:last-child { margin-bottom: 0; }
.bar-row b { font-family: var(--font-mono); color: var(--fg); text-align: right; }
.bar { height: 7px; border-radius: var(--r-pill); background: var(--bg-inset); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); }

/* análise qualitativa */
.pilar-list { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.pilar-list li { display: flex; gap: 10px; font-size: 14px; } .pilar-list li i { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; flex-shrink: 0; }
.conv { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.conv .meter { display: flex; gap: 3px; } .conv .meter span { width: 15px; height: 9px; border-radius: 2px; background: var(--brand); }
.conv .meter span.off { background: var(--bg-inset); }
.rec-pill { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; color: var(--fg-onBrand); background: var(--brand); padding: 5px 12px; border-radius: var(--r-sm); }

/* rail */
.qcard .qbig { display: flex; align-items: flex-end; gap: 14px; }
.qcard .qbig .score { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 0.9; letter-spacing: -0.02em; }
.qcard .qbig .score.high { color: var(--q-high); } .qcard .qbig .score.mid { color: var(--q-mid); } .qcard .qbig .score.low { color: var(--q-low); }
.qcard .qbig .lbl { padding-bottom: 7px; } .qcard .qbig .lbl b { font-size: 14.5px; } .qcard .qbig .lbl span { display: block; font-size: 12px; color: var(--fg-muted); }
.qband-leg { display: flex; gap: 6px; margin-top: 16px; }
.qband-leg .qb { flex: 1; text-align: center; font-size: 10.5px; padding: 7px 4px; border-radius: var(--r-sm); font-weight: 600; }
.qb.high { background: var(--q-high-soft); color: var(--q-high); } .qb.mid { background: var(--q-mid-soft); color: var(--q-mid); } .qb.low { background: var(--q-low-soft); color: var(--q-low); }
.qb.dim { opacity: 0.4; }
.rail-cta { background: var(--brand-deep); color: #ECF4EF; border-radius: var(--r-lg); padding: 22px; text-align: center; }
.rail-cta h3 { color: #fff; justify-content: center; font-family: var(--font-serif); font-weight: 600; font-size: 19px; margin: 0 0 8px; }
.rail-cta p { color: rgba(236,244,239,0.8); font-size: 13.5px; margin: 0 0 16px; }

/* mini list (proventos recentes / peers) */
.mini-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .ml { color: var(--fg-muted); } .mini-row .mr { font-family: var(--font-mono); font-weight: 600; }

/* peers list rail */
.peer-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.peer-row:last-child { border-bottom: 0; }
.peer-row:hover .pr-t { color: var(--brand); }
.peer-row .glyph { width: 26px; height: 26px; font-size: 9px; }
.peer-row .pr-t { flex: 1; font-family: var(--font-mono); font-size: 13px; font-weight: 600; }

/* ============================================================
   TABELAS DE LISTA / RANKINGS / COMPARAR (reusa .atable)
   ============================================================ */
.page-head { padding: 30px 0 8px; }
.page-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.02em; margin: 10px 0 0; }
.page-head p { color: var(--fg-muted); font-size: 16px; margin: 10px 0 0; max-width: 620px; }

.atable td .qbadge { cursor: default; }
.atable .glyph { width: 32px; height: 32px; }

/* comparador */
.cmp-pick { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 24px; }
.cmp-slot { display: flex; align-items: center; gap: 10px; background: var(--bg-surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: 10px 14px; min-width: 180px; position: relative; }
.cmp-slot.filled { border-style: solid; }
.cmp-slot .glyph { width: 30px; height: 30px; font-size: 10px; }
.cmp-slot .cs-id { flex: 1; line-height: 1.2; } .cmp-slot .cs-id b { font-family: var(--font-mono); font-size: 13px; } .cmp-slot .cs-id span { display: block; font-size: 11px; color: var(--fg-muted); }
.cmp-slot .cs-rm { color: var(--fg-subtle); cursor: pointer; } .cmp-slot .cs-rm:hover { color: var(--neg); }
.cmp-add { color: var(--fg-muted); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.cmp-add i { width: 16px; height: 16px; }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: right; font-size: 14px; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; color: var(--fg-muted); font-weight: 500; }
.cmp-table thead th { font-size: 13px; }
.cmp-table .best { color: var(--pos); font-weight: 700; }
.cmp-table td.mono { font-family: var(--font-mono); }

/* calculadora de proventos */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--fg-muted); margin-bottom: 7px; font-weight: 500; }
.field .inp { display: flex; align-items: center; gap: 8px; background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 14px; transition: border-color var(--dur) var(--ease); }
.field .inp:focus-within { border-color: var(--border-brand); }
.field .inp span { color: var(--fg-subtle); font-size: 14px; }
.field .inp input { flex: 1; border: 0; background: transparent; color: var(--fg); font-size: 15px; outline: none; font-family: var(--font-mono); }
.calc-out { display: flex; flex-direction: column; gap: 14px; }
.calc-big { background: var(--bg-inset); border-radius: var(--r-md); padding: 18px 20px; }
.calc-big .k { font-size: 12.5px; color: var(--fg-muted); }
.calc-big .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; margin-top: 4px; color: var(--brand); }
.calc-big .v.gold { color: var(--gold); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1000px) {
  .ficha-grid { grid-template-columns: 1fr; }
  .rank-grid, .tools-grid, .col3, .decision-grid { grid-template-columns: 1fr 1fr; }
  .ibov-head { grid-template-columns: 1fr auto; }
  .ibov-tabs { grid-column: 1 / -1; justify-self: start; }
  .news-grid { grid-template-columns: 1fr 1fr; } .news-card.feat { grid-row: auto; grid-column: span 2; }
  .open-band { grid-template-columns: 1fr; }
  .ind-grid { grid-template-columns: repeat(3, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-header .mainnav, .site-header .nav-tools, .site-header .nav-link-text, .site-header .client-menu { display: none; }
  .site-header .topbar { position: relative; gap: 8px; }
  .site-header .nav-spacer { display: block; }
  .site-header .theme-toggle, .mobile-menu-btn { width: 44px; height: 44px; }
  .mobile-menu-btn { display: inline-grid; place-items: center; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg-surface); color: var(--fg); cursor: pointer; }
  .mobile-menu-btn i { width: 20px; height: 20px; }
  .mobile-nav { position: absolute; z-index: 100; top: calc(100% + 7px); left: 12px; right: 12px; max-height: calc(100vh - 86px); overflow-y: auto;
    padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--bg-elevated); box-shadow: var(--sh-3); }
  .mobile-nav.open { display: grid; }
  .mobile-nav a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: var(--r-md); color: var(--fg-muted); font-size: 14px; font-weight: 600; }
  .mobile-nav a:hover, .mobile-nav a.on { color: var(--fg); background: var(--bg-hover); }
  .mobile-nav .mobile-nav-label { padding: 12px 12px 5px; color: var(--fg-subtle); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-nav .mobile-account { margin-top: 6px; background: var(--brand); color: var(--fg-onBrand); }
  .rank-grid, .tools-grid, .col2, .col3, .news-grid, .decision-grid { grid-template-columns: 1fr; } .news-card.feat { grid-column: auto; }
  .portal-hero { padding-top: 34px; }
  .portal-hero p { padding-inline: 18px; font-size: 16px; }
  .hero-actions { padding-inline: 18px; }
  .hero-actions .btn { width: 100%; max-width: 340px; justify-content: center; min-height: 46px; }
  .bigsearch { margin-inline: 16px; padding-left: 14px; }
  .decision-card { min-height: 220px; }
  .ibov-head { grid-template-columns: 1fr; align-items: start; }
  .ibov-quote { text-align: left; }
  .ibov-tabs { justify-self: stretch; overflow-x: auto; }
  .ibov-tabs button { flex: 1; min-width: 42px; }
  .ibov-chart-wrap { padding: 10px 8px 16px; }
  .ibov-chart { height: 230px; }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha-price { margin-left: 0; text-align: left; width: 100%; } .ficha-actions { justify-content: flex-start; }
}
