/* ============================================================
   남북교류협력센터 — 공통 토큰 · 기본 스타일
   DESIGN.md v0.5 (3안 "공공 표준" + 클로드 디자인 v2 7항목 IA) 구현
   ------------------------------------------------------------
   이 파일은 11개 페이지(국문 9 + en/zh)가 공유한다. 페이지 고유 스타일만
   각 HTML의 <style>에 남긴다. 미사용 규칙은 두지 않는다(2026-09-01 정리).
   ============================================================ */

/* ── 1. 토큰 3계층 (DESIGN §2) ───────────────────────────── */
:root{
  /* 1-1. primitive — 원시값 (unikorea.go.kr 실측) */
  --c-navy-700:#063A74;
  --c-navy-900:#052B57;
  --c-black:#000000;
  --c-gray-900:#1D1D1D;
  --c-gray-800:#212121;
  --c-gray-700:#333333;
  --c-gray-500:#666666;
  --c-gray-300:#DDDDDD;
  --c-blue-050:#EEF2F7;
  --c-ink-900:#1E2124;
  --c-white:#FFFFFF;
  --c-red-700:#B3261E;

  /* 1-2. semantic — 구현은 이 층을 참조한다 */
  --text:var(--c-black);
  --text-strong:var(--c-black);
  --text-nav:var(--c-gray-900);
  --text-title:var(--c-gray-800);
  --text-body-alt:var(--c-gray-700);
  --text-muted:var(--c-gray-500);
  --brand:var(--c-navy-700);
  --brand-active:var(--c-navy-900);
  --bg:var(--c-white);
  --bg-soft:var(--c-blue-050);
  --bg-dark:var(--c-ink-900);
  --line:var(--c-gray-300);
  --on-brand:var(--c-white);
  --on-dark:var(--c-white);
  --danger:var(--c-red-700);

  /* 1-3. component */
  --btn-radius:8px;
  --focus-ring:2px solid var(--brand);
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
}

/* ── 2. 리셋 · 기본 ──────────────────────────────────────── */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:"Pretendard Variable",Pretendard,-apple-system,sans-serif;
  color:var(--text);
  font-size:16px;              /* DESIGN §4.2 본문 16px */
  line-height:1.6;
  background:var(--bg);
  letter-spacing:normal;       /* DESIGN §4.1 자간 조작 없음 */
}
img{max-width:100%;display:block}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
/* DESIGN §11.1 — radius 0, outline:none 금지 */
:focus-visible{outline:var(--focus-ring);outline-offset:2px;border-radius:0}

/* 가로 패딩만 longhand로 지정한다.
   shorthand(padding:0 28px)로 두면 클래스 특정도(0,1,0)가
   페이지 쪽 element 규칙(section/main 등, 0,0,1)의 세로 패딩을 덮어써
   섹션 여백이 조용히 0이 된다. */
.container{max-width:1180px;margin:0 auto;padding-left:28px;padding-right:28px}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.skip{position:absolute;left:-9999px;top:0;background:var(--brand);color:var(--on-brand);padding:10px 18px;z-index:100;border-radius:0}
.skip:focus{left:0}

