:root { color-scheme: light dark; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.7;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
}

nav .brand {
  font-weight: 800;
  font-size: 18px;
  color: #3E7BFA;
  text-decoration: none;
}

nav .links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

nav .links a {
  color: #555;
  text-decoration: none;
  font-size: 13px;
}

nav .links a:hover {
  color: #3E7BFA;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

h1 {
  font-size: 26px;
  margin-bottom: 20px;
}

h2 {
  font-size: 18px;
  margin-top: 32px;
}

h3 {
  font-size: 15px;
  margin-top: 20px;
}

p {
  color: #333;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  body { background: #0B0D12; color: #E5E7EB; }
  nav { border-bottom-color: #23262f; }
  nav .links a { color: #9AA5B8; }
  p { color: #C3C9D6; }
}

/* ── 글(article) 공용 요소 ─────────────────────────────────────────────
   color-scheme/currentColor/rgba 기반이라 별도 다크모드 오버라이드가 필요 없다. */
.article-meta { font-size: 0.85em; opacity: 0.65; margin-top: -0.5em; }

.data-table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95em; }
.data-table caption { text-align: left; font-size: 0.85em; opacity: 0.65; padding-bottom: 0.6em; }
.data-table th, .data-table td {
  padding: 0.6em 0.5em;
  border-bottom: 1px solid currentColor;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td { border-color: rgba(128,128,128,0.25); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { font-size: 0.85em; opacity: 0.65; font-weight: 600; }
.data-table tfoot td { font-weight: 600; border-top: 1px solid rgba(128,128,128,0.5); border-bottom: none; }
.data-table tr.spot td { font-weight: 600; }

pre {
  overflow-x: auto;
  padding: 1em 1.1em;
  border: 1px solid rgba(128,128,128,0.3);
  border-radius: 6px;
  font-size: 0.85em;
  line-height: 1.6;
  background: rgba(128,128,128,0.07);
}
pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
p code, li code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(128,128,128,0.12);
}

.pull {
  margin: 1.8em 0;
  padding: 1em 1.2em;
  border-left: 3px solid currentColor;
  opacity: 0.95;
}
.pull p { margin: 0; }

.footnotes {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid rgba(128,128,128,0.3);
  font-size: 0.85em;
  opacity: 0.75;
  line-height: 1.7;
}

@media (max-width: 480px) {
  .data-table { font-size: 0.85em; }
  .data-table th, .data-table td { padding: 0.5em 0.3em; }
  pre { font-size: 0.78em; }
}

/* ── /articles.html 목록 전용 요소 ───────────────────────────────────── */
.article-list { list-style: none; padding: 0; margin: 0 0 8px; }
.article-list li { padding: 14px 0; border-bottom: 1px solid rgba(128,128,128,0.15); }
.article-list li:last-child { border-bottom: none; }
.article-list a { font-size: 16px; font-weight: 700; color: inherit; text-decoration: none; }
.article-list a:hover { color: #3E7BFA; }
.article-date { display: block; font-size: 12px; opacity: 0.6; margin-top: 2px; }
.article-summary { font-size: 14px; margin: 6px 0 0; }
