/* ============================================================
   East Asia Brief — 미국 독자 기준의 뉴스/인텔리전스 지면.

   설계 원칙
   · 폰트는 전부 시스템 스택. 외부 폰트 요청 0건 → LCP 가 빨라지고
     Core Web Vitals 가 검색 순위와 애드센스 수익에 그대로 반영된다.
   · 헤드라인·본문은 세리프, UI(내비·바이라인·라벨)는 산세리프.
     NYT·WSJ·이코노미스트가 쓰는 대비 방식이다.
   · 색은 로고와 같은 네이비 + 레드. 그 둘 말고는 쓰지 않는다.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-sunk: #e9edf3;
  --ink: #14192a;
  --ink-2: #3a4459;
  --muted: #6a7488;
  --rule: #dde3ec;
  --rule-strong: #bcc5d4;
  /* 브랜드: 네이비 + 레드 (로고와 동일) */
  --navy: #16264f;
  --navy-2: #24386e;
  --accent: #c8102e;
  --accent-ink: #a30c25;
  --link: #16264f;
  --focus: #24386e;

  --serif: "Iowan Old Style", "Charter", Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --w: 1200px;
  --gap: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1219;
    --bg-soft: #151b26;
    --bg-sunk: #1b2230;
    --ink: #e7eaf1;
    --ink-2: #b6bece;
    --muted: #8790a3;
    --rule: #242c3a;
    --rule-strong: #374154;
    --navy: #b9c6e6;
    --navy-2: #8fa3d4;
    --accent: #ef5c6e;
    --accent-ink: #ff7484;
    --link: #c3cfe8;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- 상단 바 ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-size: 12px; color: var(--muted);
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 34px; gap: 16px; }
/* 좁은 화면에서는 날짜가 3줄로 접히며 상단 바를 무너뜨린다 */
@media (max-width: 620px) { .topbar .date { display: none; } .topbar nav { margin: 0 auto; } }
.topbar .date { text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.topbar nav { display: flex; gap: 16px; }

/* ---------- 마스트헤드 ----------
   EAB 모노그램 + EAST ASIA BRIEF 워드마크 + 태그라인, 가운데 정렬 3단.
   미국 인텔리전스 매체(Axios·Semafor·The Information)가 쓰는 결이다. */
.masthead {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 20px 0 16px; text-align: left;
}
.masthead .mark { flex: 0 0 auto; width: 62px; height: 62px; display: block; }
/* 마크 원본은 흰 바탕 위 로고다. 다크 모드에서 흰 사각형으로 보이지 않도록
   살짝 둥근 흰 배지로 감싼다 — 라이트 모드에서는 배경과 같아 보이지 않는다. */
.masthead .mark img { width: 100%; height: 100%; background: #fff; border-radius: 7px; }
.masthead .lockup { display: block; }
.masthead .wordmark {
  font-family: var(--sans);
  font-size: clamp(26px, 4.6vw, 44px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1;
  margin: 0;
}
.masthead .wordmark a:hover { text-decoration: none; }
.masthead .w1 { color: var(--navy); }
.masthead .w2 { color: var(--accent); }
.masthead .tagline {
  margin: 8px 0 0; font-size: 11.5px; color: var(--navy-2); font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em;
  border-top: 1px solid var(--rule); padding-top: 7px;
}
.masthead .tagline i { color: var(--accent); font-style: normal; margin: 0 5px; }
@media (max-width: 560px) {
  .masthead { gap: 12px; }
  .masthead .mark { width: 46px; height: 46px; }
  .masthead .tagline { font-size: 10px; letter-spacing: .11em; }
}

/* ---------- 섹션 내비 ---------- */
.nav {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
}
.nav .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto;
  padding: 13px 12px;
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-2); white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav .spacer { flex: 1 1 auto; }
.nav form { flex: 0 0 auto; display: flex; align-items: center; }
.nav input[type=search] {
  border: 1px solid var(--rule-strong); background: var(--bg-soft); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; width: 140px; font-family: inherit;
}

/* ---------- 공통 텍스트 요소 ---------- */
.kicker {
  font-size: 11.5px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--accent); display: inline-block; margin-bottom: 7px;
}
.kicker a { color: inherit; }
.byline { font-size: 13px; color: var(--muted); }
.byline .name { color: var(--ink-2); font-weight: 600; }
.dek { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; margin: 8px 0 0; }
.meta { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.rule-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 2px solid var(--ink); padding-top: 10px; margin: 0 0 18px;
}
.rule-head h2 {
  font-family: var(--sans); font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; margin: 0;
}
.rule-head a { font-size: 12px; color: var(--muted); }

/* ---------- 기사 카드 ---------- */
.card { display: block; }
.card figure { margin: 0 0 12px; background: var(--bg-sunk); }
.card figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card h3 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.012em;
  line-height: 1.22; margin: 0; font-size: 20px;
}
.card h3 a:hover { color: var(--accent-ink); }
.card .dek { font-size: 14.5px; }
.card .byline { margin-top: 9px; }
.card.sm h3 { font-size: 17px; }
.card.xs h3 { font-size: 15.5px; font-weight: 700; }
.card.xs figure img { aspect-ratio: 1 / 1; }

