:root {
  --ink: #172033;
  --muted: #5d6678;
  --paper: #f7f9fc;
  --panel: #ffffff;
  --grid: #dce5f2;
  --line: #b9c7d8;
  --blue: #2457c5;
  --green: #16745f;
  --red: #c7374f;
  --amber: #c07a18;
  --shadow: 0 22px 70px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans KR", "Pretendard", system-ui, sans-serif;
  background:
    linear-gradient(rgba(36, 87, 197, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 87, 197, 0.08) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
}

button,
a {
  font: inherit;
}

.deck-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #111827;
  color: #edf2ff;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 4px solid var(--red);
}

.brand {
  display: grid;
  gap: 10px;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 7px;
}

.brand strong {
  font-size: 19px;
  line-height: 1.25;
}

.brand span {
  color: #aeb9ce;
  font-size: 13px;
}

.toc {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.toc button {
  border: 0;
  border-left: 3px solid transparent;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  padding: 10px 10px 10px 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}

.toc button:hover,
.toc button.active {
  color: #fff;
  border-left-color: #6ee7b7;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6ee7b7, #93c5fd, #fca5a5);
}

.slide-label {
  color: #9fb0c9;
  font-size: 12px;
}

.stage {
  position: relative;
  min-width: 0;
}

.slide {
  display: none;
  min-height: 100vh;
  padding: 54px clamp(28px, 5vw, 78px);
  align-items: center;
}

.slide.active {
  display: grid;
}

.slide-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  max-width: 980px;
}

h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  max-width: 960px;
}

h3 {
  font-size: 21px;
}

p {
  color: var(--muted);
  line-height: 1.72;
  margin: 16px 0 0;
  font-size: 18px;
}

.lead {
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.55;
  color: #344055;
  max-width: 980px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
}

.artifact-board {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 12px 12px 0 #9cc7ff;
  padding: 22px;
  transform: rotate(1deg);
}

.artifact-board img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.stamp-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stamp {
  border: 1px solid var(--line);
  padding: 10px;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

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

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

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

.card,
.note,
.source-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.card.compact {
  box-shadow: none;
}

.card strong,
.note strong {
  color: var(--ink);
}

.number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  width: fit-content;
  background: #e8f1ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.red {
  color: var(--red);
}

.green {
  color: var(--green);
}

.amber {
  color: var(--amber);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.workflow .step {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  padding: 16px;
  min-height: 155px;
}

.workflow .step:nth-child(2n) {
  border-top-color: var(--green);
}

.workflow .step:nth-child(3n) {
  border-top-color: var(--red);
}

.code-panel {
  position: relative;
  margin-top: 24px;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-panel pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.copy-btn,
.nav-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #38bdf8;
  color: #082f49;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 24px;
  border: 1px solid var(--line);
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--line);
  padding: 14px;
}

.table th {
  background: #e8f1ff;
  color: #15346f;
}

.quote {
  border-left: 5px solid var(--red);
  padding: 4px 0 4px 20px;
  font-size: 22px;
  line-height: 1.6;
  color: #263244;
}

.source-card a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.source-card a:hover {
  text-decoration: underline;
}

.slide-controls {
  position: fixed;
  right: 26px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slide-controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 24px;
}

.mini-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 980px) {
  .deck-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .workflow {
    grid-template-columns: 1fr;
  }

  .slide {
    min-height: auto;
    padding: 36px 20px 92px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 56px);
    line-height: 1.06;
  }

  .slide-controls {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ===== 재구성 추가 컴포넌트 ===== */
.byline {
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  margin-top: 20px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.lead-sm {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: #344055;
  max-width: 900px;
}

.foot {
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
}

.note .mini {
  font-size: 14px;
  color: var(--muted);
  margin: 2px 0 12px;
}

.align-start {
  align-items: start;
}

ul.tight {
  margin: 12px 0 0;
  padding-left: 18px;
}

ul.tight li {
  margin: 7px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.step-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 8px;
}

.pipeline .pnode {
  flex: 1 1 120px;
  min-width: 120px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  padding: 14px 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.35;
}

.pipeline .pnode b {
  display: block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
}

.pipeline .pnode:nth-child(2n) {
  border-top-color: var(--green);
}

.pipeline .pnode:nth-child(3n) {
  border-top-color: var(--red);
}

.pipeline.flow5 .pnode {
  flex-basis: 150px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.install-steps.five {
  grid-template-columns: repeat(5, 1fr);
}

.install-steps.vertical {
  grid-template-columns: 1fr;
  gap: 10px;
}

.istep {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}

.istep b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  margin-right: 8px;
  font-size: 13px;
  vertical-align: middle;
}

.btn-row {
  margin: 20px 0 8px;
}

.dl-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  padding: 14px 22px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.dl-btn:hover {
  background: #1c46a0;
}

.shot {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--grid);
}

.shot figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 6px 4px;
}

.folder-tree {
  background: #0f172a;
  color: #dbeafe;
  border-radius: 8px;
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
  overflow: auto;
  box-shadow: var(--shadow);
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
}

.checklist.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.checklist li {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.45;
}

.mini-card {
  background: #eef4ff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: #263244;
  line-height: 1.55;
  margin-bottom: 14px;
}

.mini-card b {
  color: var(--blue);
  margin-right: 6px;
}

.mini-card.wide {
  margin-top: 18px;
}

.compact-table th,
.compact-table td {
  padding: 9px 12px;
  font-size: 14px;
}

.figure-svg {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mock.browser {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 12px 12px 0 #9cc7ff;
  overflow: hidden;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #eef2f9;
  border-bottom: 1px solid var(--line);
}

.mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cdd6e5;
}

.mock-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.mock-body {
  padding: 16px;
}

.mock-title {
  font-weight: 900;
  font-size: 17px;
  margin-bottom: 12px;
}

.mock-grid svg {
  width: 100%;
  border: 1px solid var(--grid);
  border-radius: 6px;
  display: block;
  margin-bottom: 12px;
}

.mock-row {
  font-size: 14px;
  color: #344055;
  padding: 8px 0;
  border-bottom: 1px dashed var(--grid);
}

.pill-num {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
  margin-right: 8px;
}

.mock-cta {
  margin-top: 12px;
  background: var(--green);
  color: #fff;
  text-align: center;
  font-weight: 800;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}

.mock.small .mock-body {
  padding: 14px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.cover-title {
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.12;
  max-width: 920px;
}

@media (max-width: 980px) {
  .pipeline .pnode {
    flex-basis: 100%;
  }

  .install-steps,
  .install-steps.five {
    grid-template-columns: 1fr 1fr;
  }

  .checklist.two-col {
    grid-template-columns: 1fr;
  }

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

/* 코드 블록·폴더트리·인라인 코드: Nanum Gothic Coding(한글 고정폭) + 폴백 */
.code-panel pre,
.folder-tree,
code {
  font-family: "Nanum Gothic Coding", "Noto Sans KR", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 한국어 줄바꿈: 어절(띄어쓰기) 단위로만 끊기 */
h1,
h2,
h3,
.cover-title,
.lead,
.lead-sm,
.quote,
.byline {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 평가 기준표 */
.table.rubric th,
.table.rubric td {
  font-size: 14px;
  padding: 9px 12px;
}

.table.rubric .c {
  text-align: center;
  white-space: nowrap;
}

.table.rubric .pt {
  color: var(--blue);
  font-weight: 800;
}

.table.rubric .sub {
  color: var(--green);
  font-weight: 700;
}

.table.rubric .mis {
  color: var(--amber);
  font-weight: 700;
}

.table.rubric tfoot td {
  background: #f3f7ff;
  font-weight: 700;
}
