/* Base visual do gráfico de bolhas e do painel de detalhes. */
:root{--bg:#f5f7fb;--surface:#fff;--ink:#15243d;--muted:#63728a;--line:#dfe6ef;--left:#d1495b;--center:#7ec8e3;--right:#2563eb;--other:#9aa1b2;--population:#7255aa;--electorate:#16856e;--age:#df7d49;--shadow:0 12px 40px rgba(30,55,91,.06)}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,select{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
h1,h2,h3,p{margin-top:0}
section{scroll-margin-top:92px}
.shell{width:min(1320px,calc(100% - 48px));margin:auto}

/* Cabeçalho e navegação */
.site-header{background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.header-inner{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:12px;font-size:11px;letter-spacing:.16em;line-height:1.35;font-weight:700}
.brand strong{display:block;font-size:12px;letter-spacing:.1em}
.brand-mark{width:36px;height:36px;border-radius:10px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:22px;font-weight:800;letter-spacing:0}
.main-nav{display:flex;gap:24px;white-space:nowrap;color:var(--muted);font-size:13px;font-weight:650}
.main-nav a:hover{color:var(--right)}

/* Abertura */
.eyebrow,.section-index,.hero-aside-label,.detail-kicker{display:block;font-size:11px;font-weight:800;letter-spacing:.17em;text-transform:uppercase;color:var(--right)}
.hero{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.55fr);gap:48px;padding:70px 0 65px;align-items:end}
h1{font-size:clamp(50px,7vw,96px);line-height:.99;letter-spacing:-.07em;margin:20px 0 28px}
h1 em{font-style:normal;color:var(--right)}
.hero-copy{max-width:700px;font-size:19px;line-height:1.6;color:#4c5c75;margin-bottom:0}
.hero-aside{border-left:3px solid var(--right);padding:8px 0 8px 24px}
.hero-aside p{font-size:15px;color:var(--muted);margin:12px 0 0}
.modo-isolado{margin:18px 0 0;padding:8px 12px;border:1px dashed var(--right);border-radius:8px;background:#eef4ff;font-size:13px;color:var(--ink)}
.modo-isolado a{color:var(--right);font-weight:750;text-decoration:underline}

/* Seções */
.workspace,.section-block{margin-bottom:70px}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:28px;margin-bottom:23px}
.section-heading h2{font-size:clamp(28px,3vw,38px);letter-spacing:-.045em;line-height:1.13;margin:8px 0 0}
.section-heading>p{max-width:380px;color:var(--muted);font-size:14px;margin:0}
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* Painel de gráfico */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:24px;min-width:0}
.panel-wide{grid-column:1/-1}
.panel-head{display:flex;justify-content:space-between;align-items:start;gap:24px;margin-bottom:16px}
.panel h3{font-size:19px;letter-spacing:-.025em;margin:0 0 2px}
.panel-head p{font-size:13px;color:var(--muted);margin:0}
.legend{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;color:var(--muted);font-size:12px}
.legend span{display:inline-flex;align-items:center;white-space:nowrap}
.legend i{display:inline-block;width:11px;height:11px;background:var(--swatch);border-radius:3px;margin-right:6px}
.chart-note{font-size:12px;color:var(--muted);margin:15px 0 0;padding-top:13px;border-top:1px solid var(--line)}
.chart-note a{color:var(--right);font-weight:750;text-decoration:underline;text-underline-offset:2px}

.footer{border-top:1px solid var(--line);padding:28px 0;color:var(--muted);font-size:12px}
.footer .shell{display:flex;justify-content:space-between}

/* Selo de status do dado */
.status{display:inline-block;padding:2px 8px;border-radius:20px;background:#e8f5ef;color:#197453;font-size:11px;font-weight:750;text-transform:capitalize;margin-bottom:4px}
.status-estimado{background:#fff2dd;color:#965e13}
.status-pendente{background:#edf0f4;color:#68758a}

/* Hover resumido e painel de detalhes (drawer) */
.hover-tip{position:fixed;z-index:80;width:min(330px,calc(100vw - 24px));padding:12px 14px;border:1px solid #b9c9dd;border-radius:9px;background:#17263d;color:#fff;box-shadow:0 12px 30px rgba(15,29,51,.24);pointer-events:none;font-size:12px;line-height:1.4}
.hover-tip[hidden],.drawer[hidden],.drawer-backdrop[hidden]{display:none!important}
.hover-tip strong,.hover-tip span{display:block}
.hover-tip strong{font-size:13px;margin-bottom:4px}
.hover-tip span{color:#d8e5f5}
.drawer-backdrop{position:fixed;inset:0;z-index:60;background:rgba(14,27,47,.55)}
.drawer{position:fixed;top:0;right:0;z-index:70;width:min(720px,100vw);height:100dvh;display:flex;flex-direction:column;background:#fff;box-shadow:-16px 0 45px rgba(15,29,51,.2)}
body.drawer-open{overflow:hidden}
.drawer-top{flex:none;display:flex;justify-content:space-between;align-items:center;gap:15px;padding:17px 24px;border-bottom:1px solid var(--line)}
.drawer-top>span{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--muted)}
.drawer-top #detail-close{position:static;width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:7px;background:#f5f7fb;color:var(--ink);font-size:23px;line-height:1}
.drawer-body{flex:1;min-height:0;overflow:auto;padding:30px 34px 48px}
.drawer-content h3{font-size:clamp(25px,3vw,36px);letter-spacing:-.04em;line-height:1.15;margin:8px 0 13px}
.drawer-content h4{font-size:17px;letter-spacing:-.02em;margin:29px 0 12px}
.drawer-content>p{font-size:14px;color:#42516a;line-height:1.55}
.drawer .detail-source{margin-top:26px!important;border-top:1px solid var(--line);padding-top:12px;color:var(--muted);font-size:11px!important}
.drawer .detail-source a{color:var(--right);font-weight:750;text-decoration:underline}

@media(max-width:900px){
  .main-nav{overflow:auto;max-width:60vw;gap:15px}
  .hero{grid-template-columns:1fr;padding:50px 0 45px;gap:24px}
  .hero-aside{max-width:620px}
  .section-heading{align-items:start;flex-direction:column;gap:9px}
}
@media(max-width:620px){
  .shell{width:min(100% - 28px,1320px)}
  .header-inner{min-height:62px;align-items:start;padding:12px 0;flex-direction:column;gap:10px}
  .main-nav{max-width:100%;width:100%;padding-bottom:5px;font-size:12px}
  section{scroll-margin-top:115px}
  .hero-copy{font-size:16px}
  .chart-grid{grid-template-columns:1fr}
  .panel-wide{grid-column:auto}
  .panel{padding:18px}
  .panel-head{flex-direction:column;gap:9px}
  .footer .shell{display:block}
  .footer span{display:block}
  .drawer-body{padding:22px 18px 36px}
}