/* 리드 스토리 */
.lead h3 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -0.022em; }
.lead .dek { font-size: 18px; margin-top: 12px; }
.lead figure img { aspect-ratio: 16 / 9; }

/* ---------- 레이아웃 그리드 ---------- */
main { padding: 26px 0 40px; }
.grid { display: grid; gap: var(--gap); }
.home-top { grid-template-columns: 2.15fr 1fr; align-items: start; }
.col-list > * + * { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.section-body { grid-template-columns: 1fr 320px; align-items: start; }
.block { margin: 0 0 42px; }

@media (max-width: 1000px) {
  .home-top, .section-body { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .grid { gap: 22px; }
  .col-list > * + * { padding-top: 14px; margin-top: 14px; }
}

/* ---------- 사이드바 ---------- */
.rail { position: sticky; top: 60px; }
.rail .box { border: 1px solid var(--rule); padding: 18px; margin-bottom: 24px; background: var(--bg-soft); }
.rail .box h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  margin: 0 0 14px; font-weight: 800;
}
.ranked { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranked li { counter-increment: r; display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); }
.ranked li:first-child { border-top: 0; padding-top: 0; }
.ranked li::before {
  content: counter(r); font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: var(--rule-strong); line-height: 1; min-width: 22px;
}
.ranked a { font-family: var(--serif); font-size: 15.5px; line-height: 1.28; font-weight: 600; }

/* ---------- 기사 본문 ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article-head { margin-bottom: 26px; }
.article h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.4vw, 47px);
  line-height: 1.1; letter-spacing: -0.022em; font-weight: 700; margin: 6px 0 0;
}
.article .standfirst {
  font-family: var(--serif); font-size: 20px; line-height: 1.45;
  color: var(--ink-2); margin: 14px 0 0; font-style: italic;
}
.article .bylines {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 12px 0; margin: 22px 0 0; font-size: 13.5px; color: var(--muted);
}
.article .bylines .who { color: var(--ink); font-weight: 600; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-sunk);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-2);
}

figure.hero { margin: 24px 0 6px; }
figure.hero img { width: 100%; }
figcaption {
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  padding: 9px 2px 0; border-bottom: 1px solid var(--rule); padding-bottom: 12px;
}

.keypoints {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: 18px 20px; margin: 26px 0;
}
.keypoints h2 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em;
  margin: 0 0 10px; font-weight: 800; color: var(--ink-2);
}
.keypoints ul { margin: 0; padding-left: 20px; }
.keypoints li { margin: 7px 0; font-size: 15.5px; line-height: 1.5; }

.prose { font-family: var(--serif); font-size: 19px; line-height: 1.72; color: var(--ink); }
.prose p { margin: 0 0 1.15em; }
.prose p:first-of-type::first-letter { /* 드롭캡 없이, 첫 문단만 살짝 강조 */ }
.prose h2 {
  font-size: 25px; line-height: 1.25; letter-spacing: -0.015em;
  margin: 1.9em 0 .6em; font-weight: 700;
}
.prose h3 { font-size: 20px; margin: 1.7em 0 .5em; font-weight: 700; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  font-size: 21px; line-height: 1.45; color: var(--ink-2);
}
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: .5em 0; }
.prose figure { margin: 1.8em 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin: 1.6em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 9px 8px; text-align: left; }
.prose th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; }
.tags a {
  font-size: 12px; letter-spacing: .04em; border: 1px solid var(--rule-strong);
  padding: 5px 11px; border-radius: 999px; color: var(--ink-2);
}
.tags a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.authorcard {
  display: flex; gap: 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 20px 0; margin: 30px 0;
}
.authorcard .avatar { width: 52px; height: 52px; font-size: 17px; flex: 0 0 auto; }
.authorcard h2 { font-size: 16px; margin: 0 0 4px; }
.authorcard p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

.disclosure {
  font-size: 12.5px; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--rule); padding: 12px 14px; margin: 24px 0; line-height: 1.55;
}

