:root {
  color-scheme: dark;
  --bg: #03060d;
  --panel: #05080f;
  --panel-2: #0a0f1f;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: #1e293b;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --danger: #fb7185;
  --green: #4ade80;
  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 8%, rgba(34, 211, 238, .09), transparent 28rem),
    linear-gradient(180deg, #03060d 0%, #05080f 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 100vh;
  background: #05080f;
  border-right: 1px solid var(--line);
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-mono);
  color: var(--muted);
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid var(--line); }
.sb-logo { width: 28px; height: 28px; color: var(--accent); text-decoration: none; flex: 0 0 auto; }
.sb-logo svg, .sb-ico svg { width: 100%; height: 100%; display: block; }
.sb-brand-text { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.sb-name { color: #f1f5f9; font-weight: 800; letter-spacing: .1em; font-size: 12px; }
.sb-sub { color: var(--faint); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.sb-status { display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-size: 10px; color: var(--green); letter-spacing: .12em; }
.sb-led { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 6px var(--green); animation: sb-pulse 1.4s ease-in-out infinite; }
@keyframes sb-pulse { 50% { opacity: .45; } }
.sb-nav { display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.sb-group { margin: 12px 8px 4px; color: #475569; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.sb-details { margin: 2px 0 0; }
.sb-details summary { cursor: pointer; list-style: none; margin: 10px 8px 4px; color: #64748b; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.sb-details summary::-webkit-details-marker { display: none; }
.sb-details[open] summary { color: var(--accent); }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--muted); text-decoration: none; border-radius: 3px; font-size: 12px; letter-spacing: .03em; transition: background 100ms ease, color 100ms ease; }
.sb-item:hover { background: #0c1426; color: var(--text); text-decoration: none; }
.sb-item.is-active { background: #0e1a32; color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.sb-subitem { padding-left: 16px; font-size: 11.5px; }
.sb-ico { width: 16px; height: 16px; color: currentColor; flex: 0 0 16px; }
.sb-label { min-width: 0; }
.sb-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: #475569; font-size: 9.5px; letter-spacing: .12em; }
main { width: min(1240px, 100%); margin: 0 auto; padding: 22px clamp(14px, 3vw, 36px) 64px; }
.page-head {
  background: linear-gradient(180deg, rgba(14, 26, 50, .72), rgba(5, 8, 15, .88));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  margin: 0 0 18px;
  position: relative;
  overflow: hidden;
}
.page-head::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(30px, 4.8vw, 52px); line-height: 1.08; letter-spacing: 0; font-weight: 850; }
.compact-head { border-bottom: 1px solid var(--line); padding: 6px 0 16px; margin: 0 0 16px; }
.compact-head h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 38px); line-height: 1.12; letter-spacing: 0; font-weight: 850; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.subtitle { margin: 0; color: var(--muted); max-width: 820px; font-size: 16px; }
section { background: rgba(5, 8, 15, .9); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin: 14px 0; overflow: hidden; }
section section { margin: 12px 0; }
h2 { margin: 0 0 14px; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; letter-spacing: 0; }
h3 { margin: 16px 0 8px; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.card { background: #05080f; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 16px; min-width: 0; }
.card .label { color: var(--muted); font-size: 13px; }
.card .value { font-family: var(--font-mono); color: #f8fafc; font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 4px 0; line-height: 1.12; }
.card .hint { color: var(--muted); font-size: 13px; }
.chart-wrap { width: 100%; overflow-x: auto; }
svg.chart { width: 100%; height: auto; min-width: 520px; }
.axis, .tick { fill: #94a3b8; font-size: 12px; }
.bar-label { fill: #e2e8f0; font-size: 12px; }
.note { border-left: 4px solid var(--accent); background: #07111f; padding: 12px 14px; border-radius: 4px; color: #cbd5e1; }
.insight-list { margin: 0; padding-left: 20px; }
.insight-list li { margin: 8px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; }
th { background: #0c1426; color: #f8fafc; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.report-link { display: block; background: #05080f; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 16px; text-decoration: none; color: var(--text); transition: transform 120ms ease, border-color 120ms ease; }
.report-link:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.report-link strong { display: block; margin-bottom: 4px; }
.report-link span { color: var(--muted); font-size: 14px; }
.issue-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.issue-card { display: grid; grid-template-columns: minmax(180px, .38fr) minmax(0, 1fr) auto; gap: 14px; align-items: start; background: #05080f; border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 6px; padding: 16px; text-decoration: none; color: inherit; }
.issue-card:hover { border-color: var(--accent); text-decoration: none; }
.issue-card strong { display: block; margin-bottom: 8px; font-size: 17px; }
.issue-card span { display: block; color: var(--muted); font-size: 14px; }
.issue-card .issue-count { color: var(--accent); font-family: var(--font-mono); white-space: nowrap; }
.decision-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.decision-card { border: 1px solid var(--line); border-radius: 6px; background: #05080f; padding: 14px; }
.decision-card .meta { color: var(--faint); font-family: var(--font-mono); font-size: 12px; margin-bottom: 6px; }
.decision-card .title { font-weight: 800; margin-bottom: 8px; }
.decision-card .amount { color: var(--danger); font-weight: 800; }
.decision-card a.title { color: var(--text); text-decoration: none; }
.decision-card a.title:hover { color: var(--accent); }
.summary-box { border: 1px solid #164e63; background: #07111f; border-left: 3px solid var(--accent); border-radius: 6px; padding: 14px; margin: 12px 0; }
.summary-box strong { display: block; color: var(--accent); margin-bottom: 6px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.decision-summary { margin: 0; }
.decision-summary p { margin: 0; }
.doc-section p { white-space: pre-wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr); gap: 14px; align-items: start; }
.topic-map { width: 100%; min-height: 420px; background: #03060d; border-radius: 8px; border: 1px solid #1e293b; }
.topic-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.topic-atlas { display: grid; gap: 12px; }
.topic-clusters { border: 1px solid var(--line); border-radius: 6px; background: #05080f; padding: 10px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.topic-clusters label { color: var(--faint); font-size: 12px; font-family: var(--font-mono); }
.topic-cluster-select { width: 100%; max-height: 180px; color: var(--text); background: #03060d; border: 1px solid #1e293b; border-radius: 4px; padding: 9px 10px; font: inherit; }
.topic-cluster-button { flex: 0 0 220px; min-height: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--muted); padding: 8px; font: inherit; cursor: pointer; }
.topic-cluster-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-cluster-button strong { color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
.topic-cluster-button:hover, .topic-cluster-button.is-selected { background: #0c1426; border-color: #164e63; color: var(--text); }
.topic-point, .topic-label { cursor: pointer; }
.topic-point.is-selected { stroke: #f8fafc; stroke-width: 2.5; opacity: 1; }
.topic-label.is-selected { fill: var(--accent); }
.topic-detail { border: 1px solid var(--line); border-radius: 6px; background: #05080f; padding: 12px; max-height: 300px; overflow: auto; }
.cluster-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cluster-list li { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 10px; background: #05080f; }
.cluster-list strong { display: block; }
.cluster-list span { color: var(--muted); font-size: 13px; }
@media (max-width: 820px) {
  body { display: block; }
  .site-header { position: static; min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .sb-brand { border: 0; padding: 0; }
  .sb-status, .sb-footer { display: none; }
  .sb-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .sb-group, .sb-details summary { display: none; }
  .sb-details, .sb-details[open] { display: contents; }
  .sb-item, .sb-subitem { white-space: nowrap; padding: 7px 10px; }
  .sb-item.is-active { box-shadow: inset 0 -2px 0 var(--accent); }
  .cards, .link-grid, .split, .topic-wrap { grid-template-columns: 1fr; }
  .summary-grid, .topic-clusters { grid-template-columns: 1fr; }
  .issue-card { grid-template-columns: 1fr; }
  section { padding: 14px; }
  svg.chart { min-width: 440px; }
  th, td { font-size: 13px; }
}
