/* Design alinhado com grafema.ai: creme claro, preto quente, laranja Grafema, Inter */
[hidden] { display: none !important; }
:root {
  --bg: #FBFBF8; --bg-alt: #F3F2EE; --card: #FFFFFF; --text: #11110F; --muted: #65635D; --muted-2: #77756E;
  --line: #E8E7E2; --line-2: #DEDDD8; --soft: #F5F4F0;
  --orange: #F77337; --orange-ink: #E96329; --orange-soft: #FEF1EA; --orange-mid: #FBC2A6;
  --ok: #15803D; --ok-soft: #F0FDF4; --err: #B91C1C; --err-soft: #FEF2F2;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 16px/1.6 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(17,17,15,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(17,17,15,.035) 1px, transparent 1px);
  background-size: 72px 72px;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); }
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -0.025em; }
h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* topo */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(251,251,248,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand-tag { font-size: 12.5px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.nav a { color: var(--muted); text-decoration: none; } .nav a:hover { color: var(--text); }
.right { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; }
.lang button { border: 0; background: transparent; font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: #fff; }
.user-box { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }

/* botões */
.btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; background: var(--card); color: var(--text); text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 13.5px; }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-primary { background: var(--orange); color: #fff; } .btn-primary:hover { background: var(--orange-ink); }
.btn-ghost { border-color: var(--line-2); background: var(--card); } .btn-ghost:hover { background: var(--soft); }
.btn:disabled { opacity: .45; cursor: default; }


/* secções */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { color: var(--orange-ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 17px; max-width: 780px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .big { font-size: 34px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 6px; }
.card p { color: var(--muted); margin: 4px 0 16px; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { font-size: 13px; color: var(--muted); }

/* barras */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 56px; align-items: center; gap: 12px; font-size: 14px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { display: block; background: var(--soft); border-radius: 4px; height: 10px; overflow: hidden; }
.bar-fill { display: block; background: var(--orange-mid); height: 100%; border-radius: 4px; }
.bar-row.hi .bar-fill { background: var(--orange); }
.bar-row.lo .bar-fill { background: #B9B7AF; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.split { display: flex; height: 14px; border-radius: 4px; overflow: hidden; margin: 14px 0 10px; }
.split span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* diretório */
.dir-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.quota { font-size: 13px; color: var(--muted); background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 24px 0 14px; }
.filters input[type=search], .filters select { border: 1px solid var(--line-2); background: var(--card); border-radius: 8px; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--text); }
.filters input[type=search] { flex: 1 1 280px; }
.filters input:focus, .filters select:focus, .field input:focus { outline: 2px solid var(--orange-mid); outline-offset: 0; border-color: var(--orange); }
.chk { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; font-weight: 500; }
.chk input { accent-color: var(--orange); }
.banner { background: var(--orange-soft); border: 1px solid #FBD5C1; color: #9A3A0F; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 500; }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 700; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid #F0EFEA; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FDFDFB; }
.co-name { font-weight: 700; }
.co-sub { color: var(--muted); font-size: 13px; }
.table td a { text-decoration: none; } .table td a:hover { color: var(--orange-ink); }
.blur { filter: blur(5px); user-select: none; color: var(--muted); }
.pill { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; border: 1px solid #FBD5C1; background: var(--orange-soft); color: #9A3A0F; }
.none { color: #CFCDC6; }
.linkish { background: none; border: 0; color: var(--muted-2); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0; }
.linkish:hover { color: var(--text); text-decoration: underline; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.pager div { display: flex; gap: 8px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* capa: relatório, não landing */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 12.5px; }
.cover { padding: 44px 0 36px; }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 48px; align-items: center; }
.report-tag { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.report-tag::before { content: ""; width: 22px; height: 2px; background: var(--orange); }
.report-tag .dot { color: var(--line-2); }
.cover h1 { max-width: 15ch; }
.dev-pill { margin-left: 6px; padding: 3px 8px; border-radius: 6px; background: var(--orange-soft); border: 1px solid #FBD5C1; color: #9A3A0F; letter-spacing: .04em; }
.dev-note { font-size: 14px; color: #7A3410; background: var(--orange-soft); border: 1px solid #FBD5C1; border-radius: 10px; padding: 10px 14px; max-width: 520px; margin: -10px 0 24px; }
.dev-note strong { color: #9A3A0F; }
.cover h1 em { font-style: normal; color: var(--orange); }
.dek { font-size: 18.5px; color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.dek strong { color: var(--text); }
.meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 28px; margin: 0 0 28px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta dt { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.meta dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.cover-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* mapa */
.map-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 1px 0 rgba(17,17,15,.02), 0 18px 48px -28px rgba(17,17,15,.25); }
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.map-title { font-size: 13px; font-weight: 700; }
.chips { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.chip { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip[aria-selected="true"] { background: var(--text); color: #fff; }
.map-stage { position: relative; }
#map { display: block; width: 100%; height: auto; max-height: 640px; touch-action: manipulation; }
#map .hx { stroke: #fff; stroke-width: .9; cursor: pointer; transition: fill .45s ease, opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); transform-box: fill-box; transform-origin: center; }
#map .hx.pre { opacity: 0; transform: scale(.3); }
#map .hx.few { cursor: default; }
#map .hx:hover, #map .hx.on { stroke: var(--text); stroke-width: 1.6; }
#map .hx.dim { opacity: .25; }
#map .inset-box { fill: none; stroke: var(--line-2); stroke-dasharray: 3 3; }
#map .inset-label { font-size: 9px; font-weight: 700; fill: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; }
.map-tip { position: absolute; z-index: 3; min-width: 190px; max-width: 240px; background: var(--text); color: #fff; border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.45; pointer-events: none; box-shadow: 0 12px 28px rgba(17,17,15,.25); }
.map-tip.pinned { pointer-events: auto; }
.map-tip b { font-size: 14px; display: block; }
.map-tip .tip-big { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--orange); line-height: 1.15; }
.map-tip .tip-lab { color: #C9C7C0; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #2E2D2A; }
.map-tip .tip-row { display: flex; justify-content: space-between; gap: 10px; color: #C9C7C0; }
.map-tip .tip-row span:last-child { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.map-tip .tip-btn { margin-top: 9px; width: 100%; justify-content: center; }
.map-tip .tip-hint { color: #9C9A93; font-size: 11.5px; margin-top: 6px; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.legend-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ramp { display: block; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #FDE7DA, #F77337, #8E2F0A); }
.ramp.dens { background: linear-gradient(90deg, #EDEBE6, #9C9A93, #11110F); }

/* faixa de números */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.ticker-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.tick { padding: 20px 20px 18px; border-left: 1px solid var(--line); }
.tick:first-child { border-left: 0; padding-left: 0; }
.tick-v { white-space: nowrap; font-size: clamp(22px, 2.3vw, 30px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tick-l { font-size: 13.5px; color: var(--muted); }

/* capítulos */
.chapters { padding: 24px 0 40px; }
.chapter { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; padding: 56px 0; border-bottom: 1px solid var(--line); align-items: start; }
.chapter:last-child { border-bottom: 0; }
.chapter-wide { grid-template-columns: 1fr; gap: 24px; }
.chapter-wide .ch-text { max-width: 640px; }
.ch-text { position: sticky; top: 96px; }
.chapter-wide .ch-text { position: static; }
.ch-num { font-size: 13px; font-weight: 800; color: var(--orange); letter-spacing: .04em; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.ch-num::after { content: ""; height: 1px; width: 48px; background: var(--orange-mid); }
.ch-text p { color: var(--muted); font-size: 17px; max-width: 460px; }
.ch-text p strong { color: var(--text); }
.ch-viz { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.viz-cap { font-size: 12px; font-weight: 700; color: var(--muted-2); letter-spacing: .05em; text-transform: uppercase; margin: 22px 0 12px; }
.viz-cap:first-child { margin-top: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.mini-grid .card { padding: 22px; }

/* adivinhe primeiro */
.guess-q { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 18px; }
.guess-val { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.guess-val small { font-size: 22px; color: var(--muted); margin-left: 2px; }
.guess-range { width: 100%; margin: 18px 0 6px; accent-color: var(--orange); height: 28px; cursor: pointer; }
.guess-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.guess-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.guess-track { position: relative; height: 54px; margin: 28px 0 8px; }
.guess-track .line { position: absolute; left: 0; right: 0; top: 26px; height: 2px; background: var(--line); }
.guess-track .gap { position: absolute; top: 25px; height: 4px; background: var(--orange-mid); border-radius: 2px; transition: left .9s cubic-bezier(.2,.8,.2,1), width .9s cubic-bezier(.2,.8,.2,1); }
.guess-track .mk { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: left .9s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.guess-track .mk span { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.guess-track .mk i { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.guess-track .mk.you span { background: var(--soft); color: var(--muted); }
.guess-track .mk.you i { background: #B9B7AF; }
.guess-track .mk.real { top: 30px; flex-direction: column-reverse; }
.guess-track .mk.real i { margin: 0 0 4px; background: var(--orange); width: 14px; height: 14px; }
.guess-track .mk.real span { background: var(--orange); color: #fff; }
.verdict { font-size: 15.5px; color: var(--muted); margin: 26px 0 0; }
.verdict strong { color: var(--text); }
.guess-after { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-2); animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* barras com escolha de métrica (cap. 2) */
.viz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bars .bar-fill { transition: width .6s cubic-bezier(.2,.8,.2,1); }
.gap-note { margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.gap-note strong { color: var(--text); }

/* faixa escura */
.dark-band { background: var(--text); color: #fff; padding: 56px 0; }
.dark-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.dark-band h2 { color: #fff; max-width: 640px; }
.dark-band p { color: #B6B4AD; font-size: 17px; max-width: 640px; margin: 0; }
.dark-band p strong { color: #fff; }
.dark-band .kicker { color: var(--orange); }

/* CTA dentro do diretório + popup */
.dir-cta { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--text); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.dir-cta div { display: grid; gap: 2px; }
.dir-cta strong { font-size: 16px; letter-spacing: -0.01em; }
.dir-cta span { color: #B6B4AD; font-size: 14px; }
.promo form { gap: 10px; }
.promo h3 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
.promo p { margin: 0; }
.promo-list { margin: 4px 0 6px; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.promo-list li { margin-bottom: 6px; }
.promo-list li::marker { color: var(--orange); }

/* CTA, metodologia, rodapé */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.list { padding-left: 18px; color: var(--muted); } .list li { margin-bottom: 10px; } .list strong { color: var(--text); }
.footer { background: var(--card); border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; } .footer a:hover { color: var(--text); }
.footer .brand-name { font-size: 18px; color: var(--text); }
.footer-links { display: flex; gap: 20px; }

/* diálogos */
.dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(480px, 92vw); box-shadow: 0 24px 64px rgba(17,17,15,.18); }
.dialog::backdrop { background: rgba(17,17,15,.4); }
.dialog form { padding: 28px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field input { border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 14px; font: inherit; font-weight: 400; }
.dialog .chk { align-items: flex-start; font-size: 13.5px; font-weight: 400; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.msg { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: var(--ok-soft); color: var(--ok); }
.msg.err { background: var(--err-soft); color: var(--err); }
.rm-company { margin: 0; padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 14px; font-weight: 600; }
.legal { max-width: 780px; } .legal h2 { font-size: 22px; margin-top: 32px; } .legal p { color: var(--muted); }

@media (max-width: 980px) {
  .cover-grid { grid-template-columns: 1fr; gap: 28px; }
  .chapter { grid-template-columns: 1fr; gap: 22px; padding: 40px 0; }
  .ch-text { position: static; }
  .ticker-row { grid-template-columns: repeat(3, 1fr); }
  .tick:nth-child(4) { border-left: 0; padding-left: 0; }
  .tick:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav a, .brand-tag { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .dir-head { flex-direction: column; align-items: flex-start; }
  .bar-row { grid-template-columns: 110px 1fr 48px; }
  .grid { grid-template-columns: 1fr; }
  .topbar .btn-primary { padding: 7px 10px; font-size: 13px; }
}
@media (max-width: 480px) {
  .dir-cta { flex-direction: column; align-items: stretch; }
  .dir-cta .btn { justify-content: center; }
  .cover { padding-top: 28px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .ticker-row { grid-template-columns: 1fr 1fr; }
  .tick { padding: 14px 12px; }
  .tick:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tick:nth-child(4) { border-left: 1px solid var(--line); padding-left: 12px; }
  .tick:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tick-v { font-size: 24px; }
  .ch-viz { padding: 18px; }
  .guess-val { font-size: 46px; }
  .map-card { padding: 12px; }
  .chip { padding: 5px 8px; font-size: 12px; }
  .wrap { padding: 0 16px; }
  .brand-name { font-size: 17px; }
  .right { gap: 6px; }
}
