/* ============================================================
   바이브코딩 첫 수업 — 강의 보드 디자인 시스템
   색 약속(절대 불변):
     파랑  = 자료·문서   (--data)
     주황  = AI·LLM      (--ai)
     초록  = 저장·DB     (--store)
     보라  = 도구·외부   (--tool)
   ============================================================ */

:root {
  color-scheme: light;
  --board: #f4f6f8;
  --board-deep: #e9edf2;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --ink: #243140;
  --ink-soft: #5d6c7b;
  --ink-faint: #8a97a5;
  --line: #dde4eb;
  --line-strong: #c3cdd8;

  --data: #2f6fde;
  --data-soft: #e9f0fc;
  --data-deep: #1d4fa8;
  --ai: #e8710a;
  --ai-soft: #fdf0e0;
  --ai-deep: #b4560a;
  --store: #178a5b;
  --store-soft: #e4f5ec;
  --store-deep: #0e6b45;
  --tool: #8a4fd3;
  --tool-soft: #f2ebfc;
  --tool-deep: #6836a8;

  --hl: #ffe97a;
  --danger: #d64545;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(36, 49, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(36, 49, 64, 0.1);

  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-hand: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--data);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: var(--hl);
}

mark {
  background: var(--hl);
  border-radius: 4px;
  padding: 0 3px;
}

/* ── 스크롤 진행률 ─────────────────────────── */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--data), var(--tool), var(--ai));
  transition: width 0.15s linear;
}

/* ── 상단바 ─────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px clamp(14px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 800;
}

.brand-text small {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.lesson-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px;
}

.lesson-nav::-webkit-scrollbar {
  display: none;
}

.lesson-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.lesson-nav a i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--board);
  color: var(--ink-soft);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  transition: background 0.15s, color 0.15s;
}

.lesson-nav a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.lesson-nav a.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.lesson-nav a.active i {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ── 공통 레이아웃 ──────────────────────────── */
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 32px) 60px;
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3.5vw, 40px);
}

.lesson,
.hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 92px;
}

/* ── 버튼 ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--ink);
  color: #fff;
}

.btn.ghost {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn.ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

/* 선택형 알약 버튼 */
.choice-row,
.choice-col {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.choice-col {
  flex-direction: column;
  align-items: stretch;
}

.choice-btn {
  padding: 10px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.choice-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.choice-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── 히어로 ─────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ai-deep);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.28;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--hl) 62%);
  padding: 0 2px;
}

.lead {
  margin: 0 0 22px;
  font-size: clamp(15.5px, 1.6vw, 17px);
  color: var(--ink-soft);
  max-width: 52ch;
}

.lead b {
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

/* 색 약속 */
.color-contract {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--panel-soft);
}

.contract-title {
  font-family: var(--font-hand);
  font-size: 20px;
  font-weight: 700;
}

.contract-note {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.color-contract ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.color-contract li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
}

.color-contract li span {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  display: inline-block;
}

.c-data span { background: var(--data); }
.c-ai span { background: var(--ai); }
.c-store span { background: var(--store); }
.c-tool span { background: var(--tool); }

/* 앱 해부도 */
.hero-anatomy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.anatomy-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.anatomy-title strong {
  font-size: 16px;
  font-weight: 800;
}

.anatomy-title span {
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--ai-deep);
}

.anatomy-board {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.anatomy-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--panel);
  min-width: 130px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  --accent: var(--ink-soft);
}

.anatomy-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.anatomy-node.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.anatomy-node .node-emoji {
  font-size: 22px;
  line-height: 1.2;
}

.anatomy-node b {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--accent);
}

.anatomy-node small {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.n-user { --accent: var(--ink); }
.n-kitchen { --accent: var(--ink); }
.n-ai { --accent: var(--ai); }
.n-tool { --accent: var(--tool); }
.n-db { --accent: var(--store); }

.anatomy-arrow {
  width: 2px;
  height: 20px;
  background: var(--line-strong);
  position: relative;
}

.anatomy-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--line-strong);
}

.anatomy-branches {
  width: min(78%, 340px);
  height: 22px;
  border-left: 2px solid var(--line-strong);
  border-right: 2px solid var(--line-strong);
  border-top: 2px solid var(--line-strong);
  border-radius: 10px 10px 0 0;
  position: relative;
  margin-top: 18px;
}

.anatomy-branches::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: var(--line-strong);
}

.anatomy-branches::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: var(--line-strong);
}

.anatomy-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.anatomy-row .anatomy-node {
  min-width: 0;
  flex: 1 1 0;
}

.anatomy-explain {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px;
  min-height: 96px;
}

.anatomy-explain b {
  font-size: 14px;
  font-weight: 800;
}

