/* ==========================================================================
   DB를 꿰뚫는 백엔드 엔지니어링 — 커리큘럼 안내서
   토큰(색·글꼴) → 기본 → 레이아웃 → 컴포넌트 → 섹션별 → 반응형 순서
   ========================================================================== */

:root {
  --bg: #f7f6f2;
  --bg-elev: #ffffff;
  --bg-sunk: #efede6;
  --ink: #15171c;
  --ink-2: #363b46;
  --muted: #646b78;
  --line: #e3e0d8;
  --line-strong: #cdc9be;

  --accent: #c2410c;          /* DB · 측정 */
  --accent-ink: #ffffff;
  --accent-soft: #fbe8dc;
  --app: #1d4ed8;             /* 앱 계층 */
  --app-soft: #e4ebfc;
  --ok: #157a3c;
  --ok-soft: #dcf1e3;
  --warn: #9a6700;
  --warn-soft: #fbefd0;

  --t1: #c2410c;
  --t2: #4338ca;
  --t3: #7e22ce;
  --rose: #be185d;

  --tag-backend: #1d4ed8;
  --tag-db: #c2410c;
  --tag-infra: #0f766e;
  --tag-security: #b42318;

  --code-bg: #1a1c22;
  --code-ink: #e7e7ea;
  --code-dim: #8c93a3;
  --code-hl: #ffb38a;

  --shadow-sm: 0 1px 2px rgba(20, 20, 30, .05);
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px -16px rgba(20, 20, 30, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --gutter: 24px;
  --nav-h: 60px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Pretendard Variable", Pretendard, ui-monospace, SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-elev: #161920;
    --bg-sunk: #0b0d10;
    --ink: #eceef2;
    --ink-2: #c6cad3;
    --muted: #959cab;
    --line: #262b34;
    --line-strong: #363c48;
    --accent: #ff7a45;
    --accent-ink: #1c0d05;
    --accent-soft: #34190d;
    --app: #7ea4ff;
    --app-soft: #16213d;
    --ok: #4ade80;
    --ok-soft: #11291a;
    --warn: #f2c14e;
    --warn-soft: #2e2510;
    --t1: #ff7a45;
    --t2: #8f96ff;
    --t3: #c58cfb;
    --rose: #f472b6;
    --tag-backend: #7ea4ff;
    --tag-db: #ff7a45;
    --tag-infra: #3dd6c1;
    --tag-security: #ff7b72;
    --code-bg: #0b0d10;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg-elev: #161920;
  --bg-sunk: #0b0d10;
  --ink: #eceef2;
  --ink-2: #c6cad3;
  --muted: #959cab;
  --line: #262b34;
  --line-strong: #363c48;
  --accent: #ff7a45;
  --accent-ink: #1c0d05;
  --accent-soft: #34190d;
  --app: #7ea4ff;
  --app-soft: #16213d;
  --ok: #4ade80;
  --ok-soft: #11291a;
  --warn: #f2c14e;
  --warn-soft: #2e2510;
  --t1: #ff7a45;
  --t2: #8f96ff;
  --t3: #c58cfb;
  --rose: #f472b6;
  --tag-backend: #7ea4ff;
  --tag-db: #ff7a45;
  --tag-infra: #3dd6c1;
  --tag-security: #ff7b72;
  --code-bg: #0b0d10;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }
strong { font-weight: 700; }
code, kbd, pre { font-family: var(--mono); font-variant-ligatures: none; }
:not(pre) > code {
  font-size: .86em;
  padding: .12em .4em;
  border-radius: 6px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  white-space: nowrap;
}
::selection { background: var(--accent); color: var(--accent-ink); }

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 상단 내비게이션 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  font-size: 15px;
}
.brand-mark { width: 26px; height: 26px; flex: none; }
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-sunk); }
.nav-links a.active { color: var(--ink); background: var(--bg-sunk); font-weight: 650; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* ---------- 버튼·배지·태그 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s, border-color .15s, background .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  border: 1px solid currentColor;
  white-space: nowrap;
  line-height: 1.6;
}
.badge.live { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.soon { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.new { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.7;
  white-space: nowrap;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.tag.backend { --c: var(--tag-backend); }
.tag.db { --c: var(--tag-db); }
.tag.infra { --c: var(--tag-infra); }
.tag.security { --c: var(--tag-security); }

/* ---------- 히어로 ---------- */
.hero {
  position: relative;
  padding: 76px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
  opacity: .55;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--accent);
  letter-spacing: .01em;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.65rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.14;
  margin-bottom: 22px;
}
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  padding: 0 2px;
}
.lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 36em;
}
.lead em { font-style: normal; color: var(--ink); font-weight: 650; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
.facts > div { padding: 14px 16px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.facts dd { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* 히어로 오른쪽: 계층 스택 그림 */
.stack {
  margin: 0;
  position: relative;
  padding: 22px 52px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.stack-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: .02em;
}
.layers { list-style: none; display: grid; gap: 8px; }
.layer {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.layer .k {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.layer b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.layer span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.layer.app { border-color: color-mix(in srgb, var(--app) 30%, var(--line)); background: var(--app-soft); }
.layer.app .k { color: var(--app); }
.layer.db {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.layer.db .k, .layer.db span { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.stack-rail {
  position: absolute;
  top: 54px;
  bottom: 50px;
  right: 18px;
  width: 18px;
}
.stack-rail::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  border-left: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent);
}
.stack-rail::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  border: 6px solid transparent;
  border-bottom: 8px solid var(--accent);
  border-top: 0;
}
.stack-rail span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-elev);
  padding: 0 6px;
}
.stack figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- 섹션 공통 ---------- */
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.sunk { background: var(--bg-sunk); }
.sec-head { max-width: 46rem; margin-bottom: 44px; }
.sec-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sec-kicker::after { content: ""; flex: 0 0 36px; height: 1px; background: currentColor; opacity: .5; }
.sec-head h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.sec-head p { font-size: 1.06rem; color: var(--ink-2); margin: 0; }
.sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 64px 0 20px;
}
.sub-head h3 { font-size: 1.32rem; font-weight: 750; }
.sub-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 22px 22px 20px;
}
.card h3, .card h4 { font-size: 1.06rem; font-weight: 750; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.card .num {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  margin-bottom: 14px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}

.list { list-style: none; display: grid; gap: 8px; }
.list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--line-strong);
}
.list li b { color: var(--ink); font-weight: 650; }
.list.check li::before {
  width: 9px; height: 5px; top: .55em; left: 1px;
  border-radius: 0;
  background: none;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.list.plus li::before {
  content: "+";
  width: auto; height: auto; top: 0; left: 0;
  background: none;
  color: var(--accent);
  font-weight: 800;
}

.callout {
  position: relative;
  margin-top: 20px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.callout h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 8px; }
.callout p { color: var(--ink-2); margin: 0; font-size: 15.5px; }
.callout .label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--accent);
  letter-spacing: .02em;
}
.callout.neutral { background: var(--bg-elev); border-color: var(--line); }

