/* HANWI 技術知識庫 — 文章共用樣式 */

:root {
  --navy: #0A2440;
  --blue: #1683C7;
  --teal: #14A08C;
  --warm: #F8F7F4;
  --warm-2: #EFEDE7;
  --slate: #5A6776;
  --line: #E4E9EE;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  background: var(--warm);
  padding: 72px 64px 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--slate);
}
.breadcrumb__inner { max-width: 880px; margin: 0 auto; }
.breadcrumb a { color: var(--slate); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { color: var(--line); margin: 0 8px; }
.breadcrumb__current { color: var(--navy); }

/* ─── ARTICLE HERO ─── */
.article-hero {
  background: var(--warm);
  padding: 0 64px 80px;
  border-bottom: 1px solid var(--line);
}
.article-hero__inner { max-width: 880px; margin: 0 auto; }
.article-hero__category {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.article-hero__category--teal { background: var(--teal); }
.article-hero__category--blue { background: var(--blue); }
.article-hero__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 44px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 32px;
}
.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--slate);
}
.article-hero__meta-dot { color: var(--line); }

/* ─── ARTICLE BODY ─── */
.article-body { padding: 80px 64px; background: #fff; }
.article-body__inner {
  max-width: 880px;
  margin: 0 auto;
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
  font-size: 16.5px;
  color: #1c2733;
  line-height: 1.85;
}
.article-body__inner > p:first-of-type::first-letter {
  font-family: 'Noto Serif TC', serif;
  font-size: 48px;
  font-weight: 900;
  float: left;
  line-height: 1;
  margin: 6px 12px -4px 0;
  color: var(--navy);
}
.article-body__inner p { margin: 0 0 24px; }
.article-body__inner strong { color: var(--navy); font-weight: 700; }
.article-body__inner h2 {
  font-family: 'Noto Serif TC', serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.3;
  margin: 64px 0 24px;
  padding-top: 24px;
  border-top: 2px solid var(--navy);
}
.article-body__inner h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: 21px;
  font-weight: 900;
  color: var(--navy);
  margin: 40px 0 16px;
}
.article-body__inner ul,
.article-body__inner ol { margin: 0 0 24px; padding-left: 22px; }
.article-body__inner li { margin-bottom: 10px; }
.article-body__inner a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
}
.article-body__inner a:hover { color: var(--navy); border-color: var(--navy); }

.callout {
  background: var(--warm);
  border-left: 3px solid var(--blue);
  padding: 22px 26px;
  border-radius: 0 4px 4px 0;
  margin: 32px 0;
}
.callout--teal { border-left-color: var(--teal); }
.callout__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.callout--teal .callout__label { color: var(--teal); }
.callout p:last-child { margin-bottom: 0; }

/* ─── TABLE OF CONTENTS ─── */
.toc {
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 32px;
  margin: 32px 0 40px;
}
.toc__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.toc__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 18px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc ol li {
  counter-increment: toc;
  margin-bottom: 8px;
  padding-left: 0;
  font-size: 15px;
  line-height: 1.6;
}
.toc ol li::before {
  content: counter(toc, decimal-leading-zero) ". ";
  font-family: 'IBM Plex Mono', monospace;
  color: var(--blue);
  font-weight: 600;
  margin-right: 4px;
}
.toc a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent !important;
  transition: border-color 0.2s ease;
}
.toc a:hover { border-bottom-color: var(--blue) !important; color: var(--blue); }
.article-body__inner h2[id] { scroll-margin-top: 90px; }

/* ─── SPEC TABLE ─── */
.spec-table {
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.spec-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table th {
  background: var(--navy);
  color: #fff;
  padding: 14px 10px;
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.spec-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tr.alt { background: var(--warm); }
.spec-table td.label {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--navy);
}
.spec-table .check { color: var(--teal); font-weight: 700; }

/* ─── RELATED PRODUCTS ─── */
.related-box {
  background: var(--warm);
  border-radius: 8px;
  padding: 32px;
  margin: 48px 0;
}
.related-box__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.related-box__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 18px;
}
.related-box__links { display: flex; flex-direction: column; gap: 8px; }
.related-box__links a {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--line) !important;
}
.related-box__links a:hover {
  border-color: var(--navy) !important;
  background: #fff;
}

/* ─── ARTICLE CTA ─── */
.article-cta {
  background: var(--warm);
  border: 1px solid var(--line);
  padding: 64px;
  margin-top: 64px;
  border-radius: 8px;
  text-align: center;
}
.article-cta__logo {
  display: block;
  height: 56px;
  width: auto;
  margin: 0 auto 28px;
}
/* Override .article-body__inner h2 generic styles inside CTA */
.article-cta .article-cta__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--navy) !important;
  margin: 0 0 14px !important;
  border-top: none !important;
  padding-top: 0 !important;
}
.article-cta__sub {
  color: var(--slate) !important;
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 28px !important;
}
/* Override .article-body__inner a generic styles inside CTA */
.article-cta .article-cta__btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--navy);
  color: #fff !important;
  text-decoration: none;
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 4px;
  border-bottom: none !important;
  transition: background 0.2s ease;
}
.article-cta .article-cta__btn:hover {
  background: var(--blue);
  color: #fff !important;
  border-bottom: none !important;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  color: var(--slate);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  text-decoration: none;
  border-bottom: none !important;
}
.back-link:hover { color: var(--navy); }

/* ─── RESPONSIVE ─── */
@media (max-width: 880px) {
  .breadcrumb { padding: 64px 24px 20px; }
  .article-hero { padding: 0 24px 56px; }
  .article-hero__title { font-size: 30px; }
  .article-body { padding: 56px 24px; }
  .article-body__inner { font-size: 16px; }
  .article-body__inner h2 { font-size: 24px; margin: 48px 0 18px; }
  .article-body__inner h3 { font-size: 18px; }
  .article-cta { padding: 40px 24px; }
  .article-cta__title { font-size: 21px; }
  .related-box { padding: 24px; }
}
