/* components.css — 内页组件（分类页 / 详情页） */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
/* 只用 tokens.css 与 style.css 已定义的颜色、字号、圆角，不引入第二套视觉。 */

/* ------------------------------------------------------------------ 面包屑 */

.crumb {
  padding: 14px 0 0;
}
.crumb ol {
  width: min(100% - 48px, var(--wrap));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--dim);
  list-style: none;
}
.crumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(120, 160, 210, .45);
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand-2); }
.crumb [aria-current="page"] { color: var(--ink); }

/* --------------------------------------------------------------- 列表页 hero */

.list-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(70, 130, 230, .14);
  background: radial-gradient(900px 380px at 82% 0%, rgba(30, 90, 190, .22), transparent 68%), var(--bg);
}
.list-hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 46%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 24%;
  opacity: .5;
  mask-image: linear-gradient(90deg, transparent, #000 42%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%);
}
.list-hero-inner {
  position: relative;
  z-index: 1;
  padding: 42px 0 38px;
}
.list-kicker {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--brand-2);
}
.list-hero h1 {
  margin-top: 8px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 56px;
  line-height: 1.05;
  font-weight: 900;
  background: linear-gradient(100deg, #fff 24%, #b9d6ff 70%, #7fb6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.list-lead {
  margin-top: 12px;
  max-width: 700px;
  font-size: 15px;
  line-height: 1.8;
  color: #c3d3e8;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag-row span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 170, 255, .28);
  background: rgba(47, 134, 255, .10);
  font-size: 11.5px;
  color: #bcd9ff;
}

/* ------------------------------------------------------------- 筛选排序工具条 */

.toolbar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(5, 11, 20, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(86, 152, 255, .14);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  flex-wrap: wrap;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--dim);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(86, 152, 255, .22);
  background: rgba(10, 22, 38, .7);
  color: #b9c9de;
  font-size: 12.5px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.chip:hover { color: #fff; border-color: var(--line-strong); }
.chip.is-active {
  color: #fff;
  border-color: rgba(120, 185, 255, .65);
  background: rgba(47, 134, 255, .22);
  box-shadow: 0 0 16px rgba(47, 134, 255, .18);
}
.sort-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sort-select {
  height: 34px;
  padding: 0 30px 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(86, 152, 255, .24);
  background: #0a1626;
  color: #d6e5f8;
  font-size: 12.5px;
  cursor: pointer;
}
.sort-select:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* ----------------------------------------------------------------- 列表卡片 */

.list-section { padding: 30px 0 8px; }
.list-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
}
.list-head h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 26px;
  font-weight: 800;
}
.list-count { font-size: 13px; color: var(--muted); }
.list-count strong { color: var(--brand-2); font-size: 15px; }
.list-hint { font-size: 12.5px; color: var(--dim); width: 100%; }

.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 28px 0 4px; font-size: 13px; color: var(--muted); }
.pagination a, .pagination .current { min-width: 32px; padding: 5px 10px; text-align: center; border: 1px solid rgba(76, 146, 250, .28); border-radius: 8px; color: #c8d6ea; text-decoration: none; }
.pagination a:hover { border-color: var(--brand); color: #fff; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.article-body figure { margin: 18px 0 0; }
.article-body figure img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 10px; }
.kit-card {
  min-height: 340px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(76, 146, 250, .22);
  background: linear-gradient(165deg, #0b1929 0%, #081421 70%, #07111d 100%);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.kit-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
}
.kit-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.kit-thumb {
  position: relative;
  display: block;
  height: 190px;
  overflow: hidden;
  background: var(--bg-alt);
}
.kit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transition: transform .35s ease;
}
.kit-card:hover .kit-thumb img { transform: scale(1.04); }
.kit-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(6, 16, 30, .82);
  border: 1px solid rgba(96, 170, 255, .38);
  color: #cfe6ff;
  font-size: 10.5px;
  letter-spacing: .06em;
}
.kit-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.kit-title {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}
.kit-desc { font-size: 12.5px; line-height: 1.65; color: var(--muted); flex: 1; }
.kit-meta {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(86, 152, 255, .12);
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: .04em;
}
.kit-meta span:first-child { color: var(--brand-2); }
.kit-card[hidden] { display: none; }
.back-row { padding-bottom: 20px; }
.scale-h-88 { --h: 88px; }
.scale-h-132 { --h: 132px; }
.scale-h-194 { --h: 194px; }
.empty-state {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------- 列表说明文字 */

.list-desc {
  padding: 46px 0 8px;
}
.list-desc .wrap {
  max-width: 900px;
}
.list-desc h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 27px;
  font-weight: 800;
  margin-bottom: 14px;
}
.list-desc p {
  font-size: 14.5px;
  line-height: 2;
  color: #b6c6da;
}

/* --------------------------------------------------------------- 相邻分类 */

