:root {
  --ink: #172338;
  --muted: #64748b;
  --paper: #f7f9fc;
  --card: rgba(255,255,255,.92);
  --line: #e4e9f2;
  --blue: #3767f5;
  --blue-2: #eaf0ff;
  --mint: #15a889;
  --coral: #ff765d;
  --yellow: #ffc857;
  --shadow: 0 18px 50px rgba(35, 56, 102, .10);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell { max-width: 1260px; margin: 0 auto; padding: 0 24px; }
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); background: rgba(247,249,252,.85); border-bottom: 1px solid rgba(228,233,242,.85); }
.topbar-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #3767f5, #7d5cff); color: white; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(55,103,245,.25); }
.nav { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.nav a { padding: 8px 11px; border-radius: 10px; }
.nav a:hover { background: var(--blue-2); color: var(--blue); }
.progress-pill { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 7px 12px; font-size: 12px; color: var(--muted); }

.hero { position: relative; overflow: hidden; padding: 72px 0 46px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.hero::before { width: 380px; height: 380px; background: rgba(55,103,245,.13); right: -90px; top: -130px; }
.hero::after { width: 250px; height: 250px; background: rgba(21,168,137,.12); left: -110px; bottom: -90px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 36px; align-items: end; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--blue); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--blue); }
h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1.03; letter-spacing: -.06em; margin: 18px 0 20px; max-width: 800px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 690px; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { border: 0; border-radius: 13px; padding: 11px 16px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: white; box-shadow: 0 10px 25px rgba(23,35,56,.18); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(23,35,56,.24); }
.btn-soft { background: white; border: 1px solid var(--line); color: var(--ink); }
.stat-card { background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.stat-card h2 { margin: 0; font-size: 52px; line-height: 1; letter-spacing: -.06em; }
.stat-card p { margin: 8px 0 18px; font-size: 13px; color: var(--muted); }
.mini-progress { height: 9px; background: #e9eef7; border-radius: 99px; overflow: hidden; }
.mini-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #7d5cff); border-radius: inherit; transition: width .4s; }
.stat-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 10px; }

.section { padding: 44px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 29px; letter-spacing: -.04em; }
.section-head p { margin: 4px 0 0; color: var(--muted); max-width: 650px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { flex: 1 1 240px; min-width: 180px; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 12px 14px; color: var(--ink); outline: none; }
.search:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(55,103,245,.10); }
.chip { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 9px 12px; color: var(--muted); font-size: 13px; }
.chip.active, .chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-2); }
.lesson-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lesson-card { position: relative; display: flex; flex-direction: column; min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px; box-shadow: 0 8px 22px rgba(35,56,102,.045); transition: transform .2s, box-shadow .2s, border-color .2s; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #ced8f6; }
.lesson-card.done { border-color: #a7dfce; background: linear-gradient(150deg, #fff, #f1fbf7); }
.lesson-card.done::after { content: "✓ 已完成"; position: absolute; top: 16px; right: 14px; color: var(--mint); font-size: 11px; font-weight: 800; }
.lesson-no { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.lesson-card h3 { font-size: 18px; line-height: 1.25; margin: 8px 0 8px; letter-spacing: -.02em; }
.lesson-card p { color: var(--muted); font-size: 13px; margin: 0; }
.lesson-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.tag { background: #f2f5fa; color: #526178; border-radius: 8px; padding: 4px 7px; font-size: 11px; }
.open-link { color: var(--blue); font-size: 13px; font-weight: 750; margin-top: 13px; }

.framework-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.framework-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.framework-card .icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-2); color: var(--blue); font-weight: 800; margin-bottom: 14px; }
.framework-card h3 { margin: 0 0 6px; font-size: 17px; }
.framework-card p { margin: 0; color: var(--muted); font-size: 13px; }

.callout { border-radius: var(--radius); padding: 24px; background: linear-gradient(135deg, #172338, #28395a); color: white; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.callout h2 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.03em; }
.callout p { color: #cad4e9; margin: 0; max-width: 650px; font-size: 14px; }
.callout .btn { background: #fff; color: var(--ink); white-space: nowrap; }

footer { padding: 24px 0 56px; color: var(--muted); font-size: 12px; }

/* lesson pages */
.lesson-hero { padding: 42px 0 26px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.lesson-hero h1 { font-size: clamp(36px, 5vw, 60px); max-width: 900px; margin: 0 0 13px; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.lesson-main, .lesson-side { display: grid; gap: 16px; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 22px rgba(35,56,102,.045); }
.panel h2 { margin: 0 0 14px; font-size: 21px; letter-spacing: -.03em; }
.panel h3 { margin: 20px 0 8px; font-size: 16px; }
.panel p, .panel li { color: #526178; font-size: 14px; }
.panel ul, .panel ol { padding-left: 21px; }
.project { padding: 0; overflow: hidden; }
.project-head { padding: 20px 22px; background: linear-gradient(135deg, #edf2ff, #effbf8); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.project-head h2 { margin: 0 0 5px; }
.project-head p { margin: 0; color: var(--muted); font-size: 13px; }
.project-body { padding: 22px; }
.prompt-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.prompt-tab { border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); padding: 7px 10px; font-size: 12px; font-weight: 750; }
.prompt-tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.prompt-copy { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.prompt-text { background: #f5f7fb; border: 1px solid var(--line); border-radius: 13px; padding: 13px; color: #34435d; font-size: 13px; white-space: pre-wrap; }
.copy-btn { border: 1px solid var(--line); background: white; border-radius: 9px; padding: 8px 10px; color: var(--muted); font-size: 12px; }
.copy-btn:hover { color: var(--blue); border-color: var(--blue); }
.version-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.workbench { display: grid; gap: 14px; margin-top: 17px; }
.workbench label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.workbench input, .workbench select, .workbench textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; outline: none; background: white; }
.workbench input:focus, .workbench select:focus, .workbench textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(55,103,245,.1); }
.result { border-radius: 12px; padding: 12px; background: #f4fbf8; border: 1px solid #cfeee2; color: #146d59; font-size: 13px; min-height: 42px; }
.code-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.code-pill { padding: 9px 10px; background: #f5f7fb; border-radius: 10px; color: #45536a; font-size: 12px; }
.rubric { width: 100%; border-collapse: collapse; font-size: 12px; }
.rubric th, .rubric td { text-align: left; vertical-align: top; padding: 9px 6px; border-bottom: 1px solid var(--line); color: #526178; }
.rubric th { color: var(--ink); font-weight: 800; }
.checklist { display: grid; gap: 8px; }
.check { display: flex; gap: 9px; align-items: start; color: #526178; font-size: 13px; }
.check input { accent-color: var(--mint); margin-top: 4px; }
.sticky-card { position: sticky; top: 88px; }
.score { display: flex; align-items: baseline; gap: 8px; }
.score strong { font-size: 40px; letter-spacing: -.06em; }
.score span { color: var(--muted); font-size: 12px; }

@media (max-width: 1020px) {
  .lesson-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { padding: 0 16px; }
  .nav { display: none; }
  .hero { padding-top: 48px; }
  .lesson-grid, .framework-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .callout { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
  h1 { font-size: 42px; }
  .lesson-grid, .framework-grid { grid-template-columns: 1fr; }
  .project-head { flex-direction: column; }
  .prompt-copy { grid-template-columns: 1fr; }
  .code-map { grid-template-columns: 1fr; }
}
