/* ============================================================
   NUKE — OBSIDIAN v3 : 칼럼 허브 · 상세 · 전환 컴포넌트
   main.css 의 디자인 토큰을 그대로 쓴다.
   ============================================================ */

:root {
  /* data-cat 이 없을 때의 기본 강조색 */
  --cat:      var(--blue);
  --cat-soft: rgba(59,111,255,.14);
  --cat-line: rgba(59,111,255,.34);
  --cat-glow: rgba(59,111,255,.28);

  --measure:  clamp(16rem, 100%, 46rem);
  --ease:     cubic-bezier(.22,.61,.36,1);
}

/* ── 한글 조판 기본 ─────────────────────────────────────────
   한국어는 어절 단위로 끊어야 읽힌다. keep-all 없이는 단어 중간이
   잘려 가독성이 크게 떨어진다. ───────────────────────────── */
h1, h2, h3, h4, h5, h6,
p, li, dd, dt, figcaption, blockquote,
.ncard__title, .ntag, .post-nav__title, .toc__item a,
.sidelist a, .poplist__title, .seriesbox__item, .serieslist__title {
  word-break: keep-all;
  /* anywhere 는 어절 안까지 끊는다("5가지" → "5가/지").
     break-word 는 그 낱말만으로 줄을 못 채울 때만 끊는다. */
  overflow-wrap: break-word;
}

/* ── 접근성 ────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 0 0 8px 0;
  font-size: .85rem;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 읽기 진행률 ───────────────────────────────────────────── */
.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 1200;
  background: transparent;
  pointer-events: none;
}
.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  box-shadow: 0 0 12px var(--blue-glow);
  transition: width .1s linear;
}

/* ── 헤더 추가 요소 ────────────────────────────────────────── */
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 9px;
  color: var(--text-sec);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--blue-dim); }

.search-panel {
  border-top: 1px solid var(--border);
  background: var(--bg-glass2);
  backdrop-filter: blur(18px);
  animation: nfade .28s var(--ease);
}
.search-panel__inner { padding: 22px 0 26px; }
.search-panel__hints {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.search-panel__hints .mono-label { margin-right: 4px; color: var(--text-xmuted); }

@keyframes nfade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── 검색 폼 ───────────────────────────────────────────────── */
.nsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color .2s, box-shadow .2s;
}
.nsearch:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-dim);
}
.nsearch__icon { color: var(--text-muted); flex-shrink: 0; }
.nsearch__input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .92rem;
}
.nsearch__input::placeholder { color: var(--text-muted); }
.nsearch__input::-webkit-search-cancel-button { filter: invert(.6); }
.nsearch__btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--blue);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  transition: background .2s, box-shadow .2s;
}
.nsearch__btn:hover { background: #5585ff; box-shadow: 0 0 20px var(--blue-glow); }

.nav-mobile-foot { display: none; }

/* ── 빵부스러기 ────────────────────────────────────────────── */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--text-primary); }
.crumbs__sep { color: var(--text-xmuted); }
.crumbs__current { color: var(--cat); }

/* ── 페이지 히어로 ─────────────────────────────────────────── */
.phero {
  position: relative;
  padding: 150px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.phero__bg {
  position: absolute;
  inset: -40% 0 auto 50%;
  width: 900px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--cat-glow) 0%, transparent 62%);
  opacity: .28;
  pointer-events: none;
}
.phero__inner { position: relative; z-index: 1; }
.phero__label {
  color: var(--cat);
  font-size: .68rem;
  letter-spacing: .28em;
  margin-bottom: 14px;
}
.phero__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text-primary);
  max-width: 20ch;
}
.phero__desc {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--text-sec);
  font-size: clamp(.92rem, 1.5vw, 1.02rem);
  line-height: 1.85;
}
.phero__meta { margin-top: 18px; color: var(--text-xmuted); font-size: .65rem; letter-spacing: .2em; }
.phero--hub { padding-bottom: 40px; }
.phero--post { padding-bottom: 44px; }

