/* =========================================================
   GPTEA — Guia Pedagógico Prático (site digital)
   Etapa 1 — Estrutura base e layout
   ========================================================= */

/* ---------- Tokens de design ---------- */
:root {
  /* Marca */
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #e6f4f2;
  --brand-line: #c8e6e1;

  /* Texto e superfícies */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e6e9ee;
  --bg: #ffffff;
  --bg-soft: #f7f9fa;
  --surface: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, .08);

  /* Níveis de suporte (cor da paleta do próprio guia) */
  --n1: #15803d; --n1-bg: #e9f7ee;
  --n2: #b45309; --n2-bg: #fdf3e3;
  --n3: #b91c1c; --n3-bg: #fdecec;

  /* Família / apoio familiar */
  --family: #6d28d9;
  --family-bg: #f6f2fe;
  --family-line: #e3d8fb;

  /* Acento por dimensão (identidade visual dos capítulos 1–7) */
  --accent-1: #2563eb; --accent-1-soft: #e8effd;
  --accent-2: #7c3aed; --accent-2-soft: #f1ebfe;
  --accent-3: #db2777; --accent-3-soft: #fdebf3;
  --accent-4: #ea580c; --accent-4-soft: #fdeee4;
  --accent-5: #0891b2; --accent-5-soft: #e4f5f9;
  --accent-6: #16a34a; --accent-6-soft: #e7f6ec;
  --accent-7: #4f46e5; --accent-7-soft: #ecebfd;

  /* Métricas */
  --sidebar-w: 300px;
  --topbar-h: 60px;
  --content-max: 880px;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Escala de texto controlada pelo usuário (barra de acessibilidade) */
  font-size: calc(100% * var(--font-scale, 1));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.35em; }
li { margin-bottom: .4em; }

/* Acessibilidade: foco visível */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Atalhos de acessibilidade (skip links) */
.skip-links {
  position: fixed;
  top: -140px;
  left: 12px;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  transition: top .2s ease;
}
.skip-links:focus-within { top: 12px; }
.skip-link {
  background: var(--brand-strong);
  color: #fff;
  padding: .55rem .95rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .92rem;
  box-shadow: var(--shadow-md);
}
.skip-link:focus,
.skip-link:focus-visible { text-decoration: none; outline: 3px solid #fff; outline-offset: 2px; }

/* Utilitário: conteúdo apenas para leitores de tela */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Indicador de link que abre em nova aba (somente leitor de tela) */
a[target="_blank"]::after {
  content: " (abre em nova aba)";
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Barra de progresso de leitura */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 120;
  pointer-events: none;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transition: width .1s linear;
}

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.brand {
  padding: 1.4rem 1.4rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.brand__mark {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.brand__glyph {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.brand__name { font-weight: 700; color: var(--ink); font-size: 1.02rem; letter-spacing: -.01em; }
.brand__sub { display: block; font-size: .76rem; color: var(--muted); font-weight: 500; margin-top: 1px; }

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem .8rem 1.4rem;
  scrollbar-width: thin;
}
.nav__group-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 1.15rem .6rem .45rem;
}
.nav__group-label:first-child { margin-top: .2rem; }

.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }

.nav__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: .925rem;
  font-weight: 500;
  line-height: 1.35;
  transition: background .15s ease, color .15s ease;
}
.nav__link:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav__link[aria-current="true"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}
.nav__num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}
.nav__link[aria-current="true"] .nav__num {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.sidebar__foot {
  padding: .9rem 1.4rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.5;
}

/* =========================================================
   Topbar (mobile)
   ========================================================= */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  align-items: center;
  gap: .75rem;
  padding: 0 1rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 90;
}
.topbar__title { font-weight: 700; color: var(--ink); font-size: .98rem; letter-spacing: -.01em; }
.topbar__brand { display: flex; align-items: center; gap: .55rem; }
.topbar__brand .brand__glyph { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; font-size: .82rem; }

.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.menu-btn:hover { background: var(--bg-soft); }
.menu-btn svg { width: 20px; height: 20px; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 95;
}
.overlay.is-visible { opacity: 1; visibility: visible; }

