:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1d1d1d;
  --line: #2a2a2a;
  --text: #f5f5f4;
  --muted: #a3a3a3;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --accent-ink: #0a0a0a;
  --teal: #ffb020;
  --warn-bg: #1f170c;
  --warn-line: #5c3d12;
  --code-bg: #111111;
  --code-text: #f1f1f1;

  --radius: 14px;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo__mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-ink); }
.logo__mark svg { width: 20px; height: 20px; }
.logo__text { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.logo__text b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

@media (max-width: 760px) {
  .topbar__inner { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .nav { width: 100%; margin: 6px -12px 4px; padding: 0 0 6px; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; background: radial-gradient(700px 320px at 85% 0%, rgba(255,122,26,.16), transparent 70%); border-bottom: 1px solid var(--line); }
.hero__kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px; margin: 0 0 18px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); margin: 0 0 16px; max-width: 16ch; }
.hero h1 span { color: var(--accent); }
.hero__lead { font-size: 19px; color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; font-size: 16px; border: 1px solid transparent; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); }

/* ---------- Seções ---------- */
.section { padding-top: 32px; padding-bottom: 32px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__title { font-size: 26px; margin: 0; }
.section__more { font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cat__icon svg { width: 24px; height: 24px; }
.cat b { display: block; font-family: var(--display); font-size: 17px; }
.cat small { color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__top { height: 8px; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.chip { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px; text-decoration: none; }
.card h3 { font-size: 20px; margin: 0; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card .chip { position: relative; z-index: 1; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card__meta { margin-top: auto; font-size: 13px; color: var(--muted); }

.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.site { padding: 20px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface); text-decoration: none; color: var(--text); }
.site:hover { border-color: var(--accent); border-style: solid; }
.site b { font-family: var(--display); font-size: 18px; display: block; }
.site span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.site em { display: block; font-style: normal; color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 10px; }

/* ---------- Página de categoria / institucional ---------- */
.page-head { padding-top: 44px; padding-bottom: 12px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 10px; }
.page-head p { color: var(--muted); font-size: 18px; margin: 0; max-width: 65ch; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; }

/* ---------- Artigo ---------- */
.article-head { padding: 40px 0 8px; }
.article-head h1 { font-size: clamp(30px, 5vw, 46px); margin: 10px 0 14px; }
.article-head .lead { font-size: 19px; color: var(--muted); margin: 0 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 28px 0; }
.toc summary { font-family: var(--display); font-weight: 700; cursor: pointer; }
.toc ol { margin: 10px 0 0; padding-left: 20px; }
.toc li { margin: 4px 0; font-size: 15px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose { overflow-wrap: break-word; }
.prose h2 { font-size: 28px; margin: 44px 0 12px; scroll-margin-top: 90px; }
.prose h3 { font-size: 21px; margin: 30px 0 8px; scroll-margin-top: 90px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 650; }
.prose kbd { font-family: var(--mono); font-size: .85em; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 650; }
.prose .path { font-weight: 600; color: var(--text); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; }

.callout { border-radius: var(--radius); padding: 16px 18px; margin: 0 0 22px; border: 1px solid var(--line); background: var(--surface); }
.callout--dica { border-left: 4px solid var(--teal); }
.callout--aviso { background: var(--warn-bg); border-color: var(--warn-line); border-left: 4px solid var(--teal); }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 4px; }

.prompt { position: relative; margin: 0 0 22px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 40px 18px 18px; }
.prompt__label { position: absolute; top: 10px; left: 18px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.prompt pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 14.5px; line-height: 1.6; }
.prompt__copy { position: absolute; top: 8px; right: 8px; font: 600 13px var(--body); color: var(--code-text); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.prompt__copy:hover { background: rgba(255,255,255,.16); }

.produto { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 24px; }
.produto__tag { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); }
.produto b { display: block; font-family: var(--display); font-size: 18px; margin: 2px 0; }
.produto p { margin: 0; font-size: 15px; color: var(--muted); }
.produto .btn { flex-shrink: 0; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.ad { margin: 28px 0; text-align: center; min-height: 0; }
.ad__label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

.disclosure-inline { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 36px; }
.related { margin-top: 48px; }

/* ---------- Rodapé ---------- */
.footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 28px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-family: var(--display); font-size: 15px; margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 6px 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__about { color: var(--muted); margin: 12px 0 0; max-width: 40ch; }
.footer__bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

.notfound { text-align: center; padding-top: 80px; padding-bottom: 80px; }
.notfound h1 { font-size: 64px; margin: 0; color: var(--accent); }