.hub-search {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 30px;
  max-width: 620px;
}
.hub-search .nsearch { flex: 1; min-width: 260px; }
.hub-search__meta { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.hub-search__meta strong { color: var(--gold); font-size: .95rem; }

/* ── 카테고리 레일 ─────────────────────────────────────────── */
.catrail {
  position: sticky;
  /* 고정 헤더 높이(72px)에 맞춘다. 1px 겹쳐 경계에 틈이 생기지 않게 한다. */
  top: 71px;
  z-index: 40;
  background: var(--bg-glass2);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.catrail__inner {
  display: flex;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.catrail__inner::-webkit-scrollbar { display: none; }
.catrail__item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .8rem;
  color: var(--text-sec);
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.catrail__item:hover { color: var(--cat); border-color: var(--cat-line); background: var(--cat-soft); }
.catrail__item.is-active {
  color: var(--cat);
  border-color: var(--cat-line);
  background: var(--cat-soft);
  font-weight: 500;
}
.catrail__count {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--text-xmuted);
}
.catrail__item.is-active .catrail__count { color: var(--cat); }

/* ── 태그 배지 ─────────────────────────────────────────────── */
.ntag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--cat-line);
  border-radius: 100px;
  background: var(--cat-soft);
  color: var(--cat);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
a.ntag:hover { background: var(--cat-glow); transform: translateY(-1px); }
.ntag--sm { padding: 3px 9px; font-size: .6rem; }
.ntag--lg { padding: 7px 16px; font-size: .7rem; margin-bottom: 18px; }
.ntag--plain {
  border-color: var(--border);
  background: none;
  color: var(--text-muted);
}
.ntag--plain:hover { border-color: var(--cat-line); color: var(--cat); background: var(--cat-soft); }

/* ── 섹션 리듬 ─────────────────────────────────────────────── */
.section--tight { padding: 56px 0 88px; }
.section--deep { padding: 80px 0; background: var(--bg-deep); border-top: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 30px;
}
.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-primary);
  white-space: nowrap;
}
.section-head__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ── 카드 그리드 ───────────────────────────────────────────── */
.ngrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.ncard {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .34s var(--ease), border-color .34s, box-shadow .34s;
}
.ncard:hover {
  transform: translateY(-5px);
  border-color: var(--cat-line);
  box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 0 1px var(--cat-line), 0 0 42px var(--cat-glow);
}
.ncard__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-deep);
}
.ncard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s;
  filter: saturate(.86) contrast(1.02);
}
.ncard:hover .ncard__media img { transform: scale(1.05); filter: saturate(1) contrast(1.02); }

.ncard__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, var(--cat-glow) 0%, transparent 55%),
    linear-gradient(140deg, var(--bg-card-hov), var(--bg-deep));
}
.ncard__ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .6;
}
.ncard__ph-mark {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-style: italic;
  color: var(--cat);
  opacity: .5;
}

.ncard__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
  flex: 1;
}
.ncard__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ncard__date { font-family: var(--font-mono); font-size: .62rem; color: var(--text-xmuted); }
.ncard__title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -.005em;
  color: var(--text-primary);
}
.ncard__title a { transition: color .2s; }
.ncard:hover .ncard__title a { color: var(--cat); }
.ncard__excerpt {
  font-size: .84rem;
  line-height: 1.8;
  color: var(--text-sec);
  flex: 1;
}
.ncard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--text-xmuted);
}
.ncard__go { color: var(--cat); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.ncard:hover .ncard__go { opacity: 1; transform: none; }

/* ── 대표 칼럼 ─────────────────────────────────────────────── */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  margin-bottom: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color .34s, box-shadow .34s;
}
.featured:hover {
  border-color: var(--cat-line);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 60px var(--cat-glow);
}
.featured__media {
  position: relative;
  display: block;
  min-height: 320px;
  overflow: hidden;
  background: var(--bg-deep);
}
.featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.featured:hover .featured__media img { transform: scale(1.04); }
.featured__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, var(--cat-glow) 0%, transparent 58%),
    linear-gradient(140deg, var(--bg-card-hov), var(--bg-deep));
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-style: italic;
  letter-spacing: .1em;
  color: var(--cat);
  opacity: .38;
}
.featured__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 42px;
  justify-content: center;
}
.featured__eyebrow { color: var(--cat); font-size: .62rem; letter-spacing: .3em; }
.featured__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.featured__date { font-family: var(--font-mono); font-size: .64rem; color: var(--text-xmuted); }
.featured__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  font-weight: 600;
  line-height: 1.36;
  letter-spacing: -.012em;
  color: var(--text-primary);
}
.featured__title a { transition: color .2s; }
.featured__title a:hover { color: var(--cat); }
.featured__excerpt { font-size: .92rem; line-height: 1.86; color: var(--text-sec); }
.featured__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--cat);
  font-size: .86rem;
  font-weight: 500;
  transition: gap .25s;
}
.featured__go:hover { gap: 14px; }

