@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader Italic"; src: url("/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
/* ============ NTB Design System ============
   Identidade: tinta azul-petróleo sobre papel quente, acento ciano-técnico, kicker em laranja-sinal.
   Tipografia: Newsreader (serifa editorial) + Inter (interface). */
:root {
  /* Paleta da marca NTB: azul-marinho #17263B + vermelho #B23A32 sobre papel creme (#FAF8F3, fundo do logotipo) */
  --paper: #faf8f3; --paper-2: #f1eee6; --paper-3: #e8e4d9;
  --ink: #17263b; --ink-2: #3f4c60; --muted: #5b6676;
  --rule: #d9d4c8; --rule-strong: #17263b;
  --accent: #b23a32; --accent-hover: #8e2d27; --on-accent: #fff;
  --signal: #b23a32; --focus: #1d4ed8; --danger: #b42318; --ok: #1a7f4b;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-meta: 0.78rem; --fs-small: 0.875rem; --fs-body: 1.0625rem;
  --container: 1240px; --gutter: clamp(1rem, 3vw, 2rem);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #101a2a; --paper-2: #17263b; --paper-3: #1f3149;
  --ink: #f4f1ea; --ink-2: #c0c8d4; --muted: #94a0b0;
  --rule: #2a3b54; --rule-strong: #f4f1ea;
  --accent: #e4574d; --accent-hover: #ff7a70; --on-accent: #fff;
  --signal: #ef6a60; --focus: #7aa2ff; --danger: #ff8a7a; --ok: #5fd39a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101a2a; --paper-2: #17263b; --paper-3: #1f3149;
    --ink: #f4f1ea; --ink-2: #c0c8d4; --muted: #94a0b0;
    --rule: #2a3b54; --rule-strong: #f4f1ea;
    --accent: #e4574d; --accent-hover: #ff7a70; --on-accent: #fff;
    --signal: #ef6a60; --focus: #7aa2ff; --danger: #ff8a7a; --ok: #5fd39a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4, .serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.2; }
h4 { font-size: 1.05rem; line-height: 1.25; }
.subtitle { font-family: var(--font-serif); font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.4; color: var(--ink-2); font-weight: 400; }
.kicker { font-size: var(--fs-meta); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--signal); }
.meta { font-size: var(--fs-meta); color: var(--muted); }
.caption { font-size: var(--fs-small); color: var(--muted); line-height: 1.4; }
.breadcrumb { font-size: var(--fs-meta); color: var(--muted); display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumb a:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: var(--fs-meta); font-weight: 600; padding: .3rem .65rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); background: var(--paper); }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.demo-badge { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-3); color: var(--ink-2); padding: .15rem .45rem; border-radius: 3px; }

