/* ============================================================
   APOCALIPSE HOJE — Design System
   Paleta: navy profundo + dourado | Tipos: Cormorant Garamond + Inter
   ============================================================ */

:root {
  --bg: #060a13;
  --bg-2: #0a1120;
  --surface: #0e1626;
  --surface-2: #141f35;
  --line: #1e2b47;
  --line-soft: #16223c;
  --ink: #e9edf5;
  --muted: #8fa0bc;
  --faint: #5d6c88;
  --gold: #c9a45c;
  --gold-2: #e6c880;
  --gold-dim: rgba(201, 164, 92, 0.14);
  --navy-accent: #2e4470;
  --danger: #d4694f;
  --ok: #6fae7c;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --radius: 10px;
  --radius-lg: 16px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --w-max: 1200px;
  --w-prose: 720px;
  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f3ec;
  --bg-2: #efece2;
  --surface: #fdfcf8;
  --surface-2: #f0ecdf;
  --line: #ddd5c2;
  --line-soft: #e6e0d0;
  --ink: #16202f;
  --muted: #55627c;
  --faint: #8a94a8;
  --gold: #8f6e2e;
  --gold-2: #75591f;
  --gold-dim: rgba(143, 110, 46, 0.12);
  --navy-accent: #24365c;
  --shadow: 0 10px 40px rgba(30, 35, 50, 0.12);
  --shadow-sm: 0 4px 14px rgba(30, 35, 50, 0.08);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
main { flex: 1; }
::selection { background: var(--gold); color: #0a0f1c; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Tipografia ---------- */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

/* ---------- Layout ---------- */
.container { width: min(var(--w-max), 100% - 2 * var(--space-4)); margin-inline: auto; }
.section { padding-block: var(--space-7); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.section-head .eyebrow { display: block; margin-bottom: var(--space-2); }
.section-link { font-size: 0.88rem; font-weight: 500; color: var(--gold); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: gap 0.2s ease; }
.section-link:hover { gap: 10px; }

.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }

/* ---------- Assinatura: divisor dos sete selos ---------- */
.seals {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; padding-block: var(--space-3);
  color: var(--gold);
}
.seals::before, .seals::after {
  content: ""; flex: 1; max-width: 180px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.5;
}
.seals::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.seals span {
  width: 5px; height: 5px; background: var(--gold);
  transform: rotate(45deg); opacity: 0.85;
}
.seals span:nth-child(4) { width: 8px; height: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border: 1px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--gold);
  letter-spacing: 0.02em; flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
.brand-name em { font-style: italic; color: var(--gold); }
.brand-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--faint); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--gold); border-color: var(--line); background: var(--surface); }
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; min-height: 42px; color: var(--faint); font-size: 0.88rem;
  background: var(--surface); min-width: 210px;
  transition: border-color 0.2s, color 0.2s;
}
.search-trigger:hover { border-color: var(--gold); color: var(--muted); }
.search-trigger kbd {
  margin-left: auto; font-size: 0.68rem; border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 4px; font-family: var(--font-body); color: var(--faint);
}
.btn-entrar {
  padding: 9px 18px; min-height: 42px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.88rem; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-entrar:hover { border-color: var(--gold); color: var(--gold); }

.main-nav { border-top: 1px solid var(--line-soft); }
.main-nav ul {
  list-style: none; display: flex; gap: 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
  display: block; padding: 11px 13px; font-size: 0.85rem; font-weight: 500;
  color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle { display: none; }

/* Drawer mobile */
.drawer {
  position: fixed; inset: 0; z-index: 200; visibility: hidden;
}
.drawer.open { visibility: visible; }
.drawer-scrim {
  position: absolute; inset: 0; background: rgba(3, 6, 12, 0.6);
  opacity: 0; transition: opacity 0.25s ease;
}
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: var(--surface); border-left: 1px solid var(--line);
  padding: var(--space-4); overflow-y: auto;
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-panel ul { list-style: none; margin-top: var(--space-4); }
.drawer-panel a {
  display: block; padding: 13px 10px; font-size: 1rem; border-bottom: 1px solid var(--line-soft);
  color: var(--muted); transition: color 0.15s;
}
.drawer-panel a:hover, .drawer-panel a[aria-current="page"] { color: var(--gold); }
.drawer-close { position: absolute; top: 14px; right: 14px; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
  .search-trigger { min-width: 0; }
  .search-trigger .search-label, .search-trigger kbd { display: none; }
  .btn-entrar span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(70px, 12vw, 130px) clamp(60px, 9vw, 100px);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-alpha-omega {
  position: absolute; right: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: clamp(16rem, 34vw, 30rem);
  line-height: 1; color: var(--gold); opacity: 0.05; user-select: none; pointer-events: none;
  white-space: nowrap;
}
.hero-inner { position: relative; max-width: 780px; }
.hero h1 { margin-block: var(--space-3) var(--space-4); }
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero .lead { margin-bottom: var(--space-5); }

.hero-search { max-width: 560px; margin-bottom: var(--space-5); position: relative; }
.hero-search input {
  width: 100%; min-height: 56px; padding: 16px 56px 16px 20px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 1rem; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search input::placeholder { color: var(--faint); }
.hero-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.hero-search button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--gold); border-radius: 8px; transition: background 0.2s;
}
.hero-search button:hover { background: var(--gold-dim); }

.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 13px 28px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s, color 0.2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold); color: #0d1220; }
.btn-gold:hover { background: var(--gold-2); box-shadow: 0 6px 24px rgba(201, 164, 92, 0.25); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: 0.87rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-sm); }
.card-media { aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: var(--surface-2); }
.card-media svg { width: 100%; height: 100%; }
.card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cat {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold);
}
.card h3 a { transition: color 0.2s; }
.card h3 a:hover { color: var(--gold-2); }
.card p { font-size: 0.9rem; color: var(--muted); flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--faint); margin-top: auto; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