/* ── 시리즈 ────────────────────────────────────────────────── */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.series-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s;
}
.series-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.series-card:hover { transform: translateY(-4px); border-color: var(--border-gold); }
.series-card__badge { color: var(--gold); font-size: .6rem; letter-spacing: .18em; }
.series-card__title { font-size: 1.05rem; font-weight: 600; line-height: 1.5; color: var(--text-primary); }
.series-card__desc { font-size: .82rem; line-height: 1.78; color: var(--text-sec); }
.series-card__go { margin-top: auto; padding-top: 10px; font-size: .78rem; color: var(--gold); }

.serieslist { display: flex; flex-direction: column; gap: 2px; counter-reset: none; }
.serieslist__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  transition: border-color .25s, background .25s;
}
.serieslist__item:hover { border-color: var(--cat-line); background: var(--bg-card-hov); }
.serieslist__num { color: var(--cat); font-size: 1rem; opacity: .7; }
.serieslist__title { font-size: 1.02rem; font-weight: 600; line-height: 1.5; color: var(--text-primary); }
.serieslist__title:hover { color: var(--cat); }
.serieslist__excerpt { margin-top: 6px; font-size: .84rem; line-height: 1.78; color: var(--text-sec); }
.serieslist__meta { margin-top: 8px; font-family: var(--font-mono); font-size: .62rem; color: var(--text-xmuted); }

/* ── 인기 목록 ─────────────────────────────────────────────── */
.poplist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 4px 32px;
  list-style: none;
}
.poplist__item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
}
.poplist__num { font-size: 1.05rem; color: var(--cat); opacity: .55; }
.poplist__title { font-size: .96rem; font-weight: 500; line-height: 1.6; color: var(--text-primary); transition: color .2s; }
.poplist__title:hover { color: var(--cat); }
.poplist__meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--text-xmuted);
}
.poplist__cat { color: var(--cat); }

/* ── 페이지네이션 · 빈 상태 ────────────────────────────────── */
.npagination { margin-top: 52px; }
.npagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.npagination a,
.npagination span {
  display: grid;
  place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-sec);
  transition: all .2s;
}
.npagination a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.npagination .current { background: var(--blue); border-color: var(--blue); color: #fff; }
.npagination .dots { border-color: transparent; }

.nempty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 84px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
}
.nempty__title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); }
.nempty__desc { font-size: .88rem; color: var(--text-sec); }
.nempty__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 10px; }

/* ── 칼럼 상세 ─────────────────────────────────────────────── */
.single__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 3.05rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.015em;
  color: var(--text-primary);
  max-width: 24ch;
}
.single__lead {
  margin-top: 18px;
  max-width: 58ch;
  font-size: clamp(.95rem, 1.6vw, 1.08rem);
  line-height: 1.85;
  color: var(--text-sec);
}
.single__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
}

.single__hero { margin-top: -28px; position: relative; z-index: 2; }
.single__thumb {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
}
.single__thumb img { width: 100%; }

.single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 60px;
  padding: 64px 0 90px;
  /* align-items: start 를 주면 안 된다. 사이드바 칼럼이 내용 높이(≈830px)로
     줄어들어 sticky 가 움직일 공간이 0 이 된다. 기본값 stretch 로 두어야
     칼럼이 본문 높이만큼 늘어나고, 그 안에서 sticky 가 따라올 수 있다. */
}
.single__main { min-width: 0; }
.single__side { position: relative; min-width: 0; }

