/* ============================================================
   PyVerse · Apple-style Python Learning Site
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000;
  --bg-soft: #0b0b10;
  --card-dark: #16161d;
  --card-dark-2: #1d1d26;
  --light: #f5f5f7;
  --text: #f5f5f7;
  --text-dim: #a1a1a6;
  --text-dark: #1d1d1f;
  --text-dark-dim: #6e6e73;
  --blue: #0071e3;
  --grad: linear-gradient(92deg, #6a5cff 0%, #00c2ff 60%, #30d158 110%);
  --radius: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, "JetBrains Mono", monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
code { font-family: var(--mono); background: rgba(0,113,227,.1); padding: 2px 7px; border-radius: 6px; font-size: .9em; }

::selection { background: rgba(106, 92, 255, .4); }

/* ============ 导航 ============ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .5s var(--ease), backdrop-filter .5s;
}
#nav.scrolled {
  background: rgba(10, 10, 14, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; height: 56px;
  display: flex; align-items: center; gap: 32px; padding: 0 22px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a { font-size: 13px; color: var(--text-dim); transition: color .25s; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--blue); padding: 7px 16px; border-radius: 980px;
  transition: transform .25s var(--ease), background .25s;
}
.nav-cta:hover { background: #0077ed; transform: scale(1.04); }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 150px 22px 90px; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #17142e 0%, #000 60%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; animation: float 14s ease-in-out infinite; }
.orb-a { width: 480px; height: 480px; background: #4a3aff; top: -140px; left: -120px; }
.orb-b { width: 420px; height: 420px; background: #0071e3; top: 20%; right: -160px; animation-delay: -5s; }
.orb-c { width: 340px; height: 340px; background: #00c2ff; bottom: -120px; left: 30%; opacity: .3; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-36px) scale(1.06); } }

.hero-content { text-align: center; position: relative; z-index: 2; }
.eyebrow {
  font-size: 15px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 22px;
}
.eyebrow.dark { color: var(--text-dark-dim); }
h1 {
  font-size: clamp(48px, 9vw, 104px); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.06; margin-bottom: 26px;
}
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(17px, 2.4vw, 21px); color: var(--text-dim); line-height: 1.7; margin-bottom: 40px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 15px 34px; border-radius: 980px;
  font-size: 17px; font-weight: 600; border: none; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .25s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 30px rgba(0,113,227,.4); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 44px rgba(0,113,227,.55); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.15); transform: translateY(-3px); }

/* 终端 */
.terminal {
  position: relative; z-index: 2; margin-top: 72px; width: min(680px, 92vw);
  background: rgba(20, 20, 28, .82); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(106,92,255,.15), 0 0 80px rgba(0,194,255,.08);
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.terminal-title { margin-left: 10px; font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.terminal-body {
  padding: 20px 22px; min-height: 168px; font-family: var(--mono);
  font-size: 14.5px; line-height: 1.85; color: #d8d8e2; white-space: pre-wrap; text-align: left;
}
.cursor { display: inline-block; width: 9px; height: 18px; background: #00c2ff; vertical-align: -3px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-stats {
  position: relative; z-index: 2; margin-top: 72px;
  display: flex; gap: clamp(28px, 6vw, 72px); flex-wrap: wrap; justify-content: center;
}
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 13px; color: var(--text-dim); }

/* ============ 宣言 ============ */
.statement {
  background: var(--light); color: var(--text-dark);
  padding: clamp(90px, 14vw, 160px) 22px; text-align: center;
}
.statement p { max-width: 920px; margin: 0 auto; font-size: clamp(22px, 3.6vw, 34px); font-weight: 700; line-height: 1.6; letter-spacing: -.01em; }
.statement .hl { color: var(--blue); }

/* ============ 通用区块 ============ */
.light-sec { background: var(--light); color: var(--text-dark); padding: clamp(80px, 11vw, 130px) 22px; }
.dark-sec { background: var(--bg); padding: clamp(80px, 11vw, 130px) 22px; }
.sec-head { text-align: center; max-width: 780px; margin: 0 auto 64px; }
.sec-head h2 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; letter-spacing: -.03em; margin: 10px 0 18px; }
.sec-sub { font-size: 17px; color: var(--text-dim); line-height: 1.7; }
.light-sec .sec-sub { color: var(--text-dark-dim); }