/* ---------- Header ---------- */
.topbar { border-bottom: 1px solid var(--rule); font-size: var(--fs-meta); color: var(--muted); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 2.25rem; gap: 1rem; }
.masthead { padding-block: 1.1rem; }
.masthead .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; line-height: 1; }
/* Logotipo da marca: o par claro/escuro alterna com o tema */
.brand { display: inline-flex; line-height: 0; }
.brand img { height: auto; display: block; }
.brand-principal img { width: clamp(190px, 18vw + 100px, 300px); }
.brand-compacta img { width: 84px; }
.brand-dark { display: none !important; }
:root[data-theme="dark"] .brand-light { display: none !important; }
:root[data-theme="dark"] .brand-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-light { display: none !important; }
  :root:not([data-theme="light"]) .brand-dark { display: block !important; }
}
.brand-img { height: auto; display: block; }
.nav { border-block: 3px double var(--rule-strong); background: var(--paper); position: sticky; top: 0; z-index: 40; }
.nav .container { display: flex; align-items: center; gap: .25rem; }
.nav-list { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav-list a { display: block; padding: .8rem .9rem; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -3px var(--accent); color: var(--accent); }
.nav-list a:hover { background: var(--paper-2); }
.icon-btn { background: none; border: 0; color: var(--ink); padding: .6rem; cursor: pointer; border-radius: 6px; display: inline-flex; }
.icon-btn:hover { background: var(--paper-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .875rem var(--font-sans); padding: .7rem 1.1rem; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: .4rem .7rem; font-size: .8rem; }
.search-panel { border-bottom: 1px solid var(--rule); background: var(--paper-2); padding-block: 1rem; }
.search-form { position: relative; display: flex; gap: .5rem; }
.input, .select, .textarea { width: 100%; font: 400 1rem var(--font-sans); padding: .7rem .85rem; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 32px rgb(0 0 0 / .14); z-index: 50; list-style: none; margin: 0; padding: .35rem; max-height: 60vh; overflow: auto; }
.suggest li a { display: flex; gap: .6rem; align-items: baseline; padding: .55rem .65rem; border-radius: 5px; }
.suggest li a:hover, .suggest li a[aria-selected="true"] { background: var(--paper-2); }
.suggest .type { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); min-width: 4.2rem; }
.mobile-only { display: none; }
@media (max-width: 760px) { .desktop-only { display: none !important; } .mobile-only { display: inline-flex; } }
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--paper); padding: 1rem var(--gutter); overflow: auto; }
.drawer ul { list-style: none; padding: 0; margin: 1rem 0; }
.drawer li a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--rule); font: 600 1.2rem var(--font-serif); }