/* 읽는 동안 계속 따라오는 묶음: 목차 + 상담 CTA + 많이 읽은 글.
   화면이 짧아 다 안 들어가면 목차 목록만 안쪽에서 스크롤되고,
   CTA 는 어떤 경우에도 줄어들지 않는다(문의 동선이 최우선). */
.side-sticky {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.side-sticky::-webkit-scrollbar { width: 6px; }
.side-sticky::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* 우선순위: 목차는 양보하며 줄고, CTA 는 고정, 많이 읽은 글은 마지막 */
.side-sticky > .toc--side { flex: 0 1 auto; min-height: 0; }
.side-sticky > .sidecard--cta { flex: 0 0 auto; }
.side-sticky > .sidecard { flex: 0 0 auto; }

/* ── 목차 ──────────────────────────────────────────────────── */
.toc--side {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
}
.toc--side .toc__list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.toc--side .toc__list::-webkit-scrollbar { width: 5px; }
.toc--side .toc__list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.toc__title { flex: 0 0 auto; color: var(--text-xmuted); font-size: .6rem; letter-spacing: .24em; margin-bottom: 12px; }
.toc__list { display: flex; flex-direction: column; gap: 2px; list-style: none; counter-reset: none; }
.toc__item a {
  display: block;
  padding: 7px 10px 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-muted);
  transition: color .2s, border-color .2s, background .2s;
}
.toc__item a:hover { color: var(--text-primary); background: rgba(255,255,255,.03); }
.toc__item--h3 a { padding-left: 24px; font-size: .75rem; }
.toc__item.is-current a {
  color: var(--cat);
  border-left-color: var(--cat);
  background: var(--cat-soft);
}

/* 모바일 목차 — 헤더(72px) 바로 아래에 붙어 따라온다.
   접힌 상태는 한 줄(약 48px)이라 자리를 거의 먹지 않고,
   펼치면 본문 위에 겹쳐 뜨므로 내용이 밀리며 튀지 않는다. */
.toc--mobile {
  display: none;
  position: sticky;
  top: 71px;
  z-index: 45;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  /* 반투명(glass)으로 두면 뒤로 지나가는 본문이 비쳐 글자가 읽히지 않는다.
     고정 요소 위로 본문이 흐르는 자리이므로 불투명해야 한다. */
  background: var(--bg-card);
}
.toc--mobile[open] { border-color: var(--cat-line); }
.toc--mobile .toc__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  max-height: 58vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px;
  border: 1px solid var(--cat-line);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 18px 44px rgba(0,0,0,.7);
}
.toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
}
.toc__summary::-webkit-details-marker { display: none; }
.toc__summary::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s;
}
.toc--mobile[open] .toc__summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc__count { font-family: var(--font-mono); font-size: .68rem; color: var(--text-xmuted); margin-left: auto; margin-right: 12px; }

/* ── 본문 조판 ─────────────────────────────────────────────── */
.post-content { max-width: var(--measure); font-size: 1.02rem; line-height: 1.95; color: var(--text-sec); }
.post-content > * + * { margin-top: 1.5em; }
.post-content p { color: var(--text-sec); }
.post-content strong { color: var(--text-primary); font-weight: 600; }

.post-content h2,
.post-content h3 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--text-primary);
  scroll-margin-top: 110px;
}
.post-content h2 {
  margin-top: 2.6em;
  padding-top: .8em;
  border-top: 1px solid var(--border);
  font-size: clamp(1.35rem, 2.6vw, 1.72rem);
  line-height: 1.4;
}
.post-content h3 { margin-top: 2em; font-size: clamp(1.1rem, 2vw, 1.28rem); line-height: 1.45; }

.hanchor {
  position: absolute;
  left: -1.1em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: .8em;
  color: var(--cat);
  opacity: 0;
  transition: opacity .2s;
}
.post-content h2:hover .hanchor,
.post-content h3:hover .hanchor,
.hanchor:focus-visible { opacity: .8; }

