:root {
  --clr-bg: #ffffff;
  --clr-surface: #f6f7fb;
  --clr-border: #e8eaf0;
  --clr-text: #12141a;
  --clr-muted: #7a8092;
  --clr-primary: #0369a1;
  --clr-accent: #0ea5e9;
  --clr-ink: #0b1220;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
  --font-stack: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --grad-brand: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  --fs-body: 16px;
  --fs-body-m: 15px;
  --fs-aux: 13px;
  --lh-body: 1.7;
  --gap-section: 64px;
  --gap-section-m: 40px;
  --trans: .2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

a {
  color: var(--clr-primary);
}

:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* ============ 页头 ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-main {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-main a {
  padding: 4px 0;
  font-size: 15px;
  color: var(--clr-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--trans), border-color var(--trans);
}

.nav-main a:hover {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
}

.menu-btn {
  display: none;
}

/* ============ 容器 ============ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.container > section {
  margin-bottom: var(--gap-section);
}

.container > section:last-of-type {
  margin-bottom: 0;
}

/* ============ 面包屑 ============ */
.breadcrumb {
  margin-top: 20px;
  font-size: var(--fs-aux);
  color: var(--clr-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--trans);
}

.breadcrumb a:hover {
  color: var(--clr-primary);
}

.breadcrumb span {
  color: var(--clr-muted);
}

/* ============ 区块标题 ============ */
.section-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 24px;
  color: var(--clr-text);
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--grad-brand);
  border-radius: 2px;
  margin-top: 12px;
}

/* ============ 首屏深色卡片 ============ */
.hero-rank {
  position: relative;
  overflow: hidden;
  background: var(--clr-ink);
  color: #fff;
  padding: 48px 40px 40px;
  border-radius: var(--radius-md);
  margin: 24px 0 56px;
}

.hero-rank::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-brand);
}

.hero-rank::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -130px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: var(--clr-primary);
  opacity: .22;
  filter: blur(90px);
  pointer-events: none;
}

.hero-rank > * {
  position: relative;
  z-index: 1;
}

.hero-rank h1 {
  color: #fff;
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 24px;
}

.hero-figure {
  margin: 0 0 24px;
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .72);
  margin: 0 0 12px;
  max-width: 820px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  list-style: none;
  margin: 28px 0 24px;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stats strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--clr-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-stats span {
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
}

.hero-update {
  font-size: var(--fs-aux);
  color: rgba(255, 255, 255, .5);
  margin: 0 0 18px;
}

.rank-criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.rank-criteria li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .78);
}

.rank-criteria li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-accent);
  flex: 0 0 auto;
}

/* ============ 本期概览 ============ */
.rank-summary p {
  font-size: 16px;
  line-height: 1.85;
  margin: 0 0 16px;
  max-width: 820px;
}

/* ============ 本期变动 ============ */
.changes-intro {
  font-size: 15px;
  color: var(--clr-muted);
  margin: 0 0 16px;
}

.change-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.change-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--clr-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.change-tag {
  flex: 0 0 auto;
  font-size: var(--fs-aux);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--clr-primary);
  border: 1px solid var(--clr-primary);
  white-space: nowrap;
}

.change-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ============ 排名条 ============ */
.rank-item {
  display: grid;
  grid-template-columns: 96px 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--clr-border);
  align-items: start;
  transition: background var(--trans);
}

.rank-item.is-top {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: inset 3px 0 0 var(--clr-primary);
}

.rank-item:hover {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
}

.rank-no {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: var(--clr-border);
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding-top: 4px;
}

.rank-item.is-top .rank-no {
  color: var(--clr-primary);
}

.rank-poster {
  display: block;
}

.rank-poster img {
  width: 160px;
  height: 214px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}

.rank-name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans);
}

.rank-name a:hover {
  color: var(--clr-primary);
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--clr-muted);
}

.rank-score {
  font-size: 17px;
  font-weight: 800;
  color: var(--clr-primary);
  font-variant-numeric: tabular-nums;
}

.rank-score::after {
  content: " 分";
  font-size: var(--fs-aux);
  font-weight: 400;
}

.rank-tags {
  color: var(--clr-muted);
}

.rank-ep {
  color: var(--clr-muted);
}

.rank-desc {
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 12px;
  color: var(--clr-text);
}

.rank-points {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-points li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--clr-muted);
  padding-left: 16px;
  position: relative;
}

