/* ============================================================
   KoSIF WATER dashboard — design tokens + shared classes
   Contract file: section workers (s2a/s2b/s3/s4) build against
   these exact names. Do not rename without orchestrator sync.
   ============================================================ */

/* 라이트 에디토리얼 (2026-07-29 전환, Sam 확정): NYT·Guardian 계열 흰 바탕
   + KoSIF 브랜드(네이비 #1C3A5F 헤드라인, 오렌지 액센트).
   텍스트용 액센트는 흰 바탕 AA(4.5:1) 대비를 위해 브랜드 오렌지를 어둡게 튜닝
   (--accent #9a5b00 ≈5.0:1 — #c17a06은 3.47:1로 미달, 적대 리뷰 U 실측);
   그래픽 채움용 원색은 --accent-graphic #F39C12.
   수치 성격 라벨(공시·계획·추정·예시) 시맨틱: 청록·주황·보라·회색 유지하되
   라이트 대비용으로 어두운 톤 리터럴 사용. --serif 폴백은 라이닝 숫자 폰트
   고정(Georgia 올드스타일 숫자 방지). */
@import url('https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@2.0/nanumsquare.css');

:root {
  --bg: #ffffff;
  --surface: #f7f5f0;
  --line: #e4e1da;
  --ink: #171f2a;
  --dim: #5c6672;
  --accent: #9a5b00;
  --accent-graphic: #F39C12;
  --pos: #0a8a6b;
  --warn: #b45309;
  --neg: #c0334e;
  --navy: #1C3A5F;
  --serif: 'Noto Serif KR', 'Times New Roman', serif;
  --sans: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --brand-display: 'NanumSquare', 'Noto Sans KR', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
}

h1, h2, h3, h4, p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img, svg { max-width: 100%; height: auto; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(28, 58, 95, 0.16); }

/* ---------- section shell ---------- */
/* One .sec per editorial block. Thin 1px rules divide consecutive blocks. */
.sec {
  max-width: 1140px;
  margin: 0 auto;
  padding: 96px 24px;
}

.sec + .sec { border-top: 1px solid var(--line); }

/* ---------- editorial type ---------- */
.kicker {
  font-family: var(--brand-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* 헤드라인 = 브랜드 보이스(나눔스퀘어 EB, 네이비), 대형 데이터 숫자는 각 섹션의 --serif 유지 */
.headline {
  font-family: var(--brand-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--navy);
  margin-top: 14px;
}

.dek {
  font-size: 16.5px;
  color: var(--dim);
  max-width: 720px;
  line-height: 1.75;
  margin-top: 18px;
}

/* ---------- version tabs (V1·V2·V3 화법 비교) ---------- */
.vtabs {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 20px;
  font-size: 13px;
  margin: 28px 0 8px;
}

.vtab {
  color: var(--dim);
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.02em;
  transition: color 250ms ease, border-color 250ms ease;
}

.vtab:hover { color: var(--ink); }

.vtab.on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- provenance pills (수치 성격 라벨) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
  white-space: nowrap;
}

/* 공시·실측 — 청록 (리터럴 고정: --accent와 무관하게 공시=청록 시맨틱 유지) */
.pill--gongsi {
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.35);
  background: rgba(14, 116, 144, 0.06);
}

/* 계획(안) — 주황 */
.pill--plan {
  color: #9a5b00;
  border-color: rgba(154, 91, 0, 0.40);
  background: rgba(243, 156, 18, 0.10);
}

/* 모델 추정 — 보라 */
.pill--est {
  color: #6250c9;
  border-color: rgba(98, 80, 201, 0.35);
  background: rgba(98, 80, 201, 0.06);
}

/* 예시 — 회색 */
.pill--ex {
  color: var(--dim);
  border-color: var(--line);
  background: rgba(92, 102, 114, 0.06);
}

/* ---------- source line ---------- */
.srcline {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.7;
}

/* 터치 기기에서 vtab 히트 영역 44px 확보 (밑줄 위치·데스크톱 밀도 불변) */
@media (pointer: coarse) {
  .vtab {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .sec { padding: 64px 20px; }

  .vtabs {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px 18px;
  }
}

/* ── S4 어휘 별칭 → 셸 4계 통일 (적대 리뷰 C H2 수정) ──
   산출·모델 = 모델 추정 계열(보라) / 보간·외삽 = 예시 계열(회색).
   셸 규칙이 실명 특이도라 s4의 :where() 폴백 스킨을 이긴다. */
.pill--model, .pill--calc {
  color: #6250c9;
  border-color: rgba(98, 80, 201, 0.35);
  background: rgba(98, 80, 201, 0.06);
}
.pill--interp, .pill--extrap {
  color: var(--dim);
  border-color: var(--line);
  background: transparent;
}
