/* ==========================================================================
   高项学习通 · 现代学习工作台 v2 (2026-08-14 重设计)
   设计系统：design tokens + 阴影层 + 渐变 + 动效
   ========================================================================== */

/* ----- Design Tokens ----- */
:root {
  /* 品牌色 */
  --c-primary: #5B8FF9;
  --c-primary-dark: #3A6FE0;
  --c-primary-light: #E8F0FF;
  --c-accent: #FF7A45;
  --c-accent-light: #FFE8DC;
  --c-purple: #9254DE;
  --c-purple-light: #F1E6FF;
  --c-success: #52C41A;
  --c-success-light: #F6FFED;
  --c-warning: #FAAD14;
  --c-warning-light: #FFF7E6;
  --c-danger: #F5222D;
  --c-danger-light: #FFF1F0;

  /* 中性色 */
  --c-bg: #FAFAFB;
  --c-bg-soft: #F4F5F8;
  --c-card: #FFFFFF;
  --c-text: #1F1F1F;
  --c-text-2: #595959;
  --c-text-3: #8C8C8C;
  --c-border: #EAEAEC;
  --c-border-soft: #F0F1F4;

  /* 阴影 */
  --sh-sm: 0 2px 8px rgba(15, 25, 50, 0.04);
  --sh-md: 0 4px 16px rgba(15, 25, 50, 0.06);
  --sh-lg: 0 8px 28px rgba(15, 25, 50, 0.08);
  --sh-xl: 0 16px 40px rgba(15, 25, 50, 0.10);

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;

  /* 动效曲线 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ----- Reset ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.75;
  font-size: 15px;
  min-height: 100vh;
  font-feature-settings: "tnum" on, "lnum" on;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--c-primary-dark); }

button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
   Topbar 顶栏
   ========================================================================== */
.topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.logo {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--c-text-3);
}
.topbar-meta .crumb a { color: var(--c-text-2); font-weight: 500; }
.topbar-meta .crumb a:hover { color: var(--c-primary); }
.topbar-meta .countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--c-warning-light);
  color: #AD6800;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 12px;
}
.topbar-meta .countdown strong { color: var(--c-text); font-weight: 700; }

/* ==========================================================================
   Hero 区 · 渐变 + 大数字
   ========================================================================== */
.hero {
  position: relative;
  padding: 56px 24px 64px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 0% 0%, rgba(91, 143, 249, 0.12), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 50%, rgba(146, 84, 222, 0.10), transparent 60%),
    radial-gradient(ellipse 500px 300px at 50% 100%, rgba(255, 122, 69, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: center;
  z-index: 1;
}
.hero-left { display: flex; flex-direction: column; gap: 12px; }
.hero-greeting {
  font-size: 14px;
  color: var(--c-text-3);
  font-weight: 500;
}
.hero-greeting strong {
  color: var(--c-primary);
  font-weight: 700;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--c-text);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--c-text-2);
  font-weight: 500;
  align-self: flex-start;
}
.hero-tip-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-warning-light);
  border-radius: var(--r-full);
  font-size: 11px;
}

/* 进度环（带渐变） */
.ring {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--c-border-soft); stroke-width: 12; }
.ring-arc {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease);
}
.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-text .ring-num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.ring-text .ring-label {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 6px;
  font-weight: 500;
}

/* Hero 右侧 3 个小统计卡 */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 180px;
  transition: all .25s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.stat-label {
  font-size: 11px;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}
.stat-value .unit { font-size: 12px; color: var(--c-text-3); margin-left: 2px; font-weight: 500; }

/* ==========================================================================
   通用区块
   ========================================================================== */
.section {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 24px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .emoji { font-size: 22px; }
.section-title small {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-3);
  margin-left: 6px;
}
.section-link {
  font-size: 13px;
  color: var(--c-primary);
  font-weight: 600;
}

/* 卡片基础 */
.card {
  background: var(--c-card);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--c-border-soft);
  transition: all .25s var(--ease);
}
.card:hover { box-shadow: var(--sh-md); }

/* ==========================================================================
   今日任务
   ========================================================================== */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.task-card {
  position: relative;
  padding: 18px 18px 18px 22px;
  border-radius: var(--r-md);
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  cursor: pointer;
  transition: all .25s var(--ease);
  overflow: hidden;
}
.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--c-primary);
  transition: width .25s var(--ease);
}
.task-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.task-card:hover::before { width: 6px; }
.task-card.done {
  background: var(--c-success-light);
  border-color: #B7EB8F;
}
.task-card.done::before { background: var(--c-success); }
.task-card.done .task-title { text-decoration: line-through; color: var(--c-text-3); }
.task-card.done .task-meta { opacity: 0.6; }

.task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.task-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-light);
  border-radius: var(--r-sm);
  font-size: 16px;
}
.task-card.done .task-icon { background: var(--c-success-light); }
.task-priority {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--c-accent-light);
  color: #D4380D;
  letter-spacing: 0.5px;
}
.task-priority.low { background: var(--c-bg-soft); color: var(--c-text-3); }
.task-priority.high { background: var(--c-danger-light); color: var(--c-danger); }
.task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 6px;
}
.task-meta {
  font-size: 12px;
  color: var(--c-text-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-meta .sep { color: var(--c-border); }

/* ==========================================================================
   18 章网格
   ========================================================================== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.chapter-card {
  position: relative;
  padding: 18px 18px 18px 20px;
  border-radius: var(--r-md);
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  cursor: pointer;
  transition: all .25s var(--ease);
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text);
  display: block;
}
.chapter-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--c-border);
  transition: all .25s var(--ease);
}
.chapter-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  color: var(--c-text);
}
.chapter-card:hover::before { background: var(--c-primary); width: 5px; }

.chapter-card.done { background: linear-gradient(135deg, var(--c-success-light), #fff); }
.chapter-card.done::before { background: var(--c-success); }
.chapter-card.current { background: linear-gradient(135deg, var(--c-warning-light), #fff); border-color: #FFD591; }
.chapter-card.current::before { background: var(--c-warning); }

.chapter-no {
  display: inline-block;
  font-size: 10px;
  color: var(--c-text-3);
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.chapter-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.4;
  margin-bottom: 10px;
  min-height: 38px;
}
.chapter-progress {
  height: 4px;
  background: var(--c-bg-soft);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.chapter-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-purple));
  border-radius: var(--r-full);
  transition: width .6s var(--ease);
}
.chapter-card.done .chapter-progress-bar { background: var(--c-success); }
.chapter-card.current .chapter-progress-bar { background: var(--c-warning); }
.chapter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--c-text-3);
  font-weight: 500;
}
.chapter-status-text { font-weight: 600; }

/* ==========================================================================
   月份路径（时间线）
   ========================================================================== */
.month-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.month-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--c-text);
  transition: all .25s var(--ease);
  position: relative;
}
.month-card:hover {
  border-color: var(--c-primary);
  transform: translateX(4px);
  box-shadow: var(--sh-md);
  color: var(--c-text);
}
.month-card::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-border);
  border: 2px solid var(--c-bg);
}
.month-card.current::before { background: var(--c-warning); box-shadow: 0 0 0 4px var(--c-warning-light); }
.month-card.done::before { background: var(--c-success); }

.month-no {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-mono);
}
.month-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.month-info p {
  font-size: 13px;
  color: var(--c-text-3);
}
.month-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--c-text-3);
}
.month-arrow {
  font-size: 18px;
  color: var(--c-text-3);
  transition: transform .25s var(--ease);
}
.month-card:hover .month-arrow { transform: translateX(4px); color: var(--c-primary); }

/* ==========================================================================
   快速入口
   ========================================================================== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  text-decoration: none;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 600;
  transition: all .25s var(--ease);
}
.quick-btn:hover {
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  color: var(--c-text);
}
.quick-btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-light);
  border-radius: var(--r-sm);
  font-size: 18px;
  flex-shrink: 0;
}
.quick-btn:nth-child(2) .quick-btn-icon { background: var(--c-purple-light); }
.quick-btn:nth-child(3) .quick-btn-icon { background: var(--c-accent-light); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  text-align: center;
  padding: 40px 24px 32px;
  color: var(--c-text-3);
  font-size: 12px;
}
.footer p { margin-bottom: 6px; }
.footer code {
  background: var(--c-bg-soft);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   章节详情页
   ========================================================================== */
.chapter-detail {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding: 6px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-full);
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s var(--ease);
}
.back-link:hover {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}