.rank-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--clr-primary);
  transform: rotate(45deg);
}

.rank-fit {
  font-size: var(--fs-aux);
  color: var(--clr-muted);
  background: var(--clr-surface);
  border-radius: 4px;
  padding: 6px 10px;
  margin: 0 0 12px;
  display: inline-block;
}

.rank-link {
  display: inline-block;
  font-size: 14px;
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--trans);
}

.rank-link::after {
  content: " ›";
}

.rank-link:hover {
  color: var(--clr-accent);
}

/* ============ 分题材子榜 ============ */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.sub-card {
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  padding: 18px 20px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform var(--trans), box-shadow var(--trans);
}

.sub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .08), 0 8px 20px rgba(15, 23, 42, .07);
}

.sub-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--clr-border);
}

.sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 15px;
}

.sub-no {
  flex: 0 0 18px;
  font-size: var(--fs-aux);
  font-weight: 700;
  color: var(--clr-primary);
  font-variant-numeric: tabular-nums;
}

.sub-item a {
  color: var(--clr-text);
  text-decoration: none;
  transition: color var(--trans);
}

.sub-item a:hover {
  color: var(--clr-primary);
}

/* ============ 横向对比表格 ============ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  font-size: var(--fs-aux);
  color: var(--clr-muted);
  padding: 0 0 10px;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--clr-border);
  text-align: left;
  white-space: nowrap;
}

.compare-table thead th {
  background: var(--clr-surface);
  font-size: var(--fs-aux);
  font-weight: 700;
  color: var(--clr-muted);
  border-bottom: 2px solid var(--clr-border);
}

.compare-table tbody tr:nth-child(even) {
  background: var(--clr-surface);
}

.compare-table tbody tr:hover {
  background: var(--clr-surface);
}

.compare-table tbody td:first-child {
  font-weight: 700;
  color: var(--clr-muted);
  text-align: center;
}

.compare-table tbody td:nth-child(6) {
  font-weight: 800;
  color: var(--clr-primary);
  font-variant-numeric: tabular-nums;
}

/* ============ 评分方法 ============ */
.score-method p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--clr-muted);
  margin: 0 0 18px;
}

.method-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.method-item {
  padding-left: 18px;
  border-left: 3px solid var(--clr-border);
}

.method-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.method-item p {
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
  color: var(--clr-muted);
}

/* ============ 使用建议 ============ */
.howto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.howto-item {
  counter-increment: step;
  padding: 20px 0 20px 52px;
  border-bottom: 1px solid var(--clr-border);
  position: relative;
}

.howto-item:last-child {
  border-bottom: none;
}

.howto-item::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--clr-surface);
  color: var(--clr-primary);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.howto-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.howto-item p {
  font-size: 15px;
  line-height: 1.75;
  margin: 0;
  color: var(--clr-muted);
}

/* ============ 编辑推荐 ============ */
.pick-intro {
  font-size: 15px;
  color: var(--clr-muted);
  margin: 0 0 20px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pick-card {
  display: flex;
  flex-direction: column;
}

.pick-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pick-head img {
  width: 120px;
  height: 160px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  filter: grayscale(.35);
  flex: 0 0 120px;
}

.pick-name {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}

.pick-tag {
  font-size: var(--fs-aux);
  color: var(--clr-muted);
  margin: 0;
}

.pick-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--clr-muted);
  margin: 12px 0 0;
}

.pick-why {
  font-size: 14px;
  line-height: 1.7;
  color: var(--clr-text);
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--clr-border);
}

/* ============ FAQ ============ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: #fff;
}

.faq-item[open] {
  background: var(--clr-surface);
}

.faq-item summary {
  font-size: 16px;
  font-weight: 700;
  color: var(--clr-ink);
  cursor: pointer;
  line-height: 1.5;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "Q";
  margin-right: 9px;
  color: var(--clr-muted);
  font-weight: 800;
}

.faq-item p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--clr-muted);
  margin: 10px 0 0;
}

.faq-item p::before {
  content: "A";
  margin-right: 9px;
  font-weight: 700;
}

/* ============ 页脚 ============ */
.site-footer {
  margin-top: var(--gap-section);
  padding: 44px 0 26px;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
}

.footer-top {
  max-width: 1080px;
  margin: 0 auto 28px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand {
  max-width: 420px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--clr-ink);
}