.post-content ul,
.post-content ol { padding-left: 1.35em; }
.post-content ul { list-style: none; }
.post-content ul > li { position: relative; padding-left: 4px; }
.post-content ul > li::before {
  content: '';
  position: absolute;
  left: -1em; top: .78em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cat);
  opacity: .7;
}
.post-content ol { list-style: decimal; }
.post-content ol > li::marker { color: var(--cat); font-family: var(--font-mono); font-size: .85em; }
.post-content li + li { margin-top: .55em; }

.post-content a:not(.hanchor):not(.inline-cta__btn) {
  color: var(--cat);
  text-decoration: underline;
  text-decoration-color: var(--cat-line);
  text-underline-offset: .22em;
  transition: text-decoration-color .2s;
}
.post-content a:not(.hanchor):not(.inline-cta__btn):hover { text-decoration-color: var(--cat); }

.post-content blockquote {
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--cat);
  font-family: var(--font-display);
  font-size: 1.16em;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-primary);
}
.post-content blockquote p + p { margin-top: .7em; }

.post-content img,
.post-content figure img { border-radius: 12px; border: 1px solid var(--border); }
.post-content figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
  text-align: center;
}

.post-content code {
  padding: .16em .45em;
  border-radius: 5px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .86em;
  color: var(--gold);
}
.post-content pre {
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.7;
}
.post-content pre code { padding: 0; border: none; background: none; color: var(--text-sec); }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.post-content table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.post-content th,
.post-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.post-content th { background: var(--bg-deep); color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.post-content tbody tr:last-child td { border-bottom: none; }

.post-content hr { border: none; height: 1px; background: var(--border); margin: 2.6em 0; }

/* 본문 아래 블록들도 본문과 같은 폭에 맞춰 왼쪽 정렬을 유지한다. */
.toc--mobile,
.share,
.taglist,
.seriesbox,
.endcta,
.post-nav { max-width: var(--measure); }

/* ── 본문 중간 CTA ─────────────────────────────────────────── */
.inline-cta {
  position: relative;
  margin: 2.8em 0;
  padding: 26px 28px;
  border: 1px solid var(--cat-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% -10%, var(--cat-glow) 0%, transparent 60%),
    var(--bg-card);
  overflow: hidden;
}
.inline-cta::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cat);
}
.inline-cta__eyebrow { color: var(--cat); font-size: .62rem; letter-spacing: .24em; }
.inline-cta__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
}
.inline-cta__desc { margin-top: 8px; font-size: .86rem; line-height: 1.8; color: var(--text-sec); }
/* 본문 안에 놓이므로 .post-content a 규칙보다 우선순위가 높아야 한다. */
.inline-cta__btn,
.post-content .inline-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 22px;
  border-radius: 100px;
  background: var(--cat);
  color: #0C0C10;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform .22s, box-shadow .22s;
}
.inline-cta__btn:hover,
.post-content .inline-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 0 26px var(--cat-glow); }

/* ── 공유 ──────────────────────────────────────────────────── */
.share {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.share__label { color: var(--text-xmuted); font-size: .6rem; letter-spacing: .24em; }
.share__list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  font-size: .76rem;
  transition: all .2s;
}
.share__btn:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-card-hov); transform: translateY(-2px); }
.share__btn--copy.is-done { color: var(--gold); border-color: var(--border-gold); }

.taglist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

/* ── 시리즈 박스 ───────────────────────────────────────────── */
.seriesbox {
  margin-top: 44px;
  padding: 26px 28px;
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--gold-dim), transparent 60%), var(--bg-card);
}
.seriesbox__eyebrow { color: var(--gold); font-size: .62rem; letter-spacing: .22em; }
.seriesbox__title { margin-top: 8px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--text-primary); }
.seriesbox__title a:hover { color: var(--gold); }
.seriesbox__list { margin-top: 18px; display: flex; flex-direction: column; gap: 1px; list-style: none; }
.seriesbox__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 10px 0;
  font-size: .88rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.seriesbox__item:last-child { border-bottom: none; }