.anatomy-explain p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ── 0교시: 단어 지도 ───────────────────────── */
.word-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.word-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--wc, var(--ink-soft));
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.word-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.w-ai { --wc: var(--ai); }
.w-data { --wc: var(--data); }
.w-store { --wc: var(--store); }
.w-tool { --wc: var(--tool); }

.word-no {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--font-hand);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-faint);
}

.word-card b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--wc) 78%, var(--ink));
}

.word-card strong {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.4;
}

.word-card p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ── 교시 공통 ─────────────────────────────── */
.lesson-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.lesson-no {
  grid-row: span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-family: var(--font-hand);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  transform: rotate(-2deg);
  box-shadow: var(--shadow-sm);
}

.no-ai { background: var(--ai); }
.no-data { background: var(--data); }
.no-store { background: var(--store); }
.no-tool { background: var(--tool); }
.no-neutral { background: var(--ink); }

.lesson-head h2 {
  margin: 0;
  font-size: clamp(21px, 2.8vw, 30px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.lesson-goal {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.lesson-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  align-items: start;
}

.lesson-grid.grid-wide {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 스티커 노트 */
.sticky-note {
  background: #fff8c4;
  border: 1px solid #ecd96f;
  border-radius: 4px;
  padding: 20px 18px 16px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.sticky-note.tilt-l { transform: rotate(-1.4deg); }
.sticky-note.tilt-r { transform: rotate(1.2deg); }

.sticky-note::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 84px;
  height: 20px;
  background: rgba(200, 210, 220, 0.5);
  border: 1px solid rgba(160, 172, 185, 0.4);
  border-radius: 2px;
}

.sticky-note b {
  font-family: var(--font-hand);
  font-size: 18px;
  font-weight: 700;
  color: var(--ai-deep);
}

.sticky-note p {
  margin: 6px 0 0;
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: 1.45;
}

.why-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.why-card b {
  font-size: 13.5px;
  font-weight: 800;
}

.why-card p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.control-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.control-card > b {
  font-size: 15px;
  font-weight: 800;
}

.control-card > p {
  margin: 6px 0 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* 데모 무대 */
.demo-stage {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.demo-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-bar strong {
  font-size: 16px;
  font-weight: 900;
}

.demo-bar span {
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--ink-soft);
}

.demo-footnote {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
}

.ctx-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── 1교시: 토큰 ────────────────────────────── */
.token-sentence {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  min-height: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--data-soft);
  border: 1px solid color-mix(in srgb, var(--data) 32%, transparent);
  color: var(--data-deep);
  font-size: 14px;
  font-weight: 700;
  animation: chip-pop 0.3s both;
  animation-delay: calc(var(--i, 0) * 0.045s);
}

.token-chip.alt {
  background: #fff;
}

.token-chip.more {
  background: var(--ai-soft);
  border-color: color-mix(in srgb, var(--ai) 35%, transparent);
  color: var(--ai-deep);
}

@keyframes chip-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.token-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: stretch;
}

.token-count {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.token-count span {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-faint);
}

.token-count strong {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  line-height: 1;
  color: var(--data-deep);
  font-variant-numeric: tabular-nums;
}

/* 영수증 */
.receipt {
  background: #fffdf6;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-variant-numeric: tabular-nums;
}

.receipt-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1.5px dashed var(--line-strong);
  margin-bottom: 8px;
}

.receipt dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.receipt dl > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.receipt dt {
  color: var(--ink-soft);
}

.receipt dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
}

.receipt .receipt-total {
  border-top: 1.5px dashed var(--line-strong);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 900;
}

.receipt .receipt-total dd {
  color: var(--ai-deep);
  font-size: 14px;
}

.receipt-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.receipt.standalone {
  box-shadow: var(--shadow-sm);
  transform: rotate(0.6deg);
}

/* ── 2교시: LLM ─────────────────────────────── */
.predictor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.predictor-context {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.predictor-context p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

.predictor-context .gen-token {
  background: var(--ai-soft);
  border-radius: 6px;
  padding: 1px 4px;
  color: var(--ai-deep);
  animation: chip-pop 0.25s both;
}

.predictor-candidates {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
}

.candidate {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.candidate b {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate .bar {
  height: 14px;
  border-radius: 7px;
  background: var(--board);
  overflow: hidden;
}

.candidate .bar span {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: var(--data);
  width: 0;
  transition: width 0.45s ease;
}

.candidate small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.candidate.winner b {
  color: var(--ai-deep);
}

.candidate.winner .bar span {
  background: var(--ai);
}

.candidate.done-msg {
  display: block;
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--store-deep);
}

.predictor-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.predictor-hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* AI의 책상 */
.desk-block {
  margin-top: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: clamp(16px, 2.5vw, 26px);
}

.desk-intro h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 900;
}

.desk-intro h3 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--hl) 62%);
}

