:root {
  color-scheme: light dark;
  --bg: #fafaf8;
  --fg: #1f2430;
  --muted: #5b6472;
  --border: #e4e4de;
  --accent: #1f6f5c;
  --surface: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1f24;
    --fg: #e7e9ec;
    --muted: #a4acb8;
    --border: #3a3f47;
    --accent: #3f9b83;
    --surface: #24282e;
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.65;
  /* Thai and Vietnamese diacritics need the extra room. */
  overflow-wrap: break-word;
}

nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--fg); }

.nav-links { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.nav-links [aria-current="page"] { color: var(--fg); font-weight: 600; }

header { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; }

.hero { border-bottom: none; padding: 1rem 0 0.5rem; }
.hero h1 { font-size: 2rem; line-height: 1.25; margin-bottom: 0.75rem; }
.hero-sub { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }
.hero-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }

.pending {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

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

.cta-row { margin: 1.5rem 0 0; }

.cta {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { filter: brightness(1.08); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.card {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card h3 { margin: 0 0 0.4rem; color: var(--fg); font-size: 0.98rem; }
.card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

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

details summary {
  cursor: pointer;
  font-weight: 600;
  /* The default triangle sits oddly next to Thai and Vietnamese ascenders. */
  list-style-position: outside;
}

details p { margin: 0.6rem 0 0; color: var(--muted); }

.disclaimer { margin-top: 1rem; }

h1 { font-size: 1.6rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.35rem; color: var(--muted); }

p { margin: 0 0 0.9rem; }
ul { margin: 0 0 0.9rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

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

.updated { color: var(--muted); font-size: 0.85rem; margin: 0; }

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.langs a { color: var(--muted); text-decoration: none; }
.langs a:hover { text-decoration: underline; }
.langs [aria-current="page"] { color: var(--fg); font-weight: 600; }

.canonical {
  margin-top: 2.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