.note {
  position: relative;
  margin: 16px 0 0;
  padding: 14px 16px 14px 48px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  font-size: 14.5px;
  color: var(--ink-2);
}
.note::before {
  content: "!";
  position: absolute;
  left: 16px;
  top: 15px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 800;
  font-size: 13px;
}

/* 상관 흐름(킬러 기능) */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.flow span {
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
}
.flow i { font-style: normal; color: var(--accent); font-weight: 800; }

/* ---------- 대상 ---------- */
.audience .card h3 { display: flex; align-items: center; gap: 10px; }
.audience .card h3 .badge { font-size: 11.5px; }

/* ---------- 인프라: 아키텍처 그림 ---------- */
.arch {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.arch-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) 84px minmax(0, 1.25fr) 84px minmax(0, 1fr);
  align-items: stretch;
}
.node {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 16px;
  background: var(--bg);
}
.node .k {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.node b { display: block; font-size: 15.5px; font-weight: 750; margin-bottom: 4px; }
.node p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.55; }
.node.app { border-color: color-mix(in srgb, var(--app) 40%, var(--line)); background: var(--app-soft); }
.node.app .k { color: var(--app); }
.node.db { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.node.db .k { color: var(--accent); }
.node .inner { display: grid; gap: 6px; margin-top: 10px; }
.node .inner span {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.node .inner span small { font-weight: 500; color: var(--muted); }
.edge {
  position: relative;
  display: grid;
  place-items: center;
}
.edge::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 10px;
  top: 50%;
  border-top: 2px solid var(--line-strong);
}
.edge::after {
  content: "";
  position: absolute;
  right: 4px;
  top: calc(50% - 6px);
  border: 6px solid transparent;
  border-left: 8px solid var(--line-strong);
  border-right: 0;
}
.edge span {
  position: relative;
  z-index: 1;
  margin-top: -34px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.arch-loop {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.loop {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line));
}
.loop.ci { border-color: color-mix(in srgb, var(--tag-infra) 55%, var(--line)); }
.loop .ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.loop.ci .ic { background: color-mix(in srgb, var(--tag-infra) 14%, transparent); color: var(--tag-infra); }
.loop .ic svg { width: 18px; height: 18px; }
.loop b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.loop p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* 인프라 주제 카드 */
.topic { display: flex; flex-direction: column; }
.topic h4 { display: flex; align-items: center; gap: 10px; }
.topic h4 .ic {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--tag-infra) 13%, transparent);
  color: var(--tag-infra);
  flex: none;
}
.topic h4 .ic svg { width: 16px; height: 16px; }
.topic p { flex: 1; }
.qlinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.qlink {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  transition: border-color .15s, color .15s;
}
.qlink:hover { border-color: var(--accent); color: var(--accent); }