.desk-intro p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 70ch;
}

.desk-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.desk-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.step-btn i {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--board);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 800;
}

.step-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.step-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.step-btn.active i {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.teacher-script {
  margin-top: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-hand);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
}

.desk-area {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 10px solid #c9a87c;
  padding: 16px 18px 18px;
  min-width: 0;
}

.desk-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.desk-top strong {
  font-size: 15px;
  font-weight: 900;
}

.desk-top span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.desk-papers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desk-paper {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  opacity: 0.38;
  background: var(--panel-soft);
  transition: opacity 0.25s, transform 0.25s, border-color 0.25s, background 0.25s;
  --accent: var(--ink-soft);
}

.desk-paper.active {
  opacity: 1;
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}

.desk-paper b {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 2px;
}

.desk-paper p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.desk-paper.active p {
  color: var(--ink);
}

.p-rule { --accent: var(--ink); }
.p-user { --accent: var(--ink); }
.p-data { --accent: var(--data); }
.p-answer { --accent: var(--ai); }

.meter {
  margin-top: 14px;
  height: 12px;
  border-radius: 999px;
  background: var(--board);
  overflow: hidden;
  border: 1px solid var(--line);
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--store), #e0b429 60%, var(--ai));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.meter-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ── 3교시: 의미 지도 ───────────────────────── */
.semantic-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-bg {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1.5;
}

.map-grid line {
  stroke: #eef1f6;
  stroke-width: 1;
}

.map-zone ellipse {
  fill: rgba(216, 224, 233, 0.28);
  stroke: var(--line-strong);
  stroke-dasharray: 6 6;
  stroke-width: 1.2;
}

.map-zone text {
  font-family: var(--font-hand);
  font-size: 19px;
  fill: var(--ink-faint);
  text-anchor: middle;
}

.map-point circle {
  fill: var(--data);
  stroke: #fff;
  stroke-width: 3;
  transition: opacity 0.25s;
}

.map-point text {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  fill: var(--ink);
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.map-point,
.map-line,
.map-pin {
  transition: opacity 0.3s, transform 0.5s ease;
}

.map-point.dim {
  opacity: 0.55;
}

.map-line {
  stroke: var(--ai);
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
  animation: dash-flow 1.4s linear infinite;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -26;
  }
}

.map-pin path {
  fill: var(--ai);
  stroke: #fff;
  stroke-width: 2;
}

.map-pin circle {
  fill: #fff;
}

.map-pin text {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 900;
  fill: var(--ai-deep);
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.ranking-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.ranking-card > b {
  font-size: 15px;
  font-weight: 800;
}

.ranking-card ol {
  list-style: none;
  counter-reset: rank;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-card li {
  counter-increment: rank;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  font-size: 13.5px;
}

.ranking-card li::before {
  content: counter(rank);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--board);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}

.ranking-card li:first-child {
  background: var(--data-soft);
  border-color: color-mix(in srgb, var(--data) 35%, transparent);
}

.ranking-card li:first-child::before {
  background: var(--data);
  color: #fff;
}

.ranking-card li b {
  flex: 1;
  font-weight: 700;
}

.ranking-card li small {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.ranking-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ── 4교시: RAG ─────────────────────────────── */
.rag-story {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(20px, 3vw, 30px);
}

.story-cut {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.story-cut:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  color: var(--ink-faint);
  z-index: 1;
}

.cut-no {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  color: var(--data-deep);
}

.cut-visual {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-doc {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.cut-arrow {
  font-size: 16px;
}

.mini-chunks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-chunks i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--data-deep);
  background: var(--data-soft);
  border: 1px solid color-mix(in srgb, var(--data) 30%, transparent);
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mini-chunks i em {
  font-style: normal;
  font-size: 10px;
}

.mini-chunks i.hit {
  background: var(--ai-soft);
  border-color: var(--ai);
  color: var(--ai-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ai) 18%, transparent);
}

.mini-question {
  background: var(--panel);
  border: 1.5px solid var(--ai);
  color: var(--ai-deep);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.mini-desk {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 6px solid #c9a87c;
  padding: 0 8px 10px;
}

.mini-desk .desk-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--data-deep);
  background: var(--data-soft);
  border: 1px solid color-mix(in srgb, var(--data) 30%, transparent);
  border-radius: 6px;
  padding: 3px 8px;
}

.mini-desk .desk-ai {
  font-size: 24px;
}

.story-cut b {
  font-size: 14.5px;
  font-weight: 800;
}

.story-cut p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* 청킹 체험 */
.chunk-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: clamp(16px, 2.5vw, 26px);
}

