/* Blog da Escola xequemat. Estilo das páginas públicas.
   Cores, tipos, espaços e cantos vêm do sistema visual da Escola (KIT-MARCA-v1, tokens v1). Não inventar valor aqui:
   se faltar um tom, ele entra primeiro no sistema. Topo, abertura e rodapé no tema escuro; leitura no tema claro. */

@font-face { font-family: "Sora"; src: url("fontes/sora.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fontes/inter.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
/* Reserva com a mesma largura, para o texto não pular quando a fonte chega. */
@font-face { font-family: "Inter reserva"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }
@font-face { font-family: "Sora reserva"; src: local("Arial"); size-adjust: 116%; ascent-override: 84%; descent-override: 22%; line-gap-override: 0%; }

:root {
  --purple-100: #ede7ff;
  --purple-200: #dfd3fe;
  --surface-950: #0b0615;
  --surface-900: #170e27;
  --surface-800: #251a3a;
  --surface-700: #35274f;
  --paper-0: #ffffff;
  --paper-50: #faf9fd;
  --paper-100: #f4f2f8;
  --paper-200: #e8e6ee;
  --neutral-300: #d2cfd8;
  --neutral-400: #b2b0b8;
  --neutral-600: #6a686f;
  --neutral-700: #4e4c53;
  --neutral-900: #1b1920;
  --brand-core: #944cf7;
  --brand-deep: #6201b4;
  --brand-light: #b289ff;
  --warm-light: #d07cf8;
  --on-brand: #ffffff;

  /* papéis, tema claro (leitura) */
  --bg: var(--paper-50);
  --bg-raised: var(--paper-0);
  --bg-muted: var(--paper-100);
  --ink: var(--neutral-900);
  --ink-2: var(--neutral-700);
  --ink-3: var(--neutral-600);
  --accent: var(--brand-deep);
  --line: var(--paper-200);
  --line-strong: var(--neutral-300);
  --focus: var(--brand-core);
  --shadow-sm: 0 1px 2px rgba(27, 25, 32, 0.06), 0 4px 12px rgba(27, 25, 32, 0.06);
  --shadow-lg: 0 24px 48px -24px rgba(98, 1, 180, 0.25);

  --display: "Sora", "Sora reserva", "Inter", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Inter reserva", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;
  --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 999px;

  --largura: 1200px;
  --entrada: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-core); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; margin: 0; }
.icone { flex: none; }
.so-leitor { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pular { position: absolute; left: var(--space-4); top: -100px; z-index: 50; padding: var(--space-3) var(--space-4); background: var(--paper-0); color: var(--brand-deep); font-weight: 600; border-radius: var(--radius-sm); }
.pular:focus { top: var(--space-3); }

/* ---- Topo (tema escuro) ---------------------------------------------------------------------------------- */
.topo { position: sticky; top: 0; z-index: 40; background: var(--surface-950); color: var(--paper-50); border-bottom: 1px solid #ffffff1a; }
.topo-dentro { max-width: var(--largura); margin: 0 auto; padding: 0 var(--space-4); min-height: 64px; display: flex; align-items: center; gap: var(--space-6); }
.topo-marca { display: flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; flex: none; }
.topo-marca img { display: block; height: 44px; width: auto; }
.topo-blog { font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--warm-light); padding-left: var(--space-3); border-left: 1px solid #ffffff2e; line-height: 1.6; }
.topo-botao { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); background: transparent; color: inherit; border: 1px solid #ffffff2e; border-radius: var(--radius-sm); font: 600 0.875rem/1 var(--body); cursor: pointer; }
.topo-botao[hidden] { display: none; }
.menu { margin-left: auto; display: flex; align-items: center; gap: var(--space-5); }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul { display: flex; align-items: center; gap: var(--space-1); }
.menu a, .menu summary { display: flex; align-items: center; gap: var(--space-1); min-height: 44px; padding: 0 var(--space-3); color: var(--neutral-300); font-weight: 600; font-size: 0.875rem; text-decoration: none; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.menu a:hover, .menu summary:hover, .menu details[open] > summary { color: var(--paper-0); background: var(--surface-800); }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu details[open] > summary .icone { transform: rotate(180deg); }
.menu-grupo { position: relative; }
.menu-grupo details > ul { position: absolute; top: calc(100% + var(--space-2)); left: 0; min-width: 232px; padding: var(--space-2); background: var(--surface-900); border: 1px solid #ffffff1a; border-radius: var(--radius-md); }
.busca { position: relative; display: flex; align-items: center; color: var(--neutral-400); }
.busca .icone { position: absolute; left: var(--space-3); pointer-events: none; }
.busca input { width: 184px; min-height: 40px; padding: 0 var(--space-3) 0 36px; background: var(--surface-800); color: var(--paper-50); border: 1px solid transparent; border-radius: var(--radius-sm); font: 400 0.875rem/1 var(--body); }
.busca input::placeholder { color: var(--neutral-400); }
.busca input:focus { outline: none; border-color: var(--brand-light); }

/* ---- Abertura (tema escuro): trilha, título e ficha -------------------------------------------------------- */
.abertura { position: relative; background: var(--surface-950); color: var(--paper-50); overflow: hidden; }
.abertura::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 88% 0%, rgba(148, 76, 247, 0.32), transparent 70%); }
.abertura::after { content: ""; position: absolute; inset: 0 0 0 45%; background: url("/assets/marca/v1/pattern/pattern-tabuleiro-escuro.svg") right top / 420px; opacity: 0.6; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.abertura-dentro { position: relative; z-index: 1; max-width: var(--largura); margin: 0 auto; padding: var(--space-8) var(--space-4) calc(var(--space-12) + var(--space-8)); }
.trilha ol { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); font-size: 0.8125rem; font-weight: 500; color: var(--neutral-400); }
.trilha li + li::before { content: "›"; margin-right: var(--space-2); color: var(--surface-700); }
.trilha a { color: var(--neutral-300); text-decoration: none; }
.trilha a:hover { color: var(--paper-0); text-decoration: underline; }
.abertura h1 { font-weight: 700; font-size: clamp(1.75rem, 1.15rem + 2.7vw, 2.625rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; }
/* A ficha é uma fileira de casas do tabuleiro: dois tons vizinhos, alternados. */
.ficha { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0 0; }
.ficha-casa { min-width: 96px; padding: var(--space-2) var(--space-3); background: var(--surface-800); border-radius: var(--radius-sm); }
.ficha-casa:nth-child(even) { background: var(--surface-900); box-shadow: inset 0 0 0 1px #ffffff1a; }
.ficha dt { font-size: 0.8125rem; font-weight: 500; line-height: 1.45; color: var(--neutral-400); }
.ficha dd { margin: 0; font-weight: 600; line-height: 1.3; color: var(--paper-50); }
.ficha dd a { color: var(--brand-light); text-decoration: none; }
.ficha dd a:hover { text-decoration: underline; }

/* ---- Miolo: texto e lateral -------------------------------------------------------------------------------- */
.miolo { position: relative; z-index: 2; max-width: var(--largura); margin: calc(-1 * var(--space-12)) auto 0; padding: 0 var(--space-4) var(--space-16); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-10); }
.principal { min-width: 0; }

.texto { background: var(--bg-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-6) var(--space-5); font-size: 1rem; overflow-wrap: break-word; }
.texto > * { max-width: 68ch; margin-left: auto; margin-right: auto; }
.texto p { margin-top: 0; margin-bottom: var(--space-4); }
.texto > :last-child { margin-bottom: 0; }
.texto strong { font-weight: 600; }
.texto h2, .texto h3, .texto h4 { margin-top: var(--space-8); margin-bottom: var(--space-3); color: var(--ink); }
.texto h2 { font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.texto h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.texto h4 { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.texto ul, .texto ol { margin-top: 0; margin-bottom: var(--space-4); padding-left: var(--space-6); }
.texto li { margin-bottom: var(--space-2); }
.texto figure { margin-top: var(--space-6); margin-bottom: var(--space-6); text-align: center; }
.texto figure img { display: inline-block; vertical-align: middle; }
.texto figcaption { margin-top: var(--space-2); font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
.texto blockquote { margin-top: var(--space-6); margin-bottom: var(--space-6); padding: var(--space-4) var(--space-5); background: var(--bg-muted); border-left: 4px solid var(--brand-core); border-radius: var(--radius-sm); }
.texto .wp-block-table, .texto .tabela { overflow-x: auto; }
.texto table { border-collapse: collapse; min-width: 100%; font-size: 0.875rem; }
.texto th, .texto td { padding: var(--space-2) var(--space-3); border: 1px solid var(--line-strong); text-align: left; }
.texto th { background: var(--bg-muted); font-weight: 600; }
.texto hr { height: 1px; margin: var(--space-8) auto; border: 0; background: var(--line); }
.texto > hr:first-child { display: none; }
/* Classes que vêm do texto importado. */
.texto .has-text-align-center { text-align: center; }
.texto .has-text-align-right { text-align: right; }
.texto .has-large-font-size { margin-top: var(--space-8); font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.texto .has-large-font-size strong { font-weight: 700; }
.texto .has-medium-font-size { font-size: 1.125rem; }
.texto .has-small-font-size { font-size: 0.875rem; }
.texto .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.texto .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; background: var(--surface-950); border-radius: var(--radius-md); overflow: hidden; }
.texto .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.texto > iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-md); }

/* ---- Depois do texto ---------------------------------------------------------------------------------------- */
.compartilhar { margin-top: var(--space-8); }
.compartilhar h2 { font-family: var(--body); font-weight: 600; font-size: 1rem; line-height: 1.55; color: var(--accent); }
.compartilhar ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; gap: var(--space-2); }
.rede { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; background: var(--bg-raised); color: var(--brand-deep); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; transition: background-color 160ms var(--entrada), color 160ms var(--entrada); }
.rede:hover { background: var(--brand-deep); color: var(--on-brand); border-color: var(--brand-deep); }
.rede[hidden] { display: none; }
.rede [data-copiar-aviso]:not(:empty) { position: absolute; left: calc(100% + var(--space-2)); white-space: nowrap; font: 600 0.8125rem/1 var(--body); color: var(--ink-2); }

.vizinhas { margin-top: var(--space-8); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.vizinha { display: flex; flex-direction: column; gap: var(--space-1); min-height: 72px; padding: var(--space-3) var(--space-4); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; }
.vizinha span { font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
.vizinha strong { font-family: var(--display); font-weight: 600; line-height: 1.3; color: var(--accent); }
.vizinha-depois { text-align: right; }
.vizinha-vazia { visibility: hidden; }
a.vizinha:hover { border-color: var(--brand-core); }

.botao { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-6); border: 0; border-radius: var(--radius-sm); font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; }

.telegram { position: relative; margin-top: var(--space-8); padding: var(--space-8) var(--space-5); background: var(--brand-deep); color: var(--on-brand); border-radius: var(--radius-xl); text-align: center; }
.telegram-icone { width: 56px; height: 56px; margin: 0 auto var(--space-4); display: flex; align-items: center; justify-content: center; background: #ffffff1f; border-radius: var(--radius-md); }
.telegram h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.telegram p { margin: var(--space-2) auto 0; max-width: 52ch; color: var(--purple-100); }
.botao-telegram { margin-top: var(--space-5); background: var(--paper-0); color: var(--brand-deep); }
.botao-telegram:hover { background: var(--purple-100); color: var(--brand-deep); }
.telegram .telegram-entrar { margin-top: var(--space-4); font-size: 0.875rem; }
.telegram-entrar a { color: var(--on-brand); font-weight: 600; }
.telegram-aviso { position: absolute; top: var(--space-4); left: 50%; transform: translateX(-50%); max-width: calc(100% - var(--space-8)); padding: var(--space-2) var(--space-4); background: var(--paper-0); color: var(--neutral-900); border-radius: var(--radius-sm); font-size: 0.8125rem; font-weight: 600; }
.telegram-aviso[hidden] { display: none; }

.relacionadas { margin-top: var(--space-12); }
.relacionadas > h2 { font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.cartoes { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.cartao { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-4); align-content: start; padding: var(--space-4); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cartao:hover { border-color: var(--brand-core); }
/* A casa com o número da questão: é por ele que o aluno acha a questão. */
.cartao-casa { grid-row: 1 / span 4; width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--purple-100); color: var(--brand-deep); border-radius: var(--radius-sm); font-family: var(--display); font-variant-numeric: tabular-nums; }
.cartao-casa b { font-weight: 700; font-size: 1.5rem; line-height: 1; letter-spacing: -0.02em; }
.cartao-casa small { margin-top: 2px; font: 600 0.75rem/1.3 var(--body); }
.cartao > :not(.cartao-casa) { grid-column: 2; }
.cartao h2, .cartao h3 { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.cartao h2 a, .cartao h3 a { color: var(--ink); text-decoration: none; }
.cartao h2 a::after, .cartao h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.selo { position: relative; z-index: 1; justify-self: start; margin-top: var(--space-2); padding: 2px var(--space-2); background: var(--bg-muted); color: var(--brand-deep); border-radius: var(--radius-xs); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.selo:hover { background: var(--purple-100); color: var(--brand-deep); }
.cartao p { margin: var(--space-2) 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cartao-ver { margin-top: var(--space-2); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.cartao-sem-casa { display: block; }
.cartao-sem-casa .selo { display: inline-block; }
.cartao-sem-casa .cartao-ver { display: block; }

/* ---- Lateral ------------------------------------------------------------------------------------------------- */
.lateral { display: grid; gap: var(--space-6); align-content: start; }
.banner { display: block; max-width: 378px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; }
.banner img { display: block; width: 100%; }
.ultimas h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.ultimas ul { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.ultimas a { display: flex; gap: var(--space-3); align-items: center; min-height: 80px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink); font-size: 0.875rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.ultimas a:hover { border-color: var(--brand-core); color: var(--brand-deep); }
.ultimas img { flex: none; display: block; width: 104px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-muted); }
.ultimas span { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Rodapé (tema escuro) -------------------------------------------------------------------------------- */
.rodape { background: var(--surface-950); color: var(--neutral-300); }
.rodape-dentro { max-width: var(--largura); margin: 0 auto; padding: var(--space-12) var(--space-4); display: grid; gap: var(--space-6); justify-items: center; text-align: center; }
.rodape-marca img { display: block; height: 56px; width: auto; }
.rodape ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); }
.rodape a { color: var(--neutral-300); }
.rodape a:hover { color: var(--paper-0); }
.rodape-redes a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--surface-800); border-radius: var(--radius-sm); }
.rodape-redes a:hover { background: var(--surface-700); }
.rodape-legais { font-size: 0.875rem; }
.rodape-nota { margin: 0; font-size: 0.8125rem; font-weight: 500; color: var(--neutral-400); }

/* ---- Abertura de artigo, listagem, home e página fixa ------------------------------------------------------ */
.pagina-artigo .abertura h1, .pagina-listagem .abertura h1, .pagina-fixa .abertura h1, .pagina-home .abertura h1 { max-width: 28ch; }
.abertura-resumo { margin: var(--space-4) 0 0; max-width: 65ch; font-size: 1.125rem; line-height: 1.5; color: var(--neutral-300); }
.abertura-conta { margin: var(--space-3) 0 0; font-size: 0.8125rem; font-weight: 500; line-height: 1.45; color: var(--neutral-400); }
.assinatura { margin: var(--space-4) 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--neutral-300); }
.assinatura strong { font-weight: 600; color: var(--paper-50); }
.texto-artigo h2 { margin-top: var(--space-10); }
.texto-artigo img { border-radius: var(--radius-md); }

/* ---- Botões ------------------------------------------------------------------------------------------------- */
.botao-principal { background: var(--brand-core); color: var(--on-brand); }
.botao-principal:hover { background: var(--brand-deep); color: var(--on-brand); }
.botao-claro { background: var(--bg-raised); color: var(--brand-deep); border: 1px solid var(--line-strong); }
.botao-claro:hover { border-color: var(--brand-core); color: var(--brand-deep); }

/* ---- Casas de ano: uma casa do tabuleiro por ano de prova ------------------------------------------------------ */
.anos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--space-2); }
.ano { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); min-height: 96px; padding: var(--space-3); background: var(--bg-raised); color: var(--brand-deep); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; }
.ano b { font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ano span { font-size: 0.8125rem; font-weight: 600; line-height: 1.45; color: var(--ink-2); text-align: center; white-space: nowrap; }
a.ano:hover { border-color: var(--brand-core); background: var(--purple-100); color: var(--brand-deep); }
.ano-atual, a.ano-atual:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }

/* ---- Listagem ----------------------------------------------------------------------------------------------- */
.navegar { display: grid; gap: var(--space-5); margin-bottom: var(--space-6); padding: var(--space-5); background: var(--bg-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.navegar h2 { margin-bottom: var(--space-2); font-family: var(--body); font-size: 0.8125rem; font-weight: 600; line-height: 1.45; color: var(--ink-3); }
.navegar .anos { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.navegar .ano { min-height: 44px; padding: var(--space-2); border-radius: var(--radius-sm); }
.navegar .ano b { font-size: 1rem; letter-spacing: 0; }
.areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.areas .selo { display: inline-flex; align-items: center; min-height: 40px; margin-top: 0; padding: 0 var(--space-3); font-size: 0.875rem; }
.selo-atual, .selo-atual:hover { background: var(--brand-deep); color: var(--on-brand); }
.principal > .cartoes-lista { margin-top: 0; }
.vazio { padding: var(--space-6); background: var(--bg-raised); border-radius: var(--radius-lg); }
.paginacao { margin-top: var(--space-8); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); }
.paginacao ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--space-1); }
.pg { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); background: var(--bg-raised); color: var(--brand-deep); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
a.pg:hover { border-color: var(--brand-core); }
.pg-atual { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }
.pg-salto { padding: 0 var(--space-1); color: var(--ink-3); }

/* ---- Cartão de artigo ---------------------------------------------------------------------------------------- */
.cartoes-artigos { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--space-4); }
.cartao-artigo { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cartao-artigo img, .cartao-sem-imagem { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--purple-100); }
.cartao-artigo h2, .cartao-artigo h3 { margin: var(--space-4) var(--space-4) 0; }
.cartao-artigo p { margin: var(--space-2) var(--space-4) 0; -webkit-line-clamp: 3; line-clamp: 3; }
.cartao-artigo .cartao-ver { margin: auto var(--space-4) var(--space-4); padding-top: var(--space-3); }

/* ---- Home e páginas fixas -------------------------------------------------------------------------------------- */
.miolo.miolo-inteiro { display: block; }
.miolo-inteiro > * + * { margin-top: var(--space-10); }
.destaque { display: grid; gap: var(--space-5); align-items: center; padding: var(--space-6); background: var(--bg-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.destaque h2 { font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.destaque p { margin: var(--space-2) 0 0; color: var(--ink-2); }
.destaque-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.destaque-link { font-weight: 600; }
.banner-home { display: block; border-radius: var(--radius-lg); overflow: hidden; }
.banner-home img { display: block; width: 100%; }
.secao-topo { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }
.secao-topo h2 { font-weight: 700; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.01em; }
.secao-topo a { font-size: 0.875rem; font-weight: 600; }
.secao-fim { margin: var(--space-6) 0 0; }
.texto .provas { list-style: none; margin-top: var(--space-6); padding: 0; }
.texto .provas li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.texto .provas h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.provas-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.provas .botao { min-height: 44px; padding: 0 var(--space-4); font-size: 0.875rem; text-decoration: none; }
.provas-sem { font-size: 0.875rem; color: var(--ink-3); }

/* ---- Ferramentas (gabarito e simuladores) ------------------------------------------------------------------ */
.pagina-ferramenta .abertura h1 { max-width: 28ch; }
.ferramenta { padding: var(--space-4); background: var(--bg-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.conversa { min-height: 600px; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-muted); }
.conversa typebot-standard { display: block; }
.ferramenta-ajuda { margin: var(--space-4) var(--space-2) var(--space-2); font-weight: 600; }
.passos { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.passos li { padding: var(--space-5); background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.passos h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.3; color: var(--brand-deep); }
.passos p { margin: var(--space-2) 0 0; color: var(--ink-2); }
/* O bloco do gabarito traz o próprio visual (escuro, da Escola). Ele ocupa a página de lado a lado. */
.ferramenta-inteira { background: var(--surface-950); }
.ferramenta-inteira > .xqg { max-width: var(--largura); margin-left: auto; margin-right: auto; }

/* ---- Página de busca ----------------------------------------------------------------------------------------- */
.busca-campos { display: grid; gap: var(--space-4); align-items: end; padding: var(--space-5); background: var(--bg-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.busca-campo label { display: block; margin-bottom: var(--space-1); font-size: 0.8125rem; font-weight: 600; line-height: 1.45; color: var(--ink-3); }
.busca-entrada { position: relative; display: flex; align-items: center; color: var(--ink-3); }
.busca-entrada .icone { position: absolute; left: var(--space-3); pointer-events: none; }
.busca-entrada input, .busca-campo select { width: 100%; min-height: 48px; padding: 0 var(--space-3); background: var(--bg-raised); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: 400 1rem/1.2 var(--body); }
.busca-entrada input { padding-left: 44px; }
.busca-entrada input:focus, .busca-campo select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.busca-aviso { margin: var(--space-6) 0 var(--space-4); font-weight: 600; color: var(--ink-2); }
.busca-fim { margin: var(--space-6) 0 0; text-align: center; }
.busca-fim .botao[hidden] { display: none; }

/* ---- Telas maiores ----------------------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .topo-dentro, .abertura-dentro, .rodape-dentro { padding-left: var(--space-6); padding-right: var(--space-6); }
  .miolo { padding-left: var(--space-6); padding-right: var(--space-6); }
  .texto { padding: var(--space-10) var(--space-8); }
  .telegram { padding: var(--space-10) var(--space-8); }
  .lateral { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lateral .ultimas { grid-column: 1 / -1; }
  .ultimas ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .miolo { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-8); }
  .texto { font-size: 1.0625rem; }
  .lateral { grid-template-columns: minmax(0, 1fr); }
  .ultimas ul { grid-template-columns: minmax(0, 1fr); }
  .cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cartoes.cartoes-artigos { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
  .destaque { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-8); }
  .passos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .busca-campos { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) auto; padding: var(--space-6); }
  .pagina-busca .cartoes-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ferramenta { padding: var(--space-6); }
}

/* ---- Menu no celular e no tablet --------------------------------------------------------------------------- */
@media (max-width: 999px) {
  .menu { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .menu > ul { flex-direction: column; align-items: stretch; }
  .menu-grupo details > ul { position: static; min-width: 0; margin: 0 0 var(--space-2) var(--space-3); padding: 0 0 0 var(--space-2); background: transparent; border: 0; border-left: 1px solid #ffffff2e; border-radius: 0; }
  .busca input { width: 100%; min-height: 44px; }
  .topo-dentro { flex-wrap: wrap; row-gap: 0; }
  .menu { flex-basis: 100%; margin: 0; padding: var(--space-2) 0 var(--space-4); }
  /* Com script, o menu abre e fecha pelo botão. Sem script, ele fica à mostra. */
  .com-script .menu:not(.aberto) { display: none; }
}
@media (min-width: 1000px) {
  .topo-botao { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topo, .lateral, .compartilhar, .vizinhas, .telegram, .relacionadas, .rodape-redes { display: none; }
  .abertura { background: none; color: #000; }
  .abertura::before, .abertura::after { display: none; }
  .miolo { margin-top: 0; }
  .texto { box-shadow: none; padding: 0; }
}
