:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0ea5e9;
  --progress: #0f766e;
  --progress-soft: #ccfbf1;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #5b6b82;
  --border: #dbe3ee;
  --success: #047857;
  --warning: #b45309;
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: var(--primary-dark); }
a:hover { color: #1e40af; }
.container { width: min(100% - 40px, 960px); margin-inline: auto; }
.wide-container { width: min(100% - 48px, 1180px); margin-inline: auto; }
.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;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; background: white; color: var(--navy);
  font-weight: 800; transform: translateY(-160%); transition: transform 180ms ease-out;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 300; height: 64px;
  color: white; background: rgba(15, 23, 42, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(14px);
}
.site-header-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  min-height: 44px; display: inline-flex; align-items: center; gap: 10px;
  color: white; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap;
}
.brand:hover { color: white; }
.brand-mark {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  color: white; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
}
.brand-mark svg { width: 19px; height: 19px; }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-nav a, .header-cta {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 13px; border-radius: 9px; color: #cbd5e1; text-decoration: none;
  font-size: 0.88rem; font-weight: 700; transition: color 180ms ease, background-color 180ms ease;
}
.header-nav a:hover, .header-nav a[aria-current="page"] { color: white; background: rgba(255, 255, 255, 0.09); }
.header-cta { gap: 7px; color: white; background: var(--primary); white-space: nowrap; }
.header-cta:hover { color: white; background: var(--primary-dark); }
.header-cta svg, .external-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.page-hero {
  padding: 60px 0 116px; color: white; background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,0.18), transparent 24%),
    linear-gradient(135deg, var(--primary), var(--accent));
}
.breadcrumb { margin: 0 0 24px; color: #dbeafe; font-size: 0.88rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: 0.65; }
.breadcrumb a { min-height: 32px; display: inline-flex; align-items: center; color: white; }
.eyebrow {
  display: inline-flex; align-items: center; min-height: 32px; margin-bottom: 14px; padding: 3px 12px;
  border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; background: rgba(255,255,255,0.12);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em;
}
.page-hero h1 { max-width: 840px; margin: 0; font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.2; letter-spacing: -0.035em; }
.page-hero .lead { max-width: 720px; margin: 20px 0 0; color: #eff6ff; font-size: 1.08rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.page-meta span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 13px;
  border-radius: 999px; background: rgba(255,255,255,0.14); font-size: 0.88rem; font-weight: 700;
}

.progress-shell { position: relative; z-index: 10; margin-top: -68px; }
.progress-card {
  padding: 22px 24px 20px; border: 1px solid var(--border); border-radius: 18px;
  background: rgba(255,255,255,0.98); box-shadow: var(--shadow);
}
.progress-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.progress-summary strong { color: var(--navy); font-size: 0.95rem; }
.progress-summary span { color: var(--muted); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.progress-fill {
  width: var(--progress-width); height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--progress), #14b8a6); transition: width 260ms ease-out;
}
.step-list {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
  margin: 18px 0 0; padding: 0; list-style: none;
}
.step-list a {
  min-height: 62px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 8px 10px; border: 1px solid transparent; border-radius: 10px;
  color: var(--muted); text-decoration: none; transition: background-color 180ms ease, border-color 180ms ease;
}
.step-list a:hover { color: var(--navy); background: #f1f5f9; }
.step-list a[aria-current="step"] { color: #1e3a8a; border-color: #bfdbfe; background: #eff6ff; }
.step-list .passed a { color: #115e59; background: #f0fdfa; }
.step-number { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; }
.step-name { font-size: 0.84rem; font-weight: 800; line-height: 1.35; }

.page-main { padding: 56px 0 24px; }
.content-section { margin-bottom: 56px; }
.content-section > h2:first-child { margin-top: 0; }
h2 { margin: 52px 0 18px; color: var(--primary-dark); font-size: 1.65rem; line-height: 1.35; letter-spacing: -0.02em; }
h3 { margin: 36px 0 14px; color: var(--text); font-size: 1.2rem; line-height: 1.4; }
p { margin: 12px 0; }
.lead { color: var(--muted); font-size: 1.08rem; }
.card {
  margin: 20px 0; padding: 24px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.card-highlight { border-left: 4px solid var(--primary); }
.card-warn { border-left: 4px solid var(--warning); background: #fffbeb; }
.card-success { border-left: 4px solid var(--success); background: #ecfdf5; }
table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 0.94rem; background: white; }
th, td { padding: 12px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--text); background: #f1f5f9; font-weight: 800; }
tr:hover { background: #f8fafc; }
code {
  padding: 2px 6px; border-radius: 4px; background: #f1f5f9; color: #9f1239;
  font-family: "SF Mono", "Roboto Mono", monospace; font-size: 0.88em;
}
pre {
  margin: 18px 0; padding: 20px; overflow-x: auto; border-radius: 12px;
  background: var(--navy); color: #e2e8f0; font-family: "SF Mono", monospace; font-size: 0.88rem; line-height: 1.65;
}
pre code { padding: 0; color: inherit; background: none; }
.code-copy-shell { position: relative; margin: 18px 0; }
.code-copy-shell > pre { margin: 0 !important; padding-top: 66px; }
.copy-code-button {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  min-width: 88px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 9px;
  color: var(--navy); background: rgba(255, 255, 255, 0.96); box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
  font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.copy-code-button:hover { color: var(--primary-dark); border-color: #93c5fd; background: white; }
.copy-code-button:active { background: #eff6ff; }
.copy-code-button.is-copied { color: white; border-color: var(--success); background: var(--success); }
.copy-code-button.is-error { color: white; border-color: #b91c1c; background: #b91c1c; }
.copy-code-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.agenda { display: grid; gap: 12px; }
.agenda-row {
  display: grid; grid-template-columns: 120px 80px 1fr 100px; gap: 16px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.agenda-time { color: var(--primary-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.agenda-type { text-align: center; font-size: 0.8rem; }
.type-pres, .type-hands, .type-break { padding: 3px 8px; border-radius: 5px; font-weight: 700; }
.type-pres { color: #1e40af; background: #dbeafe; }
.type-hands { color: #065f46; background: #d1fae5; }
.type-break { color: #991b1b; background: #fee2e2; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--border); }
.checklist li::before { position: absolute; left: 0; content: "□"; color: var(--primary); font-size: 1.2rem; }
.architecture {
  padding: 24px; overflow-x: auto; border-radius: 12px; background: var(--navy); color: #cbd5e1;
  font-family: monospace; line-height: 1.8; white-space: pre;
}
.tip {
  display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; padding: 17px 20px;
  border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff;
}
.tip-icon { flex-shrink: 0; font-size: 1.25rem; }
.tip-content { font-size: 0.95rem; }
.tip-content strong { color: var(--primary-dark); }

.curriculum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 26px 0 8px; }
.curriculum-card {
  min-height: 170px; display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: white;
  color: var(--text); text-decoration: none; box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  transition: transform 180ms ease-out, border-color 180ms ease, box-shadow 180ms ease;
}
.curriculum-card:hover { color: var(--text); transform: translateY(-2px); border-color: #93c5fd; box-shadow: var(--shadow); }
.curriculum-card small { color: var(--primary-dark); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.curriculum-card strong { display: block; margin: 8px 0; font-size: 1.1rem; line-height: 1.45; }
.curriculum-card span { color: var(--muted); font-size: 0.9rem; }
.page-pager {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border);
}
.pager-link {
  min-height: 92px; display: flex; flex-direction: column; justify-content: center;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px;
  background: white; color: var(--text); text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.pager-link:hover { color: var(--text); border-color: #93c5fd; box-shadow: 0 8px 22px rgba(15,23,42,0.07); }
.pager-link.next { text-align: right; }
.pager-link small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.pager-link strong { color: var(--primary-dark); font-size: 0.98rem; }
.pager-spacer { min-height: 1px; }

.site-footer { margin-top: 64px; color: #94a3b8; background: var(--navy); border-top: 1px solid rgba(255,255,255,0.1); }
.site-footer-inner { padding: 40px 0 28px; }
.footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; padding-bottom: 28px; }
.footer-brand { max-width: 440px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { margin: 0; font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
.footer-links a {
  min-height: 44px; display: inline-flex; align-items: center; gap: 7px;
  color: #cbd5e1; text-decoration: none; overflow-wrap: anywhere;
}
.footer-links a:hover { color: white; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem;
}
.footer-bottom p { margin: 0; }

.brand:focus-visible, .header-nav a:focus-visible, .header-cta:focus-visible,
.breadcrumb a:focus-visible, .step-list a:focus-visible, .curriculum-card:focus-visible,
.pager-link:focus-visible, .footer-links a:focus-visible, .copy-code-button:focus-visible {
  outline: 3px solid #7dd3fc; outline-offset: 3px;
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  .step-list { display: flex; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .step-list li { min-width: 132px; scroll-snap-align: start; }
  .step-list a { min-height: 58px; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 32px, 960px); }
  .wide-container { width: min(100% - 32px, 1180px); }
  .site-header-inner { gap: 10px; }
  .header-cta { padding: 0 11px; font-size: 0.8rem; }
  .page-hero { padding: 44px 0 104px; }
  .page-hero h1 { font-size: 2rem; }
  .progress-card { padding: 18px 16px 14px; }
  .page-main { padding-top: 44px; }
  .curriculum-grid { grid-template-columns: 1fr; }
  .agenda-row { grid-template-columns: 1fr; gap: 5px; }
  .agenda-type { text-align: left; }
  .page-pager { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; }
  .footer-main, .footer-bottom { flex-direction: column; }
  .footer-main { gap: 24px; }
  .footer-links { width: 100%; flex-direction: column; justify-content: flex-start; }
  table { display: block; max-width: 100%; overflow-x: auto; font-size: 0.86rem; }
  th, td { min-width: 132px; padding: 10px 12px; }
}
@media (max-width: 420px) {
  .brand-text { display: none; }
  .header-cta { font-size: 0.76rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