/* ---------- Seções e grids ---------- */
.section { margin-top: 2.75rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--rule-strong); padding-top: .55rem; margin-bottom: 1.1rem; gap: 1rem; }
.section-head h2 { font-size: 1.35rem; text-transform: none; }
.section-head a { font-size: var(--fs-meta); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.75rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.7fr 1fr; gap: 2rem; } .hero-side { border-left: 1px solid var(--rule); padding-left: 2rem; } }
.hero-side { display: grid; gap: 1.25rem; align-content: start; }
.hero-side article + article { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; } .layout > aside { border-left: 1px solid var(--rule); padding-left: 2rem; } }
.cards-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cards-4 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards ---------- */
.card { display: flex; flex-direction: column; gap: .6rem; }
.card h3 a:hover, .card h4 a:hover { color: var(--accent); }
.media { position: relative; display: block; overflow: hidden; background: var(--paper-3); aspect-ratio: 16 / 9; border-radius: 3px; }
.media img { width: 100%; height: 100%; object-fit: cover; }
/* placeholder tipográfico gerado por categoria (sem imagem) */
.ph { width: 100%; height: 100%; display: grid; place-items: end start; padding: 1rem; color: #fff; font: 700 clamp(.9rem, 2vw, 1.2rem) var(--font-serif);
  --ph-grad: linear-gradient(var(--ph-angle, 135deg), var(--ph-a, #1f4e79), var(--ph-b, #17263b)); background: var(--ph-pattern, none), var(--ph-grad); }
/* 4 padrões (escolhidos por matéria): pontos, diagonais, grade e círculos concêntricos */
.ph-v0 { --ph-pattern: radial-gradient(circle at 85% 15%, rgb(255 255 255 / .16) 0 1px, transparent 1.5px) 0 0 / 14px 14px; }
.ph-v1 { --ph-pattern: repeating-linear-gradient(135deg, rgb(255 255 255 / .07) 0 2px, transparent 2px 16px); }
.ph-v2 { --ph-pattern: linear-gradient(rgb(255 255 255 / .06) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgb(255 255 255 / .06) 1px, transparent 1px) 0 0 / 28px 28px; }
.ph-v3 { --ph-pattern: repeating-radial-gradient(circle at var(--ph-x, 70%) 30%, rgb(255 255 255 / .08) 0 2px, transparent 2px 26px); }
.card-lead h3 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1.08; }
.card-lead .media { aspect-ratio: 16 / 10; }
.card-row { display: grid; grid-template-columns: 1fr 112px; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.card-row:first-child { padding-top: 0; }
.card-row .media { aspect-ratio: 1; }
.card-row.no-img { grid-template-columns: 1fr; }
.list-ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.list-ranked li { counter-increment: rank; display: grid; grid-template-columns: 2.2rem 1fr; gap: .5rem; padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.list-ranked li::before { content: counter(rank); font: 700 1.8rem/1 var(--font-serif); color: var(--accent); }
.list-ranked li:first-child { padding-top: 0; }
.list-ranked a { font: 600 1.02rem/1.25 var(--font-serif); }
.timeline li { padding-block: .8rem; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 3.4rem 1fr; gap: .75rem; list-style: none; }
.timeline { padding: 0; margin: 0; }
.timeline time { font-size: var(--fs-meta); font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: .15rem; }
.timeline a { font: 600 1rem/1.3 var(--font-serif); }

/* Bloco de seção (1–4 matérias): destaque + lista compacta; com 1 matéria vira destaque horizontal */
.cat-block { display: grid; gap: 1.5rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .cat-block { grid-template-columns: 1.25fr 1fr; align-items: start; } .cat-block.solo { grid-template-columns: 1fr; } .cat-block.solo .card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: center; } }
.cat-block .card h3 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.8rem); line-height: 1.12; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.cat-list li { display: grid; gap: .3rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.cat-list li:first-child { padding-top: 0; } .cat-list li:last-child { border-bottom: 0; }
.cat-list h4 { font: 600 1.15rem/1.25 var(--font-serif); }
.cat-list h4 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease-out), color .2s; }
.cat-list li:hover h4 a { background-size: 100% 1.5px; color: var(--accent); }
/* Newsletter: se a página já tem um formulário no conteúdo, o do rodapé não repete */
body:has(main .newsletter) .footer .newsletter { display: none; }
/* Comentários recolhidos atrás de um botão */
details.comment-box > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.comment-box > summary::-webkit-details-marker { display: none; }
details.comment-box[open] > summary { margin-bottom: 1rem; }
.author-box { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 1.4rem var(--font-serif); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-lg { width: 84px; height: 84px; font-size: 2rem; }
.avatar:hover { color: var(--paper); }
.byline-author { display: inline-flex; align-items: center; gap: .5rem; }
.byline-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-block; }
/* Página pública do autor */
.author-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: start; padding-block: 1.5rem 1.25rem; border-bottom: 3px double var(--rule-strong); }
@media (max-width: 640px) { .author-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.author-photo { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 4rem var(--font-serif); border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--rule); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-photo-md { width: 96px; height: 96px; font-size: 2.4rem; border-width: 3px; flex: none; }
.author-bio { max-width: 68ch; margin-top: .8rem; font-size: 1.05rem; line-height: 1.65; color: var(--ink-2); }
.author-bio p { margin: 0 0 .8em; }
.author-links { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 640px) { .author-links { justify-content: center; } }
.author-links a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--rule); border-radius: 999px; font-size: var(--fs-small); font-weight: 600; }
.author-links a:hover { border-color: var(--accent); color: var(--accent); }
.authors-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-block: 1.5rem 2rem; }
.author-card-pub { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.author-card-pub:hover { border-color: var(--accent); color: inherit; }

/* ---------- Artigo ---------- */
.article-head { max-width: 860px; margin-inline: auto; padding-top: 1.75rem; display: grid; gap: 1rem; }
.byline { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: var(--fs-small); color: var(--ink-2); border-block: 1px solid var(--rule); padding-block: .8rem; }
.byline strong { color: var(--ink); }
.hero-fig { max-width: 1100px; margin: 1.75rem auto 0; }
.hero-fig .media { aspect-ratio: 16 / 9; border-radius: 0; }
.hero-fig figcaption { padding-top: .5rem; }
.prose { max-width: 700px; margin-inline: auto; font-family: var(--font-serif); font-size: clamp(1.125rem, 1.05rem + .3vw, 1.3rem); line-height: 1.7; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.7em; margin-top: 1.8em; }
.prose h3 { font-size: 1.35em; margin-top: 1.6em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose em, .prose i, .prose blockquote, .tiptap em, .tiptap blockquote { font-family: "Newsreader Italic", var(--font-serif); }
.prose blockquote { margin-inline: 0; padding: .3em 0 .3em 1.2em; border-left: 4px solid var(--accent); font-size: 1.15em; font-style: italic; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose img, .prose video, .prose iframe { width: 100%; border-radius: 3px; }
.prose iframe { aspect-ratio: 16 / 9; border: 0; }
.prose figure { margin-inline: 0; } .prose figcaption { font: .875rem var(--font-sans); color: var(--muted); margin-top: .4rem; }
.prose table { width: 100%; border-collapse: collapse; font: .95rem var(--font-sans); display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .55rem .7rem; text-align: left; } .prose th { background: var(--paper-2); }
.prose pre { background: var(--paper-2); padding: 1rem; overflow-x: auto; font-size: .9rem; border-radius: 6px; }
.prose > p:first-of-type::first-letter { }
.box { border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; background: var(--paper-2); font-family: var(--font-sans); }
.box > h2, .box > h3 { font-family: var(--font-sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; color: var(--ink-2); }
.notice { border-left: 4px solid var(--signal); background: var(--paper-2); padding: .8rem 1rem; font-size: var(--fs-small); }
.share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Anúncios, newsletter, rodapé ---------- */
.ad { border: 1px dashed var(--rule); color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; text-align: center; padding: 1.2rem; margin-block: 1.5rem; background: var(--paper-2); }
.newsletter { background: var(--ink); color: var(--paper); padding: 2rem; border-radius: 8px; display: grid; gap: .8rem; }
.newsletter h2, .newsletter h3 { color: var(--paper); }
.newsletter .input { background: color-mix(in srgb, var(--paper) 10%, transparent); color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.newsletter .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); } .newsletter .btn:hover { background: var(--accent); color: var(--on-accent); }
.footer { margin-top: 4rem; border-top: 3px double var(--rule-strong); padding-block: 2.5rem; background: var(--paper-2); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer h4 { font: 700 .75rem var(--font-sans); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; color: var(--ink-2); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: var(--fs-small); }
.footer a:hover { text-decoration: underline; }
.consent { position: fixed; inset: auto 0 0 0; z-index: 70; background: var(--paper); border-top: 3px solid var(--accent); box-shadow: 0 -8px 30px rgb(0 0 0 / .16); padding: 1rem var(--gutter); }
.consent .inner { max-width: var(--container); margin: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; font-size: var(--fs-small); }
html.consent-ok .consent { display: none; }
.ad-wrap:empty { display: none; } /* espaço de anúncio sem anúncio não deixa vão no texto */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination a, .pagination span { padding: .5rem .85rem; border: 1px solid var(--rule); border-radius: 6px; font-size: .85rem; font-weight: 600; }
.pagination [aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-title { padding-top: 2rem; border-bottom: 1px solid var(--rule); padding-bottom: 1.25rem; margin-bottom: 1.5rem; display: grid; gap: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; background: var(--paper-2); }
@media (min-width: 900px) { .admin { grid-template-columns: 240px 1fr; } }
/* Menu lateral do painel: sempre fundo escuro e letras claras, em qualquer tema (antes usava var(--paper) e ficava ilegível no escuro). */
.admin-side { --side-bg: #17263b; --side-fg: #f4f1ea; background: var(--side-bg); color: var(--side-fg); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1rem; }
:root[data-theme="dark"] .admin-side { --side-bg: #08101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .admin-side { --side-bg: #08101a; } }
.admin-side a { color: color-mix(in srgb, var(--side-fg) 82%, transparent); display: block; padding: .5rem .7rem; border-radius: 6px; font-size: .88rem; font-weight: 500; }
.admin-side a:hover, .admin-side a[aria-current="page"] { background: color-mix(in srgb, var(--side-fg) 14%, transparent); color: var(--side-fg); }
.admin-side h5 { margin: .6rem .7rem .2rem; font: 700 .65rem var(--font-sans); text-transform: uppercase; letter-spacing: .12em; color: color-mix(in srgb, var(--side-fg) 55%, transparent); }
.admin-side .btn-ghost { color: var(--side-fg); border-color: color-mix(in srgb, var(--side-fg) 35%, transparent); }
.admin-side .btn-ghost:hover { background: color-mix(in srgb, var(--side-fg) 14%, transparent); color: var(--side-fg); }
.admin-main { padding: 1.5rem clamp(1rem, 3vw, 2.25rem) 3rem; min-width: 0; }
.admin-main h1 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 1.25rem; }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 1.5rem; }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem; }
.stat b { display: block; font: 700 1.9rem/1.1 var(--font-serif); } .stat span { font-size: var(--fs-meta); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
table.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: .6rem .7rem; border-bottom: 1px solid var(--rule); }
.table td { padding: .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.status { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .5rem; border-radius: 999px; background: var(--paper-3); }
.status.published { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.status.scheduled { background: color-mix(in srgb, var(--focus) 18%, transparent); color: var(--focus); }
.status.trashed { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; } .field label, .label { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.hint { font-size: .75rem; color: var(--muted); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.editor-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .editor-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.editor-title { font: 700 clamp(1.5rem, 3vw, 2.2rem) var(--font-serif); border: 0; border-bottom: 1px solid var(--rule); padding: .5rem 0; background: transparent; color: var(--ink); width: 100%; }
.editor-title:focus { outline: none; border-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; border: 1px solid var(--rule); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--paper-2); position: sticky; top: 0; z-index: 5; }
.toolbar button { font: 600 .8rem var(--font-sans); padding: .35rem .6rem; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--ink); cursor: pointer; }
.toolbar button:hover { background: var(--paper-3); } .toolbar button.on { background: var(--ink); color: var(--paper); }
.tiptap { min-height: 420px; border: 1px solid var(--rule); border-radius: 0 0 6px 6px; padding: 1rem 1.25rem; background: var(--paper); font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.65; }
.tiptap:focus { outline: 2px solid var(--accent); }
.tiptap > * + * { margin-top: 1em; } .tiptap blockquote { border-left: 4px solid var(--accent); padding-left: 1rem; font-style: italic; margin-inline: 0; }
.tiptap img { max-width: 100%; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--paper-2); padding: 1rem; }
.login-card { width: min(100%, 400px); background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 2rem; display: grid; gap: 1rem; }
.error { color: var(--danger); font-size: .85rem; font-weight: 600; } .success { color: var(--ok); font-size: .85rem; font-weight: 600; }
/* Editor Quill acompanhando o tema (claro/escuro): barra de ferramentas, texto, placeholder e caixa de link */
.ql-toolbar.ql-snow { background: var(--paper-2); border-color: var(--rule); }
.ql-container.ql-snow { border-color: var(--rule); background: var(--paper); color: var(--ink); }
.ql-editor { color: var(--ink); }
.ql-editor.ql-blank::before { color: var(--muted); font-style: normal; opacity: .85; }
.ql-snow .ql-stroke { stroke: var(--ink-2); } .ql-snow .ql-fill { fill: var(--ink-2); } .ql-snow .ql-stroke.ql-fill { fill: var(--ink-2); }
.ql-snow .ql-picker, .ql-snow .ql-picker-label { color: var(--ink-2); }
.ql-snow .ql-picker-options { background: var(--paper-2); border-color: var(--rule); color: var(--ink); }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-picker-label:hover .ql-stroke { stroke: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }
.ql-snow .ql-picker-label:hover, .ql-snow .ql-picker-item:hover, .ql-snow .ql-picker-label.ql-active, .ql-snow .ql-picker-item.ql-selected { color: var(--accent); }
.ql-snow .ql-tooltip { background: var(--paper-2); color: var(--ink); border-color: var(--rule); box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.ql-snow .ql-tooltip input[type=text] { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.ql-snow a { color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.bars div { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.bars div:hover { background: var(--signal); }
/* Painel: cadastro de autores */
.author-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: .5rem; }
@media (min-width: 760px) { .author-grid { grid-template-columns: 200px 1fr; } }
.author-photo-lg { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font: 700 3.4rem var(--font-serif); border: 1px solid var(--rule); }
.author-photo-lg img, .author-photo-sm img { width: 100%; height: 100%; object-fit: cover; }
.author-photo-sm { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font: 700 1.3rem var(--font-serif); flex: none; border: 1px solid var(--rule); }
.hbar { display: grid; grid-template-columns: minmax(80px, 160px) 1fr 3.2rem; gap: .6rem; align-items: center; font-size: .82rem; margin-block: .45rem; }
.hbar i { display: block; height: 10px; background: var(--accent); border-radius: 2px; }

/* ============ Movimento: transições de página, splash, progresso, skeleton ============ */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.7, 0, .2, 1); }

/* Entrada de página (template.tsx remonta a cada navegação): fade + subida suave, com cascata nos cards */
.page-enter { animation: page-in .46s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat, .panel) { animation: rise .6s var(--ease-out) both; }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat):nth-child(1) { animation-delay: .04s; }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat):nth-child(2) { animation-delay: .09s; }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat):nth-child(3) { animation-delay: .14s; }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat):nth-child(4) { animation-delay: .19s; }
.page-enter :is(.card, .card-row, .list-ranked li, .timeline li, .hero-side article, .stat):nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Barra de progresso de navegação (componente RouteProgress) */
.route-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 300; pointer-events: none; opacity: 0; transition: opacity .25s; }
.route-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--signal)); box-shadow: 0 0 10px var(--accent); }
.route-progress[data-state="loading"] { opacity: 1; }
.route-progress[data-state="loading"] i { transform: scaleX(.82); transition: transform 8s cubic-bezier(.1, .6, .2, 1); }
.route-progress[data-state="done"] { opacity: 0; transition-delay: .2s; }
.route-progress[data-state="done"] i { transform: scaleX(1); transition: transform .25s ease-out; }
/* Varredura leve a cada carregamento/atualização completa da página */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 299; pointer-events: none; transform-origin: left; background: linear-gradient(90deg, var(--accent), var(--signal)); animation: load-sweep .9s var(--ease-in-out) both; }
@keyframes load-sweep { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* Splash de abertura — somente na 1ª visita da sessão ao site público (classe aplicada por script inline no <head>) */
.splash { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; background: #17263b; color: #f4f1ea; }
html.splash-on .splash { display: grid; animation: splash-out .62s var(--ease-in-out) 1.05s forwards; }
html.splash-on body { overflow: hidden; animation: unlock 0s 1.7s forwards; }
@keyframes unlock { to { overflow: visible; } }
@keyframes splash-out { to { transform: translateY(-101%); visibility: hidden; } }
.splash-inner { display: grid; justify-items: center; gap: 1.1rem; }
/* Logotipo oficial revelado da esquerda para a direita (o sublinhado vermelho faz parte do arquivo) */
.splash-logo { width: min(340px, 62vw); height: auto; clip-path: inset(0 100% 0 0); transform: translateY(8px); animation: logo-wipe .75s var(--ease-in-out) .12s forwards; }
@keyframes logo-wipe { to { clip-path: inset(0 0 0 0); transform: none; } }
.splash-tag { margin: 0; font: 600 .78rem var(--font-sans); letter-spacing: .32em; text-transform: uppercase; opacity: 0; animation: fade-in .45s ease .6s forwards; color: #c0c8d4; }
.admin-logo { width: 104px; }
@keyframes fade-in { to { opacity: 1; } }

/* Skeleton de carregamento — usado SÓ no painel. No site público loading.tsx é proibido: o streaming enviaria status 200
   antes do notFound() (soft-404 prejudica SEO). */
.skel-wrap { animation: fade-in .3s ease .15s both; opacity: 0; }
.skel { position: relative; overflow: hidden; background: var(--paper-3); border-radius: 4px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--paper) 55%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: .9rem; margin-top: .7rem; } .skel-title { height: 2rem; margin-top: .8rem; width: 85%; }

/* Microinterações editoriais */
.media img { transition: transform .7s var(--ease-out), filter .4s; }
.card:hover .media img, .card-row:hover .media img { transform: scale(1.045); }
.card h3 a, .card h4 a, .card-row h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease-out), color .2s; }
.card:hover h3 a, .card:hover h4 a, .card-row:hover h3 a { background-size: 100% 1.5px; }
.btn { transition: background-color .2s, border-color .2s, color .2s, transform .15s; } .btn:active { transform: translateY(1px) scale(.99); }
.nav-list a { transition: background-color .2s, box-shadow .25s, color .2s; }
.reading-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 250; background: transparent; pointer-events: none; }
.reading-progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--signal); }
/* Revelação ao rolar (somente navegadores com scroll-driven animations; os demais mostram tudo normalmente) */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}

