:root {
  --bg: #ffffff;
  --text: #191f28;
  --text-sub: #4e5968;
  --muted: #8b95a1;
  --line: #eaecef;
  --surface: #f7f8fa;
  --accent: #3182f6;
  --accent-soft: #e8f3ff;
  --code-bg: #f6f8fa;
  --radius: 10px;
  --wrap: 840px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 글이 짧은 페이지에서도 하단 워드마크가 화면 맨 아래에 붙도록 본문이 남는 높이를 채운다 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 헤더 ---------- */

/* 맨 위에서는 배경 없이 본문 폭에 맞춰 놓이고,
   스크롤하면 폭이 조금 줄며 떠 있는 둥근 바가 된다 (data-scrolled는 templates.mjs의 스크립트가 붙인다). */
.site-header {
  --header-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 12px;
  pointer-events: none;
}

.header-frame {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  transition: max-width 0.4s var(--header-ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0);
  -webkit-backdrop-filter: saturate(1) blur(0);
  backdrop-filter: saturate(1) blur(0);
  pointer-events: auto;
  transition:
    padding 0.4s var(--header-ease),
    background-color 0.4s var(--header-ease),
    box-shadow 0.4s var(--header-ease),
    -webkit-backdrop-filter 0.4s var(--header-ease),
    backdrop-filter 0.4s var(--header-ease);
}

.site-header[data-scrolled] .header-frame {
  max-width: 740px;
}

.site-header[data-scrolled] .header-inner {
  padding: 0 7px 0 22px;
  background-color: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  /* 테두리는 border 대신 안쪽 그림자로 그려, 맨 위 상태에서 로고·메뉴가 본문 끝선과 정확히 맞게 한다 */
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.06);
}

/* 페이지를 넘어올 때 이전 페이지의 떠 있는 바 모양을 전환 없이 먼저 그리는 순간 (templates.mjs의 스크립트) */
.site-header.is-instant .header-frame,
.site-header.is-instant .header-inner,
.site-header.is-instant .brand,
.site-header.is-instant .nav {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .header-frame,
  .header-inner,
  .site-header .brand,
  .nav {
    transition: none;
  }
}

/* 로고 자리 글자는 맨 위에서는 페이지 제목처럼 크게 두고, 스크롤해 떠 있는 바가 되면 작게 줄인다.
   inline-block: 글자가 바뀌는 동안 폭을 직접 늘리고 줄일 수 있게 한다 (header.js) */
.brand {
  display: inline-block;
  vertical-align: middle;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  transition:
    font-size 0.4s var(--header-ease),
    letter-spacing 0.4s var(--header-ease);
}