.card-featured { flex-direction: row; align-items: stretch; }
.card-featured .card-media { aspect-ratio: auto; flex: 1.2; min-height: 280px; }
.card-featured .card-body { flex: 1; justify-content: center; padding: var(--space-5); }
.card-featured h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 760px) { .card-featured { flex-direction: column; } .card-featured .card-media { aspect-ratio: 16/9; min-height: 0; } }

/* ---------- Versículo do dia ---------- */
.verse-banner {
  background: var(--surface); border-block: 1px solid var(--line-soft);
  padding-block: var(--space-6); text-align: center; position: relative; overflow: hidden;
}
.verse-banner blockquote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2rem); max-width: 800px; margin-inline: auto;
  line-height: 1.4;
}
.verse-banner cite { display: block; margin-top: var(--space-3); font-style: normal; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }

/* ---------- Timeline (home resumo + página) ---------- */
.timeline-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; position: relative; }
.timeline-strip::before { content: ""; position: absolute; top: 7px; left: 4%; right: 4%; height: 1px; background: var(--line); }
.tl-node { padding: 0 var(--space-2); position: relative; text-align: left; }
.tl-node::before {
  content: ""; display: block; width: 9px; height: 9px; background: var(--gold);
  transform: rotate(45deg); margin-bottom: var(--space-3); position: relative; z-index: 1;
}
.tl-node h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 4px; }
.tl-node p { font-size: 0.8rem; color: var(--muted); }

.timeline-full { position: relative; padding-left: 30px; }
.timeline-full::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: var(--space-5); }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 9px; height: 9px;
  background: var(--gold); transform: rotate(45deg);
}
.tl-item .tl-era { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.tl-item h3 { margin-block: 4px 6px; }
.tl-item p { color: var(--muted); font-size: 0.92rem; max-width: 68ch; }
.tl-item .tl-refs { font-size: 0.78rem; color: var(--faint); margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--space-2); overflow: hidden; }
.faq-item summary {
  padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 0.98rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  transition: color 0.2s; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold);
  line-height: 1; transition: transform 0.25s ease; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--gold-2); }
.faq-item .faq-body { padding: 0 20px 20px; color: var(--muted); font-size: 0.93rem; max-width: 75ch; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 64px); text-align: center; position: relative; overflow: hidden;
}
.newsletter h2 { margin-block: var(--space-2) var(--space-3); }
.newsletter form { display: flex; gap: var(--space-2); max-width: 480px; margin: var(--space-4) auto 0; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px; min-height: 50px; padding: 13px 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
}
.newsletter input:focus { outline: none; border-color: var(--gold); }
.newsletter .form-note { font-size: 0.78rem; color: var(--faint); margin-top: var(--space-3); }
.form-feedback { margin-top: var(--space-3); font-size: 0.9rem; color: var(--ok); min-height: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); margin-top: var(--space-7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-5); padding-block: var(--space-6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); margin-bottom: var(--space-3); font-weight: 600; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { font-size: 0.88rem; color: var(--muted); transition: color 0.2s; }
.footer-grid a:hover { color: var(--gold-2); }
.footer-about p { font-size: 0.88rem; color: var(--muted); max-width: 34ch; margin-top: var(--space-3); }
.footer-bottom {
  border-top: 1px solid var(--line-soft); padding-block: var(--space-4);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  font-size: 0.8rem; color: var(--faint);
}

