/* 정치뉴스맵 — 신문 지면을 따른 스타일. 색은 정당 표시에만 쓰고, 구획은 괘선으로 나눈다. */
:root {
  --paper: #ffffff; --ink: #111111; --ink-2: #3d3d3d; --ink-3: #6b6b6b; --ink-4: #949494;
  --rule: #111111; --hair: #dcdcdc; --link: #0b3a75;
  --serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", "Batang", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121212; --ink: #ededed; --ink-2: #c4c4c4; --ink-3: #969696; --ink-4: #6f6f6f;
          --rule: #ededed; --hair: #333333; --link: #9cc2f2; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans);
       word-break: keep-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); font-size: 13px; }
.muted a, .prose a, .foot a { text-decoration: underline; text-underline-offset: 3px; }

/* 제호 */
.mast { border-top: 4px solid var(--rule); }
.mast-top { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; padding: 8px 0;
            font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--hair); }
.mast-name { display: block; text-align: center; padding: 22px 0 6px; font: 900 40px/1.1 var(--serif); letter-spacing: -0.02em; }
.mast-name:hover { text-decoration: none; }
.mast-tag { text-align: center; font-size: 13px; color: var(--ink-3); padding-bottom: 16px; }
.mast nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 28px; border-top: 1px solid var(--rule);
            border-bottom: 3px double var(--rule); padding: 9px 0; font-size: 15px; font-weight: 600; }

/* 구획 제목 */
h3 { font: 700 13px/1.4 var(--sans); letter-spacing: 0.02em; color: var(--ink); margin: 34px 0 12px;
     padding-top: 8px; border-top: 2px solid var(--rule); display: flex; align-items: baseline; gap: 10px; }
.tag { font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.hero { padding: 26px 0 4px; }
.hero h1 { font: 700 30px/1.3 var(--serif); letter-spacing: -0.02em; }
.hero p { margin-top: 8px; color: var(--ink-2); max-width: 70ch; }
.hero .muted { margin-top: 6px; }
.person-hero h1 { display: flex; align-items: center; gap: 10px; }

/* 국내/해외 전환 */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); margin: 22px 0 0; }
.tabs a { padding: 8px 0 9px; font-weight: 700; font-size: 16px; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--rule); }
.tabs span { font-weight: 400; font-size: 13px; color: var(--ink-3); margin-left: 4px; }

/* 메인 지면: 본문 + 옆단 */
.front { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 36px; padding-bottom: 48px; }
.front > aside { border-left: 1px solid var(--hair); padding-left: 28px; }
.front aside h3:first-child { margin-top: 22px; }
@media (max-width: 900px) { .front { grid-template-columns: 1fr; } .front > aside { border-left: 0; padding-left: 0; } }

/* 기사 항목 */
.item { padding: 20px 0; border-bottom: 1px solid var(--hair); }
.item h2 { font: 700 21px/1.38 var(--serif); letter-spacing: -0.02em; }
.item.lead { padding-top: 24px; }
.item.lead h2 { font-size: 32px; line-height: 1.28; }
.item.lead .sum { font-size: 16px; }
.meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 0 8px; }
.meta b { color: var(--ink); font-weight: 700; }
.meta span + span::before { content: "|"; color: var(--hair); margin-right: 8px; }
.sum { margin-top: 10px; color: var(--ink-2); display: grid; gap: 4px; }
.sum li { padding-left: 13px; position: relative; }
.sum li::before { content: "–"; position: absolute; left: 0; color: var(--ink-4); }
.sum.big { font-size: 17px; line-height: 1.7; color: var(--ink); gap: 8px; margin-top: 0; }
.heads { margin-top: 10px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.outlet { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-right: 8px; white-space: nowrap; }
.orig { display: block; font: 400 13px/1.5 var(--sans); color: var(--ink-3); margin-top: 3px; letter-spacing: 0; }
.item .chips { margin-top: 10px; font-size: 13px; }
.outlets { margin-top: 8px; font-size: 12px; color: var(--ink-4); display: flex; flex-wrap: wrap; gap: 0 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } .item.lead h2 { font-size: 25px; } .mast-name { font-size: 32px; } }