.site-header[data-scrolled] .brand {
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* 상단바 글자가 바뀌는 동안: 폭은 header.js가 정한다. 글자가 칸보다 잠깐 길어져도 안쪽 여백 안에서만 넘친다 */
.is-scrambling {
  overflow: hidden;
  white-space: nowrap;
}

.brand-title {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* 메뉴는 마우스를 올리면 작은 알약 모양 배경이 생긴다.
   맨 위에서는 글자 끝이 본문 오른쪽 끝에 맞도록 안쪽 여백만큼 바깥으로 민다. */
.nav {
  display: flex;
  gap: 2px;
  margin-right: -12px;
  font-size: 15px;
  color: var(--text-sub);
  transition: margin-right 0.4s var(--header-ease);
}

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.nav a:hover {
  color: var(--text);
  background-color: rgba(0, 0, 0, 0.05);
}

.site-header[data-scrolled] .nav {
  margin-right: 0;
}

main.wrap {
  flex: 1 0 auto;
  padding-top: 48px;
  padding-bottom: 96px;
}

/* 본문 제목 없이 시작하는 페이지(필터바로 시작하는 목록, 상단바가 제목인 Category·About)는 위 여백을 줄인다 */
main.is-compact {
  padding-top: 28px;
}

/* ---------- 목록 위 아트웍 ---------- */

/* 목록 페이지(홈, 카테고리)는 화면 전체를 채운 아트웍으로 시작해, 스크롤하면 상단바 아래 둥근 배너로 줄어든다
   (그림과 움직임은 public/hero.js).
   무대(.hero-stage)가 화면 높이 + 줄어드는 거리(--hero-runway)만큼 길고, 그동안 아트웍(.hero)은 화면에 붙어 있다.
   배너의 위치·크기·모서리는 보이지 않는 틀(.hero-banner)이 정하고, 스크립트가 그 틀을 재서 보이는 창을 정한다.
   글 목록은 끌어올려 두어 배너 바로 아래에 붙는다. */
:root {
  --hero-top: 72px;
  --hero-banner-h: clamp(340px, 58svh, 560px);
  --hero-radius: 28px;
  --hero-runway: max(45svh, 100svh - var(--hero-top) - var(--hero-banner-h));
}

.hero-stage {
  height: calc(100svh + var(--hero-runway));
  /* 상단바(위 여백 12px + 높이 52px) 뒤까지 채운다 */
  margin-top: -64px;
}

.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  /* 배너 모양일 때는 투명한 아랫부분이 글 목록 위에 겹치므로 클릭을 통과시킨다 */
  pointer-events: none;
}

.hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-banner {
  position: absolute;
  top: var(--hero-top);
  left: max(16px, (100% - 1200px) / 2);
  right: max(16px, (100% - 1200px) / 2);
  height: var(--hero-banner-h);
  border-radius: var(--hero-radius);
  visibility: hidden;
}

/* 배너 아래 여백은 상단바 높이(64px) + 다른 페이지의 위 여백(28px).
   배너가 화면 위로 다 지나가면 상단바가 이 여백에 놓이고, 필터바는 다른 페이지 맨 위와 같은 자리에 온다.
   글이 적어도 그 자리까지 스크롤할 수 있게 목록은 최소 화면 높이만큼 둔다 */
.hero-stage + main.wrap {
  min-height: 100svh;
  margin-top: calc(var(--hero-top) + var(--hero-banner-h) - 100svh);
  padding-top: 92px;
}

/* 화면 전체일 때 아래 가운데에서 살짝 오르내리는 버튼. 누르면 글 목록까지 내려가고,
   배너로 줄어들기 시작하면 hero.js가 흐리게 감춘다 */
.hero-next {
  position: absolute;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
  animation: hero-bob 2.2s ease-in-out infinite;
  transition: background-color 0.2s;
}

.hero-next:hover {
  background: rgba(255, 255, 255, 0.75);
}

@keyframes hero-bob {
  50% {
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-next {
    animation: none;
  }
}

/* 스크립트가 꺼져 있으면 처음부터 배너 모양으로, 멈춘 그라데이션을 보여 준다 */
@media (scripting: none) {
  .hero-next {
    display: none;
  }

  .hero {
    clip-path: inset(
      var(--hero-top) max(16px, (100% - 1200px) / 2) calc(100% - var(--hero-top) - var(--hero-banner-h))
        round var(--hero-radius)
    );
    background: linear-gradient(135deg, #dff070, #56d27a 55%, #0fa7a3);
  }
}

/* ---------- 하단 워드마크 ---------- */

/* 페이지 끝을 사이트 이름을 크고 옅게 깔아 마무리한다. 장식이라 스크린리더·선택에서 뺀다.
   글자 크기는 컨테이너 폭에 맞춘다: Pretendard 800, 자간 -0.04em에서 "progresshans"의 폭은 글자 크기의 약 6.16배.
   사이트 이름을 바꾸면 이 값을 다시 재야 한다.
   line-height 0.71은 글자 밑선(baseline)이 페이지 맨 아래에 딱 닿는 값이다 (Pretendard 기준). p·g의 꼬리는 잘린다.
   화면 폭을 거의 꽉 채우고(아주 넓은 화면에서만 1920px로 제한), 글자는 아래를 기준으로 세로로 1.1배 살짝 늘린다.
   늘어난 윗부분이 잘리지 않게 위 여백을 둔다. */
.site-footer {
  container-type: inline-size;
  flex-shrink: 0;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 16px;
  overflow: hidden;
  user-select: none;
}

.footer-mark {
  padding-top: 0.1em;
  font-size: calc(100cqw / 6.16);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.71;
  text-align: center;
  white-space: nowrap;
  color: #f1f3f5;
  transform: scaleY(1.1);
  transform-origin: 50% 100%;
}

/* ---------- 홈 / 목록 ---------- */

/* ---------- 카테고리 필터 (윗줄: 대분류 칩, 아랫줄: 소분류 탭) ---------- */

/* 글 목록 항목에 위 여백(24px)이 있어 필터바 아래 여백은 작게 둔다 */
.filter {
  margin-bottom: 8px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-sub);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chip span {
  color: var(--muted);
  font-size: 13px;
}

.chip:hover {
  border-color: #cfd4da;
  color: var(--text);
}

.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.chip.is-active span {
  color: rgba(255, 255, 255, 0.7);
}

/* 소분류를 보고 있을 때의 상위 대분류: 선택돼 있지만 한 단계 약하게 */
.chip.is-parent {
  border-color: var(--text);
  color: var(--text);
  font-weight: 600;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 14px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.subnav-item {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 0 11px;
  color: var(--text-sub);
  transition: color 0.2s;
}

.subnav-item span {
  font-size: 13px;
  color: var(--muted);
}

.subnav-item:hover {
  color: var(--text);
}

/* 선택 상태는 굵기 대신 색으로만 구분한다 (굵기가 바뀌면 글자 폭이 달라져 전환 때 흔들린다) */
.subnav-item.is-active {
  color: var(--text);
}

.subnav-item.is-active span {
  color: var(--text-sub);
}

.subnav-indicator {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  border-bottom: 1px solid var(--line);
}

.post-item:last-child {
  border-bottom: 0;
}

.post-item a {
  display: block;
  padding: 24px 0;
}

.post-cat {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.post-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  transition: color 0.15s;
}

.post-item a:hover .post-title {
  color: var(--accent);
}

.post-desc {
  margin: 6px 0 0;
  color: var(--text-sub);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.draft {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff3e0;
  color: #e8590c;
  font-style: normal;
  font-size: 12px;
}

.empty {
  color: var(--muted);
}

/* ---------- 페이지 헤더 / 카테고리 ---------- */

/* 바로 아래 오는 목록·그룹이 자체 위 여백(24px)을 가지므로 작게 둔다 */
.page-header {
  margin-bottom: 8px;
}

/* 화면에는 숨기고 검색엔진·스크린리더만 읽는 텍스트 */
.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;
}

.page-header h1,
.post-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.lead {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 17px;
}

.breadcrumbs {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .sep {
  margin: 0 8px;
  color: #d1d6db;
}

.cat-group {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.cat-group:first-child {
  padding-top: 0;
}

.cat-group:last-child {
  border-bottom: 0;
}

.cat-group h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cat-group h2 a:hover {
  color: var(--accent);
}

.cat-group h2 span,
.cat-group li span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.cat-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 15px;
}

.cat-group li {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.cat-group li a:hover {
  color: var(--accent);
}

/* ---------- 글 ---------- */

.post-header {
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.prose {
  font-size: 16px;
  line-height: 1.8;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.4;
  letter-spacing: -0.02em;
  scroll-margin-top: 80px;
}

.prose h2 {
  margin: 56px 0 8px;
  font-size: 24px;
}

.prose h3 {
  margin: 40px 0 6px;
  font-size: 20px;
}

.prose h4 {
  margin: 32px 0 4px;
  font-size: 17px;
}

.prose a.header-anchor {
  color: inherit;
  text-decoration: none;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table,
.prose pre {
  margin: 0 0 20px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 4px;
}

.prose blockquote {
  padding: 12px 18px;
  border-left: 3px solid var(--line);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-sub);
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto;
  border-radius: var(--radius);
}

.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

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

.prose th {
  background: var(--surface);
  font-weight: 600;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.88em;
}

/* 코드 블록: 라벨·복사 버튼은 감싼 div에 두어 가로 스크롤과 무관하게 고정 */
.prose .code-block {
  position: relative;
  margin: 0 0 20px;
}

.prose .code-block pre.code {
  margin: 0;
}

.prose pre.code {
  overflow-x: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 14px;
  line-height: 1.65;
}

.prose pre.code code {
  font-family: var(--mono);
  background: none;
  padding: 0;
}

.code-lang {
  position: absolute;
  top: 9px;
  right: 14px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.15s;
}

.copy-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-sub);
  font: 500 12px/1.4 var(--font);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s, transform 0.15s, color 0.15s, border-color 0.15s;
}

.code-block:hover .copy-btn,
.copy-btn:focus-visible,
.copy-btn.is-copied {
  opacity: 1;
  transform: none;
}

.code-block:hover .code-lang,
.code-block:has(.copy-btn:focus-visible, .copy-btn.is-copied) .code-lang {
  opacity: 0;
}

.copy-btn:hover {
  border-color: #cfd4da;
  color: var(--text);
}

.copy-btn.is-copied {
  border-color: #b8e2c8;
  color: #0b7a43;
}

/* 마우스가 없는 기기에서는 복사 버튼을 항상 보이고 라벨은 옆으로 비킨다 */
@media (hover: none) {
  .copy-btn {
    opacity: 1;
    transform: none;
  }

  .code-lang {
    right: 84px;
  }

  .code-block:hover .code-lang {
    opacity: 1;
  }
}

/* ---------- 목차 ---------- */

.post-body {
  position: relative;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
}

.toc-list li + li {
  margin-top: 4px;
}

.toc-list a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  transition: color 0.15s;
}

.toc-list a:hover {
  color: var(--text);
}

.toc-list .toc-l3 a {
  padding-left: 12px;
  font-size: 13px;
}

/* 좁은 화면: 글 위쪽의 접는 목차 */
.toc-inline {
  margin: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc-inline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.toc-inline summary::-webkit-details-marker {
  display: none;
}

.toc-inline summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}

.toc-inline[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.toc-inline nav {
  padding: 0 16px 14px;
}

.toc-inline .toc-list a {
  color: var(--text-sub);
}

.toc-inline .toc-list a.is-active {
  color: var(--text);
  font-weight: 600;
}

/* 넓은 화면: 본문 오른쪽에 따라오는 목차 */
.toc-rail {
  display: none;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

@media (min-width: 1320px) {
  .toc-inline {
    display: none;
  }

  .toc-rail {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(100% + 40px);
    width: 200px;
  }

  .toc-sticky {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .toc-rail .toc-list {
    border-left: 1px solid var(--line);
  }

  .toc-rail .toc-list a {
    margin-left: -1px;
    padding-left: 14px;
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
  }

  .toc-rail .toc-list .toc-l3 a {
    padding-left: 26px;
  }

  .toc-rail .toc-list a.is-active {
    border-left-color: var(--accent);
    color: var(--text);
    font-weight: 600;
  }
}

/* ---------- 읽기 진행 표시 (화면 맨 위 가장자리) ---------- */

.reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 페이지네이션 ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  font-size: 15px;
}

.page-nums {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num,
.page-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 999px;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
}

.page-num {
  min-width: 36px;
  padding: 0 6px;
}

.page-step {
  padding: 0 12px;
}

.page-num:hover,
.page-step:hover {
  background: var(--surface);
  color: var(--text);
}

.page-num.is-current {
  background: var(--text);
  color: #fff;
  font-weight: 600;
}

.page-step.is-disabled {
  color: #d1d6db;
  pointer-events: none;
}

.page-gap {
  padding: 0 4px;
  color: var(--muted);
}

.related {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.related .post-title {
  font-size: 18px;
}

.not-found {
  padding: 80px 0;
  text-align: center;
}

.not-found h1 {
  font-size: 28px;
}

.not-found a {
  color: var(--accent);
}

/* ---------- 코드 하이라이트 (GitHub 라이트 톤) ---------- */

.hljs-comment,
.hljs-quote {
  color: #6e7781;
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-type,
.hljs-doctag {
  color: #cf222e;
}

.hljs-string,
.hljs-regexp,
.hljs-addition {
  color: #0a3069;
}

.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attr,
.hljs-variable,
.hljs-template-variable {
  color: #0550ae;
}

.hljs-title,
.hljs-title.function_,
.hljs-section,
.hljs-name {
  color: #8250df;
}

.hljs-built_in,
.hljs-meta,
.hljs-selector-id,
.hljs-selector-class,
.hljs-attribute {
  color: #953800;
}

.hljs-deletion {
  color: #82071e;
  background: #ffebe9;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: 700;
}

/* ---------- 메뉴바 애니메이션 ----------
   페이지는 즉시 바뀌고, 밑줄·소분류 탭 줄의 움직임만 public/nav.js가 만든다. */

.subnav-indicator {
  transform-origin: left center;
}

/* ---------- 모바일 ---------- */

@media (max-width: 640px) {
  main.wrap {
    padding-top: 32px;
  }

  :root {
    --hero-radius: 24px;
  }

  .hero-stage + main.wrap {
    padding-top: 84px;
  }

  main.is-compact {
    padding-top: 20px;
  }

  .page-header h1,
  .post-header h1 {
    font-size: 26px;
  }

  .prose h2 {
    font-size: 21px;
  }

  .post-title {
    font-size: 18px;
  }
}
