/* AX 에이전트 실습 노트 - 공통 스타일
   굵은 제목 글꼴(도현) + 둥근 말투 글꼴(주아) + 두꺼운 테두리와 딱딱한 그림자, 대표색은 파랑 */
:root {
  --blue: #1428A0;
  --blue-600: #1B3FD1;
  --blue-500: #2D5BFF;
  --blue-200: #C5D4FF;
  --blue-100: #DFE8FF;
  --blue-50: #F0F4FF;
  --ink: #12151C;
  --ink-2: #333B4D;
  --ink-3: #68718A;
  --paper: #FFFFFF;
  --bg: #F4F6FB;
  --yellow: #FFD84D;
  --yellow-100: #FFF5C7;
  --coral: #FF6B57;
  --coral-600: #E8452F;
  --coral-100: #FFE6E1;
  --green: #12A66E;
  --green-100: #D8F5E8;
  --purple: #7A5AF8;
  --purple-100: #EAE4FF;
  --code-bg: #0E1630;
  --code-line: #1C2750;
  --f-title: "Do Hyeon", "Jua", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-fun: "Jua", "Do Hyeon", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-body: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-code: "JetBrains Mono", "D2Coding", Consolas, "Courier New", monospace;
  --bd: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-blue: 4px 4px 0 var(--blue);
  --r: 16px;
  --top-h: 118px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16.5px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-title); font-weight: 400; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }
strong, b { font-weight: 700; }
mark { background: linear-gradient(transparent 55%, var(--yellow) 55%); color: inherit; padding: 0 2px; }
code {
  font-family: var(--f-code); font-size: 0.86em; background: var(--blue-50); color: var(--blue);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--blue-100); white-space: break-spaces;
}
kbd { font-family: var(--f-code); font-size: 0.82em; background: var(--paper); border: var(--bd); border-bottom-width: 4px; border-radius: 6px; padding: 1px 7px; }
::selection { background: var(--yellow); color: var(--ink); }