.footer-slogan {
  font-size: var(--fs-aux);
  color: var(--clr-muted);
  margin: 0;
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--trans);
}

.footer-nav a:hover {
  color: var(--clr-primary);
}

.friend-links {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px dashed var(--clr-border);
  align-items: baseline;
}

.friend-links span {
  font-size: 12px;
  color: var(--clr-muted);
}

.friend-links a {
  font-size: 12px;
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--trans);
}

.friend-links a:hover {
  color: var(--clr-primary);
}

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 0;
  border-top: 1px dashed var(--clr-border);
  text-align: center;
}

.footer-bottom p {
  margin: 3px 0;
  font-size: 13px;
  color: var(--clr-muted);
  line-height: 1.6;
}

.footer-bottom a {
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--trans);
}

.footer-bottom a:hover {
  color: var(--clr-primary);
}

/* ============ 进入动画 ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-rank {
  animation: fadeUp .5s ease both;
}

.rank-item {
  animation: fadeUp .5s ease both;
}

.rank-item:nth-child(2) { animation-delay: .04s; }
.rank-item:nth-child(3) { animation-delay: .08s; }
.rank-item:nth-child(4) { animation-delay: .12s; }
.rank-item:nth-child(5) { animation-delay: .16s; }
.rank-item:nth-child(6) { animation-delay: .2s; }
.rank-item:nth-child(7) { animation-delay: .24s; }
.rank-item:nth-child(8) { animation-delay: .28s; }
.rank-item:nth-child(9) { animation-delay: .32s; }
.rank-item:nth-child(10) { animation-delay: .36s; }
.rank-item:nth-child(11) { animation-delay: .4s; }

/* ============ 移动端 ============ */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
    gap: 12px;
  }

  .logo {
    font-size: 17px;
    max-width: 58%;
  }

  .nav-main {
    display: none;
  }

  .menu-btn {
    display: flex;
    margin-left: auto;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0;
    color: transparent;
    cursor: pointer;
    position: relative;
  }

  .menu-btn::before {
    content: "";
    width: 16px;
    height: 2px;
    background: var(--clr-text);
    box-shadow: 0 -5px 0 var(--clr-text), 0 5px 0 var(--clr-text);
  }

  .container {
    padding: 0 20px;
  }

  .container > section {
    margin-bottom: var(--gap-section-m);
  }

  .hero-rank {
    padding: 32px 22px 28px;
    margin: 20px 0 40px;
  }

  .hero-rank h1 {
    font-size: 26px;
    margin-bottom: 18px;
  }

  .hero-sub {
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-stats {
    gap: 14px 24px;
    margin: 22px 0 18px;
    padding-top: 20px;
  }

  .hero-stats strong {
    font-size: 22px;
  }

  .rank-criteria {
    font-size: var(--fs-aux);
    gap: 8px 16px;
  }

  .rank-summary p {
    font-size: var(--fs-body-m);
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .rank-item {
    grid-template-columns: 64px 1fr;
    gap: 16px;
    padding: 22px 0;
  }

  .rank-item.is-top {
    padding: 22px 16px;
  }

  .rank-no {
    font-size: 40px;
    padding-top: 2px;
  }

  .rank-poster {
    grid-column: 1 / -1;
  }

  .rank-poster img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    max-height: 420px;
  }

  .rank-name {
    font-size: 18px;
  }

  .rank-desc {
    font-size: var(--fs-body-m);
  }

  .change-item {
    flex-direction: column;
    gap: 8px;
  }

  .sub-grid,
  .pick-grid {
    grid-template-columns: 1fr;
  }

  .compare-table {
    min-width: 760px;
  }

  .howto-item {
    padding: 16px 0 16px 46px;
  }

  .howto-item::before {
    top: 16px;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .footer-top {
    flex-direction: column;
    gap: 20px;
  }

  .footer-nav {
    gap: 10px 18px;
  }

  .friend-links {
    gap: 8px 14px;
  }

  .site-footer {
    margin-top: var(--gap-section-m);
    padding: 32px 0 22px;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }

  .hero-rank {
    padding: 26px 16px 24px;
  }

  .rank-item {
    grid-template-columns: 52px 1fr;
    gap: 12px;
  }

  .rank-no {
    font-size: 34px;
  }

  .hero-rank h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
    scroll-behavior: auto !important;
  }

  .hero-rank,
  .rank-item {
    animation: none;
  }

  .sub-card:hover {
    transform: none;
  }
}