/* 해외 경제 브리핑 - 한 단 읽기 레이아웃. 외부 글꼴·스크립트 없음. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6166;
  --line: #e2e0d8;
  --accent: #1d5a86;
  --accent-soft: #e6eef5;
  --mark: #8a4b0f;
  --focus: #e08a00;
  --measure: 680px;
  --gutter: 16px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui,
    "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --surface: #1e2125;
    --text: #e7e6e2;
    --muted: #a3a7ad;
    --line: #33373d;
    --accent: #8cc0e6;
    --accent-soft: #23303b;
    --mark: #f0b072;
    --focus: #ffb43d;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 600px) {
  body { font-size: 18px; }
}

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 머리 */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 20px 0 12px;
  margin-bottom: 28px;
}
.site-name { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.site-name a { color: var(--text); text-decoration: none; }
.site-tagline { margin: 2px 0 10px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.92rem; }
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover { text-decoration: underline; }

/* 글 */
h1, h2, h3 { line-height: 1.4; letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; margin: 0.2em 0 0.4em; font-weight: 800; }
h1 a { color: inherit; text-decoration: none; }
h1 a:hover { text-decoration: underline; }
@media (min-width: 600px) { h1 { font-size: 1.85rem; } }

.issue-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.issue-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.issue-summary { margin: 0.4em 0 0.6em; color: var(--muted); font-size: 1rem; }

.issue-body h2 {
  font-size: 1.25rem;
  margin: 2.2em 0 0.6em;
  padding-top: 1.1em;
  border-top: 1px solid var(--line);
}
.issue-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.issue-body h3 { font-size: 1.08rem; margin: 1.6em 0 0.4em; }
.issue-body p { margin: 0 0 1em; }
.issue-body ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.issue-body li { margin: 0.35em 0; padding-left: 0.15em; }
.issue-body li::marker { color: var(--muted); }
.issue-body strong { font-weight: 700; color: var(--mark); }

/* 첫 단락(오늘의 한 줄)을 조금 크게 */
.issue-body h2:first-child + p {
  font-size: 1.08em;
  background: var(--accent-soft);
  padding: 14px 16px;
  border-radius: 8px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0.6em 0 0; font-size: 0.85rem; line-height: 1.5; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--muted);
}
.tag:hover { color: var(--accent); border-color: var(--accent); }
.tag .count { color: var(--muted); font-size: 0.85em; }

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.7;
  vertical-align: 0.1em;
}

/* 광고 자리: 시험판에서는 숨김. 승인 뒤 display 를 바꾸고 실제 코드를 넣는다. */
.ad-slot { display: none; }

/* 구독 칸 */
.subscribe {
  margin: 40px 0 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.subscribe h2 { font-size: 1.15rem; margin: 0 0 0.3em; }
.subscribe p { margin: 0 0 0.9em; color: var(--muted); font-size: 0.95rem; }
.subscribe-row { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 200px;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
}
.subscribe button {
  flex: 0 0 auto;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--line);
  color: var(--muted);
}
.subscribe input:disabled,
.subscribe button:disabled { cursor: not-allowed; opacity: 0.85; }

/* 이전·다음 호 */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 8px;
}
.pn {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.5;
}
a.pn { background: var(--surface); }
a.pn:hover { border-color: var(--accent); }
.pn-next { text-align: right; }
.pn-label { color: var(--muted); font-size: 0.82rem; }
.pn-title { color: var(--text); font-weight: 600; }
.pn-empty { color: var(--muted); justify-content: center; border-style: dashed; }
.pn-empty:last-child { text-align: right; }

/* 목록 */
.past { margin-top: 48px; }
.past > h2 { font-size: 1.25rem; }
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.issue-item:first-child { border-top: 1px solid var(--line); }
.issue-item-date { margin: 0; color: var(--muted); font-size: 0.85rem; }
.issue-item-title { margin: 0.15em 0 0.25em; font-size: 1.08rem; line-height: 1.5; }
.issue-item-title a { color: var(--text); text-decoration: none; }
.issue-item-title a:hover { color: var(--accent); text-decoration: underline; }
.issue-item-summary { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.issue-item .tags { margin-top: 0.5em; }

.lead { color: var(--muted); }
.tag-cloud { margin: 0 0 24px; }
.more { margin: 18px 0 0; }
.empty { color: var(--muted); padding: 24px 0; }
.page .issue-body h2:first-child + p { background: none; padding: 0; font-size: 1em; }

/* 바닥 */
.site-footer {
  margin-top: 56px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.65;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.footer-nav a { color: var(--muted); }
.disclaimer, .copyright { margin: 0 0 4px; }

@media print {
  .site-nav, .subscribe, .prev-next, .ad-slot, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}