.seriesbox__num { color: var(--text-xmuted); font-size: .68rem; padding-top: 3px; }
.seriesbox__item a { color: var(--text-sec); transition: color .2s; }
.seriesbox__item a:hover { color: var(--gold); }
.seriesbox__item.is-current .seriesbox__num { color: var(--gold); }
.seriesbox__now { color: var(--text-primary); font-weight: 600; }
.seriesbox__now em { font-style: normal; font-family: var(--font-mono); font-size: .62rem; color: var(--gold); margin-left: 8px; }
.seriesbox__next {
  display: inline-block;
  margin-top: 18px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--gold);
}

/* ── 글 끝 CTA ─────────────────────────────────────────────── */
.endcta {
  margin-top: 48px;
  padding: 38px 36px;
  border: 1px solid var(--cat-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 15% 0%, var(--cat-glow) 0%, transparent 55%),
    var(--bg-card);
  text-align: center;
}
.endcta__eyebrow { color: var(--cat); font-size: .64rem; letter-spacing: .26em; }
.endcta__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.38;
  color: var(--text-primary);
}
.endcta__desc { margin: 12px auto 0; max-width: 46ch; font-size: .9rem; line-height: 1.82; color: var(--text-sec); }
.endcta__actions { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.endcta__mail { font-family: var(--font-mono); font-size: .76rem; color: var(--text-muted); }
.endcta__mail:hover { color: var(--gold); }

/* ── 사이드 카드 ───────────────────────────────────────────── */
.sidecard {
  padding: 20px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
}
.sidecard--cta {
  border-color: var(--cat-line);
  background: linear-gradient(160deg, var(--cat-soft), transparent 70%), var(--bg-card);
}
.sidecard__title { font-size: .88rem; font-weight: 600; color: var(--text-primary); }
.sidecard__title.mono-label { font-size: .6rem; letter-spacing: .24em; color: var(--text-xmuted); font-weight: 400; }
.sidecard__desc { margin-top: 8px; font-size: .78rem; line-height: 1.75; color: var(--text-sec); }
.sidecard__btn { width: 100%; justify-content: center; margin-top: 16px; }

.sidelist { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; list-style: none; }
.sidelist li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.sidelist__num { font-size: .62rem; color: var(--text-xmuted); padding-top: 3px; }
.sidelist a { font-size: .8rem; line-height: 1.6; color: var(--text-sec); transition: color .2s; }
.sidelist a:hover { color: var(--cat); }

/* ── 모바일 고정 CTA ───────────────────────────────────────── */
.sticky-cta {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--cat-line);
  border-radius: 14px;
  background: var(--bg-glass2);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  transform: translateY(140%);
  transition: transform .38s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sticky-cta__label { font-size: .8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta__sub { font-family: var(--font-mono); font-size: .58rem; color: var(--text-muted); }
.sticky-cta__btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--cat);
  color: #0C0C10;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.sticky-cta__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  color: var(--text-muted);
  border-radius: 6px;
}

/* ── 홈 칼럼 미리보기 ──────────────────────────────────────── */
.homecol { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; }
.homecol__lead {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.homecol__lead:hover { border-color: var(--cat-line); box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 44px var(--cat-glow); }
.homecol__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-deep); }
.homecol__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.homecol__lead:hover .homecol__media img { transform: scale(1.04); }
.homecol__ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--cat-glow) 0%, transparent 58%), linear-gradient(140deg, var(--bg-card-hov), var(--bg-deep));
  font-family: var(--font-display); font-size: 2.6rem; font-style: italic; letter-spacing: .12em;
  color: var(--cat); opacity: .38;
}
.homecol__body { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px 28px; }
.homecol__top { display: flex; align-items: center; gap: 12px; }
.homecol__date { font-family: var(--font-mono); font-size: .62rem; color: var(--text-xmuted); }
.homecol__title { font-family: var(--font-display); font-size: 1.42rem; font-weight: 600; line-height: 1.42; color: var(--text-primary); }
.homecol__title a:hover { color: var(--cat); }
.homecol__excerpt { font-size: .87rem; line-height: 1.82; color: var(--text-sec); }
.homecol__go { font-size: .8rem; color: var(--cat); }