.chapter-detail h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--c-text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.chapter-detail h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--c-primary);
  line-height: 1.4;
}
.chapter-detail h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  margin: 24px 0 10px;
}
.chapter-detail h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-2);
  margin: 16px 0 8px;
}
.chapter-detail p {
  font-size: 15px;
  color: var(--c-text);
  margin-bottom: 12px;
  line-height: 1.8;
}
.chapter-detail ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.chapter-detail ul li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 15px;
  color: var(--c-text);
  line-height: 1.7;
}
.chapter-detail ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
}
.chapter-detail blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-purple-light));
  border-left: 4px solid var(--c-primary);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
}
.chapter-detail blockquote strong { color: var(--c-primary-dark); }
.chapter-detail code {
  background: var(--c-bg-soft);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-accent);
}

/* ==========================================================================
   章节详情页 · Hero 头图 + 信息条（v3 重设计）
   ========================================================================== */
.ch-hero {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  align-items: center;
  padding: 24px 26px;
  background:
    radial-gradient(ellipse 400px 200px at 0% 0%, rgba(91, 143, 249, 0.12), transparent 60%),
    linear-gradient(135deg, var(--c-primary-light), var(--c-purple-light));
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
  overflow: hidden;
}
.ch-hero-no {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  letter-spacing: -1px;
}
.ch-hero-main { min-width: 0; }
.ch-hero-sub {
  font-size: 12px;
  color: var(--c-text-3);
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ch-hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.3;
  color: var(--c-text);
}
.ch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.ch-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--c-primary-dark);
  border: 1px solid var(--c-primary-light);
  white-space: nowrap;
}
.ch-tag.tier {
  background: var(--c-danger-light);
  color: var(--c-danger);
  border-color: #FFCCC7;
}

/* 信息条：横向 stat 卡 */
.ch-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.ch-meta-item {
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 13px 16px;
  box-shadow: var(--sh-sm);
  transition: all .2s var(--ease);
}
.ch-meta-item:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.ch-meta-label {
  font-size: 11px;
  color: var(--c-text-3);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.ch-meta-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  word-break: break-word;
}
.ch-meta-value .unit { font-size: 12px; color: var(--c-text-3); font-weight: 500; margin-left: 3px; }

/* 小节编号 chip */
.chapter-detail h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ksec-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 25px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 知识点卡片列表 */
.kp-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kp-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 14px 18px;
  border-radius: var(--r-md);
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-left: 3px solid var(--c-primary);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.kp-item:hover {
  border-color: var(--c-primary);
  transform: translateX(4px);
  box-shadow: var(--sh-sm);
}
.kp-check {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: transparent;
  transition: all .2s var(--ease);
  flex-shrink: 0;
  margin-top: 1px;
}
.kp-item:hover .kp-check { border-color: var(--c-primary); }
.kp-item.kp-done { background: var(--c-success-light); border-color: #B7EB8F; }
.kp-item.kp-done .kp-check {
  background: var(--c-success);
  border-color: var(--c-success);
  color: white;
}
.kp-item.kp-done .kp-name { color: var(--c-text-3); text-decoration: line-through; }
.kp-content { min-width: 0; }
.kp-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary-dark);
  line-height: 1.5;
  margin-bottom: 4px;
}
.kp-desc {
  font-size: 13px;
  color: var(--c-text-3);
  line-height: 1.6;
}
.kp-sub {
  list-style: none;
  padding: 8px 0 0;
  margin: 8px 0 0;
  border-top: 1px dashed var(--c-border-soft);
}
.kp-sub li {
  position: relative;
  padding: 3px 0 3px 18px;
  font-size: 13px;
  color: var(--c-text-2);
}
.kp-sub li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--c-primary);
  font-weight: 700;
}

/* ==========================================================================
   案例 / 论文 静态页
   ========================================================================== */
.page-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px;
}
.page-content h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-content > p:first-of-type {
  font-size: 15px;
  color: var(--c-text-3);
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border-soft);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(82, 196, 26, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(82, 196, 26, 0); }
}

.task-card.done,
.kp-item.kp-done {
  animation: pop .35s var(--ease-bounce);
}

