:root {
  --bg: #0b0b0c;
  --panel: #141416;
  --panel-2: #1b1b1e;
  --line: #2a2a2e;
  --text: #f1f1f2;
  --muted: #a1a1a8;
  --accent: #f4f4f5;
  --ok: #7fd49a;
  --warn: #f1c46b;
  --info: #9dbcf7;
  --bad: #f3a39b;
  --radius: 12px;
  --max: 1120px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: var(--text); }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.88em; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.7rem; margin: 0 0 18px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 12px max(20px, calc((100% - var(--max)) / 2)); background: rgba(11, 11, 12, 0.92);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo { position: relative; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; background: #000;
  border: 1px solid #2a2a2c; display: inline-block; }
/* The official logo (1093x1438, mark centred on black) is framed, not edited. */
.logo img { position: absolute; width: 303.6%; height: auto; max-width: none; left: -102.8%; top: -146.9%; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; }
.nav a:hover { color: var(--text); }

.btn { display: inline-block; background: var(--accent); color: #0b0b0c !important; text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--accent); cursor: pointer; font-size: 0.95rem; }
.btn:hover { filter: brightness(0.92); }
.btn-ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hero { padding: 72px 0 40px; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 0 0 18px; max-width: 900px; }
.lead { font-size: 1.12rem; color: #d4d4d8; max-width: 820px; }
.lead-sm { color: #d4d4d8; max-width: 820px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.pill-row { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pill-row li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; color: var(--muted); }

.section { padding: 56px 0; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .nav a:not(.btn) { display: none; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card p { margin: 0; color: #d4d4d8; }
.card-muted { opacity: 0.85; }
.list-x, .list-check { margin: 0; padding-left: 20px; }
.list-x li::marker { content: "✕  "; color: var(--bad); }
.list-check li::marker { content: "✓  "; color: var(--ok); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; }
.steps p { margin: 0; color: #d4d4d8; }
.step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--accent); color: #0b0b0c; }

.code { margin: 0; background: #070708; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow: auto; }
.defs { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-content: start; }
.defs dt { margin: 0; } .defs dd { margin: 0; color: #d4d4d8; }

.notice { border-left: 3px solid var(--warn); background: var(--panel); padding: 10px 14px; border-radius: 6px; color: #e8e2cf; }
.demo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; }
@media (max-width: 960px) { .demo { grid-template-columns: 1fr; } }
.demo-page-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
#demo-svg { width: 100%; height: auto; background: #fbfbf9; border-radius: 6px; display: block; }
#demo-svg text { fill: #1b1b1b; font-family: Georgia, "Times New Roman", serif; }
#demo-svg rect.hl { fill: rgba(255, 196, 0, 0.18); stroke: #d98c00; stroke-width: 1.5; }
.badge { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; }
.badge.ok { color: var(--ok); border-color: #2f5a3c; }
.badge.bad { color: var(--bad); border-color: #5a2f2f; }
.fact-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.fact-list button { width: 100%; text-align: left; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; cursor: pointer; font: inherit; display: flex; justify-content: space-between; gap: 8px; }
.fact-list button[aria-pressed="true"] { border-color: var(--accent); background: var(--panel-2); }
.status { font-size: 0.75rem; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.status.pendente_revisao { background: #17284a; color: var(--info); }
.status.incerto { background: #3a2c10; color: var(--warn); }
.fact-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 0.9rem; }
.fact-detail dt { color: var(--muted); } .fact-detail dd { margin: 0; overflow-wrap: anywhere; }
.subhead { margin-top: 28px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: var(--panel); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { color: var(--bad); white-space: nowrap; }

.flow { list-style: none; padding: 0; margin: 20px 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr 1fr; } }
.flow li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 4px; }
.flow li strong::before { counter-increment: f; content: counter(f) ". "; color: var(--muted); }
.flow span { color: var(--muted); font-size: 0.88rem; }

.faq { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: #d4d4d8; margin: 10px 0 2px; }

.form { display: grid; gap: 12px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.form input, .form textarea { font: inherit; color: var(--text); background: #0f0f11; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form button { justify-self: start; }

.footer { max-width: var(--max); margin: 0 auto; padding: 28px 20px 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }
