@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --bg: #f6f5f0;
  --surface: #fffdf8;
  --surface-soft: #edf3ef;
  --ink: #14232c;
  --muted: #68777c;
  --line: #d7dfdb;
  --teal: #137d71;
  --teal-dark: #0b4e49;
  --coral: #df704f;
  --sky: #3e78b3;
  --navy: #102a32;
  --content: 1180px;
  --inset: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, 'Noto Sans SC', sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { touch-action: manipulation; }
.shell { width: min(var(--content), calc(100% - (var(--inset) * 2))); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(215, 223, 219, .92);
  background: rgba(246, 245, 240, .9);
  backdrop-filter: blur(14px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; background: var(--navy); font: 700 13px 'DM Mono'; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.breadcrumb { color: var(--muted); font: 500 12px 'DM Mono'; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(250px, .78fr);
  align-items: end;
  gap: 64px;
  padding: 82px 0 66px;
}
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--teal); font: 500 12px 'DM Mono'; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--coral); }
h1 { max-width: 820px; margin: 18px 0 20px; font-size: clamp(2.5rem, 5.5vw, 5.2rem); font-weight: 800; line-height: 1.07; }
h2 { margin: 0 0 13px; font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.2; }
.lead { max-width: 720px; margin: 0; color: #43575e; font-size: 1.08rem; }
.hero-note { padding: 12px 0 12px 24px; border-left: 3px solid var(--coral); color: #506269; }
.hero-note strong, .hero-note span { display: block; }
.hero-note strong { margin-bottom: 8px; color: var(--ink); font-size: 1.06rem; }
.hero-note span { max-width: 340px; }

.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-kicker { margin-bottom: 7px; color: var(--teal); font: 500 11px 'DM Mono'; letter-spacing: .1em; text-transform: uppercase; }
.section-sub { max-width: 760px; margin: -8px 0 22px; color: var(--muted); font-size: .91rem; }

.lab { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 42px; }
.lab-copy { max-width: 420px; }
.lab-copy p { margin: 0; color: var(--muted); }
.lab-label { margin-bottom: 9px; color: var(--coral); font: 500 11px 'DM Mono'; letter-spacing: .1em; text-transform: uppercase; }
.principles { display: grid; gap: 9px; margin: 22px 0 0; padding: 0; list-style: none; }
.principles li { display: grid; grid-template-columns: 20px 1fr; gap: 9px; color: #3e555b; font-size: .9rem; }
.principles li::before { content: '—'; color: var(--coral); font-weight: 800; }
.lab-panel { min-width: 0; padding: 25px 27px 23px; border-radius: 10px; color: #f3faf7; background: var(--navy); }
.lab-panel::before { content: 'LIVE TRACE'; display: block; margin-bottom: 12px; color: #85b4ab; font: 500 10px 'DM Mono'; letter-spacing: .13em; }
.flow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-height: 126px; padding: 8px 0 0; }
.flow::before { content: ''; position: absolute; top: 55px; right: 7%; left: 7%; height: 2px; background: #36535a; }
.flow-node { position: relative; z-index: 1; display: flex; min-width: 0; min-height: 104px; padding: 4px 4px 0; border: 0; color: #aec8c2; background: transparent; cursor: pointer; flex-direction: column; align-items: center; text-align: center; transition: color .22s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
.flow-node i { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border: 2px solid #55736f; border-radius: 50%; color: #b9d7d1; background: var(--navy); font: 500 12px 'DM Mono'; font-style: normal; transition: color .22s ease, background .22s ease, border-color .22s ease, box-shadow .35s ease; }
.flow-node span { max-width: 130px; font-size: .78rem; line-height: 1.4; }
.flow-node:hover, .flow-node:focus-visible { color: #fff; }
.flow-node.done { color: #d5e9e3; }
.flow-node.done i { border-color: #62bbaa; color: #07231f; background: #76d1c0; }
.flow-node.active { color: #fff; transform: translateY(-7px); }
.flow-node.active i { border-color: #f4b18d; color: #fff; background: var(--coral); box-shadow: 0 0 0 7px rgba(223, 112, 79, .16); }
.flow-signal { position: absolute; top: 0; left: 0; z-index: 2; width: 14px; height: 14px; border: 2px solid var(--navy); border-radius: 50%; background: #f4b18d; box-shadow: 0 0 0 5px rgba(244, 177, 141, .18); opacity: 0; pointer-events: none; transform: translate(0, 0); transition: transform .48s cubic-bezier(.2, .85, .25, 1), opacity .2s ease; }
.flow-signal.on { opacity: 1; }
.flow-progress { height: 4px; margin: 3px 0 0; overflow: hidden; border-radius: 99px; background: #2a464d; }
.flow-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .45s ease; }
.flow-status { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 31px; margin: 8px 0 10px; color: #8eaea8; font: 500 11px 'DM Mono'; }
.flow-status strong { min-width: 0; overflow: hidden; color: #e6f2ee; font: 500 12px Manrope, 'Noto Sans SC', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.animation-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.play, .control-btn { min-height: 42px; border-radius: 7px; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease; }
.play { padding: 8px 14px; border: 0; color: #fff; background: var(--coral); font-weight: 800; }
.play:hover, .play:focus-visible { transform: translateY(-1px); filter: brightness(1.05); }
.control-btn { padding: 8px 12px; border: 1px solid #47656a; color: #d3e7e2; background: transparent; }
.control-btn:hover, .control-btn:focus-visible { border-color: #9ad7cb; color: #fff; background: #1b3a40; }
.control-btn:disabled { opacity: .4; cursor: not-allowed; }
.speed-control { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: #9ab8b2; font-size: 11px; }
.speed-control input { width: 92px; accent-color: var(--coral); }

.knowledge-section { scroll-margin-top: 70px; }
.knowledge-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font: 500 11px 'DM Mono'; }
.knowledge-meta span { padding-right: 10px; border-right: 1px solid var(--line); }
.knowledge-meta span:last-child { padding-right: 0; border-right: 0; }
.knowledge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.knowledge-toolbar p { max-width: 780px; margin: 0; color: var(--muted); font-size: .9rem; }
.text-control { color: var(--teal-dark); background: transparent; }
.knowledge-list-wrap { border-top: 1px solid var(--line); }
.knowledge-item { border-bottom: 1px solid var(--line); }
.knowledge-item summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) 28px; align-items: center; gap: 13px; min-height: 68px; padding: 12px 0; cursor: pointer; list-style: none; }
.knowledge-item summary::-webkit-details-marker { display: none; }
.knowledge-index { color: var(--teal); font: 500 13px 'DM Mono'; }
.knowledge-title { min-width: 0; }
.knowledge-title strong, .knowledge-title small { display: block; }
.knowledge-title strong { font-size: .97rem; }
.knowledge-title small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-chevron { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: var(--muted); background: var(--surface-soft); transition: color .2s ease, background .2s ease, transform .2s ease; }
.knowledge-item[open] .knowledge-chevron { color: #fff; background: var(--teal); transform: rotate(180deg); }
.knowledge-body { max-width: 900px; padding: 0 0 24px 55px; color: #43575e; }
.knowledge-body p { margin: 14px 0 0; font-size: .92rem; }
.knowledge-body strong { color: var(--ink); }
.knowledge-body a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.knowledge-body code { padding: 2px 5px; border-radius: 4px; color: var(--teal-dark); background: var(--surface-soft); font: 500 .84em 'DM Mono'; }
.knowledge-code { overflow-x: auto; margin: 15px 0 0; padding: 15px; border-left: 3px solid var(--teal); color: #d8ece7; background: #122b31; font: 12px/1.65 'DM Mono'; }
.knowledge-list { margin: 14px 0 0; padding-left: 21px; }
.knowledge-list li + li { margin-top: 5px; }
.knowledge-quote { margin: 15px 0 0; padding: 12px 14px; border-left: 3px solid var(--coral); color: #53666b; background: var(--surface-soft); }
.knowledge-rule { margin: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
.knowledge-table-wrap { overflow-x: auto; margin-top: 15px; }
.knowledge-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .84rem; }
.knowledge-table th, .knowledge-table td { padding: 9px 10px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.knowledge-table th { color: var(--ink); background: var(--surface-soft); font-weight: 800; }
/* 微信外链因防盗链无法正常显示，暂不在页面渲染；获得授权后删除此条即可恢复 */
.knowledge-image { display: none; }
.knowledge-image { margin: 17px 0 0; }
.knowledge-image img { display: block; max-width: 100%; max-height: 340px; margin: 0 auto; border-radius: 6px; object-fit: contain; }
.knowledge-image figcaption { margin-top: 6px; color: var(--muted); font-size: .76rem; text-align: center; }

.qa-experience { max-width: 860px; padding: 24px 0 3px; border-top: 2px solid var(--ink); }
.qa-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.qa-head .section-kicker { margin-bottom: 0; }
.qa-progress, .qa-score { color: var(--muted); font: 500 12px 'DM Mono'; }
.qa-score strong { color: var(--teal); }
.qa-question { margin-top: 20px; }
.qa-q { max-width: 780px; margin: 0 0 16px; font-size: 1.08rem; font-weight: 800; line-height: 1.55; }
.qa-options { display: grid; gap: 8px; }
.qa-options button { display: flex; align-items: flex-start; gap: 12px; min-height: 50px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface); cursor: pointer; text-align: left; line-height: 1.5; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.qa-options button::before { content: attr(data-opt); display: grid; flex: 0 0 26px; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--teal); background: var(--surface-soft); font: 600 11px 'DM Mono'; }
.qa-options button:hover:not(:disabled), .qa-options button:focus-visible { border-color: var(--teal); background: #f5fbf8; transform: translateX(3px); }
.qa-options button:disabled { cursor: default; }
.qa-options button.correct { border-color: #43aa8e; background: #eff9f5; }
.qa-options button.correct::before { color: #fff; background: #43aa8e; }
.qa-options button.wrong { border-color: var(--coral); background: #fff4ef; }
.qa-options button.wrong::before { color: #fff; background: var(--coral); }
.qa-feedback { display: none; margin-top: 16px; padding: 13px 15px; border-left: 3px solid var(--teal); color: #375b55; background: var(--surface-soft); font-size: .9rem; line-height: 1.65; }
.qa-feedback.show { display: block; }
.qa-feedback.bad { border-left-color: var(--coral); color: #704438; background: #fff1eb; }
.qa-feedback strong { display: block; margin-bottom: 3px; color: inherit; }
.quiz-next { min-height: 43px; margin-top: 18px; padding: 8px 15px; border: 0; border-radius: 7px; color: #fff; background: var(--teal); cursor: pointer; font-weight: 800; transition: filter .18s ease, transform .18s ease, opacity .18s ease; }
.quiz-next:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
.quiz-next:disabled { opacity: .42; cursor: not-allowed; }

.pager { display: flex; justify-content: space-between; gap: 14px; padding: 27px 0 48px; }
.pager a { max-width: 48%; padding: 8px 0; color: var(--teal-dark); font-size: .88rem; }
.pager a:hover, .pager a:focus-visible { color: var(--coral); }
.pager small { color: var(--muted); }
.pager .next { margin-left: auto; text-align: right; }
.footer { display: flex; justify-content: space-between; gap: 15px; padding: 21px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

.overview-hero { max-width: 900px; padding: 80px 0 35px; }
.overview-hero h1 { max-width: 900px; }
.coverage-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px; margin-top: 23px; color: var(--muted); font: 500 12px 'DM Mono'; }
.coverage-strip strong { color: var(--teal); font: 800 1.2rem Manrope, 'Noto Sans SC', sans-serif; }
.route-bar { display: flex; align-items: center; gap: 12px; margin: 18px 0 30px; }
.route-bar input { flex: 1; min-height: 47px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink); background: var(--surface); }
.route-bar input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19, 125, 113, .12); }
.route-bar small { color: var(--muted); white-space: nowrap; }
.chapter-list { border-top: 1px solid var(--line); }
.chapter-link { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 88px; padding: 15px 0; border-bottom: 1px solid var(--line); transition: padding .18s ease, background .18s ease; }
.chapter-link:hover, .chapter-link:focus-visible { padding-right: 10px; padding-left: 10px; background: var(--surface-soft); }
.chapter-num { color: var(--teal); font: 500 16px 'DM Mono'; }
.chapter-link strong { display: block; font-size: .96rem; }
.chapter-link span span { display: block; margin-top: 3px; color: var(--muted); font-size: .79rem; }
.chapter-arrow { color: var(--coral); font-size: 18px; }
.roadmap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 28px 0 8px; border-top: 2px solid var(--line); }
.road-step { min-height: 78px; padding: 12px 10px 0 0; border-top: 2px solid var(--teal); color: var(--muted); font-size: .77rem; }
.road-step:nth-child(5n + 2) { border-color: var(--sky); }
.road-step:nth-child(5n + 3) { border-color: var(--coral); }
.road-step:nth-child(5n + 4) { border-color: #7e6aae; }
.road-step:nth-child(5n + 5) { border-color: #4d9a9a; }
.road-step b { display: block; margin-bottom: 4px; color: var(--ink); font-size: .82rem; }
.hidden { display: none !important; }

body.dark { --bg: #0d191b; --surface: #142527; --surface-soft: #193536; --ink: #e8f0ed; --muted: #9db0ad; --line: #2b4645; --teal: #63c8b8; --teal-dark: #9ce2d5; --navy: #071619; }
body.dark .topbar { border-color: rgba(43, 70, 69, .9); background: rgba(13, 25, 27, .9); }
body.dark .lead, body.dark .hero-note span, body.dark .knowledge-body { color: #bdd0ca; }
body.dark .route-bar input, body.dark .chapter-link, body.dark .qa-options button { background: var(--surface); }
body.dark .qa-options button:hover:not(:disabled), body.dark .qa-options button:focus-visible { background: #1b3b3b; }
body.dark .qa-options button.correct { background: #173b34; }
body.dark .qa-options button.wrong { background: #3a251e; }
body.dark .qa-feedback { color: #bde0d6; background: #173635; }
body.dark .qa-feedback.bad { color: #f2c2b1; background: #3a251e; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; }
  .hero-note { max-width: 600px; }
  .lab { grid-template-columns: 1fr; gap: 26px; }
  .lab-copy { max-width: 720px; }
  .roadmap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  :root { --inset: 17px; }
  .topbar-inner { min-height: 60px; }
  .breadcrumb { display: none; }
  h1 { font-size: 2.45rem; }
  .hero { padding: 46px 0 42px; }
  .section { padding: 35px 0; }
  .section-head { display: block; }
  .section-head .breadcrumb { display: block; margin-top: 7px; }
  .flow { grid-template-columns: 1fr; gap: 0; min-height: 0; padding: 0 0 4px; }
  .flow::before { top: 18px; bottom: 18px; left: 18px; width: 2px; height: auto; }
  .flow-node { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 58px; padding: 4px 0; text-align: left; }
  .flow-node i { margin: 0; }
  .flow-node span { max-width: none; }
  .flow-node.active { transform: translateX(5px); }
  .flow-signal { top: 0; }
  .knowledge-item summary { grid-template-columns: 34px minmax(0, 1fr) 27px; }
  .knowledge-body { padding-left: 47px; }
  .knowledge-title small { white-space: normal; }
  .knowledge-meta { margin-top: 9px; }
  .knowledge-toolbar { align-items: flex-start; flex-direction: column; }
  .animation-controls { gap: 6px; }
  .speed-control { width: 100%; }
  .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road-step { min-height: 72px; }
  .chapter-link { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 14px 0; }
  .chapter-link:hover, .chapter-link:focus-visible { padding-right: 7px; padding-left: 7px; }
  .pager { display: block; }
  .pager a { display: block; max-width: none; }
  .pager .next { margin-top: 12px; text-align: left; }
  .footer { display: block; }
  .footer span { display: block; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
