/* Page: article centre + article category lists */
.topic-cards { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0; margin: 0; }
.topic-cards > li { margin: 0; }
.topic-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; background: #fff; transition: border-color var(--t), box-shadow var(--t); }
.topic-card:hover, .topic-card:focus-within { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.topic-card h2 { font-size: 1.08rem; margin-bottom: 8px; }
.topic-card h2 a { color: var(--ink); }
.topic-card h2 a:hover { color: var(--brand-deep); }
.topic-card p { color: var(--muted); font-size: 0.9rem; }
.topic-card .count { margin-top: auto; font-size: 0.8rem; color: var(--brand-deep); font-weight: 600; letter-spacing: 0.04em; }
.topic-section { border-top: 1px solid var(--line); padding-top: 34px; margin-top: 34px; }
.topic-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.topic-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.topic-head h2 { margin: 0; }
.post-list-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-list-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .topic-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .topic-cards, .post-list-2, .post-list-wide { grid-template-columns: minmax(0, 1fr); }
}

/* specification tables inside articles */
.table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; min-width: 540px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.spec-table thead th { background: var(--bg-soft); font-weight: 700; color: var(--ink); white-space: nowrap; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table tbody tr:hover td { background: #fafcfb; }
.article-body .faq { margin: 1.5rem 0 2rem; }
.article-body .spec-note { border-left: 3px solid var(--brand); padding: 6px 0 6px 16px; color: var(--ink-soft); font-size: 0.95rem; }
.article-body ul { padding-left: 1.2em; }
.article-body h3 { margin-top: 1.6em; font-size: 1.04rem; }
@media (max-width: 620px) {
  .spec-table { font-size: 0.84rem; }
  .spec-table th, .spec-table td { padding: 9px 11px; }
}

/* in-page table of contents (article sidebar) */
.toc { list-style: none; padding: 0; margin: 0 0 14px; counter-reset: toc; }
.toc li { margin: 0; border-bottom: 1px solid var(--line); }
.toc li:last-child { border-bottom: 0; }
.toc a {
  display: block;
  padding: 9px 2px;
  font-size: 0.89rem;
  line-height: 1.45;
  color: var(--ink-soft);
  transition: color var(--t), padding-left var(--t);
}
.toc a::before {
  counter-increment: toc;
  content: counter(toc) ". ";
  color: var(--brand-deep);
  font-weight: 600;
}
.toc a:hover { color: var(--brand-deep); padding-left: 6px; text-decoration: none; }
.toc a.is-active { color: var(--brand-deep); font-weight: 600; }
.article-body h2, .article-body h3 { scroll-margin-top: 96px; }

/* before / after comparison pair inside articles */
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 1.4rem 0 2rem; align-items: start; }
.figure-pair figure { margin: 0; }
.figure-pair img { width: 100%; margin: 0; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.figure-pair figcaption { margin-top: 10px; font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }
.figure-pair figcaption strong { display: block; margin-bottom: 2px; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-deep); }
@media (max-width: 620px) {
  .figure-pair { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 1.2rem 0 1.6rem; }
}
