/* Article template — shared by tech-planter-2026, news-silkworm-egg-quality, case-silkworm-hatching
   (Figma 229:17141 / 229:17225 / 229:17334, 1440 wide). Sidebar 300 + gap 35 + body 914 = 1249. */

/* ---------- hero band ---------- */
.article-hero { color: var(--bg); background: #05041a url("../../img/article/hero-bg.webp") center 50%/cover no-repeat; }
.article-hero__inner { padding-top: 16px; padding-bottom: 28px; }
.article-hero .breadcrumb { color: var(--bg); padding: 0; font: 400 15px/1.4 var(--font-en); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: ""; width: 12px; height: 12px; margin: 0 7px; background: url("../../img/common/chevron.svg") center/6px auto no-repeat; filter: brightness(0) invert(1); opacity: .9; }
.article-hero .breadcrumb [aria-current] { color: var(--red); font-weight: 600; }
.article-hero__tag { margin-top: 34px; background: var(--red); font: 500 15px/22px var(--font-en); padding: 0 5px; }
.article-hero__title { font: 600 clamp(26px, 2.8vw, 40px)/1.45 var(--font-th); max-width: 1250px; margin-top: 0; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; font: 300 15px/1.4 var(--font-en); }
.article-meta__time { display: inline-flex; align-items: center; gap: 2px; }
.article-meta__time img { width: 15px; height: 15px; }

/* ---------- layout ---------- */
.article-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 35px; align-items: start; padding-top: 51px; padding-bottom: 61px; }
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; }

/* ---------- table of contents ---------- */
.side-title { font: 700 20px/1.5 var(--font-th); letter-spacing: .33em; color: var(--red-dark); text-transform: uppercase; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin: 0 0 6px; }
.toc > summary { list-style: none; cursor: default; }
.toc > summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.toc a { display: flex; align-items: center; min-height: 66px; padding: 4px 11px 4px 22px; border-left: 4px solid var(--muted); color: var(--muted); font: 400 18px/1.505 var(--font-th); text-decoration: none; transition: color .15s, border-color .15s; }
.toc a b { font-weight: 700; }
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--red); }

/* ---------- related articles (sidebar) ---------- */
.related { margin-top: 60px; }
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related a { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; background: #f2f2ef; text-decoration: none; color: #000; transition: background .15s; }
.related a:hover { background: #e9e9e4; }
.related img { width: 140px; aspect-ratio: 16/9; object-fit: cover; }
.related .cat { display: block; font: 400 12px/1.3 var(--font-th); }
.related__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font: 400 13px/1.35 var(--font-th); padding-right: 8px; }

/* ---------- body ---------- */
.article-body { font-size: 20px; line-height: 1.5; font-weight: 300; }
.article-cover { width: 100%; aspect-ratio: 914/514; object-fit: cover; margin-bottom: 24px; }
.article-body p { margin: 0 0 12px; }
.article-body .article-lead { font-weight: 500; margin-bottom: 24px; }
.article-body h2 { position: relative; font: 600 35px/1.3 var(--font-th); margin: 40px 0 22px; padding-bottom: 18px; scroll-margin-top: calc(var(--header-h) + 24px); }
.article-body h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 87px; height: 3px; background: var(--red-dark); }
.article-body--h40 h2 { font-size: 40px; }
.article-body h2 + p { margin-top: 0; }
.article-body ul { margin: 0 0 12px; padding-left: 30px; }
.article-body li { margin: 0; }
.article-body figure { margin: 36px 0; }
.article-body figure img { width: 100%; }
.article-body figure.is-narrow { max-width: 768px; margin-left: auto; margin-right: auto; }
.article-body .spacer { margin-bottom: 30px; }

.article-back { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: #636363; font: 400 15px/1.5 var(--font-th); text-decoration: none; }
.back-link img { width: 20px; height: 15px; transform: rotate(180deg); }
.back-link:hover { color: var(--red); }

/* ---------- phone / tablet ---------- */
@media (max-width: 960px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 40px; }
  .article-aside { display: contents; }
  .toc { order: -1; border: 1px solid var(--line); background: #fff; }
  .toc > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; cursor: pointer; }
  .toc > summary .side-title { border: 0; padding: 0; margin: 0; font-size: 16px; }
  .toc > summary::after { content: ""; width: 12px; height: 12px; background: url("../../img/common/chevron.svg") center/7px auto no-repeat; filter: brightness(0); transform: rotate(90deg); transition: transform .2s; }
  .toc[open] > summary::after { transform: rotate(270deg); }
  .toc ol { padding: 0 16px 16px; }
  .toc a { min-height: 44px; font-size: 16px; padding-left: 14px; }
  .related { order: 1; margin-top: 16px; }
  .article-body { font-size: 17px; }
  .article-body h2, .article-body--h40 h2 { font-size: clamp(24px, 6vw, 30px); margin-top: 32px; }
  .article-body figure { margin: 24px 0; }
  .article-hero__tag { margin-top: 20px; }
}
