:root {
  --max-width: 980px;
  --accent: #1f3a93;
  --accent-dark: #14296b;
  --text: #222;
  --muted: #666;
  --border: #e2e2e2;
  --bg-soft: #f7f7f8;
  --link: #1d4ed8;
  --green: #2d7a2d;
  --green-soft: #f3fee0;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: #fff;
  color: var(--text);
  font-family: "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic",
               "맑은 고딕", "나눔고딕", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; border: 0; display: block; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ===== 헤더 ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0 16px;
  border-bottom: 3px solid var(--accent);
}
.site-header .logo { flex: 0 0 auto; }
.site-header .logo img { width: 72px; height: 80px; }
.site-header .brand { flex: 1 1 auto; min-width: 0; }
.site-header .brand img { width: 191px; height: 36px; max-width: 100%; }
.site-header .top-nav { flex: 0 0 auto; }
.site-header .top-nav img { width: 127px; height: 42px; }

/* ===== 하단 네비 ===== */
.sub-nav {
  margin: 40px 0 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 4px;
}
.sub-nav-inner {
  padding: 0 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.sub-nav a {
  display: inline-block;
  padding: 12px 6px;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.sub-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ===== 메인 ===== */
.main { margin-top: 28px; }
.article { min-width: 0; }

.article-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.article-title {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
  margin: 0 0 20px;
}
.article-byline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.article-hero {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 24px;
}
.article p {
  margin: 0 0 1.1em;
  color: #333;
}
.article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

/* 본문 내 이미지 부유 */
.article img.float-left,
.float-left {
  float: left;
  width: 240px;
  max-width: 50%;
  margin: 6px 18px 10px 0;
  border-radius: 4px;
}
.article img.float-right,
.float-right {
  float: right;
  width: 240px;
  max-width: 50%;
  margin: 6px 0 10px 18px;
  border-radius: 4px;
}
.clear, .article p::after { clear: both; }

.article-signature {
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 28px 0 0;
}

/* ===== 인용 박스 ===== */
.article blockquote,
.quote-box {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: #444;
}
.article blockquote p:last-child,
.quote-box p:last-child { margin-bottom: 0; }

/* ===== 관련기사 ===== */
.related {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.related h3, .related h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--accent-dark);
  padding: 0;
  border: 0;
}
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { padding: 4px 0; }
.related li::before {
  content: "›";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}
.related a { text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* ===== 타임라인 (1_3) ===== */
.timeline { margin: 24px 0; }
.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dotted #ddd;
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-date {
  font-weight: 700;
  color: var(--accent-dark);
  font-feature-settings: "tnum";
}
.timeline-text { color: #444; }

.stat-box {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.stat-box dt { font-weight: 600; margin-top: 6px; color: var(--accent-dark); }
.stat-box dd { margin: 2px 0 8px; color: #444; }
.source-note { color: #1f3a93; font-size: 0.9rem; margin-top: 16px; }

/* ===== 동화 박스 (1_10) ===== */
.author-box {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--green-soft);
  border-radius: 6px;
  color: #2a5a2a;
}
.author-box-title {
  text-align: center;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--green);
}
.heart-title {
  text-align: center;
  font-size: 1.4rem;
  color: var(--green);
  font-weight: 700;
  margin: 32px 0 20px;
  border: 0;
  padding: 0;
}
.refrain {
  text-align: center;
  color: var(--green);
  font-weight: 600;
  font-style: italic;
  margin: 1.2em 0;
}

/* ===== 결의문 (1_7) ===== */
.pledge-num { color: var(--accent); margin-right: 6px; }

/* ===== 코멘트 안내 ===== */
.comment-notice {
  margin: 20px 0 0;
  padding: 14px 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.comment-notice a {
  color: var(--accent);
  font-weight: 500;
  word-break: break-all;
}

/* ===== 푸터 ===== */
.site-footer {
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .scripture {
  display: block;
  margin-top: 6px;
  color: #999;
  font-style: italic;
}

/* ===== 반응형 ===== */
@media (max-width: 640px) {
  .page { padding: 0 14px 28px; }
  .site-header {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0 12px;
  }
  .site-header .brand { order: 3; flex: 1 1 100%; text-align: center; margin-top: 6px; }
  .article-title { font-size: 1.45rem; }
  .article h2 { font-size: 1.1rem; }
  .article img.float-left,
  .article img.float-right,
  .float-left, .float-right {
    float: none;
    width: 100%;
    max-width: 320px;
    margin: 12px auto;
  }
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
  .timeline-date { font-size: 0.95rem; }
}
@media (max-width: 380px) {
  .site-header .top-nav img { width: 110px; height: 36px; }
  .site-header .logo img { width: 60px; height: 67px; }
}
