/* ============================================================
   易读书 · 统计学系列图鉴皮肤
   Isolation: ALL rules under .stats-series — do NOT edit theme.css
   Direction: Vibrant block-based catalog · blue data + amber highlight
   ============================================================ */

.stats-series {
  --stats-primary: #1E40AF;
  --stats-primary-soft: #3B82F6;
  --stats-accent: #F59E0B;
  --stats-accent-soft: #FEF3C7;
  --stats-ink: #1E293B;
  --stats-ink-deep: #1E3A8A;
  --stats-muted: #64748B;
  --stats-bg: #F8FAFC;
  --stats-surface: #FFFFFF;
  --stats-line: #E2E8F0;
  --stats-green: #059669;
  --stats-shadow: 0 10px 28px rgba(30, 64, 175, 0.08);
  --stats-shadow-hover: 0 14px 32px rgba(30, 64, 175, 0.14);
  --stats-radius: 20px;
  --stats-radius-sm: 14px;
  --stats-font-display: "Exo", "Noto Sans SC", sans-serif;
  --stats-font-body: "Noto Sans SC", system-ui, sans-serif;
  --stats-font-mono: "Roboto Mono", "IBM Plex Mono", ui-monospace, monospace;
  --stats-nav-h: 64px;
  --stats-block-gap: 48px;

  font-family: var(--stats-font-body);
  background: var(--stats-bg);
  color: var(--stats-ink);
  line-height: 1.7;
  min-height: 100vh;
}

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

.stats-series a {
  color: var(--stats-primary);
  text-decoration: none;
  cursor: pointer;
}

.stats-series a:hover {
  color: var(--stats-primary-soft);
}

.stats-series a:focus-visible,
.stats-series button:focus-visible {
  outline: 3px solid var(--stats-primary-soft);
  outline-offset: 3px;
}

/* ---------- Nav ---------- */
.stats-series > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: var(--stats-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 64, 175, 0.1);
}

.stats-series > nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--stats-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--stats-ink-deep);
  letter-spacing: -0.02em;
}

.stats-series > nav .logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.stats-series > nav .nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.stats-series > nav .nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--stats-muted);
  transition: background 0.2s, color 0.2s;
}

.stats-series > nav .nav-links a:hover {
  background: rgba(30, 64, 175, 0.08);
  color: var(--stats-primary);
}

.stats-series > nav .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--stats-primary);
  cursor: pointer;
}

.stats-series > nav .nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .stats-series > nav .nav-toggle {
    display: flex;
  }
  .stats-series > nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 16px 16px;
    background: rgba(248, 250, 252, 0.98);
    border-bottom: 1px solid var(--stats-line);
    box-shadow: var(--stats-shadow);
  }
  .stats-series > nav .nav-links.open {
    display: flex;
  }
  .stats-series > nav .nav-links a {
    width: 100%;
  }
}

/* ---------- Hero ---------- */
.stats-series .stats-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--stats-nav-h) + 56px) 24px 56px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(245, 158, 11, 0.16), transparent 50%),
    linear-gradient(180deg, #EEF4FF 0%, var(--stats-bg) 100%);
}

.stats-series .stats-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 64, 175, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

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

.stats-series .stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.1);
  color: var(--stats-primary);
  font-family: var(--stats-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stats-series .stats-hero h1 {
  font-family: var(--stats-font-display);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--stats-ink-deep);
  margin: 0 0 16px;
}

.stats-series .stats-hero h1 .hi {
  background: linear-gradient(135deg, var(--stats-primary), var(--stats-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-series .stats-hero > p {
  max-width: 36em;
  margin: 0 auto 28px;
  color: var(--stats-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.stats-series .stats-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 28px;
  max-width: 640px;
}

.stats-series .stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--stats-surface);
  border: 1px solid var(--stats-line);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--stats-ink);
}

.stats-series .stats-pill svg {
  width: 16px;
  height: 16px;
  color: var(--stats-primary);
  flex-shrink: 0;
}

.stats-series .stats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: var(--stats-accent);
  color: #1C1917;
  font-family: var(--stats-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.stats-series .stats-btn:hover {
  color: #1C1917;
  background: #FBBF24;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.42);
}

.stats-series .stats-btn.secondary {
  background: var(--stats-surface);
  color: var(--stats-primary);
  border: 1.5px solid rgba(30, 64, 175, 0.2);
  box-shadow: var(--stats-shadow);
}

.stats-series .stats-btn.secondary:hover {
  color: var(--stats-primary);
  background: #EFF6FF;
  border-color: var(--stats-primary-soft);
}

.stats-series .stats-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Main catalog ---------- */
.stats-series .stats-main {
  max-width: 840px;
  margin: 0 auto;
  padding: 8px 24px 64px;
}

.stats-series .stats-chapter {
  margin: 0 0 var(--stats-block-gap);
  padding: 28px 28px 24px;
  background: var(--stats-surface);
  border-radius: var(--stats-radius);
  border: 1px solid var(--stats-line);
  box-shadow: var(--stats-shadow);
  position: relative;
  overflow: hidden;
}

.stats-series .stats-chapter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--chapter-accent, var(--stats-primary));
}

