/* ============================================================
   MENGMOZ BLOG · 블로그 전용 스타일
   styles.css 의 디자인 토큰(CSS 변수)만 사용합니다.
   새로운 hex 값·폰트를 이 파일에서 정의하지 않습니다.
   ============================================================ */

/* ── 지면 ────────────────────────────────────────────── */
.bl-page {
  padding: 60px 0 0;
}
.bl-wrap {
  width: 100%;
  max-width: 728px;      /* 본문 컬럼 680px + 좌우 여백 24px */
  margin: 0 auto;
  padding: 0 24px;
}

.bl-page a:focus-visible,
.bl-page summary:focus-visible {
  outline: 2px solid var(--violet-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 목록 페이지 헤더 ────────────────────────────────── */
.bl-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--violet-600);
}
.bl-h1 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.035em;
  color: var(--ink-950);
  margin: 16px 0 0;
}
.bl-sub {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-500);
}

/* ── 카테고리 pill ───────────────────────────────────── */
.bl-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 44px;
}
.bl-cat {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-500);
  background: transparent;
  transition: border-color .15s ease, color .15s ease;
}
a.bl-cat:hover {
  border-color: var(--line-2);
  color: var(--ink-800);
}
.bl-cat[aria-current="page"] {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: var(--cream);
}
.bl-cat.is-soon {
  color: var(--ink-300);
  cursor: default;
}

/* ── 글 목록 (리스트형) ──────────────────────────────── */
.bl-list {
  border-top: 1px solid var(--line);
}
.bl-item {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.bl-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-400);
}
.bl-item-title {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.03em;
  color: var(--ink-950);
  margin: 12px 0 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .18s ease;
}
.bl-item:hover .bl-item-title {
  text-decoration-color: var(--ink-300);
}
.bl-excerpt {
  margin: 11px 0 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 포스트 헤더 ─────────────────────────────────────── */
.bl-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-400);
}
.bl-crumb a { transition: color .15s ease; }
.bl-crumb a:hover { color: var(--ink-800); }
.bl-crumb .sep { color: var(--ink-300); }
.bl-crumb [aria-current="page"] { color: var(--ink-600); font-weight: 550; }

.bl-postmeta {
  margin: 30px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-400);
}
.bl-title {
  font-family: var(--font-sans);
  font-size: clamp(27px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--ink-950);
  margin: 14px 0 0;
}

/* ── 안목 노트 (직답 박스) ───────────────────────────── */
.bl-note {
  margin: 40px 0 0;
  background: var(--paper);
  border-left: 2px solid var(--violet-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 28px 30px 30px;
}
.bl-note-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--violet-600);
}
.bl-note-answer {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: -0.03em;
  color: var(--ink-950);
  margin: 18px 0 0;
}
.bl-note-why {
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink-600);
}

/* ── 목차 ────────────────────────────────────────────── */
.bl-toc {
  margin: 44px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0 24px;
}
.bl-toc-h {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-400);
}
.bl-toc ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bl-toc li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}
.bl-toc li::before {
  content: "·";
  color: var(--ink-300);
  flex: 0 0 auto;
}
.bl-toc a {
  color: var(--ink-700);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color .18s ease, color .15s ease;
}
.bl-toc a:hover {
  color: var(--ink-950);
  text-decoration-color: var(--line-2);
}

/* ── 본문 ────────────────────────────────────────────── */
.bl-body h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: var(--ink-950);
  margin: 58px 0 0;
  scroll-margin-top: 88px;
}
.bl-body h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin: 34px 0 0;
}
.bl-body p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0;
  color: var(--ink-700);
  /* 문단 간격은 행간보다 넓어야 한다.
     전에는 margin 18px인데 행간이 30px이라 문단 사이가 줄 사이보다 좁았다.
     그래서 문단이 안 나뉘고 글이 벽처럼 보였다. */
  margin: 30px 0 0;
  word-break: keep-all;      /* 한글 단어가 줄 끝에서 쪼개지지 않게 */
}
/* 섹션마다 하나씩 넣는 가운데 정렬 강조.
   본문 전체를 가운데로 하면 한 줄이 40자라 매 줄 시작점이 달라져 오히려 읽기 힘들다.
   짧은 강조 문장에만 쓴다. */
.bl-body .bl-center {
  text-align: center;
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.75;
  color: var(--ink-950);
  margin: 42px 0 6px;
  padding: 0 8px;
  word-break: keep-all;
}
@media (max-width: 640px) {
  .bl-body .bl-center { font-size: 17.5px; margin-top: 36px; }
}

/* ── 본문 사진 ───────────────────────────────────────────
   긴 글에서 눈이 쉬는 자리를 만든다.
   본문(680px)보다 좌우로 24px씩 넓게 빼서 "사진은 글보다 넓다"는 리듬을 준다.
   모바일에서는 화면 끝까지 닿는다 — 좁은 화면일수록 이 효과가 크다. */
