:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #1c2430;
  --muted: #5a6573;
  --line: #e2e6ec;
  --accent: #1a5fb4;
  --accent-soft: #e8f0fb;
  --radius: 10px;
  --max: 860px;
}

* { box-sizing: border-box; }

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

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

a { color: var(--accent); }
a:hover { text-decoration: none; }

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

/* Language toggle: PT is the default; EN appears only when html has .en-on */
html:not(.en-on) .en { display: none !important; }
html.en-on .pt { display: none !important; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 4px 12px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
.lang-switch .sep {
  width: 1px;
  background: var(--line);
}

/* Hero */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 40px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
}
.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Content */
main { padding: 16px 0 48px; }

section { padding: 24px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }

h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.3;
}
h3 { margin: 18px 0 6px; font-size: 1.05rem; }

p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }

code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-all;
}

.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  margin: 12px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 0.95rem;
}
.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  background: var(--bg-soft);
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }

.about-en {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 24px;
}
.about-en h2 { font-size: 1.2rem; }
.about-en p:last-child { margin-bottom: 0; }

.updated { color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 0;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 28px; }
  .hero h1 { font-size: 1.75rem; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .data-table td { border: 0; padding: 4px 0; }
  .data-table td:first-child { font-weight: 600; }
}

/* Brand logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
}
.brand img { display: block; width: 32px; height: 32px; }
.hero-logo { display: block; width: 64px; height: 64px; margin-bottom: 16px; }