/* ---------- 위쪽 고정 영역 ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--bd); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 12px 24px 8px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-badge {
  font-family: var(--f-title); font-size: 22px; background: var(--blue); color: #fff; padding: 2px 10px 0; border-radius: 10px;
  border: var(--bd); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg);
}
.brand-text { font-family: var(--f-title); font-size: 24px; }
.search { margin-left: auto; position: relative; width: min(340px, 42vw); }
.search input, .g-filter input {
  width: 100%; font: inherit; font-size: 15px; padding: 8px 14px; border: var(--bd); border-radius: 999px; background: var(--bg); outline: none;
}
.search input:focus, .g-filter input:focus { background: #fff; box-shadow: var(--shadow-blue); }
.search-out {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(520px, 92vw); max-height: 70vh; overflow: auto;
  background: #fff; border: var(--bd); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px;
}
.search-out a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); line-height: 1.5; }
.search-out a:hover, .search-out a.sel { background: var(--blue-50); }
.search-out a b { font-family: var(--f-fun); font-weight: 400; font-size: 17px; }
.search-out a small { display: block; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-out .empty { padding: 14px; color: var(--ink-3); }
.tabs { max-width: 1280px; margin: 0 auto; padding: 4px 24px 12px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; text-decoration: none; color: var(--ink); background: var(--paper);
  border: var(--bd); border-radius: 12px; padding: 4px 13px 3px; line-height: 1.2; min-height: 44px; transition: transform .12s, box-shadow .12s;
}
.tab b { font-family: var(--f-title); font-weight: 400; font-size: 18px; }
.tab small { font-family: var(--f-fun); font-size: 12.5px; color: var(--ink-3); }
.tab:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); color: var(--ink); }
.tab.on { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.tab.on small { color: var(--blue-200); }
.progress { height: 4px; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--yellow); border-right: var(--bd); }

/* ---------- 머리 영역(히어로) ---------- */
.hero { background: var(--blue); color: #fff; border-bottom: var(--bd); position: relative; overflow: hidden; }
.hero-in { max-width: 1280px; margin: 0 auto; padding: 46px 24px 44px; position: relative; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 14px 0 12px; max-width: 18em; }
.hero-tag { font-family: var(--f-fun); font-size: clamp(17px, 2.2vw, 22px); color: var(--blue-100); max-width: 44em; line-height: 1.6; }
.hero-tag b { color: var(--yellow); font-weight: 400; }
.hero-num {
  position: absolute; right: 24px; top: -40px; font-family: var(--f-title); font-size: 340px; line-height: 1; color: transparent;
  -webkit-text-stroke: 3px rgba(255, 255, 255, .16); pointer-events: none; user-select: none;
}
.sticker {
  display: inline-block; font-family: var(--f-title); font-size: 20px; background: var(--yellow); color: var(--ink);
  border: var(--bd); border-radius: 10px; padding: 3px 14px 0; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { font-family: var(--f-fun); font-size: 15px; background: rgba(255, 255, 255, .12); border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 999px; padding: 1px 12px; }
.hero.plain { background: var(--paper); color: var(--ink); }
.hero.plain .hero-tag { color: var(--ink-2); }
.hero.plain .hero-tag b { color: var(--blue-600); }

/* ---------- 본문 틀 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.wrap.single { grid-template-columns: minmax(0, 1fr); max-width: 1040px; }
.toc { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow: auto; }
.toc-in { background: var(--paper); border: var(--bd); border-radius: var(--r); padding: 16px 14px; box-shadow: var(--shadow); }
.toc-title { display: block; font-family: var(--f-title); font-weight: 400; font-size: 20px; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0 0 14px; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 5px 8px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-code); font-size: 11.5px; color: var(--ink-3); padding-top: 3px; flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal; }
.toc a:hover { background: var(--blue-50); color: var(--blue); }
.toc a.on { background: var(--blue); color: #fff; }
.toc a.on::before { color: var(--yellow); }
.content { min-width: 0; display: flex; flex-direction: column; gap: 32px; counter-reset: lesson; }

.lesson, .goals {
  background: var(--paper); border: var(--bd); border-radius: 22px; padding: 30px 32px 32px; box-shadow: var(--shadow);
  display: flow-root;
}
.lesson > h2, .goals > h2 { font-size: 34px; margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lesson > h2 a { color: inherit; }
.content > .lesson:not(.auto) { counter-increment: lesson; }
.page-day .content > .lesson:not(.auto) > h2::before {
  content: counter(lesson, decimal-leading-zero); font-family: var(--f-title); font-size: 22px; background: var(--blue); color: #fff;
  border-radius: 9px; padding: 3px 10px 0; border: var(--bd); align-self: center;
}
.lesson h3 { font-size: 25px; margin: 32px 0 12px; padding-left: 12px; border-left: 6px solid var(--blue-500); }
.lesson h4 { font-family: var(--f-fun); font-size: 19px; margin: 18px 0 6px; }
.lead { font-size: 18.5px; line-height: 1.8; color: var(--ink-2); }
.goals { background: var(--yellow-100); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 34px; margin: 0; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border: var(--bd); border-radius: 6px; background: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--blue-600); line-height: 1;
}

/* ---------- 강조 상자 ---------- */
.callout { border: var(--bd); border-radius: var(--r); padding: 16px 18px 16px; margin: 18px 0; background: var(--blue-50); position: relative; }
.callout::before {
  content: "메모"; position: absolute; top: -13px; left: 14px; font-family: var(--f-fun); font-size: 14.5px; background: var(--blue); color: #fff;
  border: var(--bd); border-radius: 999px; padding: 0 12px; line-height: 1.6;
}
.callout { padding-top: 22px; }
.callout-title { display: block; font-family: var(--f-fun); font-weight: 400; font-size: 19px; margin-bottom: 4px; }
.callout.why { background: var(--yellow-100); }
.callout.why::before { content: "왜 필요할까"; background: var(--yellow); color: var(--ink); }
.callout.analogy { background: var(--purple-100); }
.callout.analogy::before { content: "비유하자면"; background: var(--purple); }
.callout.tip { background: var(--green-100); }
.callout.tip::before { content: "알아 두면 좋아요"; background: var(--green); }
.callout.warn { background: var(--coral-100); }
.callout.warn::before { content: "함정 주의"; background: var(--coral); color: var(--ink); }
.callout.run { background: #fff; border-style: dashed; }
.callout.run::before { content: "돌려 보면"; background: var(--ink); }
.callout.key { background: var(--blue); color: #fff; }
.callout.key::before { content: "한 줄 핵심"; background: var(--yellow); color: var(--ink); }
.callout.key code { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .3); }
.callout.key a { color: var(--yellow); }

/* ---------- 알약, 버튼 ---------- */
.pill { display: inline-block; font-family: var(--f-fun); font-size: 14px; line-height: 1.5; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; text-decoration: none; color: var(--ink); white-space: nowrap; }
.pill.blue { background: var(--blue); color: #fff; }
.pill.yellow { background: var(--yellow); }
.pill.coral { background: var(--coral); }
.pill.green { background: var(--green); color: #fff; }
.pill.purple { background: var(--purple); color: #fff; }
.pill.ghost { border-style: dashed; color: var(--ink-3); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-fun); font-size: 16px; line-height: 1; padding: 9px 16px 8px; border: var(--bd);
  border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.small { font-size: 14px; padding: 7px 12px 6px; width: 100%; justify-content: center; }

/* ---------- 흐름 그림 ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 0; margin: 18px 0; }
.flow .node {
  display: flex; flex-direction: column; justify-content: center; font-family: var(--f-fun); font-size: 17px; line-height: 1.35; text-align: center;
  background: #fff; border: var(--bd); border-radius: 14px; padding: 10px 16px; box-shadow: 3px 3px 0 var(--ink); min-width: 96px;
}
.flow .node small { font-family: var(--f-body); font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.flow .node.blue { background: var(--blue); color: #fff; }
.flow .node.blue small { color: var(--blue-200); }
.flow .node.yellow { background: var(--yellow); }
.flow .node.green { background: var(--green-100); }
.flow .node.coral { background: var(--coral-100); }
.flow .node.purple { background: var(--purple-100); }
.flow .node.ghost { border-style: dashed; box-shadow: none; color: var(--ink-3); }
.flow .node.dark { background: var(--ink); color: #fff; }
.flow .arr { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; padding: 0 4px; font-family: var(--f-fun); font-size: 13px; color: var(--ink-3); line-height: 1.2; text-align: center; }
.flow .arr::after { content: "→"; font-family: var(--f-body); font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1; }
.flow .arr.back::after { content: "↩"; color: var(--coral-600); }
.flow.vertical { flex-direction: column; align-items: flex-start; gap: 0; }
.flow.vertical .arr { min-height: 34px; min-width: 96px; }
.flow.vertical .arr::after { content: "↓"; }
.flow-note { font-size: 14.5px; color: var(--ink-3); margin-top: -8px; }
figure.diagram { margin: 20px 0; background: var(--blue-50); border: var(--bd); border-radius: var(--r); padding: 16px; overflow-x: auto; }
figure.diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
figure.diagram figcaption, figure.shot figcaption, figure.code figcaption { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 10px; line-height: 1.6; }
.d-box { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.d-box.blue { fill: var(--blue); }
.d-box.yellow { fill: var(--yellow); }
.d-box.green { fill: var(--green-100); }
.d-box.coral { fill: var(--coral-100); }
.d-box.purple { fill: var(--purple-100); }
.d-box.dark { fill: var(--ink); }
.d-box.ghost { fill: none; stroke-dasharray: 6 5; }
.d-text { font-family: var(--f-fun); font-size: 16px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.d-text.white { fill: #fff; }
.d-text.small { font-family: var(--f-body); font-size: 12.5px; fill: var(--ink-3); }
.d-text.left { text-anchor: start; }
.d-edge { fill: none; stroke: var(--ink); stroke-width: 2; }
.d-edge.blue { stroke: var(--blue-600); }
.d-edge.red { stroke: var(--coral-600); }
.d-edge.dash { stroke-dasharray: 6 5; }
.d-label { font-family: var(--f-fun); font-size: 13.5px; fill: var(--ink-2); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--blue-50); stroke-width: 5px; }

/* ---------- 카드, 비교, 단계, 표 ---------- */
.grid2, .grid3, .compare { display: grid; gap: 16px; margin: 18px 0; }
.grid2, .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: var(--bd); border-radius: var(--r); padding: 16px 18px; }
.card > h4:first-child { margin-top: 0; }
.card.blue { background: var(--blue-50); }
.card.yellow { background: var(--yellow-100); }
.compare .card.bad { background: var(--coral-100); }
.compare .card.good { background: var(--green-100); }
.compare .card > h4:first-child::before { font-family: var(--f-body); font-weight: 700; margin-right: 6px; }
.compare .card.bad > h4:first-child::before { content: "✕"; color: var(--coral-600); }
.compare .card.good > h4:first-child::before { content: "○"; color: var(--green); }
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 18px 0; display: grid; gap: 12px; }
ol.steps > li { counter-increment: step; position: relative; padding: 2px 0 2px 52px; margin: 0; min-height: 38px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center;
  font-family: var(--f-title); font-size: 20px; background: var(--yellow); border: var(--bd); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); padding-top: 2px;
}
ol.steps > li > b:first-child { font-family: var(--f-fun); font-weight: 400; font-size: 18.5px; display: block; }
.table-wrap { overflow-x: auto; margin: 18px 0; border: var(--bd); border-radius: var(--r); }
table.tbl { border-collapse: collapse; width: 100%; font-size: 15.5px; background: #fff; }
.tbl th { font-family: var(--f-fun); font-weight: 400; font-size: 16.5px; background: var(--blue); color: #fff; text-align: left; padding: 9px 14px; white-space: nowrap; }
.tbl td { padding: 9px 14px; border-top: 1.5px solid var(--blue-100); vertical-align: top; line-height: 1.65; }
.tbl tbody tr:nth-child(even) td { background: var(--blue-50); }
.tbl td.num { white-space: nowrap; color: var(--ink-3); font-family: var(--f-code); font-size: 13px; }
.tbl.files td:first-child { white-space: nowrap; }
details.qa { border: var(--bd); border-radius: 14px; background: #fff; margin: 10px 0; }
details.qa > summary { cursor: pointer; padding: 12px 16px; font-family: var(--f-fun); font-size: 18px; list-style: none; display: flex; gap: 10px; }
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::before { content: "Q"; font-family: var(--f-title); color: var(--blue-600); }
details.qa[open] > summary { border-bottom: 1.5px dashed var(--ink-3); }
details.qa > div { padding: 12px 16px 14px 40px; }

/* ---------- 코드 ---------- */
figure.code, figure.shot { margin: 18px 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: #fff; border: var(--bd); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 6px 8px 5px 16px; }
.code-label { font-family: var(--f-code); font-size: 13px; }
.code-label a { color: var(--yellow); text-decoration: none; }
.code-label a:hover { text-decoration: underline; }
.code-range { color: #9BA6C7; margin-left: 6px; }
.copy { font-family: var(--f-fun); font-size: 13.5px; background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 8px; padding: 2px 10px; cursor: pointer; }
.copy:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.hl { background: var(--code-bg); border: var(--bd); overflow-x: auto; }
figure.code .hl { border-radius: 0 0 14px 14px; }
.hl pre { margin: 0; padding: 14px 18px 14px 0; font-family: var(--f-code); font-size: 13.8px; line-height: 1.72; color: #DCE3F7; tab-size: 4; width: max-content; min-width: 100%; }
.hl .linenos { display: inline-block; min-width: 3.4em; padding-right: 1.1em; text-align: right; color: #56618A; user-select: none; }
.hl .hll { background: rgba(255, 216, 77, .16); display: block; box-shadow: inset 4px 0 0 var(--yellow); }
.hl .c, .hl .c1, .hl .cm, .hl .ch, .hl .cs, .hl .cp { color: #7F8DB8; font-style: italic; }
.hl .k, .hl .kn, .hl .kd, .hl .kr, .hl .kc, .hl .ow, .hl .kt { color: #7FA8FF; font-weight: 600; }
.hl .s, .hl .s1, .hl .s2, .hl .sa, .hl .sb, .hl .sc, .hl .sh, .hl .sx { color: #B9E986; }
.hl .sd { color: #8FBF6A; font-style: italic; }
.hl .si, .hl .se { color: #FFD84D; }
.hl .m, .hl .mi, .hl .mf, .hl .mh, .hl .il { color: #FFB37A; }
.hl .nf, .hl .fm { color: #FFD84D; }
.hl .nc, .hl .ne { color: #6FE0D2; }
.hl .nd { color: #FF9D8F; }
.hl .nb, .hl .bp { color: #C7A6FF; }
.hl .nn { color: #DCE3F7; }
.hl .nt { color: #7FA8FF; }
.hl .na { color: #6FE0D2; }
.hl .o, .hl .p { color: #AEB9DB; }
.hl .gp { color: #7F8DB8; }
details.codefile { border: var(--bd); border-radius: 14px; margin: 16px 0; background: #fff; overflow: hidden; scroll-margin-top: calc(var(--top-h) + 16px); }
details.codefile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
details.codefile > summary::-webkit-details-marker { display: none; }
details.codefile > summary::after { content: "코드 펼치기 ▾"; margin-left: auto; font-family: var(--f-fun); font-size: 14px; color: var(--blue-600); white-space: nowrap; }
details.codefile[open] > summary::after { content: "접기 ▴"; }
details.codefile > summary:hover { background: var(--blue-50); }
.cf-ext { font-family: var(--f-title); font-size: 15px; background: var(--yellow); border: var(--bd); border-radius: 7px; padding: 1px 7px 0; }
.cf-name { font-family: var(--f-code); font-size: 13.5px; font-weight: 600; }
.cf-title { font-size: 14.5px; color: var(--ink-2); }
.cf-meta { font-family: var(--f-code); font-size: 12px; color: var(--ink-3); }
.cf-note { padding: 4px 16px 14px; font-size: 15.5px; color: var(--ink-2); border-top: 1.5px dashed var(--blue-200); padding-top: 12px; }
.cf-body { position: relative; }
.cf-body .hl { border: 0; border-top: var(--bd); max-height: 620px; overflow: auto; }
.cf-body .copy { position: absolute; right: 14px; top: 10px; z-index: 2; background: rgba(14, 22, 48, .85); }
details.codefile:target { box-shadow: 0 0 0 4px var(--yellow); }

/* ---------- 설명 자료 카드, 그림 ---------- */
.ex-list { display: grid; gap: 16px; margin: 18px 0; }
.explainer { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; border: var(--bd); border-radius: var(--r); background: #fff; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); margin: 16px 0; }
.ex-list .explainer { margin: 0; }
.ex-thumb { position: relative; height: 176px; overflow: hidden; background: var(--blue-50); border-right: var(--bd); cursor: pointer; }
.ex-thumb iframe { width: 1040px; height: 704px; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; background: #fff; }
.ex-thumb::after { content: "미리 보기"; position: absolute; left: 10px; bottom: 8px; font-family: var(--f-fun); font-size: 12.5px; background: var(--ink); color: #fff; border-radius: 999px; padding: 0 9px; }
.ex-info { padding: 14px 18px 16px; min-width: 0; }
.ex-info h4 { font-family: var(--f-title); font-size: 23px; margin: 6px 0 4px; }
.ex-info p { font-size: 15px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.7; }
.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ex-path { font-family: var(--f-code); font-size: 12px; color: var(--ink-3); }
figure.shot { text-align: center; }
figure.shot img { border: var(--bd); border-radius: var(--r); background: #fff; padding: 12px; max-height: 460px; cursor: zoom-in; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(18, 21, 28, .72); display: flex; flex-direction: column; padding: 18px; }
.viewer[hidden], .zoom[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; gap: 10px; background: var(--yellow); border: var(--bd); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; padding: 8px 12px 8px 18px; }
.viewer-bar b { font-family: var(--f-title); font-weight: 400; font-size: 22px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer iframe { flex: 1; width: 100%; border: var(--bd); border-radius: 0 0 var(--r) var(--r); background: #fff; }
.zoom { position: fixed; inset: 0; z-index: 100; background: rgba(18, 21, 28, .8); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.zoom img { max-width: 96vw; max-height: 92vh; background: #fff; border: var(--bd); border-radius: var(--r); padding: 16px; }

/* ---------- 용어 ---------- */
dl.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
dl.terms dt { font-family: var(--f-fun); font-size: 19px; color: var(--blue); }
dl.terms dd { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
dl.terms > div { border: var(--bd); border-radius: 14px; padding: 12px 16px; background: var(--blue-50); }
.g-filter { max-width: 420px; }
dl.glossary { margin: 0; display: grid; gap: 12px; }
.g-item { background: #fff; border: var(--bd); border-radius: var(--r); padding: 14px 20px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 20px; }
.g-item dt { font-family: var(--f-title); font-size: 23px; color: var(--blue); }
.g-item dd { margin: 0; display: grid; gap: 8px; }
.g-def { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15.5px; line-height: 1.7; }
.g-def .pill { margin-top: 3px; }

/* ---------- 이전/다음, 바닥 ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pg { display: block; background: #fff; border: var(--bd); border-radius: var(--r); padding: 14px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s; }
.pg:hover { transform: translate(-2px, -2px); background: var(--yellow-100); color: var(--ink); }
.pg small { font-family: var(--f-fun); font-size: 14px; color: var(--ink-3); display: block; }
.pg b { font-family: var(--f-title); font-weight: 400; font-size: 22px; }
.pg.next { text-align: right; }
.foot { border-top: var(--bd); background: var(--ink); color: #fff; }
.foot p { max-width: 1280px; margin: 0 auto; padding: 26px 24px; font-family: var(--f-title); font-size: 24px; }
.foot span { display: block; font-family: var(--f-body); font-size: 14px; color: #A9B1C7; margin-top: 4px; }

/* ---------- 홈 ---------- */
.page-home .hero h1 { font-size: clamp(44px, 7.4vw, 92px); line-height: 1.08; max-width: none; }
.page-home .hero h1 em { font-style: normal; color: var(--yellow); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-cta .btn { font-size: 19px; padding: 12px 22px 10px; box-shadow: var(--shadow); }
.hero-cta .btn.primary { background: var(--yellow); color: var(--ink); }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stat { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 14px; padding: 8px 18px 6px; line-height: 1.3; }
.stat b { display: block; font-family: var(--f-title); font-weight: 400; font-size: 32px; color: var(--yellow); }
.stat span { font-family: var(--f-fun); font-size: 14.5px; }
.day-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin: 18px 0 0; }
.day-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: var(--bd); border-radius: 20px; padding: 18px 20px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, background .12s; position: relative; overflow: hidden; }
.day-card:hover { transform: translate(-3px, -3px); background: var(--blue-50); color: var(--ink); }
.day-card .n { font-family: var(--f-title); font-size: 15px; background: var(--blue); color: #fff; border: var(--bd); border-radius: 8px; padding: 2px 9px 0; align-self: flex-start; }
.day-card h3 { font-size: 27px; margin: 0; padding: 0; border: 0; }
.day-card p { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.7; }
.day-card .made { font-family: var(--f-fun); font-size: 14.5px; color: var(--blue-600); margin-top: auto; padding-top: 6px; }
.day-card .ghostnum { position: absolute; right: 8px; top: -18px; font-family: var(--f-title); font-size: 120px; color: var(--blue-50); line-height: 1; z-index: 0; }
.day-card:hover .ghostnum { color: var(--blue-100); }
.day-card > *:not(.ghostnum) { position: relative; z-index: 1; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 980px) {
  :root { --top-h: 112px; }
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 60px; gap: 20px; }
  .toc { position: static; max-height: none; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 2px 4px; }
  .lesson, .goals { padding: 22px 18px 24px; }
  .lesson > h2, .goals > h2 { font-size: 28px; }
  .grid2, .grid3, .compare, dl.terms, .pager { grid-template-columns: minmax(0, 1fr); }
  .explainer { grid-template-columns: minmax(0, 1fr); }
  .ex-thumb { border-right: 0; border-bottom: var(--bd); }
  .g-item { grid-template-columns: minmax(0, 1fr); }
  .hero-num { font-size: 220px; }
  .brand-text { font-size: 20px; }
  .top-in, .tabs { padding-left: 16px; padding-right: 16px; }
  .hero-in { padding: 34px 16px; }
}
@media print {
  .top, .toc, .viewer, .pager, .copy { display: none !important; }
  .wrap { display: block; }
  details.codefile > .cf-body { display: block; }
  .lesson, .goals { box-shadow: none; break-inside: avoid-page; }
}

/* ---------- 다듬기 ---------- */
.tbl td code, .tbl th code { white-space: nowrap; overflow-wrap: normal; }
.flow .node { font-size: 16px; padding: 9px 13px; min-width: 84px; }
.flow .arr { min-width: 38px; }
h1, h2, h3, h4, .tab, .pill, .btn, .chip, .sticker { overflow-wrap: normal; }
.flow { column-gap: 6px; }
.d-text.light { fill: var(--blue-200); }
.d-text.small.light { fill: var(--blue-200); }
@media (max-width: 980px) {
  :root { --top-h: 0px; }
  .top { position: static; }
}