.section { animation: fadeUp .5s var(--ease) both; }
.section:nth-child(2) { animation-delay: .05s; }
.section:nth-child(3) { animation-delay: .1s; }
.section:nth-child(4) { animation-delay: .15s; }
.section:nth-child(5) { animation-delay: .2s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-left { align-items: center; }
  .ring { margin: 0 auto; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1; min-width: 140px; }
  .month-card { grid-template-columns: 60px 1fr auto; gap: 14px; padding: 16px 18px; }
  .month-no { font-size: 22px; }
}

@media (max-width: 600px) {
  .hero { padding: 32px 20px 40px; }
  .hero-title { font-size: 24px; }
  .section { padding: 0 20px; }
  .chapter-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .chapter-card { padding: 14px; }
  .topbar-meta .countdown { display: none; }
  .month-card { padding: 12px 14px; gap: 10px; }
  .month-meta { display: none; }
}

/* ==========================================================================
   Topics · 知识图谱 / Calc · 计算器 / 闪卡 / 错题 / 笔记 / 进度
   ========================================================================== */
.tier-section { margin-bottom: 40px; }
.tier-section h2 { font-size: 18px; margin-bottom: 4px; padding-left: 10px; border-left: 4px solid var(--c-primary); }

.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.ch-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--c-text);
  transition: all .2s var(--ease);
}
.ch-row:hover {
  border-color: var(--c-primary);
  transform: translateX(4px);
  box-shadow: var(--sh-sm);
  color: var(--c-text);
}
.ch-no {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-text-3);
  font-size: 12px;
}
.ch-name { font-size: 14px; font-weight: 600; }
.ch-score {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
  background: var(--c-primary-light);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.ch-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 6px;
}
.tag-tier { background: var(--c-danger-light); color: var(--c-danger); }
.tag-case { background: var(--c-warning-light); color: #AD6800; }
.tag-essay { background: var(--c-purple-light); color: var(--c-purple); }

.tip-box {
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-purple-light));
  border-radius: var(--r-lg);
  padding: 24px;
  margin-top: 32px;
}
.tip-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--c-primary-dark); }
.tip-box ul { list-style: none; padding: 0; }
.tip-box li {
  padding: 6px 0 6px 22px;
  position: relative;
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
}
.tip-box li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: var(--c-primary);
  font-weight: 700;
}
.tip-box li strong { color: var(--c-text); font-weight: 700; }

/* 公式速查表 */
.formula-card {
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: all .2s var(--ease);
}
.formula-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--sh-sm);
}
.formula-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}
.formula-text {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--c-accent);
  background: var(--c-accent-light);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
}
.formula-meta {
  font-size: 12px;
  color: var(--c-text-3);
  display: flex;
  gap: 12px;
}
.formula-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* 案例套路步骤 */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.step-card {
  position: relative;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
  transition: all .25s var(--ease);
}
.step-card:hover { border-color: var(--c-primary); transform: translateY(-2px); box-shadow: var(--sh-md); }
.step-num {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-purple));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--sh-md);
}
.step-title { font-size: 15px; font-weight: 700; margin: 12px 0 6px; color: var(--c-text); }
.step-desc { font-size: 13px; color: var(--c-text-3); line-height: 1.6; }

/* 闪卡 */
.flashcard-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.flashcard {
  perspective: 1000px;
  height: 200px;
  cursor: pointer;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease);
  transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute;
  inset: 0;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  box-shadow: var(--sh-sm);
}
.flashcard-front { font-size: 16px; font-weight: 600; color: var(--c-text); }
.flashcard-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-purple-light));
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
}

