/* 이재명 정부 1주년 데이터 인터랙티브 - 공유 스타일
   에디토리얼 톤: 종이 흰 배경, 잉크 블랙, 옥스블러드 단일 액센트, 헤어라인, 그림자 0, 라운딩 0 */
:root {
  --bg: #FAFAFA;
  --ink: #0A0A0A;
  --ink-mid: #3A3A3A;
  --ink-muted: #707070;
  --hairline: #D8D8D8;
  --divider: #ECECEC;
  --accent: #2654E9;   /* 경향신문 웹 실측 블루 */
  --accent-dim: #4C70E8;
  --accent-bg: #EEF3FE;

  /* 정당 팔레트 (validate_palette.js 통과: 4색 + 중립 Other) */
  --p-minju: #2E4E8F;
  --p-ppp: #B3362E;
  --p-cho: #0C8068;
  --p-jinbo: #7C4197;
  --p-etc: #8A8275;

  --serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --sans: 'Pretendard Variable', 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a { touch-action: manipulation; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 400;
  font-feature-settings: "ss06", "tnum";
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 40px 80px; }

/* === 상단 내비게이션 === */
.topnav {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.topnav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: stretch; gap: 36px; height: 58px;
}
.brand {
  display: flex; flex-direction: column; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand small { font-size: 10px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.08em; }
.brand a { color: inherit; text-decoration: none; }
.navlinks { display: flex; gap: 28px; margin-left: auto; }
.navlinks a {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-muted); text-decoration: none;
  font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-top: 2px;
}
.navlinks a .no { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--hairline); }
.navlinks a:hover { color: var(--ink); }
.navlinks a.active { color: var(--ink); border-bottom-color: var(--accent); }
.navlinks a.active .no { color: var(--accent); }

/* === 페이지 헤더 === */
header.page { border-bottom: 1px solid var(--hairline); padding: 52px 0 32px; margin-bottom: 56px; }
.kicker {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: 42px; line-height: 1.2; letter-spacing: -0.01em;
  margin: 0 0 18px; max-width: 860px;
}
.lede { font-size: 16px; color: var(--ink-mid); max-width: 740px; line-height: 1.65; margin: 0 0 30px; }

.kpi-row { display: flex; gap: 44px; flex-wrap: wrap; }
.kpi { border-left: 1px solid var(--hairline); padding-left: 20px; min-width: 110px; }
.kpi:first-child { border-left: none; padding-left: 0; }
.kpi-label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; margin-bottom: 6px;
}
.kpi-value { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; }
.kpi-value small { font-size: 14px; font-weight: 500; color: var(--ink-mid); }
.kpi-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }

/* === 경고 문단 (박스·컬러 스트립 없이 플레인) === */
.notice {
  font-size: 13px; color: var(--ink-mid); margin: 0 0 48px;
  max-width: 640px;
}
.notice b { color: var(--accent); }

/* === 섹션 === */
section { margin-bottom: 84px; }
.sec-head { display: grid; grid-template-columns: 84px 1fr; gap: 28px; margin-bottom: 26px; align-items: start; }
.sec-num {
  font-family: var(--serif); font-size: 56px; line-height: 1;
  color: var(--hairline); font-weight: 400; font-style: italic;
}
.sec-meta { padding-top: 10px; }
.sec-eyebrow {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; margin-bottom: 8px;
}
.sec-title { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.3; margin: 0 0 12px; }
.sec-desc { color: var(--ink-mid); font-size: 14px; max-width: 740px; margin: 0; }
.sec-desc + .sec-desc { margin-top: 8px; }

/* === 차트 프레임 === */
.figure { border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); padding: 10px 0 4px; }
.fig-caption { font-size: 12px; color: var(--ink-muted); padding: 10px 2px 0; line-height: 1.6; }
.fig-caption b { color: var(--ink-mid); }

/* === 통계 타일 === */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border: 1px solid var(--hairline); }
.tile { padding: 20px 22px; border-right: 1px solid var(--divider); background: #FFF; }
.tile:last-child { border-right: none; }
.tile-rule { height: 2.5px; width: 34px; background: var(--accent); margin-bottom: 14px; }
.tile-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; margin-bottom: 8px; }
.tile-value { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.1; }
.tile-value small { font-size: 15px; font-weight: 500; color: var(--ink-mid); }
.tile-sub { font-size: 12px; color: var(--ink-muted); margin-top: 6px; line-height: 1.55; }

