/* =========================================================================
   Tecnologia atual em dados — design system
   Fundo branco · azul (ação/marca) · cinza (estrutura) · amarelo (destaque)
   ========================================================================= */
:root {
  --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe; --blue-500: #3b82f6;
  --blue-600: #1d4ed8; --blue-700: #1e40af; --blue-900: #172554;
  --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0; --gray-300: #cbd5e1;
  --gray-500: #64748b; --gray-600: #475569; --gray-700: #334155; --gray-900: #0f172a;
  --yellow-100: #fef3c7; --yellow-300: #fcd34d; --yellow-400: #fbbf24; --yellow-500: #f59e0b;
  --red-600: #b91c1c; --red-50: #fef2f2; --green-600: #15803d; --green-50: #f0fdf4;

  --bg: #fff; --text: var(--gray-900); --muted: var(--gray-500); --border: var(--gray-200);
  --primary: var(--blue-600); --primary-hover: var(--blue-700); --accent: var(--yellow-400);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem;
  --radius: 14px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06); --shadow-md: 0 8px 24px -8px rgb(15 23 42 / .18);
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); line-height: 1.6; font-size: 1.0625rem;
  /* Degradê: azul claro no topo -> branco. Fica por trás da marca d'água e de todo o conteúdo. */
  background: #fff linear-gradient(180deg, var(--blue-100) 0, var(--blue-50) 420px, #fff 1100px) no-repeat; }
/* Papel de parede: marca d'água em padrão, fixa na janela (não rola), sempre atrás do texto. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/static/img/watermark-tile.png") center top / 760px auto repeat; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--yellow-400); outline-offset: 2px; border-radius: 4px; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gray-900); color: #fff; padding: var(--s-2) var(--s-4); z-index: 100; }
.skip-link:focus { left: var(--s-4); top: var(--s-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 var(--s-3); color: var(--gray-900); }

/* ---- Botões ---- */
.btn { display: inline-flex; align-items: center; gap: var(--s-2); padding: .7rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: .98rem; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--accent { background: var(--accent); color: var(--gray-900); }
.btn--accent:hover { background: var(--yellow-300); color: var(--gray-900); }
.btn--ghost { background: #fff; border-color: var(--gray-300); color: var(--gray-700); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--danger { background: #fff; border-color: var(--red-600); color: var(--red-600); }
.btn--danger:hover { background: var(--red-50); color: var(--red-600); }
.btn--sm { padding: .4rem .9rem; font-size: .88rem; }

/* ---- Cabeçalho ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .88); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-4); min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--gray-900); font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.brand:hover { color: var(--gray-900); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__text { white-space: nowrap; }
.brand__text span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.nav a { white-space: nowrap; padding: .45rem .5rem; border-radius: 999px; text-decoration: none; color: var(--gray-700); font-weight: 500; font-size: .92rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--blue-50); color: var(--primary); }
.search { display: flex; }
.search input { width: 110px; padding: .45rem .9rem; border: 1px solid var(--gray-300); border-radius: 999px 0 0 999px; font: inherit; font-size: .92rem; border-right: 0; }
.search button { padding: .45rem .9rem; border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 0 999px 999px 0; cursor: pointer; font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: .4rem .6rem; cursor: pointer; font-size: 1.1rem; }

/* ---- Hero ---- */
.hero { background: radial-gradient(900px 300px at 85% -10%, rgb(254 243 199 / .75), transparent 60%); border-bottom: 1px solid rgb(191 219 254 / .7); }
.hero__inner { padding: var(--s-8) 0 var(--s-7); }
.hero h1, .hero p { max-width: 780px; }
.hero__kicker { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-700); background: var(--blue-100); padding: .25rem .7rem; border-radius: 999px; margin-bottom: var(--s-4); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
.mark { background: linear-gradient(transparent 62%, var(--yellow-300) 62%); padding: 0 .1em; }
.hero p { font-size: 1.2rem; color: var(--gray-600); max-width: 60ch; margin: 0 0 var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.chip { text-decoration: none; font-size: .9rem; font-weight: 600; padding: .35rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--gray-300); color: var(--gray-700); }
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Seções e cards ---- */
.section { padding: var(--s-7) 0; }
.section__title + .card, .card + .section__title { margin-top: var(--s-6); }
.section__title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s-5); }
.section__title h2 { font-size: 1.5rem; margin: 0; }
.grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.card__media { aspect-ratio: 16 / 9; background: var(--blue-100); display: grid; place-items: center; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--blue { background: linear-gradient(135deg, var(--blue-100), var(--blue-200)); }
.card__media--yellow { background: linear-gradient(135deg, var(--yellow-100), var(--yellow-300)); }
.card__media--gray { background: linear-gradient(135deg, var(--gray-100), var(--gray-300)); }
.card__glyph { width: 56px; height: 56px; opacity: .85; }
.card__body { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__title { font-size: 1.18rem; margin: 0; }
.card__title a { color: var(--gray-900); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__title a:hover { color: var(--primary); }
.card__summary { color: var(--gray-600); font-size: .98rem; margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; color: var(--muted); font-size: .86rem; margin-top: auto; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; text-decoration: none; letter-spacing: .01em; position: relative; z-index: 2; }
.pill--blue { background: var(--blue-100); color: var(--blue-700); }
.pill--yellow { background: var(--yellow-100); color: #7c4a03; }
.pill--gray { background: var(--gray-100); color: var(--gray-700); }
.featured { display: grid; grid-template-columns: 1.1fr 1fr; }
.featured .card__media { aspect-ratio: auto; min-height: 280px; }
.featured .card__body { padding: var(--s-6); justify-content: center; }
.featured .card__title { font-size: clamp(1.5rem, 3vw, 2rem); }
.featured .card__summary { font-size: 1.05rem; }

/* ---- Paginação ---- */
.pagination { display: flex; gap: var(--s-2); justify-content: center; margin-top: var(--s-6); flex-wrap: wrap; }
.pagination a, .pagination span { padding: .45rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--gray-700); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- Artigo ---- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-7); padding: var(--s-6) 0 var(--s-7); align-items: start; }
.post__header { padding-bottom: var(--s-5); }
.post__header h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin-top: var(--s-3); }
.post__lead { font-size: 1.2rem; color: var(--gray-600); }
.post__cover { border-radius: var(--radius); margin: 0 0 var(--s-6); width: 100%; }
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--gray-700); max-width: 72ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.65rem; margin-top: 2em; } .prose h3 { font-size: 1.3rem; margin-top: 1.6em; }
.prose h2, .prose h3, .prose strong { color: var(--gray-900); }
.prose blockquote { margin-inline: 0; padding: .6em 1.2em; border-left: 4px solid var(--yellow-400); background: var(--yellow-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--gray-900); }
.prose blockquote > * { margin: .4em 0; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--blue-50); color: var(--blue-700); padding: .15em .4em; border-radius: 6px; }
.prose pre { font-family: var(--mono); font-size: .9rem; line-height: 1.55; padding: var(--s-4) var(--s-5); border-radius: var(--radius); overflow-x: auto; background: #0d1117; color: #e6edf3; }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .6rem .8rem; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--gray-50); color: var(--gray-900); }
.prose img, .prose video { border-radius: var(--radius-sm); display: block; max-width: 100%; height: auto; margin-inline: auto; }
.prose video { width: 100%; background: #0d1117; }
.reader { background: rgb(255 255 255 / .9); border: 1px solid rgb(226 232 240 / .9); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm); }
.reader .post__header { padding-top: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.sidebar { position: sticky; top: 90px; display: grid; gap: var(--s-5); }
.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); background: var(--gray-50); }
.panel h2 { font-size: 1rem; margin-bottom: var(--s-3); }
.panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.panel a { text-decoration: none; font-weight: 600; }
.preview-banner { background: var(--yellow-400); color: var(--gray-900); text-align: center; padding: var(--s-2); font-weight: 700; }

