:root {
  --bg: #f4f6fb;
  --card-bg: #fff;
  --text-main: #22314d;
  --text-muted: #7f8ba3;
  --line: #e9eef6;
  --primary: #2196f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text-main);
}

.page {
  width: 1200px;
  max-width: calc(100vw - 48px);
  margin: 16px auto 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 190px;
  border-radius: 10px;
  background: linear-gradient(100deg, #eef3ff 0%, #e7f2ff 45%, #f2f8ff 100%);
  padding: 22px 30px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(55, 139, 255, 0.18);
}

.hero::before {
  width: 24px;
  height: 24px;
  right: 450px;
  top: 24px;
}

.hero::after {
  width: 34px;
  height: 34px;
  right: 360px;
  top: 8px;
}

.hero-left h1 {
  margin: 0;
  font-size: 50px;
  line-height: 1.18;
  letter-spacing: 1px;
}

.hero-tags {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.hero-tags span {
  background: #fff;
  border: 1px solid #e2ebf8;
  border-radius: 8px;
  color: #4c5f7e;
  font-size: 14px;
  padding: 8px 16px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  margin-left: 360px;
}

.hero-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfd9ea;
}

.hero-dots .active {
  width: 20px;
  border-radius: 8px;
  background: #8ea2c4;
}

.hero-right {
  width: 280px;
  display: flex;
  justify-content: center;
}

.book-illus {
  width: 235px;
  height: 140px;
  position: relative;
}

.book-main {
  width: 168px;
  height: 118px;
  border-radius: 12px;
  position: absolute;
  right: 36px;
  top: 10px;
  background: linear-gradient(145deg, #60b8ff 10%, #2c8df7 65%, #4e9cff 100%);
  box-shadow: 0 14px 30px rgba(45, 124, 232, 0.25);
}

.book-main::before,
.book-main::after {
  content: "";
  position: absolute;
  border-radius: 4px;
  background: #fff;
}

.book-main::before {
  width: 70px;
  height: 12px;
  left: 28px;
  top: 24px;
}

.book-main::after {
  width: 90px;
  height: 14px;
  left: 28px;
  top: 48px;
}

.book-side {
  width: 58px;
  height: 100px;
  position: absolute;
  right: 0;
  top: 28px;
  border-radius: 10px;
  background: linear-gradient(165deg, #eaf4ff 0%, #d6e8fd 100%);
}

.subject-nav {
  margin-top: 14px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px 16px;
}

.stage-block {
  margin-top: 14px;
}

.stage-block .subject-nav {
  margin-top: 0;
}

.stage-block .subject-nav.wrong-nav {
  margin-top: 14px;
}

.subject-nav.wrong-nav {
  border-left: 3px solid #ffe0e3;
  background: linear-gradient(90deg, #fff9f9 0%, #fff 18%);
}

.nav-group {
  margin-top: 16px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px 10px;
}

.group-title {
  font-size: 22px;
  font-weight: 700;
  color: #2d3b55;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  width: fit-content;
}

.group-title::-webkit-details-marker {
  display: none;
}

.group-title span {
  margin-left: 6px;
  color: #7d8da8;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.accordion-item[open] .group-title span {
  transform: rotate(90deg);
}

.accordion-item:not([open]) .subject-grid {
  display: none;
}

.subject-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px 22px;
}

.subject-item {
  display: flex;
  align-items: center;
  min-height: 36px;
  gap: 10px;
  white-space: nowrap;
}

.subject-item strong {
  font-size: 18px;
  font-weight: 700;
  color: #27374f;
}

.subject-item a {
  font-size: 14px;
  color: #7b8597;
  text-decoration: none;
}

.subject-item em {
  font-style: normal;
  color: #9eabbf;
  font-size: 13px;
  margin: 0 -2px;
}

.paper-section {
  margin-top: 14px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px 8px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-line {
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 3px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.tabs {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #edf1f7;
  background: #f3f5f8;
  border-radius: 8px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.tabs button {
  border: none;
  background: transparent;
  color: #667796;
  font-size: 15px;
  padding: 4px 0;
  cursor: pointer;
}

.tabs button.active {
  background: linear-gradient(90deg, #1ca2ff, #177cf1);
  color: #fff;
  border-radius: 20px;
  padding: 4px 13px;
}

.tabs button.pill {
  color: #fff;
  background: linear-gradient(90deg, #4a95ff, #2a76ef);
  border-radius: 16px;
  padding: 4px 10px;
}

.tabs .ai-link {
  margin-left: auto;
  text-decoration: none;
  color: #2593ff;
  font-weight: 700;
}

/* 小学试卷：类别前三项 — 红字加粗、项间竖线（与示意图一致） */
.zjcp-primary-sjlb-tabs > button:nth-child(2):not(.active),
.zjcp-primary-sjlb-tabs > button:nth-child(3):not(.active),
.zjcp-primary-sjlb-tabs > button:nth-child(4):not(.active) {
  color: #e53935;
  font-weight: 700;
}
.zjcp-primary-sjlb-tabs > button:nth-child(3),
.zjcp-primary-sjlb-tabs > button:nth-child(4) {
  border-left: 1px solid #dce0e8;
  padding-left: 16px;
  margin-left: 0;
}
.zjcp-primary-sjlb-tabs > button:nth-child(3).active,
.zjcp-primary-sjlb-tabs > button:nth-child(4).active {
  border-left-color: transparent;
}

/* 初中试卷：类别前三项 — 与小学块相同视觉（红字加粗、竖线分隔） */
.zjcp-junior-sjlb-tabs > button:nth-child(2):not(.active),
.zjcp-junior-sjlb-tabs > button:nth-child(3):not(.active),
.zjcp-junior-sjlb-tabs > button:nth-child(4):not(.active) {
  color: #e53935;
  font-weight: 700;
}
.zjcp-junior-sjlb-tabs > button:nth-child(3),
.zjcp-junior-sjlb-tabs > button:nth-child(4) {
  border-left: 1px solid #dce0e8;
  padding-left: 16px;
  margin-left: 0;
}
.zjcp-junior-sjlb-tabs > button:nth-child(3).active,
.zjcp-junior-sjlb-tabs > button:nth-child(4).active {
  border-left-color: transparent;
}

/* 高中试卷：类别前三项 — 与初中块相同视觉 */
.zjcp-senior-sjlb-tabs > button:nth-child(2):not(.active),
.zjcp-senior-sjlb-tabs > button:nth-child(3):not(.active),
.zjcp-senior-sjlb-tabs > button:nth-child(4):not(.active) {
  color: #e53935;
  font-weight: 700;
}
.zjcp-senior-sjlb-tabs > button:nth-child(3),
.zjcp-senior-sjlb-tabs > button:nth-child(4) {
  border-left: 1px solid #dce0e8;
  padding-left: 16px;
  margin-left: 0;
}
.zjcp-senior-sjlb-tabs > button:nth-child(3).active,
.zjcp-senior-sjlb-tabs > button:nth-child(4).active {
  border-left-color: transparent;
}

.cards-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.paper-card {
  border-right: 1px solid #eef2f8;
  padding-right: 10px;
}

.paper-card:last-child {
  border-right: none;
}

.paper-card .tag {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  color: #ef4c56;
  line-height: 1;
}

.paper-card .tag.hot {
  color: #e43d4c;
}

.paper-card h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.3;
  max-height: 48px;
  overflow: hidden;
}

.paper-card .meta,
.paper-card .stats {
  color: var(--text-muted);
  font-size: 14px;
}

.paper-card .meta {
  display: none;
}

.paper-card .stats {
  margin-top: 5px;
  display: flex;
  gap: 20px;
}

.paper-card ul {
  margin: 10px 0 0;
  padding-left: 0;
  color: #4f5f7b;
  list-style: none;
}

.paper-card li {
  position: relative;
  padding-left: 14px;
  line-height: 1.75;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4f5f7b;
  transform: translateY(-50%);
}

@media (max-width: 1100px) {
  .hero {
    min-height: 170px;
    padding: 18px 20px;
  }

  .hero-left h1 {
    font-size: 34px;
  }

  .hero-tags span {
    font-size: 13px;
  }

  .hero-dots {
    margin-left: 180px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .subject-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 8px 16px;
  }

  .group-title {
    font-size: 20px;
  }

  .subject-item strong {
    font-size: 17px;
  }

  .subject-item a {
    font-size: 13px;
  }

  .paper-card {
    border-right: none;
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 12px;
  }

  .paper-card:last-child {
    border-bottom: none;
  }

  .paper-card h3 {
    font-size: 17px;
  }
}