/* === 테이블 === */
.tbl-wrap { overflow-x: auto; overscroll-behavior-x: contain; border-top: 2px solid var(--ink); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; background: #FFF; }
table.data th {
  text-align: left; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; padding: 10px 12px;
  border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
table.data td.num { font-feature-settings: "tnum"; text-align: right; white-space: nowrap; }
table.data tr:hover td { background: #F4F2EE; }
.party-chip { display: inline-block; width: 9px; height: 9px; margin-right: 7px; vertical-align: baseline; }

/* === 인라인 컨트롤 === */
.controls {
  border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider);
  padding: 14px 2px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.ctl-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; }
.seg { display: flex; border: 1px solid var(--hairline); }
.seg button {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-muted);
  background: #FFF; border: none; border-right: 1px solid var(--divider);
  padding: 7px 16px; cursor: pointer;
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: #FFF; }
input.search {
  font: inherit; font-size: 13px; padding: 7px 12px; width: 220px;
  border: 1px solid var(--hairline); background: #FFF; color: var(--ink);
  border-radius: 0; outline: none;
}
input.search:focus { border-color: var(--ink-mid); }

/* === 풀쿼트 / 해설 박스 === */
.pull {
  font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.65;
  border-left: 3px solid var(--accent); padding: 4px 0 4px 24px;
  color: var(--ink-mid); max-width: 720px; margin: 30px 0;
}
.note-list { font-size: 13.5px; color: var(--ink-mid); max-width: 760px; padding-left: 18px; }
.note-list li { margin-bottom: 8px; }

/* === 푸터 === */
footer {
  border-top: 1px solid var(--hairline); margin-top: 40px; padding: 26px 0 10px;
  font-size: 12px; color: var(--ink-muted); line-height: 1.8;
}
footer b { color: var(--ink-mid); }

/* === 표지 (index) === */
.cover { padding: 96px 0 40px; }
.cover h1 { font-size: 52px; max-width: 900px; }
.menu-list { border-top: 2px solid var(--ink); margin-top: 56px; }
.menu-item {
  display: grid; grid-template-columns: 110px 1fr 200px; gap: 32px;
  padding: 34px 6px; border-bottom: 1px solid var(--hairline);
  text-decoration: none; color: inherit; align-items: start;
}
.menu-item:hover { background: #F4F2EE; }
.menu-no { font-family: var(--serif); font-style: italic; font-size: 46px; color: var(--hairline); line-height: 1; }
.menu-item:hover .menu-no { color: var(--accent); }
.menu-title { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.menu-desc { font-size: 14px; color: var(--ink-mid); max-width: 560px; }
.menu-stats { font-size: 12px; color: var(--ink-muted); text-align: right; padding-top: 8px; line-height: 2; }
.menu-stats b { font-family: var(--serif); font-size: 17px; color: var(--ink); display: block; }
.menu-go { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-top: 14px; display: inline-block; }

@media (max-width: 760px) {
  .wrap, .topnav-inner { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 30px; }
  .cover h1 { font-size: 34px; }
  .sec-head { grid-template-columns: 1fr; gap: 6px; }
  .sec-num { font-size: 36px; }
  .menu-item { grid-template-columns: 1fr; gap: 10px; }
  .menu-stats { text-align: left; }
  .navlinks { gap: 16px; }
  .brand small { display: none; }
}

/* === 인물 그리드 (명단 전수) === */
.pgrid-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pgrid-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-mid);
  background: #FFF; border: 1px solid var(--hairline); border-radius: 0;
  padding: 4px 10px; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #FFF; }
.pgrid-count { font-size: 12px; color: var(--ink-muted); margin-left: auto; }
.pgrid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px;
  border-top: 2px solid var(--ink); padding-top: 10px;
  max-height: 560px; overflow-y: auto;
}
.pcard {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  background: #FFF; border: 1px solid var(--divider); border-radius: 0;
  padding: 9px 11px; content-visibility: auto; contain-intrinsic-size: auto 56px;
}
.pcard:hover { border-color: var(--accent); }
.pcard.dim { opacity: 0.28; }
.pcard b { display: block; font-size: 13.5px; letter-spacing: -0.01em; }
.pcard span { display: block; font-size: 10.5px; color: var(--ink-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard i { display: block; font-style: normal; height: 2.5px; width: 22px; margin-top: 7px; background: var(--hairline); }
.pcard.has i { background: var(--accent); }

dialog.person {
  border: 1px solid var(--ink); border-radius: 0; padding: 0;
  width: min(520px, calc(100vw - 40px)); background: var(--bg);
}
dialog.person::backdrop { background: rgba(10, 10, 10, 0.45); }
.pd-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--hairline); }
.pd-name { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.2; }
.pd-role { font-size: 13px; color: var(--ink-mid); margin-top: 4px; }
.pd-body { padding: 18px 26px 22px; }
.pd-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 700; margin: 14px 0 7px; }
.pd-label:first-child { margin-top: 0; }
.pd-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pd-tag { font-size: 11px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent-dim); padding: 2.5px 8px; background: var(--accent-bg); }
.pd-career { margin: 0; padding-left: 16px; font-size: 13.5px; color: var(--ink-mid); }
.pd-career li { margin-bottom: 4px; }
.pd-empty { font-size: 13px; color: var(--ink-muted); }
.pd-meta { font-size: 12px; color: var(--ink-muted); margin-top: 12px; line-height: 1.7; }
.pd-foot { padding: 12px 26px; border-top: 1px solid var(--divider); display: flex; justify-content: flex-end; }
.pd-excl li { color: var(--ink-muted); }
.pd-excl li small { display: block; font-size: 10.5px; color: #9A9284; margin-top: 1px; }
.pd-foot button {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--ink); color: #FFF; border: none; padding: 7px 18px;
}
@media (max-width: 760px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } }

/* === 접점/출신 구분 (2026-07 업데이트) === */
.pd-label small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pd-tag em { font-style: normal; font-weight: 700; margin-left: 5px; opacity: 0.85; font-size: 10px; }
.pd-tag.strong { background: var(--accent); color: #FFF; border-color: var(--accent); }
.pd-tag.weak { color: var(--ink-muted); border: 1px dashed var(--hairline); background: transparent; }
.chip-co { border-radius: 999px; }
.pd-bio { font-size: 13px; color: var(--ink-mid); margin: 0; }
.pd-ct { font-size: 11.5px; font-weight: 700; color: var(--ink-mid); margin: 10px 0 4px; }
.pd-ct em { font-style: normal; font-weight: 600; color: var(--ink-muted); font-size: 10.5px; }
dialog.person { max-height: 82vh; overflow-y: auto; }

/* === 로스터 검색 자동추천 / 전체선택 === */
.psearch-wrap { position: relative; }
.sug { position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 30;
  background: #FFF; border: 1px solid var(--ink); border-top: none; max-height: 280px; overflow-y: auto; }
.sug:empty { display: none; }
.sug button { display: block; width: 100%; text-align: left; font: inherit; font-size: 12.5px;
  background: #FFF; border: none; border-bottom: 1px solid var(--divider); padding: 7px 12px; cursor: pointer; }
.sug button:hover, .sug button.sel { background: var(--accent-bg); }
.sug button small { color: var(--ink-muted); margin-left: 6px; }
.chip.util { border-style: dashed; color: var(--ink-muted); }
.chip-utils { display: inline-flex; gap: 6px; white-space: nowrap; }
.pcard { position: relative; }
.pcard .yr { position: absolute; top: 8px; right: 9px; font-style: normal;
  font-size: 8.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-muted); }
.pd-src { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-src a { font-size: 11px; color: var(--ink-mid); border: 1px solid var(--divider);
  padding: 2.5px 8px; text-decoration: none; background: #FFF; }
.pd-src a:hover { border-color: var(--accent); color: var(--accent); }

/* === 언어 전환기 (우하단 FAB) - 연애격차 web 이식, 팔레트만 이 사이트 기준 === */
.lang-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 55;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.lang-fab-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 9px 15px; cursor: pointer;
  box-shadow: 0 3px 14px rgba(10, 10, 10, 0.13);
  transition: color .15s, border-color .15s;
}
.lang-fab-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.lang-fab-icon { display: block; width: 19px; height: 19px; }
.lang-menu[hidden] { display: none; }
.lang-menu {
  display: flex; flex-direction: column; min-width: 132px;
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 5px;
  box-shadow: 0 6px 22px rgba(10, 10, 10, 0.16);
}
.lang-item {
  font-size: 13.5px; font-weight: 600; color: var(--ink-mid);
  padding: 8px 12px; border-radius: 7px; text-align: left; text-decoration: none;
}
a.lang-item:hover { text-decoration: none; color: var(--accent); background: var(--accent-bg); }
.lang-item.on { color: var(--accent); font-weight: 800; background: var(--accent-bg); }