.related-section { padding: 44px 0 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(76, 146, 250, .2);
  background: linear-gradient(165deg, #0b1929, #081421);
  transition: border-color .2s ease, transform .2s ease;
}
.related-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.related-name { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 18px; font-weight: 800; color: var(--brand-2); }
.related-desc { font-size: 12px; line-height: 1.6; color: var(--muted); }
.related-arrow { position: absolute; right: 16px; top: 16px; color: rgba(120, 175, 240, .6); font-size: 15px; }
.related-arrow::before { content: "→"; }

.inner-links { padding: 22px 0 60px; }
.inner-links-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.inner-links a {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px dashed rgba(96, 170, 255, .28);
  font-size: 12.5px;
  color: #b9cee7;
}
.inner-links a:hover { border-style: solid; color: #fff; }

/* ------------------------------------------------------------------ 详情页 */

.article-hero {
  position: relative;
  padding: 26px 0 0;
}
.article-head { padding: 18px 0 26px; border-bottom: 1px solid rgba(86, 152, 255, .14); }
.article-head h1 {
  margin-top: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 44px;
  line-height: 1.2;
  font-weight: 900;
  color: #f5f9ff;
  max-width: 900px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.article-meta span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 170, 255, .3);
  background: rgba(47, 134, 255, .1);
  font-size: 11px;
  color: #c7dcf6;
}
.article-lead {
  margin-top: 16px;
  max-width: 820px;
  font-size: 15px;
  line-height: 1.85;
  color: #c3d3e8;
}

.article-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 44px;
  padding: 34px 0 20px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  border: 1px solid rgba(76, 146, 250, .2);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #0b1929, #081421);
  padding: 16px 16px 14px;
}
.toc h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--dim);
  margin-bottom: 8px;
}
.toc ol { display: grid; gap: 2px; counter-reset: toc; }
.toc a {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  border-left: 2px solid transparent;
}
.toc a:hover { color: #fff; background: rgba(47, 134, 255, .08); }
.toc a.is-current {
  color: #fff;
  background: rgba(47, 134, 255, .14);
  border-left-color: var(--brand);
}
.toc-toggle { display: none; cursor: pointer; }

.article-body { max-width: 820px; }
.article-body section { padding: 6px 0 26px; }
.article-body h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 800;
  color: #f0f6ff;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(86, 152, 255, .14);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article-body h2:focus-visible { outline: 2px solid var(--brand-2); }
.article-body p {
  font-size: 14.5px;
  line-height: 2;
  color: #b9c9dd;
}
.article-body p + p { margin-top: 12px; }

.article-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin: 28px auto 6px;
}
.article-nav-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 18px;
  border: 1px solid rgba(76, 146, 250, .22);
  border-radius: var(--radius);
  background: linear-gradient(165deg, #0b1929, #081421);
  transition: border-color .2s ease, transform .2s ease;
}
.article-nav-item:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.article-nav-label { font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.article-nav-title {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
  color: #eaf3ff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-nav-item.next { grid-column: 2; text-align: right; }
.article-foot {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(76, 146, 250, .18);
  background: rgba(8, 20, 34, .5);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.related-kits { padding: 30px 0 10px; }
.related-kits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.rk-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(76, 146, 250, .2);
  background: linear-gradient(165deg, #0b1929, #081421);
  transition: border-color .2s ease, transform .2s ease;
}
.rk-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.rk-card img { width: 76px; height: 68px; object-fit: cover; border-radius: 6px; flex: none; }
.rk-card h3 { font-size: 14px; font-weight: 700; }
.rk-card p { margin-top: 3px; font-size: 11.5px; line-height: 1.55; color: var(--muted); }

/* ---------------------------------------------------------------- 内页页脚 */

.inner-footer {
  height: auto;
  min-height: 0;
  margin-top: 30px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(76, 146, 250, .2);
  padding: 30px 0 34px;
}
.inner-footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}
.inner-footer .footer-brand { font-size: 26px; }
.inner-footer .footer-cols { margin-top: 0; grid-template-columns: 1fr 1fr; gap: 20px; }
.inner-footer .footer-about { margin-top: 0; max-width: 300px; }
.inner-footer .copyright { grid-column: 1 / -1; margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(86, 152, 255, .1); }
.inner-footer .footer-mecha { right: 4%; bottom: 10px; opacity: .22; }

/* -------------------------------------------------------------- 响应式内页 */

@media (max-width: 1024px) {
  .kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 14px; }
  .toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(96, 170, 255, .32);
    background: rgba(47, 134, 255, .10);
    color: #cfe4ff;
    font-size: 12.5px;
  }
  .toc { position: static; display: none; }
  .toc.is-open { display: block; }
  .toc ol { grid-template-columns: 1fr 1fr; }
  .inner-footer-inner { grid-template-columns: 1fr 1fr; }
  .inner-footer .copyright { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .crumb ol { width: calc(100% - 32px); }
  .list-hero h1 { font-size: 40px; }
  .list-hero-inner { padding: 30px 0 28px; }
  .list-hero-bg { width: 70%; opacity: .3; }
  .toolbar { min-height: 0; padding: 10px 0; gap: 10px; }
  .toolbar-wrap { position: static; }
  .kit-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .inner-links-inner { grid-template-columns: 1fr; }
  .article-head h1 { font-size: 30px; }
  .article-layout { padding-top: 22px; gap: 12px; }
  .toc { padding: 12px 14px; }
  .toc ol { grid-template-columns: 1fr; }
  .toc a { padding: 8px; }
  .article-body h2 { font-size: 21px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-item.next { grid-column: auto; text-align: left; }
  .related-kits-grid { grid-template-columns: 1fr; }
  .inner-footer-inner { grid-template-columns: 1fr; }
  .inner-footer .footer-mecha { opacity: .12; }
  .inner-links { padding-bottom: 40px; }
}
