/* ── Reset & Box Model ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tipografia & Base ─────────────────────────────────────────────────── */
:root {
  --color-text:     #1a1a2e;
  --color-muted:    #6b7280;
  --color-border:   #e5e7eb;
  --color-bg-soft:  #f8fafc;
  --color-primary:  #2563eb;
  --color-cta:      #16a34a;
  --color-cta-hover:#15803d;
  --color-accent-bg:#eff6ff;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-w: 780px;
  --gap: 1.5rem;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
  background: #fff;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

@media (min-width: 600px) {
  body { padding: 2rem 1.5rem; }
}

/* ── Header ────────────────────────────────────────────────────────────── */
header {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}
header a {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
header a:hover { text-decoration: underline; }

/* ── Headings ──────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: #111827;
}
h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.25rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border);
  color: #111827;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
  color: #374151;
}

/* ── Prose ─────────────────────────────────────────────────────────────── */
p { margin-bottom: 1rem; }

article ul, article ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
article li { margin-bottom: 0.3rem; }

article a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
article a:hover { opacity: 0.8; }

blockquote {
  border-left: 4px solid var(--color-primary);
  background: var(--color-accent-bg);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0 6px 6px 0;
  color: #374151;
  font-style: italic;
}

strong { font-weight: 700; }
code {
  background: var(--color-bg-soft);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "Fira Code", "Cascadia Code", Consolas, monospace;
}

img { max-width: 100%; height: auto; border-radius: 6px; }

/* ── Meta (data) ───────────────────────────────────────────────────────── */
.meta {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

/* ── Nota Geral (review) ───────────────────────────────────────────────── */
.nota-geral {
  background: var(--color-accent-bg);
  border-left: 4px solid var(--color-primary);
  padding: 0.875rem 1.25rem;
  margin: 1.75rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e40af;
}

/* ── CTA Afiliado ──────────────────────────────────────────────────────── */
.cta {
  margin: 2.5rem 0;
  text-align: center;
}
.cta a {
  background: var(--color-cta);
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-block;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}
.cta a:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

/* ── Lista de posts (home) ─────────────────────────────────────────────── */
.posts { list-style: none; }
.posts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.posts li a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
}
.posts li a:hover { text-decoration: underline; }
.posts .date {
  font-size: 0.8rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* ── TOC (Guia) ─────────────────────────────────────────────────────────── */
.toc {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
}
.toc strong { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-muted); }
.toc nav ul { margin: 0.5rem 0 0 1rem; }
.toc nav li { margin: 0.3rem 0; font-size: 0.95rem; }
.toc nav a { color: var(--color-primary); text-decoration: none; }
.toc nav a:hover { text-decoration: underline; }
