/* =========================================================================
   DiferenciAgro Universidade — Plataforma de Provas
   Identidade visual baseada no Relatório de Engajamento da Universidade.
   Verde floresta + acento dourado (latão) + escala de 4 estágios.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* superfícies */
  --forest:    #14431F;   /* verde escuro: cabeçalho, hero, rodapé */
  --forest-2:  #0E3316;   /* mais escuro: gradiente/blobs */
  --forest-3:  #1C5128;   /* blob mais claro sobre o forest */
  --bg:        #F1F5EE;   /* fundo da página (off-white esverdeado) */
  --surface:   #FFFFFF;   /* cards */
  --surface-2: #F7FAF4;

  /* marca */
  --green:      #1F7A34;  /* verde principal (botões, números) */
  --green-deep: #14431F;
  --green-bright:#2E9E3F; /* verde vivo (Concluído / Alto) */
  --green-avanc:#357140;  /* Avançado (verde médio) */

  /* acentos */
  --gold:      #C1943B;   /* dourado/latão */
  --gold-deep: #A97C29;
  --gold-soft: #E7D9AC;
  --copper:    #B5642A;   /* Inicial / engajamento baixo */
  --copper-soft:#EAD3C1;

  /* texto */
  --ink:    #17251A;
  --muted:  #66756A;
  --sage:   #A9BCAD;      /* texto claro sobre verde */
  --sage-2: #86A08C;

  --line:   #E2E9DC;
  --line-2: #EDF1E8;

  --radius:   16px;
  --radius-sm:11px;
  --shadow:   0 1px 2px rgba(20,67,31,.05), 0 10px 30px rgba(20,67,31,.07);
  --shadow-sm:0 1px 2px rgba(20,67,31,.06), 0 4px 12px rgba(20,67,31,.05);

  --display: 'Poppins', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
::selection { background: var(--gold-soft); }

/* ---------- Layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 32px 22px 72px; }
.container-narrow { max-width: 480px; }

/* ---------- Eyebrow (assinatura do relatório) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--body); font-weight: 700; font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--green);
  margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--gold); border-radius: 2px; }
.eyebrow.on-dark { color: var(--gold); }
.eyebrow.on-dark::before { background: var(--gold); }

/* ---------- Topbar (fundo branco — a barra de navegação, não o resto do site) ---------- */
.topbar { background: #fff; color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20,67,31,.04); }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .b1 { font-family: var(--display); font-weight: 700; font-size: .96rem; letter-spacing: .02em; color: var(--ink); }
.brand-text .b1 em { font-style: normal; color: var(--green); }
.brand-text .b2 { font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--green); font-weight: 600; }

.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav > a { color: var(--muted); padding: 9px 13px; border-radius: 9px; font-size: .9rem; font-weight: 500; transition: background .12s, color .12s; }
.mainnav > a:hover { background: var(--surface-2); color: var(--green-deep); text-decoration: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; background: var(--surface-2); border-radius: 999px; }
.user-name { font-size: .85rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--forest); font-weight: 700; font-size: .76rem; display: grid; place-items: center; font-family: var(--display); }