/* ============ 章节手风琴 ============ */
.chapter-list { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.chapter {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.05); transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.chapter:hover { box-shadow: 0 14px 44px rgba(0,0,0,.1); transform: translateY(-2px); }
.chapter-head {
  display: flex; align-items: center; gap: 18px; padding: 26px 28px; cursor: pointer; user-select: none;
}
.ch-icon {
  width: 54px; height: 54px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: linear-gradient(135deg, #eef2ff, #e0f4ff);
}
.ch-info { flex: 1; min-width: 0; }
.ch-info h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.ch-info p { font-size: 13.5px; color: var(--text-dark-dim); margin-top: 4px; }
.ch-meta { text-align: right; flex-shrink: 0; }
.ch-count { font-size: 13px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.ch-bar { width: 110px; height: 5px; background: #e8e8ed; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; width: 0%; transition: width .6s var(--ease); }
.ch-chev { font-size: 22px; color: #c7c7cc; transition: transform .45s var(--ease); flex-shrink: 0; font-weight: 300; }
.chapter.open .ch-chev { transform: rotate(45deg); }

.ch-body { max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
.chapter.open .ch-body { max-height: 3600px; }
.lesson-list { padding: 0 28px 24px; display: flex; flex-direction: column; }
.lesson {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px; padding: 13px 6px;
  border-top: 1px solid #f0f0f4; transition: background .2s; border-radius: 12px;
}
.lesson:hover { background: #fafafc; }
.check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  border: 2px solid #d2d2d7; background: #fff; position: relative; margin-top: 1px;
  transition: all .3s var(--ease);
}
.check:hover { border-color: var(--blue); transform: scale(1.12); }
.lesson.done .check { background: var(--grad); border-color: transparent; }
.lesson.done .check::after {
  content: ""; position: absolute; left: 8px; top: 4px;
  width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.lesson-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.lesson-text { flex: 1; min-width: 0; }
.lesson-text b { display: block; font-size: 15px; font-weight: 600; }
.lesson.done .lesson-text b { color: #8e8e93; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.lesson-text span { font-size: 13px; color: var(--text-dark-dim); }
.lesson-toggle { flex-shrink: 0; font-size: 12px; color: #c7c7cc; transition: transform .35s var(--ease); }
.lesson.expanded .lesson-toggle { transform: rotate(180deg); color: var(--blue); }
.lesson-detail {
  width: 100%; display: none; padding: 6px 4px 12px 42px;
}
.lesson.expanded .lesson-detail { display: block; animation: detailIn .4s var(--ease); }
@keyframes detailIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.lesson-detail ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.lesson-detail li {
  font-size: 13.5px; color: var(--text-dark-dim); line-height: 1.65;
  padding-left: 18px; position: relative;
}
.lesson-detail li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad);
}
.lesson-detail pre {
  background: #101018; border-radius: 14px; padding: 15px 18px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  color: #d8d8e6; overflow-x: auto; white-space: pre;
}
.lesson-detail pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

/* ============ 刷题区 ============ */
.ex-progress-strip { max-width: 880px; margin: 0 auto 40px; text-align: center; }
.ex-progress-strip span { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.strip-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 6px; margin-top: 12px; overflow: hidden; }
.strip-fill { height: 100%; width: 0%; background: var(--grad); border-radius: 6px; transition: width .8s var(--ease); }

.exercise-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 26px;
}
@media (max-width: 560px) { .exercise-grid { grid-template-columns: 1fr; } }

.ex-card {
  background: var(--card-dark); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.ex-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,.5); border-color: rgba(255,255,255,.16); }
.ex-card.solved { border-color: rgba(48,209,88,.45); }
.ex-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ex-no { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.diff { font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 980px; }
.diff.easy { background: rgba(48,209,88,.16); color: #30d158; }
.diff.mid { background: rgba(255,159,10,.16); color: #ff9f0a; }
.diff.hard { background: rgba(255,69,58,.16); color: #ff453a; }
.ex-chapter { font-size: 11.5px; color: var(--text-dim); background: rgba(255,255,255,.07); padding: 4px 11px; border-radius: 980px; }
.ex-solved-badge { margin-left: auto; font-size: 12px; font-weight: 700; color: #30d158; opacity: 0; transform: scale(.6); transition: all .4s var(--ease); }
.ex-card.solved .ex-solved-badge { opacity: 1; transform: scale(1); }

.ex-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.ex-desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 18px; }
.ex-desc code { color: #9ecfff; }

.ex-editor {
  width: 100%; min-height: 170px; resize: vertical; font-family: var(--mono); font-size: 13.5px;
  line-height: 1.75; background: #0d0d13; color: #e8e8f0; border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 16px 18px; outline: none; tab-size: 4;
  transition: border-color .25s, box-shadow .25s;
}
.ex-editor:focus { border-color: rgba(0,194,255,.5); box-shadow: 0 0 0 3px rgba(0,194,255,.12); }

.ex-actions { display: flex; gap: 10px; margin: 16px 0 0; flex-wrap: wrap; }
.ex-btn {
  font-family: var(--font); font-size: 14px; font-weight: 600; padding: 10px 22px;
  border-radius: 980px; border: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, opacity .25s;
}
.ex-btn:active { transform: scale(.96); }
.ex-run { background: var(--blue); color: #fff; }
.ex-run:hover:not(:disabled) { background: #0077ed; }
.ex-run:disabled { opacity: .55; cursor: wait; }
.ex-sol { background: rgba(255,255,255,.08); color: #d8d8e2; border: 1px solid rgba(255,255,255,.14); }
.ex-sol:hover { background: rgba(255,255,255,.14); }
.ex-mark { background: transparent; color: var(--text-dim); border: 1px solid rgba(255,255,255,.14); }
.ex-mark:hover { color: #fff; border-color: rgba(255,255,255,.35); }

.ex-output {
  margin-top: 16px; background: #0d0d13; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 18px; font-family: var(--mono); font-size: 13px;
  line-height: 1.7; color: #b9f6ca; white-space: pre-wrap; word-break: break-word;
  min-height: 20px; display: none;
}
.ex-output.show { display: block; }
.ex-output.err { color: #ff9b94; }
.ex-status { font-size: 13px; font-weight: 600; margin-top: 12px; min-height: 18px; }
.ex-status.ok { color: #30d158; }
.ex-status.bad { color: #ff9f0a; }
.ex-status.loading { color: #00c2ff; }

.ex-solution { display: none; margin-top: 14px; }
.ex-solution.show { display: block; }
.ex-solution pre {
  background: #101018; border: 1px dashed rgba(106,92,255,.4); border-radius: 14px;
  padding: 16px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.75;
  color: #cbb8ff; overflow-x: auto;
}
.ex-solution .sol-tag { font-size: 12px; font-weight: 700; color: #6a5cff; letter-spacing: .08em; }

/* ============ 项目实战:爬虫 ============ */
.project-sec { background: linear-gradient(180deg, var(--light) 0%, #eaf0fa 100%); }

.crawl-flow {
  max-width: 980px; margin: 0 auto 48px;
  display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.flow-item {
  background: #fff; border-radius: 20px; padding: 18px 26px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.05); min-width: 150px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.flow-item:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.1); }
.flow-ico { display: block; font-size: 26px; margin-bottom: 8px; }
.flow-item b { display: block; font-size: 15px; font-weight: 700; }
.flow-item span { font-size: 11.5px; color: var(--text-dark-dim); font-family: var(--mono); }
.flow-arrow { font-size: 22px; color: #c7c7cc; font-weight: 300; align-self: center; }

.steps-grid {
  max-width: 1080px; margin: 0 auto 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 22px;
}
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: #fff; border-radius: var(--radius); padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,.1); }
.step-no {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  color: var(--blue); background: rgba(0,113,227,.09);
  padding: 5px 13px; border-radius: 980px; margin-bottom: 14px;
}
.step-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.step-desc { font-size: 14px; color: var(--text-dark-dim); line-height: 1.75; margin-bottom: 14px; }
.step-desc code { color: var(--blue); }
.step-card pre {
  background: #101018; border-radius: 14px; padding: 15px 18px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  color: #d8d8e6; overflow-x: auto; white-space: pre;
}
.step-card pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.ethics-card {
  max-width: 880px; margin: 0 auto 48px;
  background: rgba(255,159,10,.08); border: 1px solid rgba(255,159,10,.3);
  border-radius: var(--radius); padding: 26px 32px;
}
.ethics-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.ethics-card p { font-size: 14px; color: var(--text-dark-dim); line-height: 1.8; }
.ethics-card code { color: #b26a00; }

.mock-browser {
  max-width: 880px; margin: 0 auto 44px;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
}
.mock-browser .terminal-bar { background: #f0f0f4; border-bottom: 1px solid #e4e4ea; }
.mock-browser .terminal-title { color: var(--text-dark-dim); }
.mock-tabs { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #f0f0f4; }
.mock-tab {
  font-family: var(--font); font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--text-dark-dim); background: transparent; border: 1px solid transparent;
  padding: 7px 14px; border-radius: 980px; transition: all .25s;
}
.mock-tab:hover { background: #f5f5f7; }
.mock-tab.active { color: var(--blue); background: rgba(0,113,227,.09); border-color: rgba(0,113,227,.2); }
.mock-pane { min-height: 200px; }
.mock-preview { padding: 24px 28px; background: #fff; color: var(--text-dark); }
.mock-preview h1 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 4px; color: var(--text-dark); }
.mock-preview .sub { font-size: 12.5px; color: var(--text-dark-dim); margin-bottom: 14px; }
.mock-preview ul { list-style: none; margin: 0; padding: 0; }
.mock-preview .book { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f0f4; }
.mock-preview h2 { font-size: 15px; font-weight: 600; margin: 0; color: var(--text-dark); flex: 1; }
.mock-preview .price { font-family: var(--mono); font-size: 13.5px; font-weight: 700; color: var(--blue); }
.mock-preview .rating { font-size: 12.5px; color: #ff9f0a; font-weight: 700; }
.mock-preview .update-time { font-size: 12px; color: var(--text-dark-dim); margin-top: 14px; }
.mock-source {
  display: none; margin: 0; padding: 20px 24px; background: #101018;
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: #9ecfff;
  overflow-x: auto; white-space: pre; max-height: 420px; overflow-y: auto;
}

.pt-strip { max-width: 880px; margin: 0 auto 40px; text-align: center; }
.pt-strip span { font-size: 14px; font-weight: 600; color: var(--text-dark-dim); }

.ptask-grid { max-width: 1080px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .ptask-grid { grid-template-columns: 1fr; } }
.pt-hintbox {
  display: none; margin-top: 14px; font-size: 13.5px; line-height: 1.8;
  color: #b26a00; background: rgba(255,159,10,.1); border: 1px dashed rgba(255,159,10,.45);
  border-radius: 14px; padding: 14px 18px;
}
.pt-hintbox.show { display: block; }
.pt-hintbox code { color: #b26a00; }

/* ============ 标准规范区 ============ */
.std-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px;
}
.std-card {
  background: #fff; border-radius: var(--radius); padding: 32px 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05); display: block;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.std-card:hover { transform: translateY(-6px); box-shadow: 0 22px 54px rgba(0,0,0,.12); }
.std-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--blue); background: rgba(0,113,227,.09); padding: 5px 13px; border-radius: 980px; margin-bottom: 16px;
}
.std-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.std-card p { font-size: 14px; color: var(--text-dark-dim); line-height: 1.75; }
.std-card p code { color: var(--blue); }

.tool-strip, .res-strip { max-width: 1080px; margin: 56px auto 0; text-align: center; }
.tool-strip h3, .res-strip h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 24px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  background: #fff; border: 1px solid #e4e4ea; padding: 11px 20px; border-radius: 980px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04); transition: transform .3s var(--ease), box-shadow .3s;
}
.chip:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.09); }
.res-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.res-links a {
  font-size: 15px; font-weight: 600; color: var(--blue);
  background: rgba(0,113,227,.07); padding: 13px 24px; border-radius: 980px;
  transition: background .25s, transform .3s var(--ease);
}
.res-links a:hover { background: rgba(0,113,227,.14); transform: translateY(-3px); }

/* ============ 进度看板 ============ */
.dash-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 380px 1fr; gap: 26px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.ring-card, .bars-card {
  background: var(--card-dark); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 36px;
}
.ring-card { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.ring-wrap { position: relative; width: 220px; height: 220px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 12; }
.ring-fg {
  fill: none; stroke: url(#ringGrad); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 364.42; stroke-dashoffset: 364.42;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label b { font-size: 46px; font-weight: 800; letter-spacing: -.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ring-label span { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.ring-meta { display: flex; gap: 30px; }
.ring-meta div { text-align: center; }
.ring-meta b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-meta span { font-size: 12px; color: var(--text-dim); }

.bars-card h3 { font-size: 21px; font-weight: 700; margin-bottom: 24px; letter-spacing: -.01em; }
.chapter-bars { display: flex; flex-direction: column; gap: 15px; }
.cbar-row { display: grid; grid-template-columns: 150px 1fr 52px; align-items: center; gap: 14px; }
.cbar-name { font-size: 13.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbar-track { height: 7px; background: rgba(255,255,255,.08); border-radius: 6px; overflow: hidden; }
.cbar-fill { height: 100%; width: 0%; background: var(--grad); border-radius: 6px; transition: width .9s var(--ease); }
.cbar-num { font-size: 12.5px; font-weight: 700; color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }
.reset-btn {
  margin-top: 30px; font-family: var(--font); font-size: 13px; font-weight: 600;
  color: #ff6961; background: transparent; border: 1px solid rgba(255,105,97,.35);
  padding: 9px 20px; border-radius: 980px; cursor: pointer; transition: background .25s;
}
.reset-btn:hover { background: rgba(255,105,97,.12); }

/* ============ Footer ============ */
footer { background: #050508; border-top: 1px solid rgba(255,255,255,.07); padding: 56px 22px; }
.foot-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.foot-brand { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
footer p { font-size: 12.5px; color: #6e6e73; line-height: 2; }

/* ============ 滚动入场动画 ============ */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ 响应式 ============ */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .chapter-head { padding: 20px; gap: 12px; }
  .ch-icon { width: 44px; height: 44px; font-size: 21px; }
  .ch-meta { display: none; }
  .cbar-row { grid-template-columns: 96px 1fr 46px; }
  .ring-meta { gap: 18px; }
}
