:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #16181D;
  --muted: #565A61;
  --line: #DAD8D2;
  --accent: #1E4FD6;
  --accent-weak: #E8EEFC;
  --warn: #8A4300;
  --warn-bg: #FBEFE3;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: break-word; }
a { color: var(--accent); }
a:hover { color: #163DA8; }
.num, td, .stat b, .item-nums dd { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 20; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 6px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; margin-left: 18px; display: inline-block; padding: 10px 0; }
.nav a[aria-current="page"] { color: var(--accent); }
.site-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot p { margin: 4px 0; }

/* common */
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; font-weight: 800; }
h2 { font-size: 21px; line-height: 1.35; margin: 40px 0 12px; font-weight: 800; }
h3 { font-size: 17px; margin: 24px 0 8px; font-weight: 700; }
.lead { font-size: 18px; margin: 12px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.box { background: var(--surface); border-radius: 12px; padding: 16px 18px; }
.assume { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
ul.facts { margin: 0; padding-left: 20px; }
ul.facts li { margin: 4px 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid #ECEAE5; text-align: left; vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 600; background: #FBFAF7; white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.hl td { background: var(--accent-weak); font-weight: 700; }

/* home */
.hero { padding: 32px 0 8px; }
.hero p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 20px 0; }
.stat { background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1.3; }
.stat span { color: var(--muted); font-size: 13px; }
.reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.report-card { display: block; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 16px 18px; text-decoration: none; }
.report-card:hover { color: #fff; background: #23262D; }
.report-card b { display: block; font-size: 17px; }
.report-card span { font-size: 14px; color: #C9CCD1; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 16px 0 10px; padding: 12px; background: var(--surface); border-radius: 12px; position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 var(--line); }
.filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; flex: 1 1 120px; }
.filters label.grow { flex: 2 1 180px; }
.filters select, .filters input { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid #BDBAB3; border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px; width: 100%; }
.count { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--surface); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr; gap: 6px 16px; }
.item-when { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.dday { font-weight: 800; color: var(--accent); font-size: 15px; }
.item-title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.item-title a { color: var(--ink); }
.item-title .tag { display: inline-block; font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }
.item-sub { margin: 0; font-size: 14px; color: var(--muted); }
.item-nums { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item-nums div { min-width: 0; }
.item-nums dt { font-size: 12px; color: var(--muted); }
.item-nums dd { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.item-nums dd small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.4; }
.item-nums dd.vs { color: var(--accent); }
.item-nums dd.none { color: var(--muted); font-size: 15px; font-weight: 600; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flags li { background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
@media (min-width: 820px) {
  .item { grid-template-columns: 120px minmax(0, 1fr) 380px; align-items: center; }
  .item-when { flex-direction: column; gap: 0; }
  .item-main { grid-column: 2; }
  .item-nums { grid-column: 3; grid-row: 1 / span 2; }
  .flags { grid-column: 2; }
}

/* detail */
.crumb { font-size: 14px; margin: 20px 0 0; }
.d-head { padding: 12px 0 4px; }
.d-head .case { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.keynums { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 20px 0 8px; }
.keynum { background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.keynum.main { background: var(--ink); color: var(--bg); }
.keynum.main span { color: #C9CCD1; }
.keynum span { display: block; font-size: 13px; color: var(--muted); }
.keynum b { display: block; font-size: 24px; font-weight: 900; line-height: 1.3; }
.keynum small { font-size: 13px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.bar-track { background: #ECEAE5; border-radius: 6px; height: 28px; position: relative; }
.bar-fill { background: #9EA3AB; height: 100%; border-radius: 6px; }
.bar-row.hl .bar-fill { background: var(--accent); }
.bar-val { position: absolute; right: 8px; top: 3px; font-weight: 700; font-size: 14px; }
.bar-row.hl .bar-label { font-weight: 800; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr; gap: 2px; } }
.chart { width: 100%; height: auto; background: var(--surface); border-radius: 12px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
figure { margin: 16px 0; }
figure img { width: 100%; height: auto; border-radius: 12px; display: block; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.timeline li { background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.timeline li b { display: block; font-size: 15px; }
.timeline li.now { outline: 2px solid var(--accent); }
.checklist { margin: 0; padding-left: 20px; }
.checklist li { margin: 6px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; text-decoration: none; color: var(--ink); }