.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-inline: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .splash, body::before { display: none !important; }
  .skel-wrap { opacity: 1; }
}
@media print { .nav, .topbar, .footer, .share, .ad, .newsletter, .consent { display: none !important; } }

/* Transição suave entre páginas (View Transitions entre documentos; navegadores sem suporte navegam normalmente) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
.reading-progress i { transform: scaleX(0); }

/* ============ Painel: aba Estatísticas ============ */
:root { --c1: #b23a32; --c2: #2f6fe4; --c3: #c98200; --c4: #0f9d74; --c5: #7c4dff; --c6: #0e8fb3; --c7: #c2418a; --c8: #6b7280; }
:root[data-theme="dark"] { --c1: #e4574d; --c2: #6ea0ff; --c3: #f2b134; --c4: #3cc79a; --c5: #a98bff; --c6: #4dc3e8; --c7: #f06bb2; --c8: #94a0b0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #e4574d; --c2: #6ea0ff; --c3: #f2b134; --c4: #3cc79a; --c5: #a98bff; --c6: #4dc3e8; --c7: #f06bb2; --c8: #94a0b0; } }
.st-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.25rem; }
.st-periods { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--paper); gap: 2px; }
.st-periods a { padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.st-periods a:hover { color: var(--accent); }
.st-periods a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.st-kpis { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1.1rem; }
.st-kpi { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.1rem; display: grid; gap: .15rem; position: relative; overflow: hidden; }
.st-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.st-kpi span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.st-kpi b { font: 700 2.1rem/1.1 var(--font-serif); }
.st-kpi em { font-style: normal; font-size: .8rem; color: var(--ink-2); } .st-kpi em small { color: var(--muted); font-size: .75rem; }
.st-kpi em.up { color: var(--ok); font-weight: 700; } .st-kpi em.down { color: var(--danger); font-weight: 700; }
.st-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 1.15rem 1.25rem; min-width: 0; }
.st-card h2 { font-size: 1.05rem; margin-bottom: .9rem; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.st-card h2 .meta { font: 500 .75rem var(--font-sans); }
.st-wide { margin-bottom: 1.1rem; }
.st-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
@media (min-width: 1100px) { .st-grid { grid-template-columns: repeat(3, 1fr); } .st-span2 { grid-column: span 2; } }
.st-line { width: 100%; height: auto; display: block; overflow: visible; }
.st-line .grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 3 4; }
.st-line .ax { fill: var(--muted); font: 11px var(--font-sans); }
.st-line .area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.st-line .ln { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.st-line .dot { fill: var(--paper); stroke: var(--accent); stroke-width: 2; cursor: default; } .st-line .dot:hover { fill: var(--accent); r: 5; }
.st-rank { display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.st-rank:last-child { border-bottom: 0; }
.st-rank .pos { font: 700 1.3rem var(--font-serif); color: var(--muted); text-align: center; }
.st-rank:nth-child(2) .pos { color: var(--accent); }
.st-rank .ttl { font-weight: 600; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-rank .body { min-width: 0; display: grid; gap: .25rem; }
.st-rank .num { text-align: right; font: 700 1.2rem var(--font-serif); display: grid; } .st-rank .num small { font: 500 .7rem var(--font-sans); color: var(--muted); }
.track { height: 8px; background: var(--paper-3); border-radius: 99px; overflow: hidden; } .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--c3))); border-radius: 99px; }
.st-bar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 3rem; gap: .6rem; align-items: center; margin: .5rem 0; font-size: .85rem; }
.st-bar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .st-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.st-donut-wrap { display: grid; place-items: center; margin-bottom: .9rem; }
.st-donut { width: 170px; height: 170px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.st-donut::before { content: ""; position: absolute; inset: 24px; background: var(--paper); border-radius: 50%; }
.st-donut span { position: relative; text-align: center; font-size: .72rem; color: var(--muted); line-height: 1.2; text-transform: uppercase; letter-spacing: .05em; } .st-donut span b { display: block; font: 700 1.6rem/1.1 var(--font-serif); color: var(--ink); text-transform: none; letter-spacing: 0; }
.st-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .84rem; }
.st-legend li { display: grid; grid-template-columns: .8rem 1fr auto 3.4rem; gap: .5rem; align-items: center; } .st-legend i { width: .7rem; height: .7rem; border-radius: 3px; display: block; }
.st-legend b { font-variant-numeric: tabular-nums; } .st-legend small { color: var(--muted); text-align: right; }
.st-heat { display: grid; grid-template-columns: 2.4rem repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.st-heat .hh { font-size: .62rem; color: var(--muted); text-align: left; white-space: nowrap; } .st-heat .hd { font-size: .72rem; color: var(--ink-2); font-weight: 600; }
.st-heat .hc { aspect-ratio: 1; min-height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--v) * 100%), var(--paper-3)); }
.st-leads { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } .st-kpi-inline { font-size: .9rem; color: var(--ink-2); } .st-kpi-inline b { font: 700 1.4rem var(--font-serif); color: var(--ink); }
.st-note ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.st-note code { font-size: .8rem; background: var(--paper-3); padding: .05rem .3rem; border-radius: 4px; word-break: break-all; }
.st-warn { background: color-mix(in srgb, var(--c3) 16%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c3) 45%, transparent); border-radius: 8px; padding: .8rem 1rem; font-size: .88rem; }

/* ============ Seletor de idioma (tradução automática) ============ */
.lang { position: relative; display: inline-flex; }
.lang-btn { gap: .3rem; align-items: center; } .lang-cur { font: 700 .7rem var(--font-sans); letter-spacing: .04em; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); width: min(310px, 92vw); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: .6rem; z-index: 60; box-shadow: 0 12px 32px rgb(0 0 0 / .22); }
.lang-menu ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .15rem; }
.lang-menu li button { width: 100%; text-align: left; background: none; border: 0; padding: .5rem .6rem; border-radius: 6px; color: var(--ink); font: 500 .88rem var(--font-sans); cursor: pointer; }
.lang-menu li button:hover { background: var(--paper-2); color: var(--accent); }
.lang-menu li button[aria-current="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
/* esconde a interface do Google (barra superior e balões); a troca de idioma é feita pelo nosso menu */
body { top: 0 !important; }
.skiptranslate iframe, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; visibility: hidden !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#ntb-gt { display: none; }