/* ── 3. 유틸 스트립 (DESIGN §7.2) ───────────────────────── */
.util{background:var(--bg-soft);border-bottom:1px solid var(--line);font-size:13px;color:var(--text-body-alt)}
.util .container{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.util .langs{display:flex;gap:10px;align-items:center;margin-left:auto}
.util a{color:var(--text-body-alt);padding:2px 2px}
/* 현재 언어 강조.
   aria-current 는 "현재 페이지"를 가리키는 링크에만 붙는다(index/en/zh).
   국문 서브 페이지의 KOR 링크는 index.html(타 페이지)을 가리키므로
   aria-current 를 쓸 수 없다 → 시각 전용 클래스 .here 로 표시한다.
   (GNB 의 nav.gnb a.here 와 같은 규약. 스크린리더에는 중복 안내가 가지 않는다) */
.util a[aria-current],.util a.here{color:var(--brand);font-weight:700}

/* ── 4. 헤더 · GNB (DESIGN §7.3) ────────────────────────── */
header.site{border-bottom:1px solid var(--line);background:var(--bg)}
.hrow{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:15px 0}
.brand{display:flex;align-items:center;gap:12px}
.brand strong{font-size:20px;font-weight:700;color:var(--text);display:block;letter-spacing:normal}
.brand small{display:block;font-size:11px;color:var(--text-muted);font-weight:400;letter-spacing:.04em}
.brand:hover{text-decoration:none}

nav.gnb ul{display:flex;list-style:none;align-items:center;flex-wrap:wrap}
nav.gnb a{position:relative;display:block;padding:10px 17px;font-size:15px;font-weight:400;color:var(--text-nav);transition:color 120ms linear}
/* 호버 강조 — 색 + 하단 언더라인 바 (굵기 변화는 레이아웃이 밀려서 안 씀) */
nav.gnb a::after{content:"";position:absolute;left:17px;right:17px;bottom:2px;height:3px;background:transparent;transition:background-color 120ms linear}
nav.gnb a:hover{color:var(--brand-active);text-decoration:none}
nav.gnb a:hover::after{background:var(--brand)}
/* 현재 페이지 = aria-current, 상위 메뉴 강조 = .here (시각 전용) */
nav.gnb a[aria-current],nav.gnb a.here{color:var(--brand-active);font-weight:700}
nav.gnb a[aria-current]::after,nav.gnb a.here::after{background:var(--brand-active)}
/* CTA 버튼은 언더라인 제외 */
nav.gnb a.cta::after{content:none}
nav.gnb a.cta{background:var(--brand);color:var(--on-brand);font-weight:700;border-radius:var(--btn-radius);margin-left:12px}
nav.gnb a.cta:hover{background:var(--brand-active);color:var(--on-brand);text-decoration:none}
nav.gnb a.cta[aria-current]{background:var(--brand-active);color:var(--on-brand)}

/* ── 5. 모바일 내비 (햄버거 + 1단 아코디언) ─────────────── */
.navtoggle{
  display:none;align-items:center;gap:8px;
  min-width:44px;min-height:44px;padding:10px 14px;
  background:var(--bg);color:var(--text-nav);
  border:1px solid var(--line);border-radius:var(--btn-radius);
  font:inherit;font-size:14px;font-weight:700;cursor:pointer;
  white-space:nowrap        /* "메뉴" 라벨이 "메"/"뉴" 2줄로 깨지는 것 방지 */
}
.navtoggle .bars{position:relative;display:block;width:18px;height:2px;background:currentColor}
.navtoggle .bars::before,.navtoggle .bars::after{content:"";position:absolute;left:0;width:18px;height:2px;background:currentColor}
.navtoggle .bars::before{top:-6px}
.navtoggle .bars::after{top:6px}
.navtoggle[aria-expanded="true"]{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}

.mnav{display:none;border-top:1px solid var(--line);background:var(--bg)}
.mnav[hidden]{display:none}
.mnav ul{list-style:none}
.mnav li{border-bottom:1px solid var(--line)}
.mnav a{
  display:flex;align-items:center;
  min-height:52px;padding:14px 28px;
  font-size:16px;color:var(--text-nav)
}
.mnav a:hover{background:var(--bg-soft);color:var(--brand);text-decoration:none}
.mnav a[aria-current],.mnav a.here{color:var(--brand-active);font-weight:700;background:var(--bg-soft)}
.mnav a.cta{background:var(--brand);color:var(--on-brand);font-weight:700}
.mnav a.cta:hover{background:var(--brand-active);color:var(--on-brand)}

/* ── 6. 버튼 (DESIGN §7.1) ──────────────────────────────── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:11px 20px;
  border:1px solid var(--brand);background:var(--brand);color:var(--on-brand);
  font-family:inherit;font-size:15px;font-weight:700;line-height:1.4;
  border-radius:var(--btn-radius);cursor:pointer;
  transition:background-color 120ms linear,color 120ms linear
}
.btn:hover{background:var(--brand-active);border-color:var(--brand-active);color:var(--on-brand);text-decoration:none}
.btn.line,.btn-line{background:var(--bg);color:var(--brand)}
.btn.line:hover,.btn-line:hover{background:var(--bg-soft);color:var(--brand-active)}
/* 구 클래스명 호환 (btn-primary → 기본 .btn과 동일) */
.btn-primary{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-active);border-color:var(--brand-active);color:var(--on-brand)}

/* 네이비 면 위 반전 */
.band .btn,.pageband .btn{background:var(--bg);color:var(--brand);border-color:var(--bg)}
.band .btn:hover,.pageband .btn:hover{background:var(--bg-soft);color:var(--brand-active);border-color:var(--bg-soft)}

/* ── 7. 히어로 — 실사 + 불투명 자막 밴드 (DESIGN §7.4) ──── */
.stage{background:var(--bg-soft)}
.stage img{width:100%;height:460px;object-fit:cover;object-position:center 40%}
.band{background:var(--brand);color:var(--on-brand)}
.band .container{display:flex;align-items:center;justify-content:space-between;gap:36px;flex-wrap:wrap;padding-top:26px;padding-bottom:26px}
.band h1,.band h2{font-size:30px;font-weight:700;line-height:1.36;color:var(--on-brand);letter-spacing:normal}
.band .sub{font-size:15px;margin-top:9px;color:var(--on-brand);max-width:620px}
.band .acts{display:flex;gap:10px;flex-wrap:wrap}