/* =========================================================
   Conteúdo
   ========================================================= */
.content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}
.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Cabeçalho / capa */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.4rem, 5vw, 3.4rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 340px at 88% -10%, var(--brand-soft), transparent 62%),
    var(--bg);
  overflow: hidden;
}
.hero__inner { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: .35rem .7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  line-height: 1.12;
  margin-bottom: .5rem;
}
.hero__acronym { color: var(--brand-strong); }
.hero__lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .92rem;
  color: var(--muted);
}
.hero__meta li { display: flex; gap: .45rem; align-items: baseline; margin: 0; }
.hero__meta strong { color: var(--ink); font-weight: 600; }

/* Autoria (estilo de periódico) */
.hero__authors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .7rem;
  margin: 0 0 1.3rem;
  font-size: 1.02rem;
  color: var(--ink-2);
}
.hero__authors-label { font-weight: 600; color: var(--muted); }
.hero__author {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: var(--ink);
}
.hero__authors-sep { color: var(--muted); }
.lattes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid var(--brand-line);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lattes:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.lattes img { width: 16px; height: 16px; object-fit: contain; display: block; }

/* Como citar (ABNT / APA) */
.cite { margin: 0 0 1.4rem; }
.cite__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .95rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cite__toggle:hover { background: #dcefec; border-color: var(--brand); box-shadow: var(--shadow-sm); }
.cite__toggle svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cite__toggle[aria-expanded="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.cite__panel {
  display: grid;
  gap: .8rem;
  margin-top: .9rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.cite__panel[hidden] { display: none; }
.cite__block { margin: 0; }
.cite__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.cite__style {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.cite__text { margin: 0; font-size: .93rem; line-height: 1.6; color: var(--ink-2); }
.cite__copy {
  flex: 0 0 auto;
  padding: .3rem .65rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cite__copy:hover { border-color: var(--brand-line); color: var(--brand-strong); background: var(--brand-soft); }
.cite__copy.is-copied { color: var(--n1); border-color: var(--n1); background: var(--n1-bg); }

/* Seções */
.section { padding: clamp(2.6rem, 5vw, 4.2rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--topbar-h) + 8px); }
.section:last-of-type { border-bottom: 0; }
.section__kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: .5rem;
}
.section h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
.section__lead { font-size: 1.06rem; color: var(--ink-2); max-width: 62ch; }

/* Cartão "em construção" (usado nas etapas seguintes) */
.placeholder {
  margin-top: 1.6rem;
  border: 1px dashed var(--brand-line);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  color: var(--muted);
  font-size: .95rem;
}
.placeholder strong { color: var(--brand-strong); }

/* ---------- Componentes de conteúdo ---------- */
.lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink);
}

/* Caixa de destaque */
.callout {
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: .98rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout__title {
  font-weight: 700;
  color: var(--brand-strong);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}

/* Etiquetas (marcos normativos) */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--brand-line);
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 999px;
}

/* Passos numerados */
.steps { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1rem; }
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.step__num {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
}
.step__title { font-size: 1.02rem; margin: 0 0 .3rem; }
.step p { margin: 0; font-size: .96rem; color: var(--ink-2); }