.chunk-head h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 900;
}

.chunk-head p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

.chunk-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.doc-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}

.doc-card pre {
  margin: 12px 0 0;
  background: var(--ink);
  color: #e8eef5;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
}

.doc-card code {
  font-family: var(--font-mono);
}

.chunk-result {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.chunk-output {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chunk-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.chunk-card span {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--data-deep);
  background: var(--data-soft);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.chunk-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.chunk-card.selected {
  border: 1.5px solid var(--ai);
  background: #fffdf8;
}

.chunk-card.selected span {
  background: var(--ai);
  color: #fff;
}

.retrieval-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.retrieval-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.retrieval-flow div {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.retrieval-flow div:not(:last-child)::after {
  content: "→";
  color: var(--ink-faint);
}

.context-result {
  border-radius: var(--radius-sm);
  border: 1.5px solid color-mix(in srgb, var(--ai) 40%, transparent);
  background: var(--ai-soft);
  padding: 12px 14px;
  font-size: 13.5px;
}

/* ── 5교시: API & MCP ───────────────────────── */
.api-order {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.order-slip {
  background: #fffdf6;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-slip strong {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.5;
  flex: 1;
}

.api-log,
.mcp-log {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  animation: chip-pop 0.3s both;
}

.log-line.muted {
  color: var(--ink-faint);
  background: transparent;
  border-style: dashed;
}

.log-line b {
  flex-shrink: 0;
}

.mcp-block {
  margin-top: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: clamp(16px, 2.5vw, 26px);
}

.mcp-intro h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 900;
}

.mcp-intro p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 72ch;
}

.mcp-board {
  display: grid;
  grid-template-columns: 170px minmax(60px, 1fr) 300px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.mcp-ai {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--panel);
  border: 2px solid var(--ai);
  border-radius: var(--radius);
  padding: 18px 14px;
}

.mcp-ai .node-emoji {
  font-size: 26px;
}

.mcp-ai b {
  font-size: 15px;
  font-weight: 900;
  color: var(--ai-deep);
}

.mcp-ai small {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.mcp-hub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hub-line {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 12px, transparent 12px 20px);
}

.hub-line.active {
  background: repeating-linear-gradient(90deg, var(--tool) 0 12px, color-mix(in srgb, var(--tool) 30%, #fff) 12px 20px);
  animation: hub-pulse 0.9s ease infinite;
}

@keyframes hub-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.hub-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tool-deep);
  background: var(--tool-soft);
  border: 1px solid color-mix(in srgb, var(--tool) 30%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.mcp-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mcp-tool {
  padding: 12px 10px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.mcp-tool:hover {
  border-color: var(--tool);
  color: var(--tool-deep);
  transform: translateY(-1px);
}

.mcp-tool.active {
  background: var(--tool);
  border-color: var(--tool);
  color: #fff;
}

/* ── 6교시: DB ─────────────────────────────── */
.db-demo {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 2.5vw, 22px);
}

.wide-sheet {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.wide-sheet table,
.schema-table-wrap table,
.data-table-mini table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.wide-sheet th,
.wide-sheet td,
.schema-table-wrap th,
.schema-table-wrap td,
.data-table-mini th,
.data-table-mini td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.wide-sheet th,
.schema-table-wrap th,
.data-table-mini th {
  background: var(--panel-soft);
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.wide-sheet tbody tr:last-child td,
.schema-table-wrap tbody tr:last-child td,
.data-table-mini tbody tr:last-child td {
  border-bottom: none;
}

tr.trace-hit td {
  background: var(--hl);
}

.problem-note {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--danger);
  font-weight: 700;
}

.normalize-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--store-soft);
  border: 1.5px solid color-mix(in srgb, var(--store) 35%, transparent);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.normalize-copy b {
  font-size: 15.5px;
  font-weight: 900;
  color: var(--store-deep);
}

.normalize-copy p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.tag-store {
  display: inline-block;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--store) 40%, transparent);
  color: var(--store-deep);
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  padding: 1px 8px;
}

.normalize-card .btn.primary {
  background: var(--store-deep);
  border-color: var(--store-deep);
}

.schema-card {
  display: none;
}

.schema-card.revealed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.schema-table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--store);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  animation: chip-pop 0.4s both;
}

.schema-card.revealed .schema-table-card:nth-child(2) { animation-delay: 0.12s; }
.schema-card.revealed .schema-table-card:nth-child(3) { animation-delay: 0.24s; }

.table-name {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--store-deep);
  background: var(--store-soft);
  border-radius: 6px;
  padding: 3px 9px;
}

