
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  color: var(--text); background: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
}
/* estrelas fixas (determinísticas, via gradientes) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--stars);
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, #fff, transparent 60%),
    radial-gradient(1px 1px at 22% 40%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2px 2px at 36% 8%, var(--brilho-ipe), transparent 60%),
    radial-gradient(1px 1px at 52% 28%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 66% 14%, #fff, transparent 60%),
    radial-gradient(1px 1px at 78% 46%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 20%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 14% 66%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 78%, #fff, transparent 60%),
    radial-gradient(1px 1px at 72% 84%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2px 2px at 94% 70%, var(--brilho-ipe), transparent 60%),
    radial-gradient(1px 1px at 4% 92%, rgba(255,255,255,.6), transparent 60%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--hover-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brilho-ipe); color: var(--espaco); padding: 12px 14px; min-height: 44px; box-sizing: border-box; border-radius: var(--radius-pill); font-weight: 800; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.kicker { font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; }
.lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--text-2); max-width: 36em; }
.muted { color: var(--text-2); }

/* cabeçalho */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: var(--radius-pill); font-weight: 700; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--glass-2); }

/* botões pílula com brilho */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: var(--radius-pill);
  font: 800 1rem var(--font-body); text-decoration: none; border: 0; cursor: pointer;
  color: var(--espaco); background: linear-gradient(180deg, #FFB07F, var(--brilho-coral)); box-shadow: var(--shadow-glow);
  transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); color: var(--espaco); box-shadow: 0 14px 34px rgba(255,158,107,.5); }
.btn[aria-disabled="true"] { cursor: not-allowed; opacity: .75; }
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: var(--shadow-glow); }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--glass-2); color: var(--hover-text); }