/* 인물 표기: 정당색 사각 표식 + 이름 */
.chips { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; white-space: nowrap; }
.chip-sub { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.dot { width: 8px; height: 8px; flex: none; display: inline-block; background: var(--ink-4); align-self: center; }
.dot.lg { width: 14px; height: 14px; }

/* 옆단 목록 */
.rank li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.rank .n { font: 700 15px var(--serif); color: var(--ink-4); width: 18px; }
.rank .count { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.brief li { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.brief a { font: 600 15px/1.45 var(--serif); }
.brief .muted { display: block; font-size: 12px; margin-top: 2px; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--link); }

/* 이슈 상세 */
.detail { max-width: 760px; padding: 28px 0 56px; }
.detail h1 { font: 700 34px/1.3 var(--serif); letter-spacing: -0.02em; margin-top: 6px; }
.box { margin-top: 22px; padding: 2px 0 2px 18px; border-left: 3px solid var(--rule); }
.box h3 { border-top: 0; margin: 0 0 8px; padding: 0; }
.people li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.people p { flex-basis: 100%; color: var(--ink-2); font-size: 14px; }
.role { font-size: 12.5px; color: var(--ink-3); }
.graph-wrap { border: 1px solid var(--hair); padding: 6px; overflow-x: auto; }
.graph { display: block; width: 100%; min-width: 480px; height: auto; }
.g-edge { stroke: var(--ink-3); stroke-width: 1.2; }
.g-arrow { fill: var(--ink-3); }
.g-node { fill: var(--paper); stroke-width: 2; rx: 2px; }
.g-name { font: 700 14px var(--sans); fill: var(--ink); }
.g-label-bg { fill: var(--paper); stroke: var(--hair); rx: 2px; }
.g-label { font-size: 12px; fill: var(--ink-2); }
.rels { margin-top: 12px; font-size: 14px; }
.rels li { padding: 7px 0; border-bottom: 1px solid var(--hair); }
.arrow { color: var(--ink-4); }
.rel { font-size: 13px; color: var(--ink-2); margin: 0 6px; }
.rel::before { content: "〔"; color: var(--ink-4); } .rel::after { content: "〕"; color: var(--ink-4); }
.src { font-size: 12px; color: var(--link); margin-right: 8px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.timeline { border-left: 1px solid var(--rule); margin-left: 4px; display: grid; gap: 14px; }
.timeline li { padding-left: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 0.6em; width: 7px; height: 7px; background: var(--rule); }
.timeline li > div { margin-top: 2px; }
.timeline.plain { gap: 8px; }
.timeline.plain li::before { background: var(--paper); border: 1px solid var(--rule); }
.timeline time { font-size: 12px; color: var(--ink-3); }
.timeline.plain p { font-size: 14.5px; }
.by-outlet { border-top: 1px solid var(--rule); margin-top: 10px; }
.outlet-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.outlet-name { font-weight: 700; font-size: 14px; }
.outlet-name span { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.outlet-row ul { display: grid; gap: 8px; font-size: 14.5px; }
.outlet-row a { font-family: var(--serif); font-weight: 600; }
.outlet-row time { display: block; font-size: 12px; color: var(--ink-3); }
@media (max-width: 560px) { .outlet-row { grid-template-columns: 1fr; gap: 4px; } .outlet-name span { display: inline; margin-left: 6px; } .detail h1 { font-size: 26px; } }

/* 표 형태 목록 (인물, 의원, 위원장, 원외 정당) */
.people-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; padding-bottom: 8px; border-top: 1px solid var(--rule); }
.people-list a, .people-list .row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.people-list .count { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.committees, .minor { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.committees a, .committees .row, .minor .row { justify-content: space-between; }
.committees b { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cname { color: var(--ink-2); }
.day ul { border-top: 1px solid var(--rule); }
.day li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.day li a { font: 600 15px var(--serif); }

/* 조직도 */
.tree { display: grid; justify-items: center; padding-bottom: 4px; }
.tree-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; position: relative; padding-top: 20px; width: 100%; }
.tree-row:first-child { padding-top: 0; }
.tree-row:not(:first-child)::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 20px; background: var(--rule); }
.tree-row.wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); border-top: 1px solid var(--rule); margin-top: 20px; padding-top: 12px; }
.tree-row.wide::before { top: -21px; }
.node { display: grid; gap: 2px; border: 1px solid var(--ink-4); padding: 9px 12px; min-width: 150px; text-align: center; background: var(--paper); }
.node:hover { text-decoration: none; border-color: var(--rule); }
.node b { display: flex; align-items: center; justify-content: center; gap: 6px; font: 700 17px var(--serif); }
.node-title { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.node-count { font-size: 11.5px; color: var(--link); }
.node.vacant { border-style: dashed; }
.node.vacant b { color: var(--ink-3); font: 400 13px var(--sans); }
.note { margin-top: 10px; }
.seatbar { display: flex; height: 18px; gap: 1px; background: var(--hair); }
.seatbar span { display: block; min-width: 3px; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.seat-legend li { display: flex; align-items: center; gap: 6px; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 28px; }
.party-card { border-top: 4px solid var(--ink-4); padding: 12px 0 18px; border-bottom: 1px solid var(--hair); display: grid; gap: 8px; align-content: start; }
.party-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.party-head h2 { font: 700 20px var(--serif); }
.badge { font-weight: 700; color: var(--ink); }
.leaders { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 14px; }
.leaders dt { color: var(--ink-3); }

/* 안내 */
.prose p, .prose ul { color: var(--ink-2); max-width: 70ch; }
.prose ul { display: grid; gap: 8px; }
.prose ul li { padding-left: 13px; position: relative; }
.prose ul li::before { content: "–"; position: absolute; left: 0; color: var(--ink-4); }
.prose .outlets { font-size: 14px; color: var(--ink-2); margin: 4px 0 10px; }
.empty { padding: 56px 0; text-align: center; color: var(--ink-3); }

/* 판권 */
.foot { margin-top: 24px; border-top: 3px double var(--rule); padding: 18px 20px 56px; font-size: 12.5px; color: var(--ink-3); display: grid; gap: 4px; }
.foot b { color: var(--ink-2); }