.schema-table-card > p {
  margin: 8px 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.schema-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.trace-bar {
  grid-column: 1 / -1;
  background: var(--panel);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trace-bar > b {
  font-family: var(--font-hand);
  font-size: 19px;
  font-weight: 700;
}

.trace-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* 비용 장부 */
.cost-ledger {
  margin-top: clamp(20px, 3vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: clamp(16px, 2.5vw, 26px);
}

.cost-copy h3 {
  margin: 0 0 8px;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 900;
}

.cost-copy p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.cost-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cost-checklist li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.cost-checklist li::before {
  content: "✓";
  color: var(--store);
  font-weight: 900;
}

.cost-checklist small {
  font-weight: 500;
  color: var(--ink-faint);
  font-size: 12.5px;
}

/* ── 7교시: 실전 사례 ───────────────────────── */
.case-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.project-top {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-kind {
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--ai-deep);
}

.project-top strong {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.project-card > p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.pipe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  align-items: center;
}

.pipe-chips span {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
}

.pipe-chips span:not(:last-child)::after {
  content: "→";
  margin-left: 6px;
  color: var(--ink-faint);
}

.pc-data { background: var(--data-soft); color: var(--data-deep); }
.pc-ai { background: var(--ai-soft); color: var(--ai-deep); }
.pc-store { background: var(--store-soft); color: var(--store-deep); }
.pc-tool { background: var(--tool-soft); color: var(--tool-deep); }
.pc-neutral { background: var(--board); color: var(--ink-soft); }

.learn-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.learn-points li {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.learn-points li::before {
  content: "✓";
  color: var(--store);
  font-weight: 900;
}

.card-cta {
  margin-top: auto;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.project-card:hover .card-cta {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── 교시 마무리(써먹기 + 퀴즈) ─────────────── */
.lesson-close {
  margin-top: clamp(20px, 3vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.use-vibe {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ai);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.use-vibe > b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ai-deep);
}

.vibe-sentence {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 20px;
  line-height: 1.5;
  flex: 1;
}

.use-vibe .copy-button {
  align-self: flex-start;
}

.quiz {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--store-deep);
}

.quiz-q {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-options button {
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.quiz-options button:hover {
  border-color: var(--ink);
}

.quiz-options button.correct {
  border-color: var(--store);
  background: var(--store-soft);
  color: var(--store-deep);
}

.quiz-options button.wrong {
  border-color: var(--danger);
  background: #fdecec;
  color: var(--danger);
}

.quiz-feedback {
  margin: 0;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.quiz-feedback.ok {
  border-color: color-mix(in srgb, var(--store) 40%, transparent);
  background: var(--store-soft);
  color: var(--store-deep);
}

.quiz-feedback.nope {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: #fdecec;
  color: #a63232;
}

/* ── 치트시트 ───────────────────────────────── */
.cheat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cheat-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cheat-tag {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
}

.t-ai { background: var(--ai-soft); color: var(--ai-deep); }
.t-data { background: var(--data-soft); color: var(--data-deep); }
.t-store { background: var(--store-soft); color: var(--store-deep); }
.t-tool { background: var(--tool-soft); color: var(--tool-deep); }
.t-neutral { background: var(--board); color: var(--ink-soft); }

.cheat-card p {
  margin: 0;
  font-size: 13.5px;
  flex: 1;
}

.cheat-card .copy-button {
  align-self: flex-start;
}

.finale {
  margin-top: clamp(24px, 4vw, 40px);
  text-align: center;
}

.finale-line {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.finale-quote {
  margin: 0 auto;
  max-width: 30ch;
  font-family: var(--font-hand);
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.45;
}

.fq-ai {
  color: var(--ai-deep);
  background: linear-gradient(transparent 65%, var(--ai-soft) 65%);
}

.fq-store {
  color: var(--store-deep);
  background: linear-gradient(transparent 65%, var(--store-soft) 65%);
}

/* ── 푸터 / 토스트 ─────────────────────────── */
.site-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 32px) 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 80;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   사례 상세 페이지 공통
   ============================================================ */
.case-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  scroll-margin-top: 92px;
}

.case-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.32;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.case-hero .lead {
  margin-bottom: 18px;
}

.case-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-hero-tags span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

.case-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.case-visual img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.caption {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* 목업 창(안전 재현 화면) */
.mock-window {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  font-size: 12.5px;
  font-weight: 800;
}

.mock-titlebar::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f26d6d;
  box-shadow: 16px 0 0 #f2c94c, 32px 0 0 #6dc98e;
  margin-right: 26px;
  flex-shrink: 0;
}

.mock-titlebar time {
  margin-left: auto;
  font-weight: 600;
  color: var(--ink-faint);
}

.mock-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  padding: 12px 14px;
}

.mock-card b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 3px;
}

.mock-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.mock-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.mock-meta .badge {
  background: var(--data-soft);
  color: var(--data-deep);
  border-radius: 999px;
  padding: 2px 8px;
}

.mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.mock-chips span {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--board);
  color: var(--ink-soft);
}

/* 파이프라인(컨베이어) */
.case-pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.case-pipeline li {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--ink-soft));
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  min-width: 0;
}

.case-pipeline li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
  color: var(--ink-faint);
  z-index: 1;
}

.case-pipeline li i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent, var(--ink-soft));
  color: #fff;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.case-pipeline li b {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 4px;
}