.stats-series .stats-chapter[data-tone="blue"] { --chapter-accent: #2563EB; }
.stats-series .stats-chapter[data-tone="teal"] { --chapter-accent: #0D9488; }
.stats-series .stats-chapter[data-tone="amber"] { --chapter-accent: #F59E0B; }
.stats-series .stats-chapter[data-tone="violet"] { --chapter-accent: #6366F1; }
.stats-series .stats-chapter[data-tone="slate"] { --chapter-accent: #64748B; }

.stats-series .stats-chapter-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.stats-series .stats-chapter-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #DBEAFE;
  color: var(--chapter-accent, var(--stats-primary));
  font-family: var(--stats-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stats-series .stats-chapter[data-tone="blue"] .stats-chapter-num { background: #DBEAFE; }
.stats-series .stats-chapter[data-tone="teal"] .stats-chapter-num { background: #CCFBF1; }
.stats-series .stats-chapter[data-tone="amber"] .stats-chapter-num { background: #FEF3C7; }
.stats-series .stats-chapter[data-tone="violet"] .stats-chapter-num { background: #E0E7FF; }
.stats-series .stats-chapter[data-tone="slate"] .stats-chapter-num { background: #F1F5F9; }

.stats-series .stats-chapter-meta {
  min-width: 0;
  flex: 1;
}

.stats-series .stats-chapter-tag {
  display: block;
  font-family: var(--stats-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--stats-muted);
  margin-bottom: 4px;
}

.stats-series .stats-chapter h2 {
  font-family: var(--stats-font-display);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--stats-ink-deep);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

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

.stats-series .stats-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: var(--stats-radius-sm);
  background: #F8FAFC;
  border: 1px solid transparent;
  color: var(--stats-ink);
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.stats-series .stats-list a:hover {
  background: #EFF6FF;
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--stats-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.08);
}

.stats-series .stats-list a.is-featured {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), #F8FAFC 42%);
  border-color: rgba(245, 158, 11, 0.22);
}

.stats-series .stats-list a.is-featured:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), #EFF6FF 50%);
  border-color: rgba(245, 158, 11, 0.35);
}

.stats-series .stats-list .idx {
  font-family: var(--stats-font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--stats-muted);
  min-width: 1.6em;
}

.stats-series .stats-list .title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.45;
  min-width: 0;
}

.stats-series .stats-list .meta {
  font-family: var(--stats-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

.stats-series .stats-list .meta.star {
  color: #92400E;
  background: var(--stats-accent-soft);
}

.stats-series .stats-list .meta.lvl {
  color: var(--stats-muted);
  background: rgba(100, 116, 139, 0.12);
}

/* ---------- Foot ---------- */
.stats-series .stats-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 8px 0 40px;
  padding: 0 24px;
}

.stats-series .stats-foot a {
  font-weight: 600;
  color: var(--stats-primary);
}

.stats-series .stats-foot a:hover {
  text-decoration: underline;
}

.stats-series > footer {
  text-align: center;
  padding: 28px 24px 40px;
  color: var(--stats-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--stats-line);
}

.stats-series > footer a {
  font-weight: 600;
}

@media (max-width: 768px) {
  .stats-series .stats-hero {
    padding: calc(var(--stats-nav-h) + 36px) 16px 40px;
  }
  .stats-series .stats-main {
    padding: 0 16px 48px;
  }
  .stats-series .stats-chapter {
    padding: 22px 16px 18px;
    margin-bottom: 28px;
  }
  .stats-series {
    --stats-block-gap: 28px;
  }
  .stats-series .stats-list a {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 8px;
  }
  .stats-series .stats-list .meta {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats-series *,
  .stats-series *::before,
  .stats-series *::after {
    transition: none !important;
    animation: none !important;
  }
}
