/* ============================================
   PORTAL PAGE — páginas de conteúdo educativo
   Regras ABNT + Como fazer
   ============================================ */

.portal-hero {
  padding: var(--space-16) 0 var(--space-12);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-canvas) 100%);
  border-bottom: 1px solid var(--border-soft);
}
.portal-container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (min-width: 768px) {
  .portal-container { padding: 0 var(--space-10); }
}

.portal-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.portal-breadcrumb a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}
.portal-breadcrumb a:hover { color: #000; text-decoration: underline; }
.portal-breadcrumb .sep { opacity: 0.5; }

.portal-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--moss-700);
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-3);
  background: var(--moss-100);
  border: 1px solid var(--moss-300);
  border-radius: var(--radius-full);
}

.portal-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 var(--space-5);
}

.portal-lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 760px;
}

.portal-content {
  padding: var(--space-12) 0;
}

.portal-content h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: var(--space-12) 0 var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.portal-content h2:first-child { margin-top: 0; }
.portal-content h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: rgba(122,158,126,0.18);   /* verde bem clarinho */
  color: #000;                          /* número preto */
  border: 2.5px solid #1a1a1a;          /* borda preta */
  border-radius: 10px;
  font-size: var(--fs-md);
  font-weight: 800;
  flex-shrink: 0;
}

.portal-content h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--moss-700);
  letter-spacing: -0.01em;
  margin: var(--space-8) 0 var(--space-3);
}

.portal-content p {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 var(--space-4);
}
.portal-content p strong { color: var(--text-primary); font-weight: 600; }

.portal-content ul,
.portal-content ol {
  color: var(--text-secondary);
  padding-left: var(--space-6);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}
.portal-content li { margin-bottom: var(--space-2); }
.portal-content li strong { color: var(--text-primary); }

/* Caixa de regra (chamada visual) */
.rule-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--moss-500);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--space-6) 0;
}
.rule-box-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss-700);
  margin-bottom: var(--space-3);
}
.rule-box ul { margin: 0; }
.rule-box li { margin-bottom: var(--space-2); }

/* Caixa de aviso */
.warn-box {
  background: rgba(201, 164, 73, 0.08);
  border: 1px solid rgba(201, 164, 73, 0.3);
  border-left: 4px solid var(--gold-attn);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}
