:root {
  --ink: #1a1f2b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --green: #059669;
  --red: #dc2626;
  --bg: #f6f7f9;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px 80px; }

/* 표지 */
.cover {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff; padding: 56px 24px; margin-bottom: 28px;
}
.cover .inner { max-width: 1040px; margin: 0 auto; }
.cover .tag { font-size: 13px; opacity: .85; letter-spacing: .04em; }
.cover h1 { font-size: 30px; margin: 8px 0 6px; }
.cover .desc { opacity: .9; font-size: 15px; }
.cover .stamp { margin-top: 18px; font-size: 13px; opacity: .8; }

/* 요약 박스 */
.summary {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 26px; margin-bottom: 30px;
}
.summary h2 { margin: 0 0 12px; font-size: 18px; }
.findings { margin: 0; padding-left: 18px; }
.findings li { margin: 7px 0; }
.findings strong { color: var(--accent); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 14px; margin: 18px 0 0; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fbfcfe; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.up { color: var(--green); } .down { color: var(--red); }

/* 섹션 */
section.block { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; margin-bottom: 24px; }
section.block > h2 { font-size: 19px; margin: 0 0 6px; }
section.block > h2 .num { color: var(--accent); margin-right: 8px; }
.lead { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.note { background: #f0f6ff; border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 6px; font-size: 14px; margin: 16px 0 0; }
.note b { color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.chart-box { position: relative; min-height: 300px; }
canvas { max-height: 360px; }
@media (max-width: 820px){ .two{ grid-template-columns:1fr; } }

/* 표 */
table.stat { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.stat th, table.stat td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
table.stat th:first-child, table.stat td:first-child { text-align: left; }
table.stat thead th { color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); }
table.stat tbody tr:hover { background: #fafbff; }

/* 히트맵 */
.heat { border-collapse: collapse; font-size: 11px; width: 100%; }
.heat th { color: var(--muted); font-weight: 600; padding: 4px; }
.heat th.rot { writing-mode: vertical-rl; transform: rotate(180deg); height: 70px; white-space: nowrap; }
.heat td { text-align: center; padding: 6px 4px; color: #1a1f2b; border: 1px solid #fff; }
.heat td.lab { text-align: left; color: var(--muted); white-space: nowrap; padding-right: 8px; }

.legend { font-size: 12px; color: var(--muted); margin-top: 10px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
.toplink { display:inline-block; margin-top:14px; color:#fff; font-size:13px; text-decoration:underline; opacity:.9; }

@media print {
  body { background: #fff; }
  .cover { background: #1e3a8a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  section.block, .summary { break-inside: avoid; border-color: #ccc; }
  .toplink { display: none; }
}
