/* 숫자 서랍 차트 — 색은 이 토큰만. 라이트/다크 둘 다 따로 고른 값(dataviz 기준 팔레트, 표면 #ffffff / #1b1e19 에서 검증) */
.st-root, .st-fig {
  --st-ink: var(--ink, #1c1f1a);
  --st-ink-2: var(--ink-2, #5e6157);
  --st-muted: #6f7268;
  --st-grid: #e6e5de;
  --st-axis: #c3c2b7;
  --st-s1: #2a78d6;      /* 계열 1(크기·늘어남) */
  --st-neg: #e34948;     /* 줄어듦 */
  --st-area: rgba(42, 120, 214, .10);
  --st-tipbg: #1c1f1a; --st-tipink: #ffffff;
  /* 지도: 줄어듦(빨강) ← 회색 → 늘어남(파랑) */
  --st-n4: #a8302e; --st-n3: #e05a57; --st-n2: #f09a96; --st-n1: #f8d4d2;
  --st-z: #e3e1da;
  --st-p1: #cde2fb; --st-p2: #86b6ef; --st-p3: #3987e5; --st-p4: #1c5cab;
  --st-na: transparent;
  --st-k: 1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .st-root, :root:not([data-theme="light"]) .st-fig {
    --st-muted: #9a9d92; --st-grid: #2c2f29; --st-axis: #44483f;
    --st-s1: #3987e5; --st-neg: #e66767; --st-area: rgba(57, 135, 229, .14);
    --st-tipbg: #ecefe6; --st-tipink: #131511;
    --st-n4: #f2a09c; --st-n3: #d55451; --st-n2: #9a3330; --st-n1: #5c2321;
    --st-z: #383835;
    --st-p1: #1c3f6e; --st-p2: #2a64b0; --st-p3: #4f93e6; --st-p4: #9ec5f4;
  }
}
:root[data-theme="dark"] .st-root, :root[data-theme="dark"] .st-fig {
  --st-muted: #9a9d92; --st-grid: #2c2f29; --st-axis: #44483f;
  --st-s1: #3987e5; --st-neg: #e66767; --st-area: rgba(57, 135, 229, .14);
  --st-tipbg: #ecefe6; --st-tipink: #131511;
  --st-n4: #f2a09c; --st-n3: #d55451; --st-n2: #9a3330; --st-n1: #5c2321;
  --st-z: #383835;
  --st-p1: #1c3f6e; --st-p2: #2a64b0; --st-p3: #4f93e6; --st-p4: #9ec5f4;
}

.st-fig { margin: 18px 0 22px; padding: 14px 14px 10px; background: var(--card, #fff); border: 1px solid var(--line, #e4e2d6); border-radius: 14px; }
.st-cap { font-weight: 700; font-size: 15px; color: var(--st-ink); margin: 0 0 8px; }
.st-plot { position: relative; container-type: inline-size; }
/* viewBox 640 을 좁은 칸에 줄이면 글자도 작아진다 → 칸 너비에 따라 계단식으로 키운다(화면에서 약 12px) */
@container (max-width: 600px) { .st-svg { --st-k: 1.15; } }
@container (max-width: 520px) { .st-svg { --st-k: 1.3; } }
@container (max-width: 440px) { .st-svg { --st-k: 1.5; } }
@container (max-width: 380px) { .st-svg { --st-k: 1.7; } }
@container (max-width: 330px) { .st-svg { --st-k: 1.85; } }
.st-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.st-svg.st-map { overflow: hidden; }
.st-svg text { font-size: calc(13px * var(--st-k)); fill: var(--st-ink-2); }
.st-svg .st-tick { fill: var(--st-muted); font-variant-numeric: tabular-nums; }
.st-svg .st-lab { fill: var(--st-ink); }
.st-svg .st-val { fill: var(--st-ink-2); font-variant-numeric: tabular-nums; }
.st-svg .st-maplab { fill: var(--st-ink); font-size: calc(11px * var(--st-k)); font-weight: 600; paint-order: stroke; stroke: var(--card, #fff); stroke-width: 3px; pointer-events: none; }
.st-grid { stroke: var(--st-grid); stroke-width: 1; }
.st-axis { stroke: var(--st-axis); stroke-width: 1; }
.st-line { fill: none; stroke: var(--st-s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.st-area { fill: var(--st-area); stroke: none; }
.st-dot { fill: var(--st-s1); stroke: var(--card, #fff); stroke-width: 2; }
.st-cross { stroke: var(--st-axis); stroke-width: 1; }
.st-hit { fill: transparent; cursor: crosshair; }
.st-bar { fill: var(--st-s1); }
.st-bar.neg { fill: var(--st-neg); }
.st-rowhit { fill: transparent; }
.st-row:hover .st-rowhit, .st-row:focus-within .st-rowhit { fill: var(--surface, #f2f1ea); }
.st-svg a:focus-visible { outline: none; }
.st-svg a:focus-visible .st-rowhit { fill: var(--yellow-soft, #fff6cf); }
.st-reg { stroke: var(--card, #fff); stroke-width: .8; vector-effect: non-scaling-stroke; }
.st-map a .st-reg:hover, .st-map .st-reg:hover { stroke: var(--st-ink); stroke-width: 1.6; }
.c-n4 { fill: var(--st-n4); } .c-n3 { fill: var(--st-n3); } .c-n2 { fill: var(--st-n2); } .c-n1 { fill: var(--st-n1); }
.c-z { fill: var(--st-z); } .c-na { fill: var(--st-na); stroke: var(--st-axis); }
.c-p1 { fill: var(--st-p1); } .c-p2 { fill: var(--st-p2); } .c-p3 { fill: var(--st-p3); } .c-p4 { fill: var(--st-p4); }
.st-note { font-size: 13px; color: var(--st-ink-2); margin: 6px 0 0; }
.st-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--st-tipbg); color: var(--st-tipink); font-size: 13px; line-height: 1.45; padding: 6px 9px; border-radius: 8px; white-space: pre-line; max-width: 240px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }

.st-legend { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0; margin: 8px 0 0; font-size: 12px; color: var(--st-ink-2); font-variant-numeric: tabular-nums; }
.st-legend li { display: inline-flex; align-items: center; gap: 4px; }
.st-legend .st-lg-end { font-weight: 700; color: var(--st-ink); }
.st-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.st-sw.c-z { box-shadow: inset 0 0 0 1px var(--st-axis); }
.st-legend { gap: 4px 2px; }
.st-legend .st-lg-end { margin: 0 6px; }
.st-sw { width: 18px; border-radius: 2px; }
.st-sw.c-n4 { background: var(--st-n4); } .st-sw.c-n3 { background: var(--st-n3); } .st-sw.c-n2 { background: var(--st-n2); } .st-sw.c-n1 { background: var(--st-n1); }
.st-sw.c-z { background: var(--st-z); }
.st-sw.c-p1 { background: var(--st-p1); } .st-sw.c-p2 { background: var(--st-p2); } .st-sw.c-p3 { background: var(--st-p3); } .st-sw.c-p4 { background: var(--st-p4); }

/* 숫자 세 칸 · 답 */
.st-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.st-stat { background: var(--card, #fff); border: 1px solid var(--line, #e4e2d6); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.st-sl { display: block; font-size: 13px; color: var(--ink-2, #5e6157); }
.st-sv { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink, #1c1f1a); margin: 2px 0; overflow-wrap: anywhere; }
.st-stat small { font-size: 13px; color: var(--ink-2, #5e6157); }
.st-answer { margin: 8px 0 14px; padding-left: 20px; }
.st-answer li { margin: 4px 0; }
.st-answer b { font-weight: 800; }
.st-src { font-size: 13px; color: var(--ink-2, #5e6157); margin: 4px 0 18px; }
.st-table summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.st-cards { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.st-cards a { display: block; height: 100%; padding: 14px; border: 1px solid var(--line, #e4e2d6); border-radius: 12px; background: var(--card, #fff); text-decoration: none; color: var(--ink, #1c1f1a); }
.st-cards a:hover { border-color: var(--brand, #2f8f3a); }
.st-cards b { display: block; font-size: 16px; }
.st-cards small { color: var(--ink-2, #5e6157); font-size: 13px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 16px; }
.st-chips a { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line, #e4e2d6); text-decoration: none; font-size: 14px; color: var(--ink, #1c1f1a); background: var(--card, #fff); }
.st-chips a[aria-current="page"] { background: var(--brand-soft, #e6f2e5); border-color: var(--brand, #2f8f3a); font-weight: 700; }
@media (max-width: 520px) {
  .st-stats { grid-template-columns: 1fr; }
  .st-fig { padding: 10px 8px 8px; }
}
@media (forced-colors: active) {
  .st-line { stroke: CanvasText; } .st-bar { fill: CanvasText; } .st-reg { stroke: CanvasText; }
}