.bl-fig {
  margin: 52px 0 0;
  margin-inline: -24px;
}
.bl-fig img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
  /* 사진이 늦게 뜰 때 흰 칸이 번쩍이지 않게 지면 색을 깔아둔다 */
  background: var(--paper-2);
}
/* 캡션의 일은 출처를 밝히는 것 하나다. alt 설명을 여기 또 쓰지 않는다.
   메타데이터라서 지면의 다른 메타(.bl-postmeta, .bl-meta)와 같은 mono를 쓴다. */
.bl-figcap {
  margin: 12px 24px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--ink-400);
}
/* 사진 다음 문단은 조금 더 떨어뜨린다.
   기본 30px이면 작은 캡션이 다음 문단에 붙어 캡션인지 본문인지 헷갈린다. */
.bl-fig + p { margin-top: 38px; }

.bl-body ul {
  margin: 18px 0 0;
  padding-left: 20px;
}
.bl-body li {
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  color: var(--ink-700);
  margin-top: 8px;
}
.bl-body li::marker { color: var(--ink-300); }
.bl-body strong { font-weight: 700; color: var(--ink-900); }

.bl-body a {
  color: var(--violet-600);
  text-decoration: underline;
  text-decoration-color: var(--violet-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.bl-body a:hover { text-decoration-color: var(--violet-600); }

/* ── 표 ──────────────────────────────────────────────── */
.bl-tablewrap {
  margin: 26px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bl-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 15px;
}
.bl-table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-500);
  padding-bottom: 12px;
}
.bl-table th,
.bl-table td {
  text-align: left;
  vertical-align: top;
  padding: 15px 16px;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}
.bl-table thead th {
  background: var(--paper-2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink-700);
  border-bottom: 1px solid var(--line-2);
}
.bl-table tbody th {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink-800);
  white-space: nowrap;
}
/* 나이 숫자만 mono */
.bl-age-n {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}
.bl-table td { color: var(--ink-600); }
.bl-table tr.is-rec th,
.bl-table tr.is-rec td {
  background: var(--violet-200);
  color: var(--ink-950);
}
.bl-rec-tag {
  display: block;
  margin-top: 5px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--violet-700);
}
.bl-tablenote {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-400);
}

/* ── FAQ (네이티브 아코디언) ─────────────────────────── */
.bl-faq {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
}
.bl-faq details { border-bottom: 1px solid var(--line); }
.bl-faq summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  margin: 0 -14px;
  padding: 21px 46px 21px 14px;
  border-radius: var(--radius-sm);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  transition: background .15s ease;
}
.bl-faq summary::-webkit-details-marker { display: none; }
.bl-faq summary:hover { background: var(--paper); }
.bl-faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--ink-400);
  border-bottom: 1.6px solid var(--ink-400);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.bl-faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 32px;
}
.bl-faq-a {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink-600);
  margin: 0;
  padding: 0 8px 26px 0;
}
@media (prefers-reduced-motion: reduce) {
  .bl-faq summary::after { transition: none; }
}

/* ── 함께 읽으면 좋은 글 ─────────────────────────────── */
.bl-related {
  margin: 64px 0 0;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
}
.bl-related h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-950);
}
.bl-empty {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-400);
}

/* ── CTA 밴드 (페이지당 1개) ─────────────────────────── */
.bl-cta {
  margin: 60px 0 0;
  background: var(--violet-600);
  border-radius: var(--radius-lg);
  padding: 46px 36px 44px;
  text-align: center;
}
.bl-cta-t {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.03em;
  color: #fff;
}
.bl-cta-s {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}
.bl-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  padding: 15px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--violet-700);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform .18s cubic-bezier(.2,.7,.2,1);
}
.bl-cta-btn:hover { transform: translateY(-2px); }
.bl-cta-btn:active { transform: translateY(0) scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .bl-cta-btn, .bl-cta-btn:hover { transition: none; transform: none; }
}

/* ── 지면 하단 여백 ──────────────────────────────────── */
.bl-foot-space { height: 96px; }

/* ── 모바일 ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .bl-page { padding-top: 40px; }
  .bl-wrap { padding: 0 20px; }
  .bl-cats { margin: 28px 0 36px; }
  .bl-item { padding: 26px 0; }
  .bl-item-title { font-size: 19.5px; }
  .bl-note { padding: 24px 22px 26px; }
  .bl-note-answer { font-size: 18px; }
  .bl-body h2 { font-size: 22px; margin-top: 48px; }
  /* 모바일은 한 줄이 짧아져 같은 글도 줄 수가 늘어난다. 문단 간격을 더 벌린다 */
  .bl-body p, .bl-body li { font-size: 16.5px; }
  .bl-body p { margin-top: 26px; }
  .bl-body h2 { margin-top: 48px; }
  /* 화면 끝까지 닿게 한다. 끝까지 간 사진에 라운드가 있으면 잘린 것처럼 보인다 */
  .bl-fig { margin-top: 44px; margin-inline: -20px; }
  .bl-fig img { border-radius: 0; }
  .bl-figcap { margin: 10px 20px 0; font-size: 12px; }
  .bl-fig + p { margin-top: 32px; }
  .bl-cta { padding: 38px 24px 36px; }
  .bl-cta-t { font-size: 18.5px; }
  .bl-foot-space { height: 72px; }
}
