:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --border: #e3e6ea;
  --text: #1a1d21;
  --muted: #5c636b;
  --accent: #d72638;
  --accent-soft: rgba(215, 38, 56, 0.08);
  --radius: 14px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f24;
    --border: #2b2f36;
    --text: #eceef1;
    --muted: #a2aab4;
    --accent: #ff5566;
    --accent-soft: rgba(255, 85, 102, 0.12);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Urbanist, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- topo ---------- */
header.top {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

nav.top-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

nav.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

nav.top-nav a:hover { color: var(--accent); }

/* ---------- conteúdo ---------- */
main { padding: 46px 0 20px; }

h1 {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 40px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  margin: 24px 0 6px;
}

p, li { color: var(--text); }

.lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 8px;
}

.updated {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 8px;
}

ul { padding-left: 22px; }
li { margin-bottom: 7px; }

a { color: var(--accent); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 6px;
  word-break: break-all;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.card.highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.grid .card { margin: 0; }

.grid h3 { margin-top: 0; }

.grid p {
  margin-bottom: 0;
  font-size: 15.5px;
  color: var(--muted);
}

/* tabela de escopos */
.table-scroll { overflow-x: auto; margin: 20px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  min-width: 460px;
}

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* botões */
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 6px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- rodapé ---------- */
footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0;
  font-size: 15px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--accent); }