.case-pipeline li p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.st-data { --accent: var(--data); }
.st-ai { --accent: var(--ai); }
.st-store { --accent: var(--store); }
.st-tool { --accent: var(--tool); }
.st-neutral { --accent: var(--ink-soft); }

/* 배운 개념 복습 그리드 */
.recall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recall-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

a.recall-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.recall-chip {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--board);
  color: var(--ink-soft);
}

.recall-chip.rc-ai { background: var(--ai-soft); color: var(--ai-deep); }
.recall-chip.rc-data { background: var(--data-soft); color: var(--data-deep); }
.recall-chip.rc-store { background: var(--store-soft); color: var(--store-deep); }
.recall-chip.rc-tool { background: var(--tool-soft); color: var(--tool-deep); }

.recall-card h3,
.recall-card b {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
}

.recall-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* 3분할 역할 카드 */
.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.study-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.study-card > span {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--board);
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.study-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 800;
}

.study-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* 코드/프롬프트 카드 */
.prompt-grid,
.call-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.code-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.code-card > span {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--ai-soft);
  color: var(--ai-deep);
  margin-bottom: 8px;
}

.code-card.light > span {
  background: var(--data-soft);
  color: var(--data-deep);
}

.code-card h3 {
  margin: 0 0 10px;
  font-size: 15.5px;
  font-weight: 800;
}

.code-card pre {
  margin: 0;
  background: var(--ink);
  color: #e8eef5;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
}

.code-card.light pre {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
}

.code-card code {
  font-family: var(--font-mono);
}

/* 컨텍스트 책상(정적) */
.context-desk {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 10px solid #c9a87c;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}

.context-desk .desk-paper {
  opacity: 1;
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}

.context-desk .desk-paper p {
  color: var(--ink);
}

/* 장부 미니 테이블 */
.data-table-mini {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.data-table-mini td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--store-deep);
}

/* 강의 포인트 */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.teaching-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ai);
  border-radius: var(--radius);
  padding: 18px;
}

.teaching-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.teaching-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* 스크린샷 나란히 */
.screenshot-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.screenshot-panel {
  margin: 0;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
}

.screenshot-panel img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.screenshot-panel figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* 사례 페이지 안의 소제목 */
.case-section-head {
  margin-bottom: 18px;
}