.homecol__rest { display: flex; flex-direction: column; gap: 14px; }
.homecol__item {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  transition: border-color .25s, transform .25s;
}
.homecol__item:hover { border-color: var(--cat-line); transform: translateX(4px); }
.homecol__item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.homecol__item-title { font-size: .98rem; font-weight: 600; line-height: 1.55; color: var(--text-primary); }
.homecol__item-title a:hover { color: var(--cat); }
.homecol__item-meta { margin-top: 8px; font-family: var(--font-mono); font-size: .6rem; color: var(--text-xmuted); }
.homecol__cats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.homecol__cats .mono-label { color: var(--text-xmuted); font-size: .58rem; letter-spacing: .2em; margin-right: 2px; }

.contact-fallback { color: var(--text-sec); font-size: .9rem; line-height: 1.8; }
.contact-fallback a { color: var(--blue); }

.footer-cat { display: inline-flex; align-items: center; gap: 8px; }
.footer-cat__count { font-family: var(--font-mono); font-size: .58rem; color: var(--text-xmuted); }
.footer-cat:hover { color: var(--cat); }
.footer-legal { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-legal a,
.footer-legal__menu a { font-family: var(--font-mono); font-size: .65rem; color: var(--text-xmuted); transition: color .2s; }
.footer-legal a:hover { color: var(--text-muted); }
.footer-legal__menu { display: flex; gap: 16px; }

/* ── 반응형 ────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .single__layout { grid-template-columns: minmax(0, 1fr) 264px; gap: 40px; }
}

@media (max-width: 1024px) {
  .featured { grid-template-columns: 1fr; }
  /* min-height 를 두면 aspect-ratio 가 높이에서 너비를 역산해
     240 × 16/9 = 427px 가 되어 390px 뷰포트를 넘쳤다. 너비 기준으로 뒤집는다. */
  .featured__media { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
  .featured__body { padding: 30px 28px 34px; }

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

  .single__layout { grid-template-columns: 1fr; gap: 0; padding-bottom: 70px; }
  .single__side { display: none; }
  .toc--mobile { display: block; }

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

@media (max-width: 768px) {
  /* 데스크톱에서는 .site-nav 의 margin-left:auto 가 밀어주지만
     모바일에서는 nav 가 숨겨지므로 액션 묶음이 직접 밀어야 한다. */
  .header-actions { margin-left: auto; }

  .phero { padding: 118px 0 40px; }
  .phero__title { max-width: none; }
  .single__title { max-width: none; }

  .header-actions { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }

  /* 모바일 메뉴가 열리면 검색과 CTA 를 함께 보여준다 */
  .site-nav.mobile-open .nav-mobile-foot {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .nav-mobile-cta { justify-content: center; }

  .catrail { top: 71px; }
  .catrail__inner { padding: 12px 0; }

  .ngrid { grid-template-columns: 1fr; gap: 18px; }
  .section--tight { padding: 40px 0 64px; }
  .section--deep { padding: 60px 0; }

  .single__hero { margin-top: -18px; }
  .single__layout { padding-top: 44px; }
  /* 헤더(72) + 고정 목차 바(≈44) 아래로 제목이 오게 한다 */
  .post-content h2,
  .post-content h3 { scroll-margin-top: 136px; }
  .post-content { font-size: .98rem; line-height: 1.9; }
  .hanchor { display: none; }

  .inline-cta, .endcta { padding: 24px 22px; }
  .endcta { text-align: left; }
  .endcta__desc { margin-left: 0; }
  .endcta__actions { justify-content: flex-start; }

  .serieslist__item { grid-template-columns: 40px 1fr; gap: 12px; padding: 18px 16px; }
  .seriesbox { padding: 22px 20px; }

  .share { gap: 12px; }

  .sticky-cta { display: flex; }
  /* 고정 바가 푸터 마지막 줄을 가리지 않도록 */
  body.has-sticky-cta .site-footer { padding-bottom: 84px; }
}

@media (max-width: 480px) {
  .hub-search { flex-direction: column; align-items: stretch; }
  .hub-search .nsearch { min-width: 0; }
  .nsearch__btn { padding: 10px 16px; }
  .featured__body { padding: 24px 20px 28px; }
  .ncard__body { padding: 18px 18px 16px; }
  .sticky-cta__sub { display: none; }
}

/* ── 테마 고정 슬롯 이미지 (서비스 카드 · 회사소개) ────────── */
.service-block__visual img,
.about-visual__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 사진이 카드 배경보다 밝으면 다크 톤이 깨진다. 살짝 눌러 맞춘다. */
  filter: saturate(.9) contrast(1.03);
}
.service-block__visual { position: relative; }
.service-block__visual img { border-radius: inherit; }
.about-visual__main { overflow: hidden; padding: 0; }
.about-visual__main img { border-radius: inherit; }
/* 이미지가 들어가면 글로우가 위로 겹쳐 은은한 브랜드 톤을 남긴다 */
.service-block__visual:has(img) .service-visual-glow { z-index: 1; opacity: .55; }

/* ============================================================
   모바일 정비 (2026-09-03)
   실제 390px 뷰포트에서 확인한 파손을 고친다.
   ============================================================ */

/* ── 한글 줄바꿈을 문서 전체에 적용 ──────────────────────────
   기존에는 선택자를 열거해 두어 <span> 같은 요소가 빠졌고,
   그 결과 회사정보 표에서 "무역업"→"무역/업", "글로벌"→"글/로벌" 로
   낱말이 쪼개졌다. 상속되는 속성이므로 body 에서 한 번만 건다. */
body {
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* 코드·URL 은 낱말 단위 유지가 오히려 넘침을 만든다 */
pre, code, kbd, samp, .nsearch__input {
  word-break: normal;
  overflow-wrap: normal;
}

/* ── 탭·칩 줄(가로 스크롤 레일)이 눌리지 않게 ────────────────
   flex 항목이 내용보다 좁아지면 한글이 한 글자씩 세로로 쌓인다.
   사업영역 탭 4개가 390px 에서 실제로 이렇게 깨졌다. */
.services-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.services-tabs::-webkit-scrollbar { display: none; }
.services-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .services-tabs { margin-bottom: 36px; }
  .services-tab { padding: 12px 14px; font-size: .8rem; }

  /* ── 진행 프로세스: 가로 스크롤 대신 세로로 쌓는다 ──────────
     5단계 × 최소 180px 라 390px 에서는 1.5개만 보이고 나머지는
     스크롤 힌트도 없이 잘려 보였다. */
  .process-track {
    flex-direction: column;
    gap: 10px;
    overflow-x: visible;
  }
  .process-step { min-width: 0; width: 100%; }

  /* ── 히어로 eyebrow: 「· EC」 가 혼자 둘째 줄로 떨어지던 것 ── */
  .hero-eyebrow { flex-wrap: wrap; row-gap: 8px; }
  .hero-line { display: none; }
  .hero-eyebrow > .mono-label:last-child {
    flex-basis: 100%;
    font-size: .6rem;
  }

  /* ── 회사소개 배지가 4px 가로 넘침을 만들던 것 ────────────── */
  .about-visual__badge { right: 0; bottom: -16px; }
}

/* MISSION / VISION — 템플릿의 인라인 grid 를 걷어내고 여기서 관리한다.
   인라인 스타일은 미디어쿼리보다 우선하므로 모바일에서 절대 안 접혔다. */
.about-mv { grid-template-columns: 1fr auto 1fr; }
@media (max-width: 768px) {
  .about-mv { grid-template-columns: 1fr; gap: 28px; }
  .about-mv .stat-divider { display: none; }
}

/* ── 글 끝 「이어서 읽기」 ─────────────────────────────────── */
.readnext__lead {
  margin: -14px 0 26px;
  font-size: .9rem;
  color: var(--text-sec);
}
.readnext .post-nav { max-width: none; margin-top: 32px; }
.readnext .endcta { max-width: none; margin-top: 40px; }
