/* Layout: single reading column, tiles row, charts, then filterable table. No external fonts or requests. */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --fg: #151a22; --muted: #5b6575; --line: #dde1e8;
  --accent: #2f5d8a; --ok: #2e7d4f; --warn: #b7791f; --bad: #c0392b; --grey: #9aa3b2; --grid: #e8ebf0;
  --serif: "Iowan Old Style", "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1318; --panel: #171c23; --fg: #e7ebf1; --muted: #9aa4b3; --line: #2a313b;
    --accent: #7fa8d6; --ok: #5cbf86; --warn: #e0a84a; --bad: #e87567; --grey: #6b7584; --grid: #232a33; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px;
  padding-block: 40px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0; text-wrap: balance; }
.sub { color: var(--muted); font-size: 0.82rem; margin: 0; }
.head { display: flex; flex-direction: column; gap: 6px; }
.lede { margin: 8px 0 0; max-width: 68ch; line-height: 1.65; }
.lede b { font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .lbl { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .num { font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .hint { font-size: 0.78rem; color: var(--muted); }
.sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.chart { position: relative; min-height: 220px; min-width: 0; }
.chart svg { display: block; }
.chart svg text { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.chart svg text.val { fill: var(--fg); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--grid); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8rem; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; background: var(--grey); }
.sw[data-status="검증 완료"] { background: var(--ok); }
.sw[data-status="부분 결과"] { background: var(--accent); }
.sw[data-status="검토 중"] { background: var(--warn); }
.sw[data-status="미검증 주장"] { background: var(--grey); }
.sw[data-status="논란"] { background: var(--bad); }
.sw[data-group="주요 기여"] { background: var(--accent); }
.sw[data-group="보조 기여"] { background: var(--grey); }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 16px rgb(0 0 0 / 0.12); border-radius: 6px; padding: 6px 10px; font-size: 0.8rem; max-width: 260px; z-index: 5; line-height: 1.45; }
.tip .t { font-weight: 600; }
.tip .s { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input, .filters select { font: inherit; font-size: 0.9rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background-color: var(--panel); color: var(--fg); max-width: 100%; }
.filters input { flex: 1 1 200px; min-width: 0; }
.filters :focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.count { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th { text-align: left; font-weight: 600; font-size: 0.78rem; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.table tr:last-child td { border-bottom: 0; }
td.date { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
td.prob a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
td.prob a:hover { text-decoration-color: currentColor; }
td.note { color: var(--muted); font-size: 0.82rem; max-width: 34ch; }
td.ai { font-size: 0.82rem; max-width: 22ch; }
.pill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.kind { white-space: nowrap; font-size: 0.82rem; }
.empty { padding: 18px; color: var(--muted); }
.defs { border-top: 1px solid var(--line); padding-top: 16px; }
.defs summary { cursor: pointer; font-weight: 600; }
.defs dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; max-width: 72ch; }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--muted); }
.src { font-size: 0.8rem; color: var(--muted); max-width: 72ch; line-height: 1.6; }