.case-section-head .sec-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.case-section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.case-section-head p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 76ch;
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1020px) {
  .hero,
  .case-hero {
    grid-template-columns: 1fr;
  }

  .lesson-grid,
  .lesson-grid.grid-wide {
    grid-template-columns: 1fr;
  }

  .lesson-grid.grid-wide .side-rail {
    order: 2;
  }

  .side-rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
  }

  .desk-grid {
    grid-template-columns: 1fr;
  }

  .rag-story {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-cut:nth-child(2)::after {
    content: "";
  }

  .chunk-workbench,
  .chunk-result {
    grid-template-columns: 1fr;
  }

  .mcp-board {
    grid-template-columns: 1fr;
  }

  .mcp-hub {
    min-height: 58px;
    justify-content: center;
  }

  .hub-line {
    width: 6px;
    height: 100%;
    min-height: 40px;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    background: repeating-linear-gradient(180deg, var(--line-strong) 0 12px, transparent 12px 20px);
  }

  .hub-line.active {
    background: repeating-linear-gradient(180deg, var(--tool) 0 12px, color-mix(in srgb, var(--tool) 30%, #fff) 12px 20px);
  }

  .hub-label {
    position: relative;
    z-index: 1;
  }

  .schema-card.revealed {
    grid-template-columns: 1fr;
  }

  .cost-ledger {
    grid-template-columns: 1fr;
  }

  .cheat-grid,
  .recall-grid,
  .study-grid,
  .teaching-grid,
  .word-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-pipeline li:not(:last-child)::after {
    content: "";
  }

  .prompt-grid,
  .call-grid,
  .screenshot-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 8px;
  }

  html {
    scroll-padding-top: 132px;
  }

  .lesson,
  .hero,
  .case-hero {
    scroll-margin-top: 132px;
    border-radius: var(--radius);
  }

  .lesson-head {
    grid-template-columns: 1fr;
  }

  .lesson-no {
    grid-row: auto;
    width: 56px;
    height: 56px;
    font-size: 17px;
  }

  .token-stats {
    grid-template-columns: 1fr;
  }

  .api-order {
    grid-template-columns: 1fr;
  }

  .rag-story {
    grid-template-columns: 1fr;
  }

  .story-cut::after,
  .story-cut:nth-child(2)::after {
    content: "" !important;
  }

  .case-card-grid {
    grid-template-columns: 1fr;
  }

  .lesson-close {
    grid-template-columns: 1fr;
  }

  .cheat-grid,
  .recall-grid,
  .study-grid,
  .teaching-grid,
  .word-map {
    grid-template-columns: 1fr;
  }

  .case-pipeline {
    grid-template-columns: 1fr;
  }

  .mcp-tools {
    grid-template-columns: 1fr 1fr;
  }

  .candidate {
    grid-template-columns: 72px minmax(0, 1fr) 46px;
  }

  .anatomy-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .anatomy-branches {
    width: 2px;
    height: 20px;
    border: none;
    background: var(--line-strong);
    margin-top: 0;
  }

  .anatomy-branches::before,
  .anatomy-branches::after {
    display: none;
  }

  .anatomy-node {
    width: 100%;
  }
}

/* ── 모션 최소화 ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   2026-07 시각 안정화
   실제 강의 화면에서 읽기 어려웠던 필기체, 과한 카드 중첩,
   모바일 축소 그래프를 정리하는 최종 레이아웃 규칙이다.
   ============================================================ */

h1,
h2,
h3,
h4,
.eyebrow,
.case-section-head .sec-tag {
  letter-spacing: 0;
}

html {
  scroll-padding-top: 76px;
}

main {
  max-width: 1200px;
  padding: 0 clamp(20px, 3vw, 36px) 72px;
  gap: 0;
}

.hero,
.lesson,
.case-hero {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 64px 0;
}

.lesson {
  border-top: 1px solid var(--line);
}

.hero,
.case-hero {
  align-items: center;
}

.topbar {
  min-height: 64px;
  padding-block: 8px;
}

.brand-mark {
  border-radius: 6px;
}

.lesson-nav a {
  border-radius: 6px;
  min-height: 38px;
}

.btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  box-shadow: none;
}

.btn:hover,
.choice-btn:hover,
.mcp-tool:hover {
  transform: none;
}

.choice-btn,
.step-btn,
.mcp-tool {
  min-height: 42px;
  border-radius: 6px;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.22;
  letter-spacing: 0;
}

.case-hero h1 {
  font-size: 38px;
  line-height: 1.3;
  letter-spacing: 0;
}

.lesson-head h2 {
  font-size: 30px;
  letter-spacing: 0;
}

.lesson-no {
  grid-row: auto;
  width: auto;
  min-width: 58px;
  height: 34px;
  align-self: center;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  transform: none;
  box-shadow: none;
}

.lesson-head {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 14px;
}

.lesson-goal {
  grid-column: 2;
}

.color-contract {
  border-style: solid;
  padding: 16px;
}

.contract-title,
.anatomy-title span,
.demo-bar span,
.word-no,
.teacher-script,
.trace-bar > b,
.cut-no,
.map-zone text {
  font-family: var(--font-body);
}

.contract-title {
  font-size: 14px;
  font-weight: 800;
}

.anatomy-title span,
.demo-bar span {
  font-size: 12.5px;
}

.hero-anatomy,
.demo-stage,
.desk-block,
.chunk-block,
.mcp-block,
.sheet-card,
.cost-ledger {
  border-radius: 8px;
}

.anatomy-node {
  border-radius: 6px;
}

.node-icon {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.sticky-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tool);
  border-radius: 6px;
  padding: 18px;
  transform: none !important;
  box-shadow: none;
}

.sticky-note::before {
  display: none;
}

.sticky-note b {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tool-deep);
}

.sticky-note p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}

.teacher-script {
  font-size: 14px;
  line-height: 1.7;
}

.word-card,
.project-card,
.recall-card,
.study-card,
.code-card,
.teaching-card,
.cheat-card,
.story-cut,
.control-card,
.ranking-card,
.doc-card,
.retrieval-card,
.schema-table-card,
.screenshot-panel {
  border-radius: 8px;
}

