/* Layout: uma coluna de leitura com cabeçalho fixo; cada seção abre com um título e segue em blocos simples.
   Cores tiradas do logo da SBPD (azul-marinho, azul, verde, amarelo). O símbolo da SBPD abre a página.
   O modo claro é o padrão; o botão do menu troca para o escuro. */
:root {
  color-scheme: light;
  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --ink: #14294F;
  --muted: #51627F;
  --line: #D5DEEB;
  --accent: #1F62A8;
  --accent-ink: #FFFFFF;
  --green: #377840;
  --yellow: #E9AA38;
  --sky: #52B4E5;

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-small: 0.8125rem;
  --t-body: 1.0625rem;
  --t-lead: 1.25rem;
  --t-h3: 1.1875rem;
  --t-h2: 1.75rem;
  --t-h1: clamp(1.9rem, 4.6vw, 2.9rem);

  --wrap: 62rem;
  --gutter: clamp(16px, 4vw, 40px);
}
:root[data-theme="dark"] {
  --bg: #0C1830;
  --surface: #132345;
  --ink: #E7EDF7;
  --muted: #9CACC8;
  --line: #25385F;
  --accent: #72BFEA;
  --accent-ink: #08203A;
  --green: #7DB65A;
  --yellow: #EFCB41;
  --sky: #52B4E5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Cabeçalho */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.band {
  height: 4px;
  background: linear-gradient(90deg, var(--green) 0 34%, var(--yellow) 34% 46%, var(--sky) 46% 72%, var(--accent) 72% 100%);
}
.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand img { display: block; height: 40px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding-block: 4px;
}
.nav-link:hover { color: var(--accent); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: 0 2px 0 var(--accent); }
.tools { display: flex; align-items: center; gap: 8px; }
.tool {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  text-decoration: none;
}
.tool:hover { color: var(--accent); border-color: var(--accent); }
.tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Abertura */
.hero { padding-block: clamp(36px, 7vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: var(--t-h1); font-weight: 650; font-stretch: 108%; line-height: 1.12; letter-spacing: -0.01em; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--muted); margin: 18px 0 0; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1.5px solid var(--accent);
  white-space: nowrap;
}
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-line { color: var(--accent); }

.mark { justify-self: center; }
.mark img { display: block; width: 220px; max-width: 100%; height: auto; }

/* Abertura da página de membros */
.page-head { padding-block: clamp(32px, 6vw, 56px) clamp(8px, 2vw, 16px); }

/* Seções */
.section { padding-block: clamp(36px, 6vw, 60px); border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.section.first { border-top: 0; }
.section h2 { font-size: var(--t-h2); font-weight: 650; font-stretch: 106%; line-height: 1.2; }
.section > .wrap > p, .prose p { max-width: 40em; margin: 14px 0 0; }
.sub { margin-top: 36px; }
.sub h3 { font-size: var(--t-h3); font-weight: 600; }
.ref { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }
.section > .wrap > p.more { margin-top: 22px; font-weight: 600; }

.fronts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.fronts li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fronts strong { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.fronts span.desc { color: var(--muted); font-size: 0.9688rem; line-height: 1.45; }

.rows { margin: 14px 0 0; padding: 0; list-style: none; max-width: 44em; }
.rows li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 8px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.rows li:first-child { border-top: 1px solid var(--line); }
.rows .ref { padding-top: 0.36em; }

.facts { margin: 14px 0 0; padding-left: 1.2em; max-width: 40em; }
.facts li { padding-block: 3px; }

/* Membros */
.members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.members li { padding-block: 16px; border-top: 1px solid var(--line); min-width: 0; }
.members h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.bio { margin: 6px 0 0; color: var(--muted); font-size: 0.9688rem; line-height: 1.5; max-width: 34em; }
.cats { margin: 14px 0 0; max-width: 44em; }
.cats > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 4px 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.cats > div:first-child { border-top: 1px solid var(--line); }
.cats dt { font-weight: 600; }
.cats dd { margin: 0; color: var(--muted); }
.note { max-width: 40em; margin: 12px 0 0; }

/* Documentos */
.doc-group { margin-top: 30px; }
.doc-group h3 { font-size: var(--t-h3); font-weight: 600; }
.docs { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.doc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 18px;
}
.doc-main { min-width: 0; flex: 1 1 22rem; max-width: 46em; }
.doc-title { font-weight: 600; }
.doc-orig { color: var(--muted); font-size: 0.875rem; font-style: italic; }
.doc-meta { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; margin-top: 2px; }
.doc-info { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-top: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px dashed var(--muted);
  border-radius: 3px;
  padding: 3px 8px;
}
.empty { margin: 12px 0 0; color: var(--muted); font-size: 0.9688rem; }
.terms { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; max-width: 44em; }

/* Rodapé */
.foot { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--muted); font-size: 0.9375rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; }
.foot p { margin: 0 0 4px; }
.foot strong { color: var(--ink); }
.foot .mail { font-family: var(--font-mono); font-size: 0.875rem; user-select: all; }

@media (max-width: 720px) {
  .top { position: static; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .mark { justify-self: start; }
  .mark img { width: 120px; }
  .fronts { grid-template-columns: minmax(0, 1fr); }
  .members { grid-template-columns: minmax(0, 1fr); }
  .cats > div { grid-template-columns: minmax(0, 1fr); }
  .section { scroll-margin-top: 12px; }
}