/* ---------- 광고 ---------- */
.ad { margin: 30px 0; text-align: center; }
.ad::before {
  content: "Advertisement"; display: block;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.ad-inarticle { margin: 34px 0; }
.ad-rail { margin-bottom: 24px; }

/* ---------- 페이지네이션 ---------- */
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 36px 0 10px; }
.pager a, .pager span {
  padding: 9px 15px; border: 1px solid var(--rule-strong); font-size: 13px; font-weight: 600;
}
.pager .cur { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 정적 페이지 ---------- */
.page { max-width: 720px; margin: 0 auto; }
.page h1 { font-family: var(--serif); font-size: 38px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.02em; }
.page h2 { font-size: 19px; margin: 34px 0 10px; }
.page p, .page li { font-size: 16.5px; line-height: 1.68; color: var(--ink-2); }
.page .lede { font-size: 18.5px; color: var(--muted); margin-bottom: 26px; }

/* ---------- 푸터 ---------- */
footer.site {
  border-top: 3px solid var(--ink); margin-top: 50px; padding: 34px 0 46px;
  background: var(--bg-soft); font-size: 13.5px; color: var(--muted);
}
footer.site .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
footer.site h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin: 0 0 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 7px 0; }
footer.site .wordmark { font-family: var(--serif); font-size: 24px; color: var(--ink); font-weight: 700; }
footer.site .legal { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 18px; font-size: 12.5px; line-height: 1.7; }
@media (max-width: 800px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- 검색 결과 · 빈 상태 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h1 { font-family: var(--serif); font-size: 30px; color: var(--ink); margin: 0 0 10px; }

/* ---------- 산업 내비(2단) ---------- */
.nav.sub { position: static; border-top: 0; background: var(--bg-soft); }
.nav.sub a { padding: 9px 12px; font-size: 11.5px; letter-spacing: .09em; color: var(--muted); border-bottom-width: 2px; }
.nav.sub a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- 콘텐츠 유형 뱃지 ---------- */
/* ⚠ .kicker a { color: inherit } 가 .fmt 보다 우선순위가 높다.
   그대로 두면 빨간 배지에 빨간 글자가 되어 라벨이 안 보인다. */
.fmt, .kicker a.fmt {
  display: inline-block; margin-right: 8px; padding: 2px 7px;
  background: var(--accent); color: #fff; border-radius: 2px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .09em; vertical-align: 1px;
}
.fmt:hover { text-decoration: none; filter: brightness(1.15); }
.kicker a.fmt-why-it-matters, .fmt-why-it-matters { background: #1d4ed8; }
.kicker a.fmt-asia-compare,   .fmt-asia-compare   { background: #047857; }
.kicker a.fmt-company-watch,  .fmt-company-watch  { background: #6d28d9; }
.kicker a.fmt-policy-tracker, .fmt-policy-tracker { background: #b45309; }
.kicker .cty { color: var(--muted); font-weight: 700; }

/* ---------- 칩 ---------- */
.chip {
  display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  font-size: 12.5px; color: var(--ink-2); background: var(--bg);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip b { color: var(--muted); font-weight: 700; margin-left: 4px; font-size: 11px; }
.chip.ticker { font-family: var(--mono); font-size: 11.5px; }
.chip.impact { border-style: dashed; }
.chip.country { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.chiplist { list-style: none; margin: 0; padding: 0; }
.chiplist li { display: inline; }
.tags a.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* ---------- 국가 열(홈) ---------- */
.ctyhead {
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .13em;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 0 0 14px;
}

/* ---------- Impact map ---------- */
.impact { margin: 34px 0; }
.impact h2, .entities h2, .sources h2 {
  font-family: var(--sans); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .13em;
  border-top: 2px solid var(--ink); padding-top: 10px; margin: 0 0 8px;
}
.impact table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; margin-top: 12px; }
.impact th, .impact td { border: 1px solid var(--rule); padding: 10px 11px; text-align: left; vertical-align: top; }
.impact thead th {
  background: var(--bg-sunk); font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-2); white-space: nowrap;
}
.impact tbody th { background: var(--bg-soft); font-weight: 700; width: 22%; }

/* ---------- In this story ---------- */
.entities { margin: 30px 0; }
.entities dl { display: grid; grid-template-columns: 92px 1fr; gap: 3px 14px; margin: 14px 0 0; align-items: baseline; }
.entities dt {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); padding-top: 5px;
}
.entities dd { margin: 0; }
@media (max-width: 560px) { .entities dl { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 출처 ---------- */
.sources { margin: 30px 0; }
.sources ol { margin: 14px 0 0; padding-left: 22px; font-size: 14.5px; line-height: 1.6; }
.sources li { margin: 7px 0; }
.sources .conf { font-size: 13px; margin: 14px 0 0; color: var(--muted); }
.sources .conf b { text-transform: uppercase; letter-spacing: .06em; }
.conf-high b { color: #047857; }
.conf-medium b { color: #b45309; }
.conf-low b { color: var(--accent); }

/* ---------- 기업·정책 인덱스 ---------- */
.entindex section { margin: 0 0 26px; }
.entindex h2 {
  font-family: var(--serif); font-size: 22px; margin: 0 0 10px;
  border-bottom: 1px solid var(--rule); padding-bottom: 6px;
}

/* ---------- 인쇄 ---------- */
@media print {
  .nav, .topbar, footer.site, .ad, .rail { display: none; }
  body { font-size: 12pt; }
  .article { max-width: none; }
}