.warn-box-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-attn);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Caixa de NBR */
.nbr-box {
  background:
    linear-gradient(180deg, rgba(122,158,126,0.06) 0%, transparent 100%),
    var(--bg-surface);
  border: 1px solid var(--moss-300);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-5) 0;
}
.nbr-box-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.nbr-box-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 10px;
  background: var(--moss-700);
  color: var(--text-inverse);
  border-radius: 6px;
  letter-spacing: 0.08em;
}
.nbr-box-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-primary);
}
.nbr-box-body {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Ilustração SVG container */
.illustration {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.illustration svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.illustration-caption {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-3);
  letter-spacing: 0.02em;
}

/* Tabela de comparação */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--fs-sm);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.compare-table th {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td { color: var(--text-secondary); }
.compare-table td strong { color: var(--text-primary); }

/* CTA inline */
.portal-cta-inline {
  background: linear-gradient(135deg, var(--moss-700), var(--moss-900));
  color: var(--text-inverse);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  margin: var(--space-10) 0;
  text-align: center;
}
.portal-cta-inline h3 {
  font-size: var(--fs-lg);
  color: var(--text-inverse);
  font-weight: 700;
  margin: 0 0 var(--space-3);
}
.portal-cta-inline p {
  color: rgba(247,248,246,0.85);
  margin: 0 0 var(--space-5);
}

/* Navegação fim de artigo */
.portal-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border-soft);
  margin-top: var(--space-12);
}
.portal-nav a {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease-out);
}
.portal-nav a:hover {
  border-color: var(--moss-500);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.portal-nav .dir {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.portal-nav .lbl {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--moss-700);
}
.portal-nav a:nth-child(2) { text-align: right; }

/* ============================================
   BOX DE FORMATAÇÃO GERAL (topo — vale pra todo o TCC)
   ============================================ */
.global-fmt {
  background: linear-gradient(180deg, rgba(184,83,78,0.10) 0%, rgba(184,83,78,0.04) 100%);
  border: 1px solid rgba(184,83,78,0.35);
  border-left: 4px solid var(--crimson-alert);
  border-radius: 16px;
  padding: var(--space-6) var(--space-8);
  margin: var(--space-6) 0 var(--space-10);
  box-shadow: var(--shadow-1);
}
.global-fmt-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.global-fmt-icon { font-size: 30px; line-height: 1; }
.global-fmt h3 {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
.global-fmt h3 .nbr { color: var(--crimson-alert); }
.global-fmt-head p {
  font-size: var(--fs-sm);
  color: #5a6b62;
  margin: 0;
  line-height: 1.5;
}
.global-fmt-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) { .global-fmt-list { grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-8); } }
.global-fmt-list li {
  font-size: var(--fs-sm);
  color: #1a1a1a;
  padding-left: var(--space-5);
  position: relative;
}
.global-fmt-list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--crimson-alert);
  font-weight: 800;
}
.global-fmt-list strong { color: #000; font-weight: 700; }

/* ============================================
   ESTRUTURA INTERATIVA — blocos VERTICAIS full-width
   (Pré-textuais empilhado → Textuais → Pós-textuais)
   ============================================ */
.struct-section {
  margin: var(--space-8) 0 var(--space-12);
}
.struct-col-head {
  padding: var(--space-5) var(--space-6);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 16px;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.struct-col-head small {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.85;
}
/* 3 cores distintas por bloco */
.struct-section.pre .struct-col-head { background: linear-gradient(135deg, #7a9e7e, #5a8064); }
.struct-section.txt .struct-col-head { background: linear-gradient(135deg, #4a6a52, #2f4737); }
.struct-section.pos .struct-col-head { background: linear-gradient(135deg, #5d7d94, #3e5a6e); }

.struct-col-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Item accordion */
.struct-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-canvas);
  overflow: hidden;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.struct-item[open] { border-color: var(--moss-300); box-shadow: var(--shadow-1); }
.struct-item.is-required { border-left: 3px solid var(--moss-700); }
.struct-item.is-optional { border-left: 3px solid var(--moss-300); }

.struct-item summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.struct-item summary::-webkit-details-marker { display: none; }
.struct-item-name {
  flex: 1;
  font-size: var(--fs-lg);
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.struct-item.is-required .struct-item-name { font-weight: 800; }
.struct-item.is-optional .struct-item-name { font-weight: 600; color: var(--text-secondary); }
.struct-item-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.struct-item.is-required .struct-item-tag { background: rgba(74,106,82,0.15); color: var(--moss-700); }
.struct-item.is-optional .struct-item-tag { background: rgba(138,152,144,0.15); color: var(--text-muted); }

/* Setinha (chevron) — substitui o "+" */
.struct-item-plus {
  width: 30px; height: 30px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #2a3a30;
  font-size: 0;
  box-shadow: 0 2px 8px rgba(42,58,48,0.3);
  transition: transform 0.3s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.struct-item-plus::before {
  content: '';
  width: 11px; height: 11px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);          /* aponta pra direita (fechado) */
  margin-left: -2px;
  transition: transform 0.3s var(--ease-out);
}
.struct-item summary:hover .struct-item-plus {
  background: var(--amber-warm);
  box-shadow: 0 4px 12px var(--amber-glow);
}
.struct-item[open] .struct-item-plus {
  background: var(--amber-warm);
  box-shadow: 0 4px 12px var(--amber-glow);
}
.struct-item[open] .struct-item-plus::before {
  transform: rotate(45deg);            /* aponta pra baixo (aberto) */
  margin-left: 0; margin-top: -3px;
}

/* Menção de NORMA (NBR/ABNT) em VERMELHO — chama atenção (é lei) */
.nbr {
  color: var(--crimson-alert);
  font-weight: 700;
  white-space: nowrap;
}

.struct-item-content {
  padding: var(--space-6) var(--space-8) var(--space-8);
  font-size: var(--fs-base);
  color: #1a1a1a;                 /* TEXTO PRETO (verde só no fundo) */
  line-height: 1.7;
  border-top: 1px solid var(--border-soft);
}
.struct-item-content > p:first-child { margin-top: 0; }
.struct-item-content p { margin: 0 0 var(--space-4); color: #1a1a1a; }
.struct-item-content p:last-child { margin-bottom: 0; }
.struct-item-content strong { color: #000; font-weight: 700; }
.struct-item-content ul, .struct-item-content ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); color: #1a1a1a; }
.struct-item-content li { margin-bottom: var(--space-2); }
.struct-item-content h4 {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #1a1a1a;                 /* título PRETO, não verde */
  margin: var(--space-6) 0 var(--space-4);
  letter-spacing: -0.01em;
  text-align: center;            /* só o TÍTULO no meio (regra dos 85%) */
}
.struct-item-content > h4:first-child,
.paper > h4:first-child { margin-top: 0; }

/* "Papel" de fundo pra cada subseção (não cansa a vista com branco puro) */
.paper {
  background: linear-gradient(180deg, rgba(122,158,126,0.08) 0%, rgba(122,158,126,0.03) 100%);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: var(--space-6) var(--space-8);
  margin: var(--space-5) 0;
}
/* .center: SÓ o título centraliza — conteúdo fica à esquerda */
.paper.center h4 { text-align: center; }
.paper.center > p,
.paper.center ul,
.paper.center ol { text-align: left; }
/* exceção: o preview A4 fica centralizado no meio */
.paper.center .a4-preview { margin-left: auto; margin-right: auto; }

/* Caixa de EXEMPLO de formatação (mostra como fica na prática) */
.fmt-example {
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-3) 0 var(--space-5);
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
  box-shadow: var(--shadow-1);
  position: relative;
}
.fmt-example::before {
  content: 'EXEMPLO';
  position: absolute;
  top: -9px;
  left: var(--space-5);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--moss-700);
  background: var(--bg-surface);
  padding: 0 var(--space-2);
  border-radius: 4px;
}
.fmt-example .hang {
  padding-left: 2em;
  text-indent: -2em;
  margin-bottom: var(--space-3);
}
.fmt-example .hang:last-child { margin-bottom: 0; }
.fmt-example b, .fmt-example strong { font-weight: 700; color: #000; }
.fmt-example em, .fmt-example i { font-style: italic; }

/* Tag de cor pra indicar "vai em negrito" / "vai em itálico" no exemplo */
.fmt-note {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.fmt-note.bold { background: rgba(74,106,82,0.15); color: var(--moss-700); }
.fmt-note.ital { background: rgba(93,125,148,0.15); color: var(--slate-blue-600); }

/* AVISO destacado — fundo AMARELO + ícone (chama atenção) */
.fmt-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: linear-gradient(180deg, rgba(201,164,73,0.16) 0%, rgba(201,164,73,0.08) 100%);
  border: 1px solid var(--gold-attn);
  border-left: 4px solid var(--gold-attn);
  border-radius: 10px;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
  font-size: var(--fs-sm);
  color: #1a1a1a;
  font-weight: 500;
}
.fmt-tip strong { color: #000; }
/* Ícone SVG de alerta (esconde emoji que vier no HTML, mostra ícone próprio) */
.fmt-tip-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 0;
  position: relative;
}
.fmt-tip-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8860b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ============================================
   REGRA DE OURO — diferencial só nosso
   Medalha + verde vibrante + negrito/maiúsculo
   ============================================ */
.golden {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: linear-gradient(135deg, rgba(106,191,75,0.18) 0%, rgba(122,158,126,0.10) 100%);
  border: 2px solid #5aa832;
  border-radius: 14px;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  box-shadow: 0 4px 16px rgba(90,168,50,0.18);
}
.golden-medal { flex-shrink: 0; width: 46px; height: 46px; }
.golden-medal svg { width: 46px; height: 46px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.golden-body { flex: 1; }
.golden-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #3d7a1f;
  background: rgba(106,191,75,0.22);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: var(--space-2);
}
.golden-text {
  font-size: var(--fs-md);
  font-weight: 700;
  color: #000;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.golden-text strong { font-weight: 800; color: #000; }

/* Mini-exemplo visual dentro do accordion (folha simulada) */
.mini-page {
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  padding: var(--space-4);
  margin: var(--space-3) 0;
  aspect-ratio: 3 / 4;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 9px;
  color: var(--text-muted);
  position: relative;
  box-shadow: var(--shadow-1);
}
.mini-page .ln { height: 5px; background: var(--border-soft); border-radius: 2px; }
.mini-page .ln.center { margin: 0 auto; }
.mini-page .ln.title { background: var(--moss-500); height: 7px; }
.mini-page .top { text-align: center; font-weight: 700; color: var(--text-primary); }
.mini-page .mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; align-items: center; }
.mini-page .bot { text-align: center; }

/* ============================================
   PREVIEW FOLHA A4 (proporção real 210:297)
   ============================================ */
.a4-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  width: fit-content;
  margin: var(--space-4) auto;   /* centralizado no meio da página */
  transition: transform 0.25s var(--ease-out);
}
.a4-preview:hover { transform: translateY(-3px); }
.a4-sheet {
  width: 240px;
  aspect-ratio: 210 / 297;
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(42,58,48,0.15), 0 2px 6px rgba(42,58,48,0.1);
  padding: 10% 8% 7%;
  display: flex;
  flex-direction: column;
  font-family: 'Times New Roman', Georgia, serif;
  color: #111;
  transition: box-shadow 0.25s var(--ease-out);
}
.a4-preview:hover .a4-sheet {
  box-shadow: 0 16px 40px rgba(42,58,48,0.22), 0 4px 12px rgba(42,58,48,0.12);
}
.a4-top {
  text-align: center;
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.4;
}
.a4-author {
  text-align: center;
  font-size: 8px;
  margin-top: 8%;
}
.a4-title {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  margin: auto 0;
}
.a4-title span { font-size: 8px; font-weight: 400; text-transform: none; }
.a4-bottom {
  text-align: center;
  font-size: 8px;
  margin-top: auto;
}
.a4-zoom {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  background: var(--amber-warm);
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px var(--amber-glow);
  transition: filter 0.2s var(--ease-out);
}
.a4-preview:hover .a4-zoom { filter: brightness(1.08); }

/* Mini-preview skeleton (linhas representando texto) — pros que não têm conteúdo próprio */
.a4-sheet.a4-mini { padding: 14% 10%; gap: 5px; justify-content: flex-start; }
.a4-mini .sk { height: 5px; background: #d8ddd6; border-radius: 2px; }
.a4-mini .sk.t { height: 7px; background: #a9c2ad; width: 60%; margin: 0 auto var(--space-2); }
.a4-mini .sk.s { width: 92%; }
.a4-mini .sk.m { width: 75%; }
.a4-mini .sk.gap { background: transparent; height: 12px; }

/* Hint (mensagem descritiva pequena com VIBRAÇÃO — chama atenção) */
.hint {
  font-size: 13px !important;
  color: #8a6d00 !important;
  background: rgba(201,164,73,0.12);
  border-left: 3px solid var(--gold-attn);
  padding: 7px 12px;
  border-radius: 6px;
  margin-bottom: var(--space-3) !important;
  display: block;
  font-weight: 500;
}

/* Linha de previews (vários temas lado a lado) */
.prev-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin: var(--space-4) 0;
}
@media (min-width: 700px) { .prev-row { grid-template-columns: repeat(3, 1fr); } }
.prev-row .a4-preview { margin: 0; width: 100%; }
.prev-row .a4-sheet { width: 100%; max-width: 220px; }
.prev-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--moss-700);
  background: var(--moss-100);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--moss-300);
}

/* ============================================
   ERROS QUE REPROVAM — cards por gravidade
   ============================================ */
.err-band {
  margin: var(--space-8) 0 var(--space-12);
}
.err-band-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-radius: 14px;
  margin-bottom: var(--space-4);
  color: #fff;
  font-weight: 800;
}
.err-band-head .lvl {
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
.err-band-head .sub {
  font-size: var(--fs-sm);
  font-weight: 500;
  opacity: 0.9;
  margin-left: auto;
}
.err-band.red .err-band-head    { background: linear-gradient(135deg, #c0392b, #922b21); }
.err-band.orange .err-band-head { background: linear-gradient(135deg, #d97a3c, #b85f29); }
.err-band.yellow .err-band-head { background: linear-gradient(135deg, #c9a449, #a8842f); }

.err-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 720px) { .err-grid { grid-template-columns: 1fr 1fr; } }

.err-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-left: 4px solid;
  border-radius: 14px;
  padding: var(--space-5) var(--space-6);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.err-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.err-band.red .err-card    { border-left-color: #c0392b; }
.err-band.orange .err-card { border-left-color: #d97a3c; }
.err-band.yellow .err-card { border-left-color: #c9a449; }

.err-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-md);
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.err-card-title .ico { font-size: 18px; }
.err-card p { font-size: var(--fs-sm); color: #333; line-height: 1.6; margin: 0 0 var(--space-2); }
.err-card p:last-child { margin-bottom: 0; }
.err-card .why { color: #922b21; }
.err-band.orange .err-card .why { color: #b85f29; }
.err-band.yellow .err-card .why { color: #8a6d00; }
.err-card .fix {
  background: rgba(90,143,100,0.1);
  border-left: 3px solid var(--green-pass);
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  margin-top: var(--space-2);
  color: #2a3a30;
}
.err-card strong { color: #000; }

.struct-legend {
  display: flex;
  gap: var(--space-5);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.struct-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.struct-legend .sw {
  width: 28px; height: 14px; border-radius: 4px; display: inline-block;
}
.struct-legend .sw.req { background: var(--moss-700); }
.struct-legend .sw.opt { background: var(--moss-300); }

/* ============================================
   .lit — mantém maiúscula/minúscula original
   (ex.: exemplo "(Silva, 2020)" dentro da Regra de Ouro em CAIXA ALTA)
   ============================================ */
.golden-text .lit, .lit { text-transform: none; }

/* Transição de entrada — dá a sensação de "página nova" ao navegar */
@keyframes portalIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.portal-hero, .portal-content { animation: portalIn 0.4s var(--ease-out, ease) both; }
.portal-content { animation-delay: 0.05s; }
@media (prefers-reduced-motion: reduce) {
  .portal-hero, .portal-content { animation: none; }
}

/* Legenda de campos (ex.: explicar v., n., p. nas referências) */
.campo-legenda {
  list-style: none; padding: var(--space-5) var(--space-6); margin: var(--space-4) 0 0;
  background: linear-gradient(180deg, rgba(122,158,126,0.08), rgba(122,158,126,0.02));
  border: 1px solid var(--moss-300); border-left: 4px solid var(--moss-500);
  border-radius: 12px; display: grid; gap: var(--space-3);
}
.campo-legenda li { display: flex; gap: var(--space-3); align-items: baseline; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; text-align: left; }
.campo-legenda .cod {
  flex-shrink: 0; min-width: 84px;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #000;
  background: rgba(122,158,126,0.4); border: 1.5px solid #1a1a1a;
  padding: 1px 8px; border-radius: 6px; font-size: var(--fs-xs); text-align: center;
}
.campo-legenda li strong { color: var(--text-primary); }

/* Tutorial passo-a-passo (ex.: achar margens no Word) */
.tutorial-passos { counter-reset: passo; list-style: none; padding: 0; margin: var(--space-4) 0 0; display: grid; gap: var(--space-3); }
.tutorial-passos li {
  position: relative; padding: var(--space-4) var(--space-5) var(--space-4) 58px;
  background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: 12px;
  font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; text-align: left;
}
.tutorial-passos li::before {
  counter-increment: passo; content: counter(passo);
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: rgba(122,158,126,0.18); color: #000; border: 2px solid #1a1a1a;
  border-radius: 50%; font-weight: 800; font-size: var(--fs-sm);
}
.tutorial-passos li strong { color: var(--text-primary); }
.tutorial-passos .menu-path {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: var(--fs-xs);
  background: var(--moss-100); border: 1px solid var(--moss-300); border-radius: 5px; padding: 1px 7px; color: var(--moss-900);
}
