:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6a665e;
  --line: #e2ddd2;
  --rule: #1c1b19;
  --accent: #1f3f73;
  --accent-soft: #e9eef6;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1d1d1b;
    --text: #ebe7df;
    --muted: #a19c92;
    --line: #33322e;
    --rule: #ebe7df;
    --accent: #8fb0e6;
    --accent-soft: #1e2736;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 제호 */
.masthead { background: var(--bg); text-align: center; padding-top: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }
.logo span { font-family: var(--serif); font-weight: 900; font-size: 36px; letter-spacing: -0.02em; line-height: 1.2; }
.tagline { margin: 6px 0 18px; color: var(--muted); font-family: var(--serif); font-size: 14px; letter-spacing: 0.08em; }
.sections { border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); }
.sections .wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; padding-top: 10px; padding-bottom: 10px; }
.sections a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; }
.sections a:hover { color: var(--accent); }

/* 헤드라인 기사 */
.lead { padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.lead a { color: inherit; text-decoration: none; display: block; }
.kicker { margin: 0 0 6px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.lead h2 { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.35; margin: 0 0 12px; }
.lead a:hover h2 { color: var(--accent); }
.dek { margin: 0 0 10px; color: var(--muted); font-size: 17px; }
.lead time { color: var(--muted); font-size: 13px; }

/* 섹션 목록 */
.cat-section { scroll-margin-top: 16px; }
.cat-section h2 { font-family: var(--serif); font-size: 19px; margin: 36px 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--rule); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: block; padding: 18px 0; color: inherit; text-decoration: none; }
.post-list h3 { font-family: var(--serif); font-weight: 600; margin: 0 0 4px; font-size: 20px; line-height: 1.45; }
.post-list a:hover h3 { color: var(--accent); }
.post-list p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.post-list time { color: var(--muted); font-size: 13px; }

/* 기사 본문 */
.post { padding: 40px 0 16px; }
.post h1 { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.38; margin: 6px 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.meta { color: var(--muted); font-size: 14px; margin: 0; }
.cat { color: var(--accent); font-weight: 700; }
.content h2 { font-family: var(--serif); font-size: 23px; margin: 44px 0 12px; line-height: 1.45; }
.content h3 { font-size: 19px; margin: 32px 0 8px; }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin: 4px 0; }
.content blockquote { margin: 24px 0; padding: 14px 18px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.content blockquote p { margin: 0; }
.content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.content th { background: var(--accent-soft); }
.byline { color: var(--muted); font-size: 14px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }

.related { margin: 24px 0; padding: 18px 20px; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--line); }
.related h2 { font-family: var(--serif); font-size: 17px; margin: 0 0 8px; }
.related ul { margin: 0; padding-left: 1.2em; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 48px; font-size: 15px; }
.pager a { text-decoration: none; max-width: 48%; }

/* 푸터 */
.site-footer { border-top: 3px double var(--rule); padding: 24px 0 40px; color: var(--muted); font-size: 14px; margin-top: 48px; text-align: center; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .logo span { font-size: 30px; }
  .logo-mark { width: 26px; height: 26px; }
  .sections .wrap { gap: 4px 14px; }
  .sections a { font-size: 14px; }
  .lead h2 { font-size: 25px; }
  .post h1 { font-size: 25px; }
  .content h2 { font-size: 20px; }
}