/* ── 8. 서브 페이지 타이틀 밴드 ─────────────────────────── */
.pageband{background:var(--brand);color:var(--on-brand)}
.pageband .container{padding-top:26px;padding-bottom:26px}
.pageband h1{font-size:30px;font-weight:700;line-height:1.36;color:var(--on-brand);letter-spacing:normal}
.pageband p{font-size:15px;margin-top:9px;color:var(--on-brand);max-width:620px}
.crumb{list-style:none;display:flex;flex-wrap:wrap;gap:8px;font-size:13px;margin-bottom:12px;color:var(--on-brand)}
.crumb li+li::before{content:"›";margin-right:8px}
.crumb a{color:var(--on-brand);text-decoration:underline}

/* ── 9. 섹션 헤드 (DESIGN §7.6) ─────────────────────────── */
.block{padding:36px 0}
.blockhead{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.blockhead .no{font-family:var(--mono);font-size:12px;font-weight:700;color:var(--brand)}
.blockhead h2,.blockhead h3,.blockhead h4{font-size:19px;font-weight:700;color:var(--text);letter-spacing:normal}
.blockhead .desc{font-size:14px;color:var(--text-muted);margin-left:auto}

h2.sec,h3.sec{font-size:19px;font-weight:700;color:var(--text);letter-spacing:normal;padding-bottom:10px;border-bottom:1px solid var(--line);margin-bottom:16px}
p.lead{color:var(--text-muted);font-size:14px;margin-bottom:20px}

/* ── 10. 표 (DESIGN §7.7) ───────────────────────────────── */
.tblwrap{margin-top:4px}
table.doc{width:100%;border-collapse:collapse;font-size:15px}
table.doc caption{caption-side:top;text-align:left;font-size:13px;color:var(--text-muted);padding-bottom:8px}
table.doc th,table.doc td{padding:13px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
table.doc thead th{background:var(--bg-soft);color:var(--brand);font-size:14px;font-weight:700;border-top:2px solid var(--brand)}
table.doc tbody th{font-size:15px;font-weight:700;color:var(--text)}
table.doc td{color:var(--text-body-alt)}
table.doc td.desc{font-size:14.5px}
table.doc .code{font-family:var(--mono);font-size:12px;color:var(--text-muted);white-space:nowrap;width:68px}
table.doc .act{white-space:nowrap;width:92px}
table.doc .act a{font-weight:700;font-size:14px}
table.doc .num{font-family:var(--mono);font-size:13px;color:var(--text-muted);white-space:nowrap}
/* .code/.num 은 클래스 2개(0,2,1)라 `table.doc thead th`(0,1,2)·`tbody th`(0,1,2)의
   색을 덮어쓴다. 표 머리는 --brand, 행 제목은 --text 여야 하므로(DESIGN §7.7·§4.2)
   같은 특정도로 되돌린다. mono·고정폭은 위 규칙에서 그대로 상속된다. */
table.doc thead th.code,table.doc thead th.num{color:var(--brand);font-size:14px}
table.doc tbody th.code,table.doc tbody th.num{color:var(--text)}
table.doc tbody tr:hover th,table.doc tbody tr:hover td{background:var(--bg-soft)}

/* ── 11. 콜아웃 / 안내 (DESIGN §7.8) ────────────────────── */
.callout{
  background:var(--bg-soft);border-left:4px solid var(--brand);
  padding:18px 22px;margin-top:20px;
  display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap
}
.callout strong{font-size:17px;color:var(--brand)}
.callout p{font-size:14px;color:var(--text-body-alt);margin-top:4px}
.notice{background:var(--bg-soft);border-left:4px solid var(--brand);padding:18px 22px;margin:20px 0;font-size:14px;color:var(--text-body-alt)}
.notice strong{color:var(--brand)}

/* ── 12. 스텝 (DESIGN §6 — 순서 있는 항목) ──────────────── */
.steps{list-style:none;counter-reset:step;border-top:2px solid var(--brand);margin-top:16px}
.steps li{counter-increment:step;display:flex;gap:16px;align-items:flex-start;padding:16px 4px;border-bottom:1px solid var(--line)}
.steps li::before{
  content:counter(step);flex:0 0 28px;height:28px;
  background:var(--brand);color:var(--on-brand);
  font-family:var(--mono);font-weight:700;font-size:13px;
  display:flex;align-items:center;justify-content:center;border-radius:0
}
.steps strong{display:block;color:var(--text);font-size:15px;margin-bottom:3px}
.steps span{font-size:14px;color:var(--text-body-alt)}

/* ── 14. 소식 목록 (DESIGN §7.9) ────────────────────────── */
.newsgrid{display:grid;grid-template-columns:1fr 1fr;gap:44px}
.newsgrid h3{font-size:19px;font-weight:700;color:var(--text);padding-bottom:10px;border-bottom:2px solid var(--brand);display:flex;justify-content:space-between;align-items:baseline;letter-spacing:normal}
.newsgrid h3 a{font-size:13px;font-weight:400;color:var(--text-muted)}
.newsgrid ul{list-style:none}
.newsgrid li{border-bottom:1px solid var(--line)}
.newsgrid li a{display:flex;justify-content:space-between;gap:14px;padding:12px 2px;color:var(--text);font-size:15px}
.newsgrid li a:hover{color:var(--brand)}
.newsgrid time{font-family:var(--mono);font-size:12.5px;color:var(--text-muted);white-space:nowrap}
.newsgrid em{font-style:normal;color:var(--text-muted);font-size:13px;margin-left:6px}
.tagflat{display:inline-block;font-size:12px;font-weight:700;color:var(--brand);border:1px solid var(--brand);border-radius:0;padding:0 7px;margin-right:8px;white-space:nowrap}

/* ── 15. 푸터 (DESIGN §7.10) — 4방언 전부 적용 ──────────── */
/* F1 index(그리드) · F2 about/sub/talent/library(.fin) · F3 guide/consult · F4 en/zh */
footer{background:var(--bg-dark);color:var(--on-dark);font-size:13px;line-height:1.7}
footer a{color:var(--bg-soft)}
footer h2,footer h3,footer h4{color:var(--on-dark);font-size:14px;font-weight:700;margin-bottom:12px;letter-spacing:normal}
footer ul{list-style:none}
footer li{margin-bottom:7px}
footer .container{padding-top:22px;padding-bottom:22px}
/* .fin 은 저작권 줄. 세로 패딩은 footer .container(22px)를 그대로 쓴다 —
   .fin 이 있는 페이지(about/sub/talent/library)와 없는 페이지(guide/consult/en/zh)의
   푸터 높이를 같게 맞추기 위함. */
footer .fin{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
/* 구분선은 푸터 안에 위쪽 블록이 있을 때만 긋는다(index 의 .cols 아래).
   저작권 줄만 있는 푸터에 선을 그으면 .fin 없는 페이지와 시각이 어긋난다. */
footer .fin:not(:first-child){border-top:1px solid rgba(255,255,255,.16)}

/* ── 16. design-v2 공통 (2026-08-28 클로드 디자인 전면 반영) ──
   아래 3종은 7메뉴 IA 전환으로 10개 페이지가 함께 쓰게 된 구성요소다.
   페이지마다 <style>에 복제하지 않고 여기 한 곳에 둔다. */

/* 16-1. 서브 배너 — .pageband 위에 얹는 장식 이미지 (img 는 alt="" role="presentation") */
.pagebanner{background:var(--bg-soft);line-height:0}
.pagebanner img{width:100%;height:200px;object-fit:cover;object-position:center 45%}

/* 16-2. 페이지 내 앵커 바 (about · library) */
.anchors{border-bottom:1px solid var(--line);background:var(--bg)}
.anchors ul{list-style:none;display:flex;flex-wrap:wrap}
.anchors a{display:block;padding:13px 17px;font-size:15px;color:var(--text-nav);border-bottom:2px solid transparent}
.anchors a:hover{color:var(--brand);border-bottom-color:var(--brand);text-decoration:none}

/* 16-3. 풀 푸터 — 기관 정보(좌) + 방침 링크(우). 행 레이아웃은 기존 .fin 재사용 */
footer .fname{font-size:16px;font-weight:700;color:var(--on-dark);margin-bottom:10px}
footer .fnav{display:flex;gap:24px;flex-wrap:wrap;align-items:flex-start}
footer .fnav a.on{color:var(--on-dark);font-weight:700}

/* ── 17. 반응형 — 브레이크포인트 1000px 단일 (DESIGN §5) ── */
@media (max-width:1000px){
  .pagebanner img{height:140px}

  .container{padding-left:22px;padding-right:22px}
  nav.gnb{display:none}
  .navtoggle{display:inline-flex}
  .mnav{display:block}
  .mnav[hidden]{display:none}
  .mnav a{padding-left:22px;padding-right:22px}

  .stage img{height:300px}
  .band h1,.band h2{font-size:25px}
  .pageband h1{font-size:25px}


  .newsgrid{grid-template-columns:1fr;gap:32px}

  .tblwrap{overflow-x:auto}
  table.doc{min-width:640px}
}
