:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --text: #101323;
  --muted: #4e5ba6;
  --border: #eaecf5;
  --brand: #444ce7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1530;
    --surface: #111c3d;
    --text: #eef0fb;
    --muted: #a4bcfd;
    --border: #22305c;
    --brand: #8098fb;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Sukhumvit Set", sans-serif;
}
a { color: var(--brand); }
.top {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.top nav { display: flex; gap: 16px; font-size: 14px; }
.top nav a { text-decoration: none; }
.top nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
main {
  max-width: 760px;
  margin: 24px auto;
  padding: 24px 20px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.3; }
h2 { margin: 28px 0 8px; font-size: 19px; }
.meta { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
ul { padding-left: 22px; }
li { margin: 4px 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0 0; }
.en { font-size: 15px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 32px; }
@media (max-width: 600px) {
  main { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  h1 { font-size: 24px; }
}
h3 { margin: 20px 0 4px; font-size: 16px; }
