:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #57534e;
  --border: #e7e5e4;
  --accent: #e0561c;
  --accent-soft: #fdf1ea;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #141414;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --border: #292524;
    --accent: #f08a3c;
    --accent-soft: #2a1a10;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .inner,
main,
.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
}

.brand-mark { height: 30px; width: auto; }
.brand-word { display: flex; flex-direction: column; }
.brand-word .w1 { font-size: 19px; font-weight: 900; letter-spacing: 0.12em; }
.brand-word .w2 { font-size: 8px; font-weight: 700; letter-spacing: 0.55em; margin-top: 4px; }

nav.links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

nav.links a {
  color: var(--muted);
  text-decoration: none;
}

nav.links a[aria-current="page"],
nav.links a:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 12px;
  cursor: pointer;
  font: inherit;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

main { padding-top: 40px; padding-bottom: 64px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 36px 0 8px; }
h3 { font-size: 1.05rem; margin: 24px 0 4px; }

.updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.lead { font-size: 1.1rem; color: var(--muted); }

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

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.grid .card { margin: 0; }
.grid .card a { font-weight: 600; text-decoration: none; }

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.topics li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  background: var(--surface);
}

details {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

summary { cursor: pointer; font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}

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

/* Language visibility: PT by default, EN when html[lang="en"] */
[data-lang="en"] { display: none; }
html[lang="en"] [data-lang="pt"] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
