.article-detail-hero,
.article-detail-body,
.article-detail-footer,
.article-detail-writer,
.article-detail-back {
  font-family: var(--font-sans-body);
}

.article-detail-hero {
  width: min(var(--max-w), calc(100% - 48px));
  margin: 60px auto 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 36px;
  align-items: center;
  padding: 40px;
  border: 1px solid color-mix(in srgb, var(--navy) 10%, white);
  border-radius: calc(var(--r-xl) + 6px);
  background:
    radial-gradient(circle at top left, rgba(201, 165, 94, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(253, 250, 245, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 24px 60px rgba(13, 32, 53, 0.08);
}

.article-detail-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: none;
}

.article-detail-hero-copy h1 {
  font-family: var(--font-sans-body);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.28;
}

.article-detail-hero-visual {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid color-mix(in srgb, var(--navy) 10%, white);
  box-shadow: 0 18px 40px rgba(13, 32, 53, 0.12);
  background: var(--white);
}

.article-detail-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-detail-hero-placeholder {
  width: 100%;
  height: 100%;
}

.article-detail-hero-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}

.article-detail-hero-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.article-detail-body {
  max-width: 760px;
  margin: 0 auto;
}

.article-detail-body .notion-body {
  max-width: 100%;
}

.article-detail-body .notion-body,
.article-detail-body p,
.article-detail-body li {
  text-wrap: wrap;
  overflow-wrap: break-word;
  word-break: normal;
}

.article-detail-body :where(p, li) {
  line-height: 1.9;
}

.article-detail-body :where(ul, ol) {
  margin-top: 1.1rem;
  margin-bottom: 1.6rem;
}

.article-detail-body :where(blockquote, pre, .notion-table-wrap, .notion-image) {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.article-detail-footer {
  width: min(760px, calc(100% - 48px));
  margin: 48px auto 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.article-detail-footer--backonly {
  justify-content: flex-end;
}

.article-detail-back {
  flex: 0 0 auto;
  margin: 0;
  order: 1;
}

.article-detail-writer {
  width: fit-content;
  max-width: min(620px, 100%);
  margin: 0;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--navy) 10%, white);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(249, 245, 236, 0.9), rgba(255, 255, 255, 0.98));
  display: flex;
  align-items: center;
  gap: 20px;
  order: 2;
}

.article-detail-writer-avatarWrap {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream-dark);
}

.article-detail-writer-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.article-detail-writer-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.article-detail-writer-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-dark);
}

.article-detail-writer-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.article-detail-writer-affiliation {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-detail-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 48px 0;
}

/* ── Table of Contents ─────────────────────────────────────────────────── */

.article-toc {
  margin-bottom: 2.5rem;
  padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--navy) 12%, white);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(249, 245, 236, 0.8), rgba(255, 255, 255, 0.95));
}

.article-toc__title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--navy) 20%, white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.article-toc__list {
  list-style: disc;
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-toc__item a {
  display: block;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 0.15s;
}

.article-toc__item a:hover {
  color: var(--gold-dark);
}

.article-toc__item--h1 a {
  font-weight: 600;
}

.article-toc__item--h2 {
  padding-left: 1rem;
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

@media (max-width: 960px) {
  .article-detail-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 32px;
  }

  .article-detail-hero-visual {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 768px) {
  .article-detail-hero {
    width: min(var(--max-w), calc(100% - 32px));
    margin-top: 32px;
    margin-bottom: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 20px;
    padding: 28px;
  }

  .article-detail-footer {
    width: calc(100% - 32px);
  }

  .article-detail-writer {
    max-width: min(620px, 100%);
  }

  .article-detail-hero-copy h1 {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
}

@media (max-width: 640px) {
  .article-detail-hero {
    width: calc(100% - 24px);
    margin-top: 24px;
    margin-bottom: 32px;
    gap: 20px;
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .article-detail-hero-copy {
    gap: 16px;
  }

  .article-detail-hero-copy h1 {
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    margin-bottom: 8px;
  }

  .article-detail-hero-excerpt {
    font-size: 0.95rem;
  }

  .article-detail-hero-date {
    font-size: 0.8rem;
  }

  .article-detail-footer {
    width: calc(100% - 24px);
    margin-top: 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .article-detail-back {
    order: 2;
  }

  .article-detail-writer {
    width: 100%;
    max-width: none;
    padding: 18px;
    gap: 16px;
    order: 1;
  }

  .article-detail-back {
    width: 100%;
  }

  .article-detail-back .button {
    width: 100%;
    justify-content: center;
  }

  .article-detail-writer-avatarWrap {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .article-detail-writer-name {
    font-size: 1rem;
  }

  .article-detail-writer-affiliation {
    font-size: 0.9rem;
  }
}