/* 임베딩: 세 축이 보이는 의미 공간 */
.semantic-map {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.semantic-map svg {
  width: 100%;
  min-width: 640px;
  max-width: none;
}

.space-plane path {
  fill: #f7f9fc;
  stroke: #d8e0e9;
  stroke-width: 1.2;
}

.space-plane line {
  stroke: #e3e8ee;
  stroke-width: 1;
}

.space-axes .axis {
  stroke: #687789;
  stroke-width: 2;
}

.space-axes .axis-tip {
  fill: #687789;
}

.space-axes text {
  fill: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
}

.map-zone ellipse {
  fill: rgba(47, 111, 222, 0.05);
  stroke: rgba(47, 111, 222, 0.28);
}

.map-zone text {
  font-size: 13px;
  font-weight: 700;
  fill: var(--data-deep);
}

.map-point text,
.map-pin text {
  font-size: 13px;
}

.semantic-scroll-hint {
  display: none;
  margin: -6px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

/* RAG: 긴 예시도 잘린 것처럼 보이지 않게 줄바꿈한다. */
.doc-card pre,
.code-card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.cut-arrow {
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--data-soft);
  color: var(--data-deep);
  font-size: 10px;
  font-weight: 800;
}

.mini-desk .desk-ai {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 30px;
  border-radius: 4px;
  background: var(--ai-soft);
  color: var(--ai-deep);
  font-size: 11px;
  font-weight: 800;
}

/* DB: 세 장부를 세로로 펼쳐 헤더가 눌리지 않게 한다. */
.schema-card.revealed {
  grid-template-columns: 1fr;
}

.schema-table-wrap table {
  min-width: 760px;
  table-layout: auto;
}

.schema-table-wrap th,
.schema-table-wrap td {
  white-space: nowrap;
  overflow-wrap: normal;
}

.problem-note b {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fceaea;
}

/* 사례 페이지: 모든 첫 화면을 같은 제목·날짜·미디어 틀로 맞춘다. */
.case-hero {
  min-height: 620px;
}

.case-hero-copy,
.case-visual {
  min-width: 0;
}

.media-window {
  width: 100%;
}

.media-frame {
  height: 430px;
  overflow: hidden;
  background: #f3f5f7;
}

.media-frame img {
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.case-visual--document .media-frame img {
  height: 100%;
  object-fit: contain;
  padding: 18px;
  background: #eef1f4;
}

.case-visual--crop .media-frame img {
  height: auto;
  object-fit: initial;
  object-position: top;
}

.case-visual--news .mock-titlebar {
  padding: 8px 12px;
}

.case-visual--news .mock-body {
  gap: 7px;
  padding: 10px;
}

.case-visual--news .mock-card {
  padding: 9px 11px;
}

.case-visual--news .mock-card b {
  font-size: 12.5px;
  line-height: 1.45;
}

.case-visual--news .mock-card p {
  font-size: 11.5px;
  line-height: 1.5;
}

.case-visual--news .mock-meta {
  margin-bottom: 4px;
}

.case-visual--news .mock-chips {
  margin-top: 5px;
}

.screenshot-panel img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: top;
}

@media (max-width: 1020px) {
  .hero,
  .case-hero {
    padding-block: 52px;
  }

  .case-hero {
    min-height: 0;
  }

  .case-hero .case-visual {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 16px;
  }

  body {
    font-size: 15px;
  }

  .topbar {
    position: static;
    gap: 7px;
    padding: 9px 14px 8px;
  }

  .brand-text small {
    display: none;
  }

  .lesson-nav a {
    min-height: 36px;
    padding: 6px 10px 6px 7px;
  }

  main {
    padding: 0 18px 48px;
  }

  .hero,
  .lesson,
  .case-hero {
    padding: 42px 0;
    scroll-margin-top: 0;
  }

  .hero {
    padding-top: 38px;
  }

  .hero h1 {
    font-size: 34px;
    line-height: 1.25;
  }

  .case-hero h1 {
    font-size: 30px;
  }

  .lesson-head {
    grid-template-columns: 1fr;
  }

  .lesson-no {
    justify-self: start;
    min-width: 54px;
    height: 30px;
    font-size: 12px;
  }

  .lesson-head h2 {
    font-size: 25px;
  }

  .lesson-goal {
    grid-column: 1;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .semantic-map svg {
    width: 680px;
    min-width: 680px;
  }

  .semantic-scroll-hint {
    display: block;
  }

  .doc-card pre,
  .code-card pre {
    padding: 14px;
    font-size: 12px;
    line-height: 1.75;
  }

  .media-frame {
    height: 300px;
  }

  .screenshot-panel img {
    height: 260px;
  }

  .mock-titlebar {
    font-size: 11.5px;
  }

  .case-pipeline li:not(:last-child)::after,
  .story-cut:not(:last-child)::after {
    display: none;
  }
}
