:root {
  --bg: #faf6ee;
  --surface: #fffdf9;
  --text: #292524;
  --muted: #78716c;
  --accent: #b45309;
  --border: #e7e5e4;
  --radius: 4px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Serif Thai", "Noto Serif", Georgia, serif;
  line-height: 1.78;
}
a { color: var(--accent); }
.ext-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  font-weight: 600;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.header-wrap {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.page-shell {
  max-width: 1120px;
  margin: 28px auto;
  padding: 0 20px;
}
.article-card, .sidebar-box, .faq-box, .related-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
h1 {
  margin: 0 0 14px;
  font-size: 1.85rem;
  line-height: 1.35;
}
.stage-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--radius);
  margin-bottom: 6px;
}
h2 {
  margin: 24px 0 10px;
  font-size: 1.35rem;
  line-height: 1.4;
}
h3 {
  margin: 16px 0 6px;
  font-size: 1.1rem;
  line-height: 1.45;
}
.h3-card {
  margin: 12px 0 12px 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.faq-box { margin-top: 24px; }
.faq-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.faq-entry:last-child { border-bottom: none; }
.faq-q { font-weight: 700; margin-bottom: 6px; }
.faq-a { margin: 0; color: var(--muted); }
.related-box { margin-top: 24px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.related-item {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.92rem;
}
.related-item:hover { border-color: var(--accent); }
.all-pages-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.all-page-card {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}
.all-page-card:hover { border-color: var(--accent); }
.all-page-title { font-weight: 600; margin-bottom: 4px; }
.all-page-file { font-size: 0.82rem; color: var(--muted); word-break: break-all; }
.site-footer {
  margin-top: 40px;
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
}
.page-shell { max-width: 740px; }
.article-card { padding: 40px 44px; box-shadow: 0 8px 24px rgba(0,0,0,0.04); }