/* vidro */
.glass { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(18px, 4vw, 28px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* hero */
.hero { padding: 24px 0 56px; display: grid; gap: 28px; align-items: center; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-art { justify-self: center; width: min(60%, 260px); filter: drop-shadow(0 20px 40px rgba(255,216,74,.25)); }
@media (min-width: 820px) { .hero { grid-template-columns: 1.2fr .8fr; padding-top: 48px; } }
.soon { font-size: .9rem; color: var(--text-2); margin-top: 10px; }

section { padding: 44px 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }

/* tijolos / passos */
.step { display: flex; gap: 14px; align-items: flex-start; }
.brick { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: var(--espaco);
  background: linear-gradient(180deg, var(--brilho-coral), var(--barro)); transform: rotate(-6deg); box-shadow: 0 6px 16px rgba(200,100,47,.5); }
.brick.ipe { background: linear-gradient(180deg, var(--brilho-ipe), var(--ipe)); box-shadow: 0 6px 16px rgba(242,183,5,.4); }
.brick.mata { background: linear-gradient(180deg, var(--brilho-mata), #1E9E74); box-shadow: 0 6px 16px rgba(76,217,154,.35); }
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; color: var(--text-2); }

/* cursos */
.course { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.course .art { aspect-ratio: 4 / 3; background: var(--noite-2); }
.course .art img { width: 100%; height: 100%; object-fit: cover; }
.course .body { padding: 18px 20px 22px; border-top: 3px solid var(--c, var(--accent)); }
.course h3 { color: var(--c); margin-bottom: .3em; }
.course p { color: var(--text-2); margin: 0; font-size: .98rem; }
.course.pb { --c: var(--curso-pb); } .course.gp { --c: var(--curso-gp); } .course.hb { --c: var(--curso-hb); }
.course.cf { --c: var(--curso-cf); } .course.sb { --c: var(--curso-sb); }
.ico { font-size: 1.6rem; line-height: 1; }

/* texto longo (páginas legais) */
.doc { padding: 24px 0 64px; }
.doc .glass { max-width: 46rem; margin-inline: auto; }
.doc h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.doc ul { padding-left: 1.2em; } .doc li { margin-bottom: .4em; }
.todo { background: rgba(255,216,74,.14); border: 1px dashed var(--brilho-ipe); border-radius: 8px; padding: 1px 8px; }
details { border-top: 1px solid var(--border); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 800; padding: 10px 0; min-height: 44px; box-sizing: border-box; }
details p { margin: .6em 0 0; color: var(--text-2); }

.site-footer { border-top: 1px solid var(--border); padding: 30px 0 48px; color: var(--text-2); font-size: .95rem; background: var(--footer-bg); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 0 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--hover-text); }

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

/* utilitários (sem estilos inline: a CSP do _headers bloqueia `style=""`) */
.mt { margin-top: 16px; } .mt-lg { margin-top: 24px; }
.em { color: var(--text); }
.vcenter { display: flex; flex-direction: column; justify-content: center; }
.center { text-align: center; }
.mx { margin-inline: auto; }
.cta-center { display: flex; justify-content: center; margin-top: 18px; }
.pad-lg { padding-block: 48px; }
.art-sm { width: 140px; margin: 0 auto 12px; }

/* Constituição (gerado por tools/gen-site-constituicao.py) */
.cf-hero .cf-flag { justify-self: center; width: min(70%, 300px); filter: drop-shadow(0 20px 40px rgba(76,217,154,.3)); }
.cf-busca { margin-top: 22px; max-width: 34rem; }
.cf-label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: 6px; color: var(--text-2); }
.cf-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cf-row input { flex: 1 1 14rem; min-height: 52px; padding: 0 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-input);
  background: var(--glass-2); color: var(--text); font: 600 1rem var(--font-body); }
.cf-row input::placeholder { color: var(--text-2); }
.cf-res { margin-top: 16px; max-width: 40rem; }
.cf-count { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 6px; }
.cf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cf-list a { display: block; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.cf-list a:hover { background: var(--glass-2); }
.cf-list strong { color: var(--accent); }
.cf-ctx { color: var(--text-2); font-size: .85rem; }
.cf-snip { display: block; margin-top: 4px; font-family: var(--font-display); color: var(--text-2); font-size: .98rem; }
.cf-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); }
.cf-card:hover { background: var(--glass-2); }
.cf-card .brick { font-size: 1rem; }
.cf-pre-h { font-size: 1.3rem; }
.cf-preambulo { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.75; margin: 0; }
.cf-doc { max-width: 48rem; }
.cf-doc h1 { margin-bottom: .2em; }
.cf-toc ul { padding-left: 1.1em; }
.cf-toc li { margin-bottom: .3em; }
.cf-toc a { display: inline-block; min-height: 24px; }
.cf-cap { margin-top: 2em; color: var(--accent-2); font-size: 1.3rem; scroll-margin-top: 16px; }
.cf-art { padding: 14px 0; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
.cf-art:target { background: rgba(255,216,74,.08); border-radius: 12px; padding-inline: 12px; }
.cf-art :is(h2, h3) { font-size: 1.25rem; color: var(--accent); margin-bottom: .3em; }
.cf-anchor { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.cf-anchor:hover { text-decoration: underline; }
.cf-sec { font-size: .8rem; color: var(--accent-2); margin: 0 0 .5em; }
.cf-l { font-family: var(--font-display); margin: 0 0 .55em; }
.cf-a { margin-left: 1.4rem; } .cf-n { margin-left: 2.4rem; }
.cf-note { font-family: var(--font-body); font-size: .78rem; color: var(--text-2); }
.cf-aviso { font-size: .88rem; color: var(--text-2); margin-top: 2em; }
.cf-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 1.5em; font-weight: 800; }
.cf-band { display: grid; gap: 20px; align-items: center; }
.cf-band img { width: min(60%, 180px); margin-inline: auto; }
@media (min-width: 720px) { .cf-band { grid-template-columns: auto 1fr auto; } .cf-band img { width: 150px; } }
.hero-art img { display: block; width: 100%; height: auto; }

/* utilitário de acessibilidade: texto só 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); white-space: nowrap; border: 0; }

/* cartão inteiro clicável (o link é o título; ::after cobre o cartão) */
.card-link { position: relative; }
.card-link h3 a { color: inherit; text-decoration: none; }
.card-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.card-link:hover { border-color: var(--border-strong); }
.card-link h3 a:hover { text-decoration: underline; }
.card-link:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-link h3 a:focus-visible { outline: none; }
.course .meta { margin-top: 8px; font-weight: 800; font-size: .9rem; color: var(--text); }