/* ---------- Busca (modal) ---------- */
.search-modal { position: fixed; inset: 0; z-index: 300; display: none; }
.search-modal.open { display: block; }
.search-modal-scrim { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(4px); }
.search-modal-panel {
  position: relative; max-width: 640px; margin: 10vh auto 0; width: calc(100% - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.search-modal-panel input {
  width: 100%; padding: 20px 22px; font-size: 1.05rem; background: transparent;
  border: none; border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.search-modal-panel input:focus { outline: none; }
.search-results { max-height: 50vh; overflow-y: auto; padding: var(--space-2); }
.search-results a {
  display: block; padding: 12px 16px; border-radius: 8px; transition: background 0.15s;
}
.search-results a:hover, .search-results a.active { background: var(--surface-2); }
.search-results .sr-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); }
.search-results .sr-title { font-weight: 500; font-size: 0.95rem; }
.search-results .sr-snippet { font-size: 0.8rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: var(--space-5); text-align: center; color: var(--faint); font-size: 0.9rem; }

/* ---------- Página de artigo ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--faint); padding-block: var(--space-4); }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--faint); opacity: 0.6; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-6); align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static !important; } }
.article-aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: var(--space-4); }
.aside-box { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--space-4); }
.aside-box h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gold); margin-bottom: var(--space-3); font-weight: 600; }
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { font-size: 0.86rem; color: var(--muted); transition: color 0.15s; display: block; padding: 2px 0; }
.toc-list a:hover, .toc-list a.active { color: var(--gold-2); }
.toc-list .toc-h3 { padding-left: 14px; font-size: 0.8rem; }

.article-header { max-width: var(--w-prose); }
.article-header h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-block: var(--space-2) var(--space-3); }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.83rem; color: var(--muted); padding-block: var(--space-3); border-block: 1px solid var(--line-soft); }
.article-meta .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2);
  border: 1px solid var(--gold); display: grid; place-items: center;
  font-family: var(--font-display); color: var(--gold); font-size: 0.9rem; font-weight: 600;
}
.article-hero-img { border-radius: var(--radius-lg); overflow: hidden; margin-block: var(--space-5); border: 1px solid var(--line-soft); }
.article-hero-img svg { width: 100%; height: auto; }

.prose { max-width: var(--w-prose); font-size: 1.05rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { margin-top: 1.8em; scroll-margin-top: 120px; }
.prose h3 { margin-top: 1.5em; scroll-margin-top: 120px; }
.prose p { color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.prose blockquote {
  border-left: 2px solid var(--gold); padding: var(--space-2) var(--space-4);
  font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--ink);
  background: var(--gold-dim); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote cite { display: block; font-family: var(--font-body); font-style: normal; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-top: 8px; }
.prose ul, .prose ol { padding-left: 1.4em; color: color-mix(in srgb, var(--ink) 85%, var(--muted)); }
.prose li { margin-bottom: 0.4em; }

.share-row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin-block: var(--space-5); }
.share-row .label { font-size: 0.8rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.12em; }
.share-btn {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.share-btn:hover { color: var(--gold); border-color: var(--gold); }

.comments-box { max-width: var(--w-prose); }
.comment { border: 1px solid var(--line-soft); background: var(--surface); border-radius: var(--radius); padding: var(--space-4); margin-bottom: var(--space-3); }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.85rem; }
.comment-head strong { color: var(--gold-2); font-weight: 600; }
.comment-head time { color: var(--faint); font-size: 0.78rem; }
.comment p { font-size: 0.92rem; color: var(--muted); }
.comment-form textarea {
  width: 100%; min-height: 110px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--gold); }
.comment-form input {
  width: 100%; min-height: 46px; padding: 11px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--space-2);
}
.comment-form input:focus { outline: none; border-color: var(--gold); }

/* ---------- Ferramentas / abas ---------- */
.tool-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-5); }
.tool-tab {
  padding: 10px 18px; min-height: 44px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.86rem; font-weight: 500; color: var(--muted);
  transition: all 0.2s;
}
.tool-tab:hover { border-color: var(--gold); color: var(--gold); }
.tool-tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #0d1220; }
.tool-panel { display: none; }
.tool-panel.active { display: block; animation: fade-up 0.35s ease; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.glossary-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
.glossary-item dt { font-family: var(--font-display); font-size: 1.25rem; color: var(--gold-2); }
.glossary-item dd { color: var(--muted); font-size: 0.92rem; margin-top: 4px; max-width: 75ch; }

.quiz-card { max-width: 640px; }
.quiz-option {
  display: block; width: 100%; text-align: left; padding: 14px 18px; min-height: 48px;
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--space-2);
  font-size: 0.95rem; transition: all 0.2s; background: var(--surface);
}
.quiz-option:hover:not(:disabled) { border-color: var(--gold); }
.quiz-option.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.quiz-option.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.quiz-progress { height: 4px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-bottom: var(--space-4); }
.quiz-progress-bar { height: 100%; background: var(--gold); transition: width 0.4s ease; }