/* ---- Anúncios ---- */
.ad { margin: var(--s-5) auto; padding: var(--s-2); text-align: center; background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: var(--radius-sm); max-width: 100%; overflow: hidden; }
.ad__label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: var(--s-1); }
.ad img { display: inline-block; border-radius: 6px; }
.adsbygoogle { display: block; }
.ad--header { max-width: var(--container); }

/* ---- Rodapé e consentimento ---- */
.site-footer { margin-top: var(--s-7); background: var(--gray-900); color: var(--gray-300); padding: var(--s-7) 0 var(--s-5); }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-6); }
.site-footer h2 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.site-footer small { display: block; margin-top: var(--s-6); color: var(--gray-500); }
.consent { position: fixed; inset: auto var(--s-4) var(--s-4) var(--s-4); z-index: 80; max-width: 560px; background: #fff; border: 1px solid var(--gray-300); border-top: 4px solid var(--yellow-400); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: var(--s-5); }
.consent p { margin: 0 0 var(--s-4); font-size: .95rem; color: var(--gray-700); }
.consent form { display: inline; }
.consent__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ---- Formulários e admin ---- */
.alert { padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); margin-bottom: var(--s-4); font-size: .96rem; }
.alert--error { background: var(--red-50); color: var(--red-600); border: 1px solid #fecaca; }
.alert--ok { background: var(--green-50); color: var(--green-600); border: 1px solid #bbf7d0; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-1); }
.field label { font-weight: 600; font-size: .92rem; color: var(--gray-700); }
.field small { color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: .65rem .85rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--gray-900); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--blue-200); border-color: var(--primary); }
.field textarea { min-height: 420px; font-family: var(--mono); font-size: .95rem; line-height: 1.55; resize: vertical; }
.field--check { display: flex; gap: var(--s-2); align-items: center; }
.field--check input { width: auto; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.auth-card { max-width: 430px; margin: var(--s-8) auto; padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.admin-bar { background: var(--gray-900); color: #fff; }
.admin-bar__inner { display: flex; align-items: center; gap: var(--s-4); min-height: 56px; flex-wrap: wrap; }
.admin-bar a { color: var(--gray-300); text-decoration: none; font-weight: 600; font-size: .95rem; }
.admin-bar a:hover { color: #fff; }
.admin-bar .brand { color: #fff; }
.admin-bar form { margin-left: auto; }
.admin-main { padding: var(--s-6) 0 var(--s-7); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--gray-600); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.status { font-weight: 700; font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; }
.status--published { background: var(--green-50); color: var(--green-600); }
.status--draft { background: var(--yellow-100); color: #7c4a03; }
.status--scheduled { background: var(--blue-100); color: var(--blue-700, #1d4ed8); }
.status--off { background: var(--gray-100); color: var(--gray-600); }
.toolbar { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-5); }
.toolbar h1 { margin: 0; margin-right: auto; font-size: 1.6rem; }
.inline-form { display: inline; }
.empty { text-align: center; padding: var(--s-7); color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius); }
.page-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.page-head { padding: var(--s-6) 0 var(--s-2); }
.page-head p { color: var(--gray-600); max-width: 62ch; }

@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .featured { grid-template-columns: 1fr; }
  .featured .card__media { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: var(--s-3) var(--s-4) var(--s-4); }
  .nav.is-open { display: flex; }
  .search input { width: 100%; flex: 1; }
}
@media (max-width: 760px) {
  body::before { background-size: 460px auto; }
  .site-footer__grid, .row { grid-template-columns: 1fr; }
  .hero__inner { padding: var(--s-7) 0 var(--s-6); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Utilitários de layout ---- */
.section--tight { padding-top: var(--s-4); }
.related-title { font-size: 1.4rem; }
.panel__text { margin: 0 0 var(--s-3); font-size: .95rem; }
.container--narrow { max-width: 780px; }
.container--center { max-width: 640px; text-align: center; padding: var(--s-8) 0; }
.hint { color: var(--muted); font-size: .9rem; }
.code-sample { font-family: var(--mono); background: var(--gray-100); padding: .1em .4em; border-radius: 6px; font-size: .88em; }

/* Biblioteca de mídia (painel) */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.media-card { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.media-card__thumb { aspect-ratio: 4/3; background: #0d1117; display: flex; align-items: center; justify-content: center; }
.media-card__thumb img, .media-card__thumb video { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-card__body { padding: .6rem .7rem; font-size: .85rem; display: grid; gap: .4rem; }
.media-card__body code { word-break: break-all; font-size: .75rem; }
.media-picker { border: 1px dashed var(--gray-300, #d1d5db); border-radius: 12px; padding: .75rem; margin-top: .5rem; }
.media-picker .media-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.media-picker button.media-pick { padding: 0; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 8px; background: #0d1117; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.media-picker button.media-pick img, .media-picker button.media-pick video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.token-once { font-family: ui-monospace, monospace; word-break: break-all; background: var(--yellow-100); padding: .75rem; border-radius: 8px; user-select: all; }

/* =========================================================================
   Ordenação, curtidas e comentários
   ========================================================================= */
.stats { display: inline-flex; gap: var(--s-3); margin-left: auto; }
.stat { display: inline-flex; align-items: center; gap: .3rem; font-variant-numeric: tabular-nums; }
.icon { flex: none; vertical-align: -3px; }

.sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-5); }
.sortbar__label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.sortbar__group { display: inline-flex; padding: 4px; gap: 2px; background: var(--gray-100); border: 1px solid var(--border); border-radius: 999px; max-width: 100%; overflow-x: auto; }
.sortbar__opt { padding: .38rem .95rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--gray-700); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.sortbar__opt:hover { background: #fff; color: var(--primary); }
.sortbar__opt.is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }

.engage { margin: var(--s-6) 0 var(--s-5); padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.engage__like { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: 0; }
.engage__hint { color: var(--muted); font-size: .9rem; }
.like-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1.1rem; border-radius: 999px; border: 2px solid var(--gray-300); background: #fff; color: var(--gray-700); font: inherit; font-weight: 700; cursor: pointer; transition: transform .15s, border-color .15s, background .15s, color .15s; }
.like-btn b { padding: .05rem .55rem; border-radius: 999px; background: var(--gray-100); font-variant-numeric: tabular-nums; }
.like-btn:hover { border-color: #e11d48; color: #be123c; }
.like-btn:active { transform: scale(.97); }
.like-btn.is-liked { background: #fff1f2; border-color: #e11d48; color: #be123c; }
.like-btn.is-liked b { background: #ffe4e6; }

.comments { margin: var(--s-6) 0; }
.comments > h2 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.4rem; }
.comments__count { padding: .1rem .65rem; border-radius: 999px; background: var(--yellow-100); color: #7c4a03; font-size: .9rem; }
.comments__empty { color: var(--muted); padding: var(--s-4) 0; }
.comment-list { list-style: none; margin: var(--s-4) 0 var(--s-5); padding: 0; display: grid; gap: var(--s-3); }
.comment { display: flex; gap: var(--s-3); padding: var(--s-4); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.comment:target { outline: 3px solid var(--yellow-400); }
.comment__avatar, .mod-item__avatar { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-weight: 800; }
.comment__main { min-width: 0; flex: 1; }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); }
.comment__head time { color: var(--muted); font-size: .84rem; }
.comment__body, .mod-item__body { margin: .35rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.comment-form { padding: var(--s-5); background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius); }
.comment-form h3 { margin: 0; font-size: 1.15rem; }
.comment-form__row { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.comment-form .field textarea { min-height: 130px; font-family: var(--font); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Painel de moderação */
.badge { display: inline-block; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--yellow-400); color: var(--gray-900); font-size: .75rem; font-weight: 800; text-align: center; }
.stat-cards { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: var(--s-4); }
.stat-card { display: grid; gap: 2px; padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--gray-700); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.stat-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.stat-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--blue-100); }
.stat-card__n { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.stat-card__l { font-size: .85rem; font-weight: 600; color: var(--muted); }
.mod-list { list-style: none; margin: var(--s-4) 0; padding: 0; display: grid; gap: var(--s-3); }
.mod-item { display: flex; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--gray-300); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mod-item--pending { border-left-color: var(--yellow-400); }
.mod-item--approved { border-left-color: var(--green-600); }
.mod-item--spam { border-left-color: var(--red-600); }
.mod-item__main { min-width: 0; flex: 1; }
.mod-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.mod-item__mail, .mod-item__when { color: var(--muted); font-size: .85rem; }
.mod-item__post { margin: .15rem 0 0; font-size: .88rem; color: var(--muted); }
.mod-item__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
@media (max-width: 560px) { .stats { margin-left: 0; } .comment, .mod-item { padding: var(--s-3); } }

/* =========================================================================
   Dashboard de estatísticas
   ========================================================================= */
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: var(--s-4) 0; }
.kpi { display: grid; gap: 2px; align-content: start; padding: var(--s-4) var(--s-5); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.kpi__l { font-size: .84rem; font-weight: 600; color: var(--muted); }
.kpi__l abbr { text-decoration: none; cursor: help; }
.kpi__n { font-size: 2rem; font-weight: 800; line-height: 1.15; color: var(--gray-900); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi--live .kpi__n::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: .5rem; border-radius: 50%; background: var(--green-600); vertical-align: middle; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .kpi--live .kpi__n::after { animation: none; } }
.delta { font-size: .8rem; font-weight: 700; }
.delta--up { color: var(--green-600); }
.delta--down { color: var(--red-600); }
.delta--flat { color: var(--muted); font-weight: 600; }
.panel { padding: var(--s-5); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: var(--s-4); }
.panel h2 { margin: 0 0 var(--s-3); font-size: 1.1rem; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
.panel__head h2 { margin-bottom: var(--s-2); }
.panel .legend, .legend { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--gray-700); }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: .4rem; border-radius: 3px; vertical-align: -1px; }
.sw--views { background: var(--blue-100); border: 1px solid var(--primary); }
.sw--visitors { background: var(--primary); }
.sw--likes { background: var(--yellow-400); }
.chart { display: block; width: 100%; height: auto; }
.chart__grid { stroke: var(--gray-200); stroke-width: 1; }
.chart__tick { fill: var(--muted); font-size: 11px; }
.chart__bar { fill: var(--blue-100); stroke: var(--primary); stroke-width: 1; }
.chart__line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart__line--visitors { stroke: var(--primary); }
.chart__line--likes { stroke: var(--yellow-400); }
.chart-table { margin-top: var(--s-3); font-size: .9rem; }
.chart-table summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.grid-2 { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.stack { display: grid; gap: var(--s-4); }
.stack .panel { margin-bottom: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.hbar { display: block; width: 100%; height: 6px; margin-top: 6px; border-radius: 3px; overflow: hidden; }
.hbar__bg { fill: var(--gray-100); }
.hbar__fg { fill: var(--primary); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 0 var(--s-3); }
.bars li .hbar { grid-column: 1 / -1; }
.bars__name { overflow-wrap: anywhere; font-weight: 600; }
.bars__n { font-variant-numeric: tabular-nums; color: var(--gray-700); font-weight: 700; }