.limits {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.limit-nums { display: flex; gap: 10px; }
.limit-nums div {
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  text-align: center;
}
.limit-nums b { display: block; font-size: 1.5rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1.2; }
.limit-nums small { font-size: 12px; color: var(--muted); }

/* 표 */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; }
thead th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody tr + tr td { border-top: 1px solid var(--line); }
td:first-child { font-weight: 650; white-space: nowrap; }
td small { color: var(--muted); }
.table-foot { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- 학습 방법 ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.step.star { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.step .n {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.step.star .n { color: var(--accent); }
.step b { display: block; margin: 6px 0 6px; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.step .when {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.app-strip {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}
.app-strip code { flex: none; }

/* 빌드 블록 해부 */
.build {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 20px;
  align-items: start;
}
.build-demo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
.build-demo .bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.build-demo .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.bstep { padding: 16px 18px; }
.bstep + .bstep { border-top: 1px dashed var(--line); }
.bstep .lbl {
  display: inline-block;
  margin-bottom: 8px;
  padding: 1px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 750;
}
.lbl.where { color: var(--app); background: var(--app-soft); }
.lbl.what { color: var(--ink-2); background: var(--bg-sunk); }
.lbl.check { color: var(--ok); background: var(--ok-soft); }
.bstep p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

pre.code {
  position: relative;
  margin: 10px 0 0;
  padding: 16px 18px;
  border-radius: 11px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  tab-size: 4;
  word-break: normal;
  overflow-wrap: normal;
}
pre.code .c { color: var(--code-dim); }
pre.code .h { color: var(--code-hl); font-weight: 600; }
pre.code .p { color: #9ad3a6; }
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--code-ink);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, .12); }

.anatomy { display: grid; gap: 10px; }
.anatomy .card { padding: 18px 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.levels .card { position: relative; }
.levels .lv {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
}
.levels .card.db { border-top: 3px solid var(--accent); }
.levels .card.app { border-top: 3px solid var(--app); }
.levels .card.t3 { border-top: 3px solid var(--t3); }
.levels pre.code { font-size: 12.5px; }

/* ---------- 커리큘럼 ---------- */
.path {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 28px;
}
.path a {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 0 8px;
  border-radius: 10px;
  text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.path a:hover { border-color: var(--accent); transform: translateY(-2px); }
.path a b { font-family: var(--mono); font-size: 13.5px; font-weight: 700; }
.path a i {
  width: 70%;
  height: 4px;
  border-radius: 4px;
  background: var(--s);
}
.path-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -14px 0 28px;
  font-size: 13px;
  color: var(--muted);
}
.path-legend span { display: inline-flex; align-items: center; gap: 7px; }
.path-legend i { width: 18px; height: 4px; border-radius: 4px; background: var(--s); }

.s1 { --s: #94a3b8; }
.s2 { --s: var(--accent); }
.s3 { --s: var(--app); }
.s4 { --s: var(--rose); }
.s5 { --s: var(--tag-infra); }

.toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toolbar .label { font-size: 13px; font-weight: 650; color: var(--muted); margin-right: 4px; }
.filter {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.filter:hover { border-color: var(--line-strong); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter .cnt { font-family: var(--mono); font-size: 11.5px; opacity: .65; margin-left: 4px; }
.toolbar .spacer { flex: 1; }
.toggle-all {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.toggle-all:hover { border-color: var(--line-strong); color: var(--ink); }
.no-js .toolbar { display: none; }
.sunk .toolbar { background: color-mix(in srgb, var(--bg-sunk) 92%, transparent); }

.stage { margin-top: 36px; }
.stage-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: baseline;
  margin-bottom: 14px;
}
.stage-head .sn {
  grid-row: span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--s);
  background: color-mix(in srgb, var(--s) 14%, transparent);
}
.stage-head h3 { font-size: 1.2rem; font-weight: 800; }
.stage-head p { margin: 0; font-size: 14.5px; color: var(--muted); }
.stage.empty { display: none; }

.quests { display: grid; gap: 10px; }
.quest {
  border: 1px solid var(--line);
  border-left: 3px solid var(--s);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: border-color .15s, box-shadow .2s;
}
.quest:hover { box-shadow: var(--shadow); }
.quest[open] { box-shadow: var(--shadow); }
.quest[hidden] { display: none; }
.quest > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 22px;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
}
.quest > summary::-webkit-details-marker { display: none; }
.q-num {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--s);
  letter-spacing: -0.04em;
  line-height: 1;
}
.q-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.q-title b { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.q-title .en { font-size: 13px; color: var(--muted); font-weight: 500; }
.q-goal { display: block; margin-top: 4px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.q-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.q-metric {
  text-align: right;
  white-space: nowrap;
  padding-left: 8px;
}
.q-metric b {
  display: block;
  font-family: var(--mono);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.q-metric small { font-size: 12px; color: var(--muted); }
.chev {
  width: 22px; height: 22px;
  color: var(--muted);
  transition: transform .2s;
}
.quest[open] .chev { transform: rotate(180deg); }

.q-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 4px 20px 22px 88px;
}
.q-body h4 {
  margin: 14px 0 8px;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: .03em;
  color: var(--muted);
}
.q-body .list li { font-size: 14.5px; }
.q-body p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.measure {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg);
}
.measure .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  font-size: 13.5px;
}
.measure .row + .row { border-top: 1px solid var(--line); }
.measure .row span { color: var(--ink-2); }
.measure .row b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}
.measure .row b .bad { color: var(--tag-security); }
.measure .row b .good { color: var(--ok); }
.measure .row b .arr { color: var(--muted); padding: 0 3px; }
.measure.memo { padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); }
.sqlp {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--ink-2);
}
.sqlp b { color: var(--accent); font-weight: 700; }
.q-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
}
.q-foot .next b { color: var(--ink-2); font-weight: 650; }
.q-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.q-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.empty-msg { display: none; margin-top: 24px; color: var(--muted); }
.empty-msg.show { display: block; }