.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-3); }
.compare-col { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--space-4); }
.compare-col h4 { color: var(--gold); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: var(--space-2); }
.compare-col p { font-size: 0.95rem; color: var(--muted); font-family: var(--font-display); font-size: 1.1rem; line-height: 1.6; }

.field { margin-bottom: var(--space-3); }
.field label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 15px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.field .hint { font-size: 0.76rem; color: var(--faint); margin-top: 5px; }
.field .error-msg { font-size: 0.8rem; color: var(--danger); margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error-msg { display: block; }

/* ---------- Chat IA ---------- */
.chat-shell { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; height: min(72vh, 640px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.chat-msg { max-width: 82%; padding: 13px 17px; border-radius: 14px; font-size: 0.94rem; line-height: 1.6; animation: fade-up 0.3s ease; }
.chat-msg.user { align-self: flex-end; background: var(--navy-accent); color: #e9edf5; border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.chat-msg.bot .ref { display: block; margin-top: 8px; font-size: 0.76rem; color: var(--gold); letter-spacing: 0.08em; }
.chat-input-row { display: flex; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--line-soft); }
.chat-input-row input { flex: 1; min-height: 48px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.chat-input-row input:focus { outline: none; border-color: var(--gold); }
.chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 var(--space-3) var(--space-3); }
.chat-chip { font-size: 0.78rem; padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); transition: all 0.2s; min-height: 34px; }
.chat-chip:hover { border-color: var(--gold); color: var(--gold); }
.typing-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ---------- Admin ---------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: var(--space-5); align-items: start; }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-nav { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--space-2); position: sticky; top: 110px; }
.admin-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 14px; min-height: 44px; border-radius: 8px; font-size: 0.88rem; color: var(--muted);
  transition: all 0.15s;
}
.admin-nav button:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav button.active { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.stat-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: var(--space-4); }
.stat-card .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--gold-2); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .lbl { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.stat-card .delta { font-size: 0.75rem; color: var(--ok); margin-top: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 12px 14px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); border-bottom: 1px solid var(--line); font-weight: 600; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.data-table tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 3px 10px; border-radius: 100px; letter-spacing: 0.05em; }
.badge-gold { background: var(--gold-dim); color: var(--gold); }
.badge-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }

/* ---------- Auth ---------- */
.auth-card { max-width: 420px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 44px); }
.auth-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: var(--space-4); }
.auth-tabs button { flex: 1; padding: 12px; min-height: 46px; font-size: 0.88rem; font-weight: 500; color: var(--muted); transition: all 0.2s; }
.auth-tabs button.active { background: var(--gold); color: #0d1220; font-weight: 600; }

/* ---------- Utilidades ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.back-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--gold); color: var(--gold);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }

.page-hero { padding-block: var(--space-7) var(--space-6); border-bottom: 1px solid var(--line-soft); background: var(--bg-2); position: relative; overflow: hidden; }
.page-hero h1 { margin-block: var(--space-2) var(--space-3); }
.page-hero .lead { max-width: 68ch; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 0.8rem; padding: 8px 16px; min-height: 38px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 100px; color: var(--muted);
  transition: all 0.2s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #0d1220; font-weight: 600; }

.mini-list { list-style: none; }
.mini-list li { border-bottom: 1px solid var(--line-soft); }
.mini-list a { display: flex; align-items: baseline; gap: 12px; padding: 13px 4px; transition: background 0.15s; }
.mini-list a:hover { background: var(--surface); }
.mini-list .rank { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); font-style: italic; min-width: 26px; }
.mini-list .t { font-size: 0.92rem; font-weight: 500; }
.mini-list .m { font-size: 0.76rem; color: var(--faint); margin-left: auto; white-space: nowrap; }

.icon-tile {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4);
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s;
}
.icon-tile:hover { transform: translateY(-4px); border-color: var(--gold); }
.icon-tile .tile-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--gold-dim); color: var(--gold); display: grid; place-items: center; }
.icon-tile h3 { font-size: 1.15rem; }
.icon-tile p { font-size: 0.85rem; color: var(--muted); }

.notice { padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; background: var(--surface); font-size: 0.88rem; color: var(--muted); }
