:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16181d;
  --text-2: #4a505c;
  --muted: #7a808c;
  --line: #e3e6eb;
  --tint: #3b5bdb;
  --note: #eef2ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --card: #1b1e24;
    --text: #eceef2;
    --text-2: #b5bac4;
    --muted: #868c98;
    --line: #2c3038;
    --tint: #8ea5ff;
    --note: #222842;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", "Sukhumvit Set", "Thonburi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  margin-left: 14px;
}

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

article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
}

h1 {
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 6px;
}

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

h2 {
  font-size: 18px;
  line-height: 1.45;
  margin: 28px 0 6px;
}

p, li { color: var(--text-2); }

p { margin: 0 0 12px; }

ol, ul { padding-left: 22px; margin: 0 0 12px; }

li { margin-bottom: 6px; }

strong { color: var(--text); }

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

.note {
  background: var(--note);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}

.note p:last-child { margin-bottom: 0; }

footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 480px) {
  article { padding: 22px 18px; }
  h1 { font-size: 23px; }
  nav a { margin-left: 10px; }
}
