* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1a2e;
  --bg-light: #242438;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --border: #333;
  --note-bg: #1e3a5f;
  --warning-bg: #5f3a1e;
  --tip-bg: #1e5f3a;
}

body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { background: var(--bg-light); border-bottom: 1px solid var(--border); padding: 1rem; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; }
.site-logo { font-size: 1.25rem; font-weight: bold; color: var(--text); }

.search-box { position: relative; }
#search-input { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 1rem; border-radius: 4px; width: 250px; }
#search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; margin-top: 4px; z-index: 100; }
#search-results.active { display: block; }
.search-result { display: block; padding: 0.75rem; border-bottom: 1px solid var(--border); }
.search-result:hover { background: var(--bg); }
.search-result-title { font-weight: bold; }
.search-no-results { padding: 1rem; color: var(--text-muted); }

.layout { display: flex; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 120px); }

.sidebar { width: 250px; background: var(--bg-light); border-right: 1px solid var(--border); padding: 1rem; }
.sidebar-nav { position: sticky; top: 1rem; }
.nav-section { margin-bottom: 1rem; }
.nav-section-title { font-weight: bold; color: var(--text); display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.nav-section-title:hover { color: var(--accent-light); text-decoration: none; }
.nav-pages { list-style: none; margin: 0.5rem 0 0 1rem; }
.nav-page { display: block; padding: 0.25rem 0; color: var(--text-muted); font-size: 0.9rem; }
.nav-page:hover { color: var(--accent-light); text-decoration: none; }

.main-content { flex: 1; padding: 2rem; max-width: 800px; }

.page h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--text); }
.page h2 { font-size: 1.5rem; margin: 2rem 0 1rem; color: var(--text); }
.page h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.page p { margin: 1rem 0; }
.page ul, .page ol { margin: 1rem 0 1rem 1.5rem; }
.page li { margin: 0.5rem 0; }
.page table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page th, .page td { border: 1px solid var(--border); padding: 0.75rem; text-align: left; }
.page th { background: var(--bg-light); }
.page code { background: var(--bg-light); padding: 0.2rem 0.4rem; border-radius: 3px; font-size: 0.9em; }
.page pre { background: var(--bg-light); padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 1rem 0; }
.page pre code { background: none; padding: 0; }

.note { padding: 1rem; border-radius: 6px; margin: 1rem 0; display: flex; gap: 1rem; }
.note-icon { font-size: 1.25rem; }
.note-content { flex: 1; }
.note.tip { background: var(--tip-bg); }
.note.warning { background: var(--warning-bg); }
.note.default { background: var(--note-bg); }

kbd { background: var(--bg-light); border: 1px solid var(--border); border-radius: 3px; padding: 0.2rem 0.5rem; font-size: 0.85em; font-family: monospace; }

.page-meta { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; gap: 1rem; font-size: 0.9rem; color: var(--text-muted); }
.dificuldade { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8rem; }
.dificuldade.iniciante { background: #1e5f3a; }
.dificuldade.intermediário { background: #5f5f1e; }
.dificuldade.avançado { background: #5f1e3a; }

.toc { background: var(--bg-light); padding: 1rem; border-radius: 6px; margin-bottom: 2rem; }
.toc h2 { font-size: 1rem; margin-bottom: 0.5rem; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin: 0.25rem 0; }
.toc a { color: var(--text-muted); font-size: 0.9rem; }

.homepage { max-width: 900px; margin: 0 auto; padding: 2rem; }
.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-description { font-size: 1.25rem; color: var(--text-muted); }

.sections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.section-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; transition: border-color 0.2s; }
.section-card:hover { border-color: var(--accent); text-decoration: none; }
.section-card h2 { color: var(--text); margin-bottom: 0.5rem; }
.section-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.pages-count { font-size: 0.8rem; color: var(--accent-light); }

.site-footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid var(--border); margin-top: 2rem; }

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .main-content { padding: 1rem; }
}
/* --------------------------------------------------------------------------
   Componentes dos shortcodes

   Estas classes eram emitidas pelos shortcodes sem nenhuma regra no CSS que o
   HTML de fato carrega. O `zola build` devolve 0 nesse caso: nada no pipeline
   confere se a classe usada no template tem estilo. Um `style.css` de 27 KB
   existia em `static/`, mas era o stylesheet do guia Inkscape, copiado junto
   no commit inicial e nunca referenciado por template nenhum.
   -------------------------------------------------------------------------- */

.tip, .warning {
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
}
.tip { background: var(--tip-bg); }
.warning { background: var(--warning-bg); }
.tip-icon, .warning-icon { font-size: 1.25rem; }
.note-body, .tip-body, .warning-body { flex: 1; min-width: 0; }
.note-body > *:last-child,
.tip-body > *:last-child,
.warning-body > *:last-child { margin-bottom: 0; }

/* Espinha didática: uma caixa por seção, distinguidas pela borda. */
.objetivos, .pre-requisitos, .armadilhas, .desafio, .feynman, .por-que,
.quiz, .recap, .relacionados {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-light);
}
.objetivos h2, .pre-requisitos h2, .armadilhas h2, .desafio h2, .feynman h2,
.por-que h2, .quiz h2, .recap h2, .relacionados h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.objetivos ul, .pre-requisitos ul, .armadilhas ul, .quiz ul, .recap ul,
.relacionados ul { margin: 0 0 0 1.25rem; }
.objetivos li, .pre-requisitos li, .armadilhas li, .quiz li, .recap li,
.relacionados li { margin: 0.25rem 0; }
.objetivos > *:last-child, .pre-requisitos > *:last-child,
.armadilhas > *:last-child, .desafio > *:last-child, .feynman > *:last-child,
.por-que > *:last-child, .quiz > *:last-child, .recap > *:last-child,
.relacionados > *:last-child { margin-bottom: 0; }
.armadilhas { border-left-color: #d97706; }
.desafio { border-left-color: #dc2626; }
.feynman { border-left-color: #0891b2; }
.por-que { border-left-color: #16a34a; }

.code-block { margin: 1rem 0; border-radius: 6px; overflow: hidden; }
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.code-header .filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.code-block pre { margin: 0; border-radius: 0; }

.figure, .svg-diagram, .gimp-screenshot { margin: 1.5rem 0; text-align: center; }
.figure img, .svg-diagram svg, .gimp-screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.figure figcaption, .svg-diagram figcaption, .gimp-screenshot figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tabs { margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.tab-buttons { display: flex; overflow-x: auto; background: var(--bg-light); border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent-light); border-bottom: 2px solid var(--accent); }
.tab-content { background: var(--bg); }
.tab-panel { display: none; padding: 1rem; }
.tab-panel.active { display: block; }

.term-link { border-bottom: 1px dotted var(--accent-light); cursor: help; }
.gimp-version {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-light);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.gimp-project-link { border-bottom: 1px solid var(--accent-light); }
