/* 수학 이야기(블로그) — 홈페이지 styles.css 토큰을 그대로 사용 */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.cat-tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--forest); font-weight: 600; font-size: 16px; text-decoration: none;
}
.cat-tab:hover { border-color: var(--forest); }
.cat-tab.is-active { background: var(--forest); border-color: var(--forest); color: var(--cream); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.post-card { overflow: hidden; }
.post-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-card-link:hover .post-card-title { text-decoration: underline; text-underline-offset: 4px; }
.post-thumb { aspect-ratio: 3 / 2; background: #EFE6CF; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 20px 22px 24px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: #5E6259; }
.post-cat {
  display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line);
  color: var(--forest); font-weight: 700; font-size: 14px; text-decoration: none;
}
.post-card-title { margin-top: 10px; font-size: 21px; line-height: 1.4; }
.post-card-summary {
  margin-top: 8px; font-size: 16px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-empty { padding: 40px 0; color: #5E6259; }
.blog-more { margin-top: 32px; }

/* 글 상세 — 읽기 폭 720px */
.post-container { max-width: calc(720px + var(--gutter) * 2); }
.post-back { margin-bottom: 20px; font-size: 16px; }
.post-back a { color: var(--forest); font-weight: 600; text-decoration: none; }
.post-back a:hover { text-decoration: underline; }
.post-title { margin-top: 12px; font-size: 38px; line-height: 1.35; letter-spacing: -0.01em; }
.post-cover { margin: 28px 0 0; border-radius: var(--radius-photo); overflow: hidden; aspect-ratio: 3 / 2; background: #EFE6CF; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-missing { margin-top: 16px; }
.post-body { margin-top: 32px; font-size: 18px; line-height: 1.85; }
.post-body > * + * { margin-top: 1em; }
.post-body h2 { margin-top: 1.8em; font-size: 26px; }
.post-body h3 { margin-top: 1.6em; font-size: 22px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li + li { margin-top: 0.35em; }
.post-body a { color: var(--forest); font-weight: 600; text-underline-offset: 3px; }
.post-body blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--olive); color: #4A4F46; }
.post-body figure { margin: 1.6em 0; }
.post-body img { width: 100%; height: auto; border-radius: 16px; }
.post-body figcaption { margin-top: 8px; font-size: 15px; color: #5E6259; }
.post-cta {
  margin-top: 56px; padding: 28px; border-radius: var(--radius-card); background: var(--mustard-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.post-cta p { font-size: 20px; font-weight: 700; color: var(--forest); }

/* 홈페이지 최신 글 구역 */
.stories-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.stories-head .section-head { margin-bottom: 0; }
.stories-more { font-weight: 700; color: var(--forest); text-decoration: none; }
.stories-more:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 28px; }
  .post-body { font-size: 17px; }
  .post-body h2 { font-size: 22px; }
  .post-body h3 { font-size: 19px; }
  .post-cta { padding: 22px; }
  .post-cta p { font-size: 18px; }
  .stories-head { margin-bottom: 28px; }
}