/* ---------- 로드맵 ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  overflow: hidden;
}
.tier { padding: 24px 22px; position: relative; }
.tier + .tier { border-left: 1px solid var(--line); }
.tier::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--tc);
}
.tier.t1 { --tc: var(--t1); }
.tier.t2 { --tc: var(--t2); }
.tier.t3 { --tc: var(--t3); }
.tier .tk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.tier .tk > span:first-child {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--tc);
}
.tier h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.tier .alias { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tier p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 12px; }
.tier dl { margin: 0; display: grid; gap: 6px; font-size: 13.5px; }
.tier dl div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.tier dt { color: var(--muted); }
.tier dd { margin: 0; color: var(--ink-2); font-weight: 550; }

.spiral {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.spiral div {
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 13.5px;
  color: var(--ink-2);
}
.spiral b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; font-weight: 650; }

.track { border-top: 3px solid var(--tc, var(--line-strong)); }
.track.t2c { --tc: var(--t2); }
.track.t3c { --tc: var(--t3); }
.track .code-k {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tc);
}
.track .list { margin-top: 12px; }
.track .list li { font-size: 14px; }

.grid.c3 > .span2 { grid-column: span 2; }
.capstone {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--t3) 35%, var(--line));
  background: var(--bg-elev);
}
.capstone .main { padding: 28px; }
.capstone .side {
  padding: 28px;
  background: color-mix(in srgb, var(--t3) 8%, var(--bg-elev));
  border-left: 1px solid color-mix(in srgb, var(--t3) 20%, var(--line));
}
.capstone .code-k { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--t3); }
.capstone h3 { font-size: 1.35rem; font-weight: 850; margin: 6px 0 10px; letter-spacing: -0.025em; }
.capstone p { color: var(--ink-2); font-size: 15px; }
.capstone h4 { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 10px; letter-spacing: .02em; }
.ledger {
  font-family: var(--mono);
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  overflow: hidden;
  margin-top: 14px;
}
.ledger div {
  display: grid;
  grid-template-columns: 1fr 70px 70px;
  gap: 8px;
  padding: 7px 12px;
}
.ledger div + div { border-top: 1px solid var(--line); }
.ledger .hd { color: var(--muted); background: var(--bg-sunk); font-weight: 600; }
.ledger .r { text-align: right; }
.ledger .sum { font-weight: 700; color: var(--ok); }

/* 일정·완료 기준 */
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.timeline { list-style: none; display: grid; gap: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .dur { font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline .what b { display: block; font-weight: 700; }
.timeline .what span { color: var(--muted); font-size: 13.5px; }
.dod { display: grid; gap: 10px; }
.dod .card { padding: 18px 20px; }
.dod .card h4 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }

/* ---------- 시작하기 ---------- */
.start {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}
.prereq { list-style: none; display: grid; gap: 0; }
.prereq li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.prereq li:first-child { border-top: 0; padding-top: 0; }
.prereq .bx {
  width: 20px; height: 20px;
  margin-top: 3px;
  border-radius: 6px;
  border: 2px solid var(--line-strong);
}
.prereq b { display: block; font-weight: 700; }
.prereq span { color: var(--muted); font-size: 13.5px; }
.start pre.code { margin: 0; font-size: 12.8px; }
.next-step {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 14.5px;
}

/* ---------- 푸터 ---------- */
.footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  font-size: 14px;
  color: var(--muted);
}
.footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
}
.footer b { color: var(--ink); }
.footer p { margin: 0 0 8px; }
.footer a { color: var(--ink-2); }
.footer ul { list-style: none; display: grid; gap: 6px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1080px) {
  .nav-links a { padding: 6px 8px; font-size: 14px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  :root { --nav-h: 56px; }
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 6px; font-size: 15.5px; border-radius: 8px; }
  .nav-actions { margin-left: auto; }

  .hero { padding: 52px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .section { padding: 72px 0; }
  .grid.c3 { grid-template-columns: minmax(0, 1fr); }
  .grid.c2 { grid-template-columns: minmax(0, 1fr); }
  .build, .plan, .start, .capstone, .limits { grid-template-columns: minmax(0, 1fr); }
  .capstone .side { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--t3) 20%, var(--line)); }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--line); }
  .spiral { grid-template-columns: minmax(0, 1fr); }
  .grid.c3 > .span2 { grid-column: auto; }

  .arch { padding: 18px; }
  .arch-row { grid-template-columns: minmax(0, 1fr); }
  .edge { height: 52px; }
  .edge::before { left: 50%; right: auto; top: 6px; bottom: 12px; border-top: 0; border-left: 2px solid var(--line-strong); }
  .edge::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 4px; border: 6px solid transparent; border-top: 8px solid var(--line-strong); border-bottom: 0; }
  .edge span { margin: 0 0 0 96px; }
  .arch-loop { grid-template-columns: minmax(0, 1fr); }

  .path { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .footer .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .brand .brand-text small { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stack { padding: 18px 44px 16px 16px; }
  .layer { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .layer .k { font-size: 10.5px; letter-spacing: .02em; }
  .limit-nums div { padding: 10px 8px; }
  .limit-nums b { font-size: 1.3rem; }

  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { padding: 12px 16px; }
  .table-wrap tbody tr + tr { border-top: 1px solid var(--line); }
  .table-wrap tbody tr + tr td { border-top: 0; }
  .table-wrap td { padding: 0; }
  .table-wrap td:first-child { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
  .table-wrap td + td + td { margin-top: 4px; }
  .stack-rail { right: 13px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .grid.c4 { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .limit-nums { flex-wrap: wrap; }
  .limit-nums div { flex: 1; min-width: 0; }

  .quest > summary {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    gap: 12px;
    align-items: start;
    padding: 16px 14px;
  }
  .q-num { font-size: 1.15rem; padding-top: 3px; }
  .q-metric {
    grid-column: 2 / 3;
    grid-row: 2;
    text-align: left;
    padding: 0;
  }
  .q-metric b { display: inline; margin-right: 6px; }
  .chev { grid-column: 3; grid-row: 1; }
  .q-body { grid-template-columns: minmax(0, 1fr); padding: 0 14px 18px; }
  .toolbar { top: var(--nav-h); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar .spacer { display: none; }
  .filter, .toggle-all { flex: none; }
  .timeline li { grid-template-columns: 92px minmax(0, 1fr); }
  .ledger div { grid-template-columns: 1fr 58px 58px; }
}

@media (max-width: 380px) {
  .brand-text { display: none; }
}

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

@media print {
  .nav, .toolbar, .cta, .copy { display: none !important; }
  .quest .q-body { display: grid !important; }
  .section { padding: 32px 0; }
  body { background: #fff; }
}

/* ==========================================================================
   Level 1 고도화 — 레벨 표시 · 성과 · 3D 미리보기 · T2/T3 상세 · 검증 · Level 2
   ========================================================================== */

/* ---------- 레벨 표시 ---------- */
.level-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.6;
}
.nav-links a.nav-next { color: var(--accent); font-weight: 650; }
.nav-links a.nav-next:hover, .nav-links a.nav-next.active { color: var(--accent); }
.nav-next .pip {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: middle;
}

.ladder {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
  text-decoration: none;
  color: inherit;
}
.rung {
  flex: 1;
  display: grid;
  gap: 1px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  transition: border-color .15s;
}
.rung b { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.rung span { font-size: 13.5px; font-weight: 650; color: var(--ink-2); line-height: 1.45; }
.rung i { font-style: normal; font-size: 12px; color: var(--muted); }
.rung.now { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.rung.now b { color: var(--accent); }
.rung.next { border-style: dashed; }
.rung.next b { color: var(--t2); }
.ladder:hover .rung.next { border-color: var(--t2); }
.rung-arrow { display: grid; place-items: center; color: var(--muted); }
.rung-arrow svg { width: 20px; height: 20px; }

/* ---------- Level 1 성과 ---------- */
.outcomes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.outcomes a {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  height: 100%;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .2s;
}
.outcomes a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.outcomes .o-num {
  font-family: var(--mono);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--accent);
  padding-right: 44px;
}
.outcomes b { font-size: 15.5px; font-weight: 750; letter-spacing: -0.01em; }
.outcomes a > span:not(.o-num) { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.outcomes i {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  font-style: normal;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- 3D 해부도 미리보기 ---------- */
.explore-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
}
.et-chapters { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.et-chapters a {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  background: var(--bg-elev);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.et-chapters a:hover { border-color: var(--accent); color: var(--accent); }
.et-art { width: 100%; height: auto; overflow: visible; }
.et-art polygon { stroke-width: 1; stroke-linejoin: round; }
.et-art .top { fill: var(--bg-elev); stroke: var(--line-strong); }
.et-art .l { fill: color-mix(in srgb, var(--bg-sunk) 80%, var(--line-strong)); stroke: var(--line-strong); }
.et-art .r { fill: var(--bg-sunk); stroke: var(--line-strong); }
.et-art .s-app .top { fill: var(--app-soft); stroke: color-mix(in srgb, var(--app) 50%, var(--line)); }
.et-art .s-app .l { fill: color-mix(in srgb, var(--app) 28%, var(--app-soft)); stroke: color-mix(in srgb, var(--app) 50%, var(--line)); }
.et-art .s-app .r { fill: color-mix(in srgb, var(--app) 14%, var(--app-soft)); stroke: color-mix(in srgb, var(--app) 50%, var(--line)); }
.et-art .s-pool .top { fill: color-mix(in srgb, var(--tag-infra) 14%, var(--bg-elev)); stroke: color-mix(in srgb, var(--tag-infra) 50%, var(--line)); }
.et-art .s-pool .l { fill: color-mix(in srgb, var(--tag-infra) 30%, var(--bg-elev)); stroke: color-mix(in srgb, var(--tag-infra) 50%, var(--line)); }
.et-art .s-pool .r { fill: color-mix(in srgb, var(--tag-infra) 20%, var(--bg-elev)); stroke: color-mix(in srgb, var(--tag-infra) 50%, var(--line)); }
.et-art .s-db .top { fill: var(--accent); stroke: var(--accent); }
.et-art .s-db .l { fill: color-mix(in srgb, var(--accent) 72%, #000); stroke: color-mix(in srgb, var(--accent) 72%, #000); }
.et-art .s-db .r { fill: color-mix(in srgb, var(--accent) 58%, #000); stroke: color-mix(in srgb, var(--accent) 58%, #000); }
.et-art .lbl { font-family: var(--mono); font-size: 12px; font-weight: 700; fill: var(--ink); }
.et-art .sub { font-family: var(--font); font-size: 10px; font-weight: 500; fill: var(--muted); }
.et-art .wire { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .75; }
.et-art .packet {
  fill: var(--accent);
  stroke: var(--bg-elev);
  stroke-width: 2;
  animation: et-drop 3.6s cubic-bezier(.45, 0, .3, 1) infinite;
}
@keyframes et-drop {
  0%, 8% { transform: translateY(0); }
  45%, 55% { transform: translateY(120px); }
  92%, 100% { transform: translateY(0); }
}

/* ---------- Tier 2·3 상세 카드 ---------- */
.deep-head { align-items: center; }
.deep-head h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.deep-head p { flex: 1 1 auto; }
.tier-chip {
  padding: 2px 9px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
}
.tier-chip.t2 { --c: var(--t2); }
.tier-chip.t3 { --c: var(--t3); }
.toggle-deep {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.toggle-deep:hover { border-color: var(--line-strong); color: var(--ink); }
.no-js .toggle-deep { display: none; }
.deep { margin-top: 28px; }
.deep:first-child { margin-top: 0; }
.deep.t2c { --s: var(--t2); }
.deep.t3c { --s: var(--t3); }
.deep .capstone { height: auto; margin-bottom: 12px; }
.tag.t1ref { --c: var(--t1); font-family: var(--mono); font-size: 11.5px; }
.said {
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid var(--s);
  background: color-mix(in srgb, var(--s) 8%, var(--bg-elev));
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- 검증 ---------- */
.vstats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
.vstats div { padding: 18px 20px; }
.vstats div + div { border-left: 1px solid var(--line); }
.vstats b {
  display: block;
  font-size: 1.6rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.vstats div:first-child b, .vstats div:last-child b { color: var(--ok); }
.vstats span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.verify-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.env dl { margin: 0; display: grid; gap: 10px; }
.env dl div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.env dt { color: var(--muted); font-weight: 600; }
.env dd { margin: 0; color: var(--ink-2); font-weight: 600; }
.env dd small { display: block; margin-top: 2px; font-weight: 500; color: var(--muted); }
.card .env-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.ok-t { color: var(--ok); font-weight: 700; white-space: nowrap; }
.walk td small { color: var(--ok); font-weight: 650; white-space: nowrap; }
.fix { border-left: 3px solid var(--warn); }
.fx-k, .tl-k, .af-k {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--muted);
}
.fix .fx-k { color: var(--warn); }
.tool { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool .tl-k { color: var(--accent); }

/* ---------- Level 2 ---------- */
.levels-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.lv-card {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
}
.lv-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--lc); }
.lv-card.l1 { --lc: var(--accent); }
.lv-card.l2 { --lc: var(--t2); border-style: dashed; border-color: color-mix(in srgb, var(--t2) 45%, var(--line)); }
.lv-k {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--lc);
}
.lv-k .badge { font-family: var(--font); letter-spacing: 0; }
.lv-card h3 { font-size: 1.3rem; font-weight: 850; margin-bottom: 14px; }
.lv-card dl { margin: 0; display: grid; gap: 10px; }
.lv-card dl div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.55; }
.lv-card dt { color: var(--muted); font-weight: 600; }
.lv-card dd { margin: 0; color: var(--ink-2); }
.lv-arrow { display: grid; place-items: center; color: var(--muted); }
.lv-arrow svg { width: 26px; height: 26px; }

.l2-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}
.l2-flow > span:not(.pair), .l2-flow .pair > span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.l2-flow .pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--t2) 50%, var(--line));
}
.l2-flow small { color: var(--t2); font-weight: 800; font-size: 13px; }
.l2-flow i { font-style: normal; color: var(--muted); }

.l2-map {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.l2-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.l2-stage .no {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--t2);
  background: color-mix(in srgb, var(--t2) 13%, transparent);
}
.l2-stage b { font-size: 15px; font-weight: 750; line-height: 1.35; letter-spacing: -0.01em; }
.l2-stage .par {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t2);
  background: color-mix(in srgb, var(--t2) 12%, transparent);
  vertical-align: middle;
}
.l2-stage p { flex: 1; margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.l2-stage .from {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.l2-stage .from > span { margin-right: 2px; font-size: 12px; font-weight: 650; color: var(--muted); }
.l2-stage .from .qlink { padding: 1px 7px; font-size: 11.5px; }
.l2-stage.is-new { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.l2-stage .from.new > span { color: var(--warn); }

.answers td:first-child { white-space: nowrap; }
.answers td:nth-child(2) { color: var(--muted); }
.answers td:nth-child(3) { color: var(--ink-2); }
.artifact .af-k { color: var(--t2); }
.artifact .list { margin-top: 10px; }
.artifact .list li { font-size: 14px; }
.l2-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
}
.l2-cta-act { display: grid; justify-items: end; gap: 8px; }
.l2-cta-act small { font-size: 12.5px; color: var(--muted); }
.timeline li.next-lv .dur { color: var(--t2); }
.timeline li.next-lv a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--t2) 55%, transparent);
  text-underline-offset: 3px;
}

/* ---------- 고도화 반응형 ---------- */
@media (max-width: 1180px) {
  .nav-links a { padding: 6px 7px; font-size: 13.5px; }
  .nav .wrap { gap: 14px; }
}
@media (max-width: 1080px) {
  .l2-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vstats div:nth-child(3) { border-left: 0; }
  .vstats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 920px) {
  .nav-links a { padding: 11px 6px; font-size: 15.5px; }
  .explore-teaser, .verify-grid, .l2-cta { grid-template-columns: minmax(0, 1fr); }
  .et-art { max-width: 240px; justify-self: center; }
  .levels-compare { grid-template-columns: minmax(0, 1fr); }
  .lv-arrow { height: 30px; transform: rotate(90deg); }
  .l2-cta-act { justify-items: start; }
}
@media (max-width: 640px) {
  .outcomes, .l2-map { grid-template-columns: minmax(0, 1fr); }
  .ladder { flex-direction: column; }
  .rung-arrow { height: 18px; transform: rotate(90deg); }
  .vstats div { padding: 14px; }
  .vstats b { font-size: 1.3rem; }
  .env dl div, .lv-card dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lv-card { padding: 22px 18px 18px; }
  .answers td:first-child { white-space: normal; }
  .walk td small { white-space: normal; }
  .deep-head p { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .et-art .packet { animation: none; }
}