/* Níveis de suporte (pills) */
.levels { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.6rem 0 .7rem; }
.level {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: .9rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.level--1 { color: var(--n1); background: var(--n1-bg); border-color: #c7e9d3; }
.level--2 { color: var(--n2); background: var(--n2-bg); border-color: #f2ddb8; }
.level--3 { color: var(--n3); background: var(--n3-bg); border-color: #f4c9c9; }
.levels__note { font-size: .9rem; color: var(--muted); margin-bottom: 0; }

/* ---------- Capítulos: níveis, fatos, atividades ---------- */

/* Bloco de nível de suporte */
.level-block { margin-top: 2.8rem; }
.level-block__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: .9rem;
}
.level-block__head h3 { margin: 0; font-size: 1.3rem; }

.level-badge {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .32rem .62rem;
  border-radius: 6px;
  white-space: nowrap;
}
.level-badge--1 { color: var(--n1); background: var(--n1-bg); border: 1px solid #c7e9d3; }
.level-badge--2 { color: var(--n2); background: var(--n2-bg); border: 1px solid #f2ddb8; }
.level-badge--3 { color: var(--n3); background: var(--n3-bg); border: 1px solid #f4c9c9; }

/* Blocos informativos (características / orientação) */
.facts { display: grid; gap: .9rem; margin: 1.3rem 0; }
.fact {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}
.fact__label {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin: 0 0 .35rem;
}
.fact p { margin: 0; font-size: .97rem; }
.fact p + p { margin-top: .55rem; }
.fact ul { margin: 0; padding-left: 1.15rem; font-size: .97rem; }
.fact ul li + li { margin-top: .4rem; }
.fact strong { color: var(--ink); }

/* Cartão de atividade */
.activity {
  margin: 1.2rem 0;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.activity__eyebrow {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin: 0 0 .25rem;
}
.activity__title { font-size: 1.12rem; margin: 0 0 .95rem; }
.activity__field { margin-bottom: .85rem; }
.activity__field:last-child { margin-bottom: 0; }
.activity__label {
  display: block;
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .2rem;
}
.activity__field p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.activity__field ul { margin: .25rem 0 0; padding-left: 1.15rem; font-size: .96rem; }
.activity__field li + li { margin-top: .35rem; }
.activity__field--note {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  padding: .75rem .9rem;
}

/* ---------- Carrossel de atividades ---------- */
.carousel { margin: 1.4rem 0 1.6rem; }
.carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0 6px;
  outline-offset: 3px;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
}
.carousel__slide .activity {
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
}

.carousel__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .85rem;
}
.carousel__btn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-strong);
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.carousel__btn:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.carousel__btn:disabled { opacity: .35; cursor: default; background: var(--surface); border-color: var(--line); }
.carousel__btn svg { width: 18px; height: 18px; }

.carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.carousel__dot {
  width: 9px; height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.carousel__dot:hover { background: var(--muted); }
.carousel__dot.is-active { background: var(--brand); transform: scale(1.3); }

/* Apoio familiar */
.support {
  margin: 1.3rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--family-bg);
  border: 1px solid var(--family-line);
  border-left: 4px solid var(--family);
  border-radius: var(--radius-sm);
}
.support__label {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--family);
  margin: 0 0 .3rem;
}
.support p { margin: 0; font-size: .96rem; color: var(--ink-2); }

/* Reflexão / considerações de fechamento do capítulo */
.reflection {
  margin-top: 2.8rem;
  padding: 1.5rem 1.6rem;
  background: linear-gradient(180deg, var(--brand-soft), #ffffff);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
}
.reflection__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.15rem;
  margin: 0 0 .7rem;
}
.reflection__title::before {
  content: "";
  width: 6px;
  height: 1.15rem;
  border-radius: 3px;
  background: var(--brand);
}
.reflection p:last-child { margin-bottom: 0; }

/* Subseções de capítulo (Cap. 4, 5, 6 e 7) */
.blk { margin-top: 2.8rem; }
.blk > h3 { font-size: 1.3rem; margin: 0 0 .7rem; }

/* Lista de campos de registro (instrumentos) */
.formlist { list-style: none; margin: .8rem 0 1.2rem; padding: 0; display: grid; gap: .5rem; }
.formlist li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .85rem;
  font-size: .93rem;
  color: var(--ink-2);
}
.formlist li strong { color: var(--ink); }

/* Lista de perguntas / passos */
.qlist { margin: .6rem 0 1.2rem; padding-left: 1.35rem; }
.qlist li { margin-bottom: .5rem; font-size: .97rem; }
.qlist strong { color: var(--ink); }

/* Considerações finais (prosa de encerramento) */
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }

/* Lista de referências bibliográficas */
.refs {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: .85rem;
  max-width: 74ch;
}
.refs li {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-2);
  border-left: 3px solid var(--brand-line);
  padding: .1rem 0 .1rem 1rem;
}
.refs a {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.refs a:hover { color: var(--brand); }

/* Anexos — instrumentos de registro (PEI e acompanhamento) */
.form { margin-top: 2rem; display: grid; gap: 1.3rem; }
.form__block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 1.1rem 1.25rem 1.35rem;
}
.form__title {
  font-size: 1.02rem;
  color: var(--brand-strong);
  margin: 0 0 .9rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.form__prompt { font-size: .95rem; color: var(--ink-2); margin: 0 0 .6rem; }
.form__fields { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.form__field { display: flex; align-items: baseline; gap: .6rem; }
.form__label { flex: 0 0 auto; font-weight: 600; color: var(--ink); font-size: .94rem; }
.form__line {
  flex: 1 1 auto;
  min-width: 4rem;
  border-bottom: 1px solid #cbd5e1;
  height: 1.1em;
}
.form__field--stacked { display: block; }
.form__field--stacked .form__label { display: block; margin-bottom: .5rem; }
.form__write { display: block; height: 2.4rem; border-bottom: 1px solid #cbd5e1; }
.form__write + .form__write { margin-top: 1.1rem; }
.form__notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.form__notes li { font-size: .94rem; color: var(--ink-2); }
.form__notes strong { color: var(--ink); }
.form__notes .form__line { display: inline-block; flex: none; width: 9rem; vertical-align: baseline; }

/* =========================================================
   Ferramentas da barra lateral (busca, filtro, impressão)
   ========================================================= */
.side-tools {
  padding: .9rem 1.1rem 1rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: .75rem;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .45rem .6rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.search:focus-within {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.search svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.search__results {
  list-style: none;
  margin: 0;
  padding: .3rem;
  display: grid;
  gap: .1rem;
  max-height: 42vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.search__results li { margin: 0; }
.search__results a {
  display: block;
  padding: .45rem .55rem;
  border-radius: 8px;
  font-size: .86rem;
  line-height: 1.3;
  color: var(--ink-2);
}
.search__results a:hover { background: var(--brand-soft); color: var(--brand-strong); text-decoration: none; }
.search__results a mark { background: transparent; color: var(--brand); font-weight: 700; }
.search__results a .search__context { color: var(--muted); font-size: .92em; }
.search__results[hidden] { display: none; }
.search__empty { padding: .5rem .55rem; font-size: .85rem; color: var(--muted); }

.side-tools__row { display: grid; gap: .45rem; }
.side-tools__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.level-filter { display: flex; flex-wrap: wrap; gap: .35rem; }
.level-filter__btn {
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.level-filter__btn:hover { background: var(--bg-soft); }
.level-filter__btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Barra de acessibilidade ---------- */
.a11y { display: flex; flex-wrap: wrap; gap: .35rem; }
.a11y__btn {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 36px;
  padding: 0 .55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.a11y__btn:hover { background: var(--bg-soft); border-color: var(--brand); }
.a11y__btn:disabled { opacity: .45; cursor: not-allowed; }
.a11y__btn:disabled:hover { background: var(--surface); border-color: var(--line); }
.a11y__btn--icon { padding: 0; width: 40px; }
.a11y__btn--icon svg { width: 18px; height: 18px; }
.a11y__btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.a11y__status {
  font-size: .74rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}

/* ---------- Modo escuro (separado do alto contraste) ---------- */
html[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #131c26;
  --bg-soft: #0b1219;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --muted: #9aa8ba;
  --line: #24303d;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-soft: #10302e;
  --brand-line: #1d4d49;

  --n1: #4ade80; --n1-bg: #0c2b16;
  --n2: #fbbf24; --n2-bg: #33240a;
  --n3: #f87171; --n3-bg: #33100f;

  --family: #c4b5fd; --family-bg: #1e1b33; --family-line: #3b3568;

  --accent-1: #60a5fa; --accent-1-soft: #14233b;
  --accent-2: #c4b5fd; --accent-2-soft: #241c3d;
  --accent-3: #f9a8d4; --accent-3-soft: #3d1530;
  --accent-4: #fdba74; --accent-4-soft: #3d2210;
  --accent-5: #67e8f9; --accent-5-soft: #0b2f38;
  --accent-6: #86efac; --accent-6-soft: #0d3320;
  --accent-7: #a5b4fc; --accent-7-soft: #1a1e3d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 6px 22px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .topbar { background: rgba(15, 23, 32, .92); }
html[data-theme="dark"] .brand__glyph {
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  color: #04211e;
}
html[data-theme="dark"] .skip-link { color: #04211e; }
html[data-theme="dark"] .level-filter__btn.is-active,
html[data-theme="dark"] .a11y__btn[aria-pressed="true"],
html[data-theme="dark"] .print-btn:hover,
html[data-theme="dark"] .nav__link[aria-current="true"] .nav__num { color: #04211e; }

/* ---------- Tema de alto contraste ---------- */
html[data-theme="contrast"] {
  --bg: #000000;
  --surface: #000000;
  --bg-soft: #121212;
  --ink: #ffffff;
  --ink-2: #f2f2f2;
  --muted: #d6d6d6;
  --line: #8f8f8f;
  --brand: #ffd400;
  --brand-strong: #ffdf4d;
  --brand-soft: #1c1c1c;
  --brand-line: #ffd400;

  --n1: #4ade80; --n1-bg: #052e16;
  --n2: #fbbf24; --n2-bg: #3b2600;
  --n3: #f87171; --n3-bg: #3b0a0a;

  --family: #c4b5fd; --family-bg: #1e1b33; --family-line: #8b7be0;

  --accent-1: #7ab8ff; --accent-1-soft: #0a1e3d;
  --accent-2: #c4b5fd; --accent-2-soft: #221a3d;
  --accent-3: #f9a8d4; --accent-3-soft: #3d0f2a;
  --accent-4: #fdba74; --accent-4-soft: #3d1f08;
  --accent-5: #67e8f9; --accent-5-soft: #08303a;
  --accent-6: #86efac; --accent-6-soft: #08331a;
  --accent-7: #a5b4fc; --accent-7-soft: #14173d;

  --shadow-sm: 0 0 0 1px var(--line);
  --shadow-md: 0 0 0 2px var(--line);
}
html[data-theme="contrast"] .topbar { background: var(--surface); backdrop-filter: none; }
html[data-theme="contrast"] .brand__glyph { background: var(--brand); color: #000; }
html[data-theme="contrast"] .skip-link { color: #000; }
html[data-theme="contrast"] .hero {
  background: radial-gradient(1100px 340px at 88% -10%, #1c1c1c, transparent 62%), var(--bg);
}
html[data-theme="contrast"] .level-filter__btn.is-active,
html[data-theme="contrast"] .a11y__btn[aria-pressed="true"],
html[data-theme="contrast"] .print-btn:hover,
html[data-theme="contrast"] .nav__link[aria-current="true"] .nav__num { color: #000; }

/* Respeita preferência de contraste do sistema operacional */
@media (prefers-contrast: more) {
  :root { --line: #94a3b8; --muted: #475569; }
}

.print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .55rem .8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.print-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.print-btn svg { width: 16px; height: 16px; }

/* Botão de impressão na topbar (mobile) */
.topbar-print {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
}
.topbar-print:hover { background: var(--bg-soft); }
.topbar-print svg { width: 20px; height: 20px; }

/* Filtro por nível: blocos ocultados */
.level-block.is-hidden { display: none; }

/* =========================================================
   Identidade visual — capa e dimensões
   ========================================================= */
.dims { margin-top: 2.6rem; }
.dims__label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.dims-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.dims-grid li { margin: 0; }
.dim-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  height: 100%;
  padding: .85rem .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dim-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.dim-card__icon {
  flex: 0 0 38px;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.dim-card__icon svg { width: 20px; height: 20px; }
.dim-card__body { display: flex; flex-direction: column; min-width: 0; }
.dim-card__num {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent);
}
.dim-card__title { font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* Ícone junto ao rótulo do capítulo */
.section__kicker { display: flex; align-items: center; gap: .45rem; }
.kicker-icon { width: 1.05em; height: 1.05em; flex: none; }

/* Realce de cor por dimensão na navegação lateral */
.nav__list--dims li:nth-child(1) { --nav-accent: var(--accent-1); --nav-soft: var(--accent-1-soft); }
.nav__list--dims li:nth-child(2) { --nav-accent: var(--accent-2); --nav-soft: var(--accent-2-soft); }
.nav__list--dims li:nth-child(3) { --nav-accent: var(--accent-3); --nav-soft: var(--accent-3-soft); }
.nav__list--dims li:nth-child(4) { --nav-accent: var(--accent-4); --nav-soft: var(--accent-4-soft); }
.nav__list--dims li:nth-child(5) { --nav-accent: var(--accent-5); --nav-soft: var(--accent-5-soft); }
.nav__list--dims li:nth-child(6) { --nav-accent: var(--accent-6); --nav-soft: var(--accent-6-soft); }
.nav__list--dims li:nth-child(7) { --nav-accent: var(--accent-7); --nav-soft: var(--accent-7-soft); }
.nav__list--dims .nav__num {
  color: var(--nav-accent);
  background: var(--nav-soft);
  border-color: transparent;
}
.nav__list--dims .nav__link[aria-current="true"] { background: var(--nav-soft); color: var(--nav-accent); }
.nav__list--dims .nav__link[aria-current="true"] .nav__num {
  background: var(--nav-accent);
  color: #fff;
}

/* Rodapé */
.footer {
  margin-left: var(--sidebar-w);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 2.8rem;
}
.footer__inner { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
.footer p { font-size: .88rem; color: var(--muted); margin: 0 0 .35rem; }
.footer strong { color: var(--ink); }

/* Botão voltar ao topo */
.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 80;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-soft); }
.to-top svg { width: 20px; height: 20px; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1024px) {
  .topbar { display: flex; }
  .content { margin-left: 0; padding-top: var(--topbar-h); }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-md);
    width: min(88vw, 330px);
  }
  .sidebar.is-open { transform: none; }
  .hero { padding-top: clamp(2.2rem, 7vw, 3.2rem); }
}

@media (max-width: 560px) {
  .hero__meta { flex-direction: column; gap: .35rem; }
}

/* =========================================================
   Impressão
   ========================================================= */
@media print {
  .sidebar, .topbar, .progress, .to-top, .overlay, .skip-link,
  .side-tools, .dims, .topbar-print, .menu-btn, .cite__toggle, .cite__copy { display: none !important; }
  /* Impressão sempre com as citações visíveis */
  .cite__panel, .cite__panel[hidden] { display: grid !important; }
  .content { margin: 0; padding: 0; }
  .section { break-inside: avoid; }
  /* Impressão sempre com o guia completo, independente do filtro ativo */
  .level-block.is-hidden { display: block !important; }
  /* Carrossel vira lista vertical para imprimir todas as atividades */
  .carousel__nav { display: none !important; }
  .carousel__viewport { overflow: visible !important; padding: 0 !important; }
  .carousel__track { display: block !important; }
  .carousel__slide { display: block !important; width: auto !important; min-width: 0 !important; }
  .carousel__slide + .carousel__slide { margin-top: 1.2rem; }
  .carousel__slide .activity { margin: 1.2rem 0 !important; }
  .callout, .activity, .fact, .level-badge, .chip, .dim-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* Impressão sempre em fundo claro, mesmo com tema escuro/alto contraste ativo */
  html[data-theme="dark"],
  html[data-theme="contrast"] {
    --bg: #ffffff; --surface: #ffffff; --bg-soft: #f7f9fa;
    --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e6e9ee;
    --brand: #0f766e; --brand-strong: #115e59; --brand-soft: #e6f4f2; --brand-line: #c8e6e1;
  }
  html[data-theme="dark"] .hero,
  html[data-theme="contrast"] .hero {
    background: radial-gradient(1100px 340px at 88% -10%, var(--brand-soft), transparent 62%), var(--bg);
  }
}
