:root {
  --ink: #1f2328;
  --muted: #636c76;
  --line: #d0d7de;
  --paper: #f6f8fa;
  --panel: #ffffff;
  --blue: #0969da;
  --green: #1a7f37;
  --orange: #9a6700;
  --red: #cf222e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero,
.direction-panel,
.theme-nav,
.theme {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero {
  min-height: 230px;
  padding: 28px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(120deg, rgba(9, 105, 218, 0.92), rgba(26, 127, 55, 0.86) 58%, rgba(31, 35, 40, 0.92)),
    url("data:image/svg+xml,%3Csvg width='1100' height='360' viewBox='0 0 1100 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,.18)' stroke-width='2'%3E%3Cpath d='M70 270h960M70 210h960M70 150h960M70 90h960'/%3E%3Cpath d='M180 60v230M360 60v230M540 60v230M720 60v230M900 60v230'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.7;
}

.direction-panel {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.statement h2,
.avoid h2,
.theme h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.statement-grid {
  display: grid;
  gap: 12px;
}

.statement-grid section,
.avoid {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.statement-grid h3 {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 17px;
}

.statement-grid p,
.avoid p,
.module p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.avoid {
  border-color: rgba(207, 34, 46, 0.28);
  background: #fff8f8;
}

.avoid h2 {
  color: var(--red);
}

.avoid ul {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.9;
}

.theme-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-top: 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-nav a {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  background: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.theme-nav a:hover {
  border-color: var(--blue);
  background: #eef6ff;
}

.themes {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.theme {
  padding: 18px;
}

.theme > header {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.theme > header span {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.theme:nth-child(2) > header span {
  background: var(--green);
}

.theme:nth-child(3) > header span {
  background: var(--orange);
}

.theme > header h2 {
  margin-bottom: 0;
}

.learning-path {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(9, 105, 218, 0.2);
  border-radius: 8px;
  background: #f6faff;
}

.learning-path h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.learning-path p,
.learning-path li {
  color: var(--muted);
  line-height: 1.75;
}

.learning-path ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.module h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.module-link {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: border-color 160ms ease, transform 160ms ease;
}

.module-link:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.module-link span {
  margin-top: 12px;
  color: var(--blue);
  font-weight: 700;
  display: inline-block;
}

.lesson-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.lesson-hero,
.lesson-content,
.note-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.lesson-hero {
  min-height: 230px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(31, 35, 40, 0.94), rgba(9, 105, 218, 0.88) 58%, rgba(26, 127, 55, 0.86)),
    url("data:image/svg+xml,%3Csvg width='1100' height='360' viewBox='0 0 1100 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,.18)' stroke-width='2'%3E%3Cpath d='M90 270h900M90 210h900M90 150h900M90 90h900'/%3E%3Cpath d='M180 60v230M380 60v230M580 60v230M780 60v230'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  display: grid;
  align-content: end;
  gap: 28px;
}

.back-link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.lesson-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.lesson-content {
  padding: 18px;
}

.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chapter-nav a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: #f6f8fa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.chapter {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.chapter:last-child {
  border-bottom: 0;
}

.chapter h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.chapter p,
.chapter li {
  color: var(--muted);
  line-height: 1.8;
}

.chapter ul,
.chapter ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

pre {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
  color: #e6edf3;
  overflow-x: auto;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.practice-box,
.interview-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.practice-box {
  background: #f0fff4;
  border-color: rgba(26, 127, 55, 0.28);
}

.interview-box {
  background: #fff8e6;
  border-color: rgba(154, 103, 0, 0.28);
}

.practice-box strong {
  color: var(--green);
}

.interview-box strong {
  color: var(--orange);
}

.practice-box p,
.interview-box p {
  margin: 6px 0 0;
}

.note-panel {
  position: sticky;
  top: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.note-panel header {
  display: grid;
  gap: 4px;
}

.note-panel h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.note-panel span,
.note-panel p {
  color: var(--muted);
  font-size: 13px;
}

.note-panel textarea {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
}

.note-panel textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(9, 105, 218, 0.14);
}

.note-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.note-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.note-actions button:first-child {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

@media (max-width: 900px) {
  .direction-panel,
  .module-list,
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .note-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .page,
  .lesson-page {
    width: min(100% - 20px, 720px);
    padding: 10px 0 24px;
  }

  .hero,
  .lesson-hero {
    min-height: 220px;
    padding: 20px;
  }

  .direction-panel,
  .theme {
    padding: 12px;
  }

  .theme-nav {
    position: static;
    grid-template-columns: 1fr;
  }

  .lesson-content {
    padding: 12px;
  }

  .chapter-nav {
    position: static;
  }

  .note-panel textarea {
    min-height: 260px;
  }
}
