/* ==========================================================
   국내파생상품 정리zip — 공통 스타일
   블랙/화이트 톤, 간결한 레이아웃
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --strong: #000000;
  --invert-bg: #000000;
  --invert-text: #f5f5f7;
  --invert-muted: #a1a1a6;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1000px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --strong: #ffffff;
    --invert-bg: #f5f5f7;
    --invert-text: #1d1d1f;
    --invert-muted: #6e6e73;
    --nav-bg: rgba(0, 0, 0, 0.72);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- 상단 내비게이션 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--muted); font-weight: 600; }
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- 히어로 ---------- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.hero.dark {
  background: var(--invert-bg);
  color: var(--invert-text);
}
.eyebrow {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}
.hero.dark .eyebrow { color: var(--invert-muted); }
h1 {
  font-size: clamp(40px, 8vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 18px;
}
h3 {
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 10px;
}
.lead {
  font-size: clamp(18px, 2.6vw, 23px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
}
.hero.dark .lead { color: var(--invert-muted); }
.section-head .lead { margin: 0; }

/* ---------- 섹션 ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 44px; max-width: 760px; }
.section-num {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ---------- 목차 칩 ---------- */
.toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.toc a {
  text-decoration: none;
  font-size: 14px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.toc a:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.hero.dark .toc a { color: var(--invert-text); border-color: #48484a; }
.hero.dark .toc a:hover { background: var(--invert-text); color: var(--invert-bg); }

/* ---------- 카드/그리드 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.section:not(.alt) .card { background: var(--bg-alt); }
.card p { margin: 0; color: var(--muted); }
.card p + p { margin-top: 10px; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 18px;
}
.card .tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-bottom: 14px;
}
.card.dark { background: var(--invert-bg) !important; color: var(--invert-text); }
.card.dark p { color: var(--invert-muted); }
.card.dark .tag { border-color: #48484a; color: var(--invert-muted); }

/* 카테고리 카드 (홈) */
a.category {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.category:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12); }
.category .more { margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 15px; }
.category.soon {
  background: transparent !important;
  border: 1.5px dashed var(--line);
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--muted);
  min-height: 240px;
}

/* ---------- 비유 박스 ---------- */
.analogy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

/* ---------- 공식(수식) ---------- */
.equation {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 40px;
}
.equation .term {
  flex: 1 1 180px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.section:not(.alt) .equation .term { background: var(--bg-alt); }
.equation .term.total { background: var(--invert-bg) !important; color: var(--invert-text); flex-basis: 100%; }
.equation .term b { display: block; font-size: 18px; }
.equation .term small { color: var(--muted); font-size: 14px; }
.equation .term.total small { color: var(--invert-muted); }
.equation .op {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
}

.formula {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 9px;
  line-height: 1.5;
}

/* ---------- 표 ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
.section:not(.alt) .table-wrap { background: var(--bg-alt); }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 15px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; color: var(--muted); font-weight: 700; }
td:first-child { font-weight: 700; white-space: nowrap; }
td .easy { color: var(--muted); }

/* ---------- 콜아웃 ---------- */
.callout {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--text);
  background: var(--card);
}
.section:not(.alt) .callout { background: var(--bg-alt); }
.callout strong { display: block; margin-bottom: 4px; }
.callout p { margin: 0; color: var(--muted); }

/* ---------- 예시 계산 ---------- */
.example {
  margin-top: 24px;
  border-radius: var(--radius);
  padding: 28px;
  background: var(--invert-bg);
  color: var(--invert-text);
}
.example h3 { margin-bottom: 16px; }
.example .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #3a3a3c;
  font-size: 15px;
}
.example .row span:first-child { color: var(--invert-muted); }
.example .row.result { border-bottom: 0; font-weight: 800; font-size: 18px; padding-top: 14px; }
.example .row.result span:first-child { color: inherit; }
.example .note { font-size: 13px; color: var(--invert-muted); margin: 14px 0 0; }
@media (prefers-color-scheme: dark) {
  .example .row { border-bottom-color: #d2d2d7; }
}

/* ---------- 원문 보기 (접기/펼치기) ---------- */
details {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
}
.section:not(.alt) details { background: var(--bg); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--muted); line-height: 1; }
details[open] summary::after { content: "−"; }
details .body { padding: 0 20px 20px; font-size: 15px; color: var(--muted); }
details .body p { margin: 0 0 10px; }
details .body ul, details .body ol { margin: 0 0 10px; padding-left: 20px; }
details .body li { margin-bottom: 6px; }
details .body b { color: var(--text); }

/* ---------- 단계(타임라인) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps li {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 24px;
  counter-increment: step;
}
.section:not(.alt) .steps li { background: var(--bg-alt); }
.steps li::before {
  content: "STEP " counter(step);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.steps li p { margin: 0; color: var(--muted); font-size: 15px; }
.steps li.danger { background: var(--invert-bg) !important; color: var(--invert-text); }
.steps li.danger::before, .steps li.danger p { color: var(--invert-muted); }

/* ---------- 체크리스트 ---------- */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 24px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}
.list li span { display: block; color: var(--muted); font-size: 15px; }