/* Botão "Sair" precisa de estilo próprio no cabeçalho claro (.btn-ghost em si é para fundo escuro). */
.topbar .btn-ghost { color: var(--ink); border-color: var(--line); }
.topbar .btn-ghost:hover { background: var(--surface-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 20px;
}
.card-pad-sm { padding: 16px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; border: 1px solid var(--green);
  padding: 11px 20px; border-radius: 10px; font-size: .93rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .12s, filter .12s;
  font-family: var(--body); line-height: 1.2; box-shadow: 0 1px 2px rgba(20,67,31,.14);
}
.btn:hover { filter: brightness(1.07); text-decoration: none; box-shadow: 0 4px 14px rgba(20,67,31,.2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-sm { padding: 7px 14px; font-size: .84rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #3a2c07; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,.12); filter: none; box-shadow: none; }
.btn-outline { background: #fff; color: var(--green); border-color: var(--green); box-shadow: none; }
.btn-outline:hover { background: var(--surface-2); filter: none; }
.btn-danger { background: var(--copper); border-color: var(--copper); }
.btn-muted { background: #eef2ec; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn-muted:hover { background: #e6ece2; filter: none; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions-end { justify-content: flex-end; }

/* ---------- Forms ---------- */
.field { margin-bottom: 17px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field .hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; font-family: inherit; color: var(--ink); background: #fff; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(46,158,63,.16); }
textarea { min-height: 96px; resize: vertical; }
.inline-fields { display: flex; gap: 15px; flex-wrap: wrap; }
.inline-fields .field { flex: 1; min-width: 150px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input { width: auto; accent-color: var(--green); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 11px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; border-left-width: 4px; }
.alert-success { background: var(--surface-2); border-color: var(--line); border-left-color: var(--green-bright); color: var(--green-deep); }
.alert-error   { background: #fbeee6; border-color: #f0d8c6; border-left-color: var(--copper); color: #8a441a; }
.alert-info    { background: #eef4fb; border-color: #d5e4f2; border-left-color: #3a72b0; color: #244f77; }
.alert-warning { background: #fbf3df; border-color: #efe0b4; border-left-color: var(--gold); color: #7d5a12; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line-2); }
th { background: var(--surface-2); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sage-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td:last-child, th:last-child { text-align: right; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; }
.badge-green { background: #e2f2e4; color: #1c6e30; }
.badge-red   { background: var(--copper-soft); color: #8a441a; }
.badge-gold  { background: #f6eccf; color: #7d5a12; }
.badge-amber { background: #f6eccf; color: #7d5a12; }
.badge-gray  { background: #eef2ec; color: var(--muted); }
.badge-blue  { background: #e7f0fa; color: #244f77; }
/* estágios da trilha */
.badge-concluido    { background: #dff0e2; color: #1c6e30; }
.badge-avancado     { background: #e0ebe1; color: #2c5a37; }
.badge-intermediario{ background: #f6eccf; color: #7d5a12; }
.badge-inicial      { background: var(--copper-soft); color: #8a441a; }

/* ---------- Stat cards (borda-topo colorida) ---------- */
.stat { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat.gold   { border-top-color: var(--gold); }
.stat.copper { border-top-color: var(--copper); }
.stat.bright { border-top-color: var(--green-bright); }
.stat .num { font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--green-deep); line-height: 1; }
.stat.gold .num { color: var(--gold-deep); }
.stat.copper .num { color: var(--copper); }
.stat .label { font-weight: 600; font-size: .92rem; margin-top: 8px; color: var(--ink); }
.stat .sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 12px; letter-spacing: .01em; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }

/* ---------- Course / exam tiles ---------- */
.tile { display: flex; flex-direction: column; height: 100%; }
.tile h3 { margin-bottom: 6px; }
.tile .desc { color: var(--muted); font-size: .89rem; flex: 1; }
.tile-meta { display: flex; gap: 15px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; margin: 12px 0; }
.tile-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* subcard (prova dentro do curso) */
.subcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }

/* ---------- Meter / engagement bars ---------- */
.meter { height: 12px; border-radius: 999px; background: #e6ede2; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.meter > span.gold { background: var(--gold); }
.meter > span.copper { background: var(--copper); }

/* ---------- Ladder (escala de 4 estágios — assinatura) ---------- */
.ladder { display: flex; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ladder .seg { padding: 14px 10px; text-align: center; color: #fff; min-width: 0; }
.ladder .seg .n { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1; }
.ladder .seg .l { font-size: .74rem; opacity: .92; margin-top: 3px; }
.ladder .seg.s1 { background: var(--green-bright); }
.ladder .seg.s2 { background: var(--green-avanc); }
.ladder .seg.s3 { background: var(--gold); }
.ladder .seg.s4 { background: var(--copper); }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 440px; margin: 5vh auto 0; }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { height: 128px; width: auto; }
.auth-wrap .card { padding: 32px; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: .9rem; }

/* ---------- Hero (green panel, estilo capa do relatório) ---------- */
.hero { position: relative; overflow: hidden; background: var(--forest); color: #fff; border-radius: 22px; padding: 52px 44px; margin-bottom: 24px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.035); pointer-events: none; }
.hero::before { width: 460px; height: 460px; top: -180px; right: -120px; background: var(--forest-3); opacity: .5; }
.hero::after { width: 320px; height: 320px; bottom: -160px; right: 120px; background: var(--forest-3); opacity: .35; }
.hero .hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero img.hero-logo { height: 62px; margin-bottom: 26px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.hero p.lead { color: var(--sage); font-size: 1.1rem; max-width: 540px; margin: 0 0 26px; }
.hero .actions .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .actions .btn-outline:hover { background: rgba(255,255,255,.1); }
.hero-strip { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 30px; margin-top: 36px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-strip .hs { min-width: 120px; }
.hero-strip .hs .tick { width: 22px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 10px; }
.hero-strip .hs .hv { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: #fff; }
.hero-strip .hs .hl { color: var(--sage); font-size: .82rem; margin-top: 2px; }

.feature-icon { font-size: 1.5rem; }

/* ---------- Exam taking ---------- */
.exam-timer { position: sticky; top: 84px; z-index: 20; float: right; background: var(--forest); color: #fff; padding: 9px 17px; border-radius: 999px; font-weight: 700; font-family: var(--display); font-variant-numeric: tabular-nums; box-shadow: var(--shadow); }
.exam-timer.warning { background: var(--gold); color: #3a2c07; }
.exam-timer.danger { background: var(--copper); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.question-card { margin-bottom: 16px; }
.question-num { color: var(--green); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--body); }
.question-statement { font-size: 1.06rem; font-weight: 600; margin: 8px 0 16px; color: var(--ink); }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover { border-color: var(--green-bright); background: var(--surface-2); }
.option input { margin-top: 3px; accent-color: var(--green); }
.option.correct { border-color: var(--green-bright); background: #eaf5ec; }
.option.incorrect { border-color: #e6c3ad; background: #fbeee6; }
.option .mark-icon { margin-left: auto; font-weight: 700; font-size: .82rem; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.option.correct .mark-icon { color: #1c6e30; }
.option.incorrect .mark-icon { color: #8a441a; }

/* Gabarito comentado (feedback por alternativa) */
.option.with-feedback { flex-direction: column; align-items: stretch; gap: 0; }
.option .opt-row { display: flex; gap: 11px; align-items: flex-start; }
.opt-letter { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: #eef2ec; color: var(--muted); font-weight: 700; font-size: .8rem; display: grid; place-items: center; font-family: var(--display); }
.option.correct .opt-letter { background: var(--green-bright); color: #fff; }
.option.incorrect .opt-letter { background: var(--copper); color: #fff; }
.opt-feedback { margin: 10px 0 0 35px; font-size: .88rem; color: var(--muted); line-height: 1.55; padding-top: 10px; border-top: 1px dashed var(--line); }
.option.correct .opt-feedback { color: #2c5a37; border-top-color: #c7e2cc; }
.option.incorrect .opt-feedback { color: #8a5230; border-top-color: #e8cdb9; }
@media (max-width: 560px) { .opt-feedback { margin-left: 0; } }

/* ---------- Result / score ring ---------- */
.result-score { text-align: center; padding: 26px 20px; }
.score-ring { --pct: 0; width: 168px; height: 168px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; position: relative; background: conic-gradient(var(--ring-color, var(--green-bright)) calc(var(--pct) * 1%), #e6ede2 0); }
.score-ring::before { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%; }
.score-ring .val { position: relative; font-family: var(--display); font-size: 2.3rem; font-weight: 700; color: var(--ink); }
.score-ring .val small { display: block; font-size: .62rem; font-weight: 700; color: var(--muted); letter-spacing: .18em; font-family: var(--body); }

/* ---------- Question editor ---------- */
.opt-editor-row { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.opt-editor-top { display: flex; align-items: center; gap: 10px; }
.opt-editor-top input[type=text] { flex: 1; }
.opt-editor-row .correct-toggle { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .84rem; font-weight: 500; }
.opt-editor-row .correct-toggle input { accent-color: var(--green); }
.opt-feedback-input { min-height: 52px; font-size: .87rem; background: #fff; }

.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state .big { font-size: 2.6rem; margin-bottom: 10px; }

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 18px; } .mb-2 { margin-bottom: 18px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Footer ---------- */
.sitefooter { background: var(--forest); color: var(--sage); margin-top: 40px; }
.sitefooter .foot-inner { max-width: 1080px; margin: 0 auto; padding: 34px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sitefooter img { height: 54px; }
.sitefooter .tagline { font-family: var(--display); font-weight: 600; color: #fff; font-size: 1rem; }
.sitefooter .tag-sub { color: var(--gold); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; margin-top: 3px; }
.sitefooter .foot-meta { font-size: .82rem; text-align: right; }

/* =========================================================================
   CERTIFICADO
   ========================================================================= */
.certificate {
  background: #fff; position: relative; max-width: 940px; margin: 0 auto; padding: 40px 64px 30px;
  border-radius: 14px; box-shadow: var(--shadow); text-align: center; overflow: hidden;
  border: 1px solid var(--line);
}
.certificate::before { content: ""; position: absolute; inset: 0; border: 12px solid var(--forest); border-radius: 14px; pointer-events: none; }
.certificate::after { content: ""; position: absolute; inset: 21px; border: 1.5px solid var(--gold); border-radius: 6px; pointer-events: none; }
.cert-inner { position: relative; z-index: 1; }

/* Marca d'água sutil do ícone atrás do conteúdo — dá um ar mais "oficial". */
.cert-watermark {
  position: absolute; z-index: 0; top: 50%; left: 50%; width: 560px; height: 560px;
  transform: translate(-50%, -50%); opacity: .05; pointer-events: none;
}

/* Cantos decorativos, discretos, nos quatro vértices do quadro interno. */
.cert-corner { position: absolute; z-index: 1; width: 34px; height: 34px; border: 2px solid var(--gold); opacity: .8; }
.cert-corner.tl { top: 30px; left: 30px; border-right: 0; border-bottom: 0; }
.cert-corner.tr { top: 30px; right: 30px; border-left: 0; border-bottom: 0; }
.cert-corner.bl { bottom: 30px; left: 30px; border-right: 0; border-top: 0; }
.cert-corner.br { bottom: 30px; right: 30px; border-left: 0; border-top: 0; }

.cert-logo { height: 76px; margin-bottom: 6px; }
.cert-title { font-family: var(--display); font-size: 2.1rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-deep); margin: 0 0 4px; }
.cert-title-rule { width: 64px; height: 3px; background: var(--gold); border-radius: 2px; margin: 0 auto 16px; }
.cert-name { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--ink); margin: 14px 0 6px; border-bottom: 2px solid var(--gold-soft); display: inline-block; padding: 0 28px 6px; }
.cert-body { font-size: 1.02rem; color: var(--ink); max-width: 640px; margin: 10px auto 0; line-height: 1.55; }
.cert-course { font-weight: 700; color: var(--green); }
.cert-footer { display: flex; justify-content: center; align-items: flex-end; margin-top: 26px; gap: 60px; }
.cert-sign { text-align: center; flex: 0 1 220px; }
.cert-sign-img { height: 46px; max-width: 190px; object-fit: contain; margin-bottom: -4px; }
.cert-sign .line { border-top: 1.5px solid var(--ink); padding-top: 6px; font-weight: 600; font-family: var(--display); }
.cert-sign small { color: var(--muted); }
.cert-seal {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 5px 16px;
  border: 1px solid var(--gold-soft); border-radius: 999px; background: var(--surface-2);
}
.cert-seal .seal-icon { font-size: 1rem; }
.cert-meta { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.cert-tag { font-family: var(--display); color: var(--green); font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-top: 8px; }

.print-bar { text-align: center; margin: 22px 0; }

@media print {
  .topbar, .sitefooter, .print-bar, .no-print { display: none !important; }
  body { background: #fff; }
  .container { padding: 0; max-width: none; }
  .certificate { border: none; box-shadow: none; margin: 0; max-width: none; }
  @page { size: 297mm 210mm; margin: 10mm; }
}

/* =========================================================================
   APOSTILA (página de leitura — conteúdo convertido do PDF)
   ========================================================================= */
.apostila-cover {
  background: linear-gradient(120deg, var(--forest), var(--green-deep));
  color: #fff; border-radius: 20px; padding: 40px 36px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.apostila-cover::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: var(--forest-3); opacity: .4; top: -160px; right: -100px; }
.apostila-cover .kicker { position: relative; z-index: 1; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; color: var(--gold); }
.apostila-cover h1 { position: relative; z-index: 1; color: #fff; margin: 10px 0 8px; }
.apostila-cover p { position: relative; z-index: 1; color: var(--sage); max-width: 640px; margin: 0; }

.apostila-toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; margin-bottom: 28px; }
.apostila-toc a {
  display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 11px; padding: 13px 15px; text-decoration: none; color: var(--ink); transition: border-color .12s, background .12s;
}
.apostila-toc a:hover { background: var(--surface-2); text-decoration: none; border-left-color: var(--gold); }
.apostila-toc .n { font-family: var(--display); font-weight: 700; color: var(--green); font-size: .78rem; letter-spacing: .06em; }
.apostila-toc .t { display: block; font-weight: 600; font-size: .9rem; margin-top: 2px; }

.apostila-part {
  background: linear-gradient(120deg, var(--forest), var(--forest-2)); color: #fff;
  border-radius: 18px; padding: 30px 32px; margin: 40px 0 22px; position: relative; overflow: hidden; scroll-margin-top: 90px;
}
.apostila-part::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--forest-3); opacity: .45; bottom: -140px; right: -60px; }
.apostila-part .num { position: relative; z-index: 1; font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: var(--gold); line-height: 1; opacity: .9; }
.apostila-part .label { position: relative; z-index: 1; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .74rem; color: var(--gold); margin-top: 6px; }
.apostila-part h2 { position: relative; z-index: 1; color: #fff; font-size: 1.7rem; margin: 4px 0 8px; }
.apostila-part p { position: relative; z-index: 1; color: var(--sage); margin: 0; max-width: 620px; }

.apostila-sub { scroll-margin-top: 90px; margin-bottom: 22px; }
.apostila-sub .sub-eyebrow { font-family: var(--display); font-weight: 700; color: var(--green); font-size: .82rem; letter-spacing: .04em; }
.apostila-sub h3 { margin: 2px 0 12px; font-size: 1.28rem; }
.apostila-sub p { color: var(--ink); line-height: 1.75; }
.apostila-sub p.lead { font-weight: 600; font-size: 1.03rem; }

.callout {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 16px 19px; margin: 18px 0; font-size: .93rem; line-height: 1.65;
}
.callout .callout-label { display: block; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; color: var(--gold-deep); margin-bottom: 6px; }
.callout.green { border-left-color: var(--green-bright); }
.callout.green .callout-label { color: var(--green); }

.step-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); margin: 16px 0; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.step-card .sn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--display); font-weight: 700; font-size: .82rem; margin-bottom: 8px; }
.step-card h4 { margin: 0 0 5px; font-size: .96rem; font-family: var(--display); }
.step-card p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.55; }

.value-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); margin: 16px 0; }
.value-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 12px; padding: 16px 17px; }
.value-card h4 { margin: 0 0 6px; font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gold-deep); font-family: var(--body); }
.value-card p { margin: 0; font-size: .92rem; color: var(--ink); line-height: 1.6; }

.mini-table-wrap { overflow-x: auto; margin: 16px 0; }
.mini-table-wrap table { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.mini-table-wrap th, .mini-table-wrap td { padding: 11px 13px; border-bottom: 1px solid var(--line-2); text-align: left; }
.mini-table-wrap th { background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sage-2); }
.mini-table-wrap tr:last-child td { border-bottom: 0; }

.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item .q { font-weight: 700; color: var(--green-deep); margin-bottom: 6px; }
.faq-item .a { color: var(--ink); font-size: .93rem; line-height: 1.65; margin: 0; }

.glossary-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.gloss-term { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; }
.gloss-term dt { font-family: var(--display); font-weight: 700; color: var(--green); font-size: .9rem; }
.gloss-term dd { margin: 4px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.55; }

.checklist-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-deep); font-family: var(--body); margin: 18px 0 8px; }
.checklist-group h4:first-child { margin-top: 0; }
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: .92rem; }
.check-item .ck { flex: 0 0 auto; width: 19px; height: 19px; border-radius: 5px; background: var(--green-bright); color: #fff; display: grid; place-items: center; font-size: .72rem; margin-top: 1px; }

.signature-box {
  text-align: center; padding: 26px 24px; background: linear-gradient(120deg, var(--forest), var(--forest-2)); color: #fff;
  border-radius: 16px; margin: 30px 0; position: relative; overflow: hidden;
}
.signature-box::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--forest-3); opacity: .4; top: -140px; left: -80px; }
.signature-box p { position: relative; z-index: 1; font-family: var(--display); font-size: 1.15rem; font-weight: 600; margin: 0; max-width: 560px; margin: 0 auto; line-height: 1.5; }
.signature-box .tag { position: relative; z-index: 1; color: var(--gold); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; margin-top: 12px; display: block; }

.apostila-jump { position: sticky; top: 78px; z-index: 15; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.apostila-jump a { font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--green-deep); }
.apostila-jump a:hover { background: var(--green-100); text-decoration: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .hero { padding: 36px 24px; }
  .topbar-inner { padding: 12px 16px; }
  .brand-text .b2 { display: none; }
  .container { padding: 24px 16px 60px; }
  .page-head { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
