/* ============================================================
   "제대로 알자" 시리즈 전용 스타일
   기존 index.html의 <style> 블록은 건드리지 않고,
   이 파일 하나만 새로 추가해서 카드/상세페이지를 구성합니다.
   치유마을 신문 톤(Pretendard / Black Han Sans / IBM Plex Mono)을
   그대로 이어받되, 클래스명은 모두 th- 접두어로 분리했습니다.
   ============================================================ */

.th-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin: 28px 0 6px;
}

@media (max-width: 480px) {
  .th-grid {
    grid-template-columns: 1fr;
  }
}

.th-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line, #D8D9D4);
  border-top: 4px solid var(--th-color, var(--ink, #12151A));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.th-card:hover,
.th-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(18, 21, 26, 0.12);
  outline: none;
}

.th-card__num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #fff;
  background: rgba(18, 21, 26, 0.6);
  padding: 2px 7px;
  z-index: 1;
}

.th-card__thumb-wrap {
  aspect-ratio: 16 / 9;
  background: var(--gray, #EDEEEC);
  overflow: hidden;
}

.th-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-card__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.th-card__title {
  font-size: 0.98rem;
  line-height: 1.42;
  font-weight: 600;
  margin: 0;
}

.th-card__subtitle {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.th-card__cta {
  margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--th-color, var(--ink, #12151A));
}

.th-card__cta::after {
  content: " →";
}

/* ---------- 상세 페이지 (talks/*.html에서 사용) ---------- */

.th-detail-body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: #fff;
  color: #12151A;
  line-height: 1.65;
  margin: 0;
}

.th-detail-topbar {
  background: #0B2545;
  color: #fff;
  font-size: 0.72rem;
  padding: 10px 20px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
}

.th-detail-topbar a {
  color: #cfd8e6;
  text-decoration: none;
}

.th-detail-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.th-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.th-detail-pageno {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  padding: 3px 9px;
  border: 1px solid #12151A;
}

.th-detail-cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 10px;
  color: #fff;
  background: var(--th-color, #12151A);
}

.th-detail-title {
  font-family: 'Black Han Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  line-height: 1.3;
  margin: 0 0 10px;
  border-bottom: 5px solid var(--th-color, #12151A);
  display: inline-block;
  padding-bottom: 4px;
}

.th-detail-subtitle {
  font-size: 0.92rem;
  color: #555;
  margin: 14px 0 28px;
  max-width: 60ch;
}

.th-pdf-frame-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line, #D8D9D4);
  background: var(--gray, #EDEEEC);
}

@media (min-width: 700px) {
  .th-pdf-frame-wrap {
    aspect-ratio: 16 / 10;
  }
}

.th-pdf-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.th-pdf-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-family: 'Black Han Sans', sans-serif;
}

.th-detail-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.th-btn {
  display: inline-block;
  padding: 11px 22px;
  background: var(--th-color, #12151A);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  transition: opacity 0.2s ease;
}

.th-btn:hover {
  opacity: 0.82;
}

.th-detail-back {
  display: inline-block;
  margin-top: 36px;
  font-size: 0.85rem;
  color: #555;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
}

.th-detail-back:hover {
  color: #12151A;
}