/* ---------- 큰 숫자 ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.section:not(.alt) .stat { background: var(--bg-alt); }
.stat .label { font-size: 14px; color: var(--muted); }
.stat .value { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin: 4px 0; }
.stat .desc { font-size: 14px; color: var(--muted); }

/* ---------- 용어 사전 ---------- */
.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 40px;
  margin: 0;
}
.glossary div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-weight: 700; margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- 푸터 ---------- */
.footer {
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 13px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}
.footer p { margin: 0 0 8px; }
.footer a { color: var(--text); }

/* ---------- 현업 포인트 ---------- */
.pro {
  margin-top: 28px;
  border: 2px solid var(--text);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  background: var(--bg);
}
.section.alt .pro { background: var(--card); }
.pro-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--text);
  color: var(--bg);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.pro h4 { margin: 0 0 10px; font-size: 18px; letter-spacing: -0.02em; }
.pro ul { margin: 0; padding-left: 20px; }
.pro li { margin-bottom: 8px; font-size: 15px; }
.pro li span { color: var(--muted); font-size: 13px; margin-left: 4px; }
.pro .say {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: 10px;
  font-size: 15px;
}
.section.alt .pro .say { background: var(--bg-alt); }
.pro .say::before {
  content: "🗣️ 응대 예시";
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 4px;
}
mark.must {
  background: linear-gradient(transparent 58%, rgba(0, 0, 0, 0.16) 58%);
  color: inherit;
  font-weight: 700;
  padding: 0 1px;
}
@media (prefers-color-scheme: dark) {
  mark.must { background: linear-gradient(transparent 58%, rgba(255, 255, 255, 0.3) 58%); }
}