/* 计算器 */
.calc-form {
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.calc-row {
  display: grid;
  grid-template-columns: 140px 1fr 100px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.calc-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
}
.calc-row input, .calc-row select {
  padding: 8px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color .2s var(--ease);
}
.calc-row input:focus, .calc-row select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}
.calc-result {
  background: linear-gradient(135deg, var(--c-success-light), #fff);
  border: 1px solid #B7EB8F;
  border-radius: var(--r-md);
  padding: 20px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.8;
}
.calc-result strong { color: var(--c-success); font-size: 18px; font-weight: 800; }

/* 错题本 / 笔记 / 进度看板 · 共用列表 */
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry-item {
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 16px 20px;
  transition: all .2s var(--ease);
  cursor: pointer;
}
.entry-item:hover { border-color: var(--c-primary); box-shadow: var(--sh-sm); }
.entry-meta { font-size: 11px; color: var(--c-text-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.entry-title { font-size: 15px; font-weight: 600; color: var(--c-text); margin-bottom: 6px; }
.entry-desc { font-size: 13px; color: var(--c-text-3); line-height: 1.6; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-3);
  background: var(--c-card);
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-text { font-size: 15px; margin-bottom: 8px; }
.empty-state-hint { font-size: 13px; color: var(--c-text-3); }

/* ==========================================================================
   章节详情页 · 知识点卡片网格（v4 卡片化）
   ========================================================================== */
.kp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
.kp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--c-card);
  border: 1px solid var(--c-border-soft);
  border-top: 3px solid var(--c-primary);
  border-radius: var(--r-md);
  padding: 18px 18px 16px;
  box-shadow: var(--sh-sm);
  transition: all .25s var(--ease);
}
.kp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--c-primary);
}
.kp-card.faved {
  border-top-color: var(--c-warning);
  background: linear-gradient(180deg, var(--c-warning-light), #fff 42%);
}
.kp-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  padding-right: 30px;
}
.kp-card-body {
  font-size: 13.5px;
  color: var(--c-text-2);
  line-height: 1.7;
}
.kp-points {
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kp-points li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.6;
}
.kp-points li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--c-primary);
  font-weight: 700;
}
/* 收藏按钮 */
.kp-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--c-text-3);
  cursor: pointer;
  border-radius: 50%;
  transition: all .2s var(--ease);
}
.kp-fav:hover { background: var(--c-warning-light); color: var(--c-warning); transform: scale(1.1); }
.kp-fav.active { color: #FAAD14; }
.kp-card.faved .kp-fav { color: #FAAD14; }

/* 数字标签 + 单位（5 特征 / 12 要素 / 7 步 / 3 基准） */
.kp-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.kp-tag-num {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 2px 9px 2px 8px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-purple-light));
  color: var(--c-primary-dark);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}
.kp-tag-num .kp-tag-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-2);
}

/* 警示卡片：橙顶 + 警示角标 */
.kp-card.warned {
  border-top-color: var(--c-warning);
  background: linear-gradient(180deg, var(--c-warning-light), #fff 32%);
}
.kp-card-warn {
  position: absolute;
  top: 12px;
  right: 46px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--c-danger-light);
  color: var(--c-danger);
  letter-spacing: 0.5px;
}

/* 对比块：A vs B */
.kp-card-pair {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 6px;
  align-items: center;
  margin: 4px 0 2px;
  padding: 8px 10px;
  background: var(--c-bg-soft);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--c-text-2);
}
.kp-pair-side {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.kp-pair-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.kp-pair-side:nth-child(3) .kp-pair-label {
  background: var(--c-accent);
}
.kp-pair-vs {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-3);
  font-family: var(--font-mono);
}

/* 区段标题样式（易错点 / 公式 / 配套资源） */
.h2-warn {
  border-left-color: var(--c-warning) !important;
  background: linear-gradient(90deg, var(--c-warning-light), transparent 60%);
  padding-left: 14px !important;
}
.h2-formula {
  border-left-color: var(--c-accent) !important;
  background: linear-gradient(90deg, var(--c-accent-light), transparent 60%);
  padding-left: 14px !important;
}
.h2-tip {
  border-left-color: var(--c-text-3) !important;
}

/* 我的收藏页 · 卡片 */
.kp-card-chapter {
  font-size: 11px;
  color: var(--c-text-3);
  font-weight: 600;
  font-family: var(--font-mono);
}
.kp-fav-remove {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--c-text-3);
  text-decoration: none;
  font-size: 14px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.kp-fav-remove:hover { background: var(--c-danger-light); color: var(--c-danger); }
.kp-card-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
}
.kp-card-link:hover { text-decoration: underline; }

/* 顶栏「我的收藏」 */
.nav-fav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--c-warning-light);
  color: #AD6800;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 12px;
  transition: all .2s var(--ease);
}
.nav-fav:hover { background: #FFE0B2; color: #AD6800; }
.nav-fav .fav-count {
  background: #AD6800;
  color: #fff;
  border-radius: var(--r-full);
  padding: 0 6px;
  font-size: 11px;
  min-width: 16px;
  text-align: center;
}