/* ---------- 현업 요약 (필수 안내) ---------- */
.must-say {
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 28px;
  background: var(--invert-bg);
  color: var(--invert-text);
}
.must-say h3 { margin-bottom: 14px; }
.must-say ol { margin: 0; padding-left: 22px; }
.must-say li { margin-bottom: 10px; }
.must-say li span { display: block; color: var(--invert-muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq details { margin-top: 10px; }
.faq summary { font-size: 16px; }
.faq .src { font-size: 13px; color: var(--muted); margin-top: 6px; }

.mt-0 { margin-top: 0; }
.center { text-align: center; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 72px 0 60px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .card { padding: 26px 22px; }
  .nav-links { gap: 14px; }
  .equation .op { width: 100%; justify-content: center; padding: 0; font-size: 18px; }
  .example { padding: 24px 20px; }
  .example .row { flex-direction: column; gap: 2px; }
}

#cheat .stat .value { font-size: 28px; }

/* ==========================================================
   학습 흐름 컴포넌트 (지도 · 물탱크 · 따라가기 · 단계 표시)
   ========================================================== */

/* ---------- 공부 순서 안내 (히어로) ---------- */
.path {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 4px;
  margin-top: 34px;
  font-size: 14px;
}
.path a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: #1c1c1e;
  color: var(--invert-text);
  border: 1px solid #3a3a3c;
}
.path a:hover { background: var(--invert-text); color: var(--invert-bg); }
.path .arrow { color: var(--invert-muted); }
@media (prefers-color-scheme: dark) {
  .path a { background: #e5e5ea; border-color: #d2d2d7; }
}

/* ---------- 기초 개념 카드 ---------- */
.basics { counter-reset: basic; }
.basics .card { position: relative; }
.basics .card .emoji { font-size: 34px; line-height: 1; margin-bottom: 14px; display: block; }
.basics .card .ex {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
  color: var(--text);
}
.section.alt .basics .card .ex { background: var(--bg-alt); }
.bridge {
  margin-top: 28px;
  text-align: center;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 700;
  line-height: 1.5;
}
.bridge small { display: block; font-size: 15px; font-weight: 500; color: var(--muted); margin-top: 6px; }

/* ---------- 증거금 지도 ---------- */
.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}
.stage {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px 22px;
  display: flex;
  flex-direction: column;
}
.section:not(.alt) .stage { background: var(--bg-alt); }
.stage:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -23px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 800;
  color: var(--muted);
}
.stage .no { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.04em; }
.stage .em { font-size: 34px; line-height: 1; margin: 10px 0 8px; }
.stage h3 { margin-bottom: 4px; }
.stage .meta { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.stage .chips { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.stage .chips a {
  display: block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.section.alt .stage .chips a { background: var(--bg-alt); }
.stage .chips a:hover { border-color: var(--text); }
.stage .chips a small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.stage.dark { background: var(--invert-bg) !important; color: var(--invert-text); }
.stage.dark .no, .stage.dark .meta { color: var(--invert-muted); }
.roadmap .stage.dark .chips a { background: #1c1c1e; border-color: #3a3a3c; color: var(--invert-text); }
.stage.dark .chips a small { color: var(--invert-muted); }
@media (prefers-color-scheme: dark) {
  .roadmap .stage.dark .chips a { background: #e5e5ea; border-color: #d2d2d7; }
}
.one-line {
  margin-top: 28px;
  border-radius: var(--radius);
  padding: 24px 26px;
  border: 2px solid var(--text);
  font-size: 17px;
  line-height: 1.8;
}
.one-line b { background: linear-gradient(transparent 60%, rgba(0,0,0,.14) 60%); }
@media (prefers-color-scheme: dark) {
  .one-line b { background: linear-gradient(transparent 60%, rgba(255,255,255,.28) 60%); }
}
@media (max-width: 860px) {
  .roadmap { grid-template-columns: 1fr; gap: 30px; }
  .stage:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -27px; transform: translateX(-50%); }
}

/* ---------- 물탱크 게이지 ---------- */
.gauge-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gauge-card { background: var(--card); border-radius: var(--radius); padding: 24px; }
.section:not(.alt) .gauge-card { background: var(--bg-alt); }
.gauge-card h3 { margin-bottom: 16px; }
.gauge-card p.cap { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.gauge {
  position: relative;
  height: 240px;
  width: 100%;
}
.gauge .tank {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 110px;
  border: 3px solid var(--text);
  border-top-width: 0;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  background: var(--bg);
}
.gauge .water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--level, 50%);
  background: #c7c7cc;
  transition: height 0.7s ease;
}
.gauge.danger .water {
  background: repeating-linear-gradient(135deg, #8e8e93 0 8px, #aeaeb2 8px 16px);
}
.gauge .water span {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #1d1d1f;
}
.gauge .line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--at, 50%);
  border-top: 2px dashed var(--text);
  transition: bottom 0.7s ease, opacity 0.4s;
}
.gauge .line.max { border-top-style: solid; }
.gauge .line .lbl {
  position: absolute;
  left: 122px;
  top: -11px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  background: var(--card);
  padding-right: 4px;
}
.section:not(.alt) .gauge .line .lbl { background: var(--bg-alt); }
.gauge .line .lbl small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.gauge .line.hide { opacity: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; background: #c7c7cc; }
.legend i.danger { background: repeating-linear-gradient(135deg, #8e8e93 0 4px, #aeaeb2 4px 8px); }
.legend i.solid { background: none; border-top: 2px solid var(--text); border-radius: 0; height: 0; width: 18px; vertical-align: 4px; }
.legend i.dash { background: none; border-top: 2px dashed var(--text); border-radius: 0; height: 0; width: 18px; vertical-align: 4px; }

/* ---------- 따라가기 (스토리) ---------- */
.story {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
}
.section:not(.alt) .story { background: var(--bg-alt); }
.story-steps { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.story-steps button {
  flex: 1 1 0;
  min-width: 44px;
  border: 0;
  border-radius: 999px;
  height: 8px;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}
.story-steps button.on { background: var(--text); }
.story-body { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.story .stage-tag { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: var(--text); color: var(--bg); margin-bottom: 12px; }
.story h3 { font-size: 24px; margin-bottom: 12px; }
.story .txt p { margin: 0 0 10px; color: var(--muted); }
.story .txt p b { color: var(--text); }
.story .nums { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.story .nums li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.story .nums li span:first-child { color: var(--muted); }
.story .nums li span:last-child { font-weight: 700; text-align: right; }
.story .nums li.hl span:last-child { font-size: 17px; }
.story .concept { margin-top: 16px; font-size: 14px; color: var(--muted); }
.story .concept a { font-weight: 700; color: var(--text); }
.story .choices { display: grid; gap: 8px; margin-top: 14px; }
.story .choices div { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.story .choices b { color: var(--text); }
.story-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }
.story-nav button {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.story-nav button.primary { background: var(--text); color: var(--bg); }
.story-nav button:disabled { opacity: 0.3; cursor: default; }
.story-nav .count { font-size: 14px; color: var(--muted); }
.assume { margin-top: 14px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .story { padding: 22px 18px; }
  .story-body { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- 단계 위치 표시 ---------- */
.stage-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.stage-bar a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.stage-bar a.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chapter-intro {
  margin: -16px 0 40px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 15px;
  color: var(--muted);
}
.section:not(.alt) .chapter-intro { background: var(--bg-alt); }
.chapter-intro b { color: var(--text); }
.sub-head { margin: 56px 0 18px; padding-top: 32px; border-top: 1px solid var(--line); }
.sub-head h3 { font-size: 26px; margin: 0 0 6px; }
.sub-head p { margin: 0; color: var(--muted); }
.next-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--invert-bg);
  color: var(--invert-text);
  text-decoration: none;
}
.next-step span { color: var(--invert-muted); font-size: 14px; display: block; }
.next-step b { font-size: 18px; }
.next-step .go { font-size: 24px; }
