/* 内容源：路线图.md。只改展示，不改文案。 */

:root {
  --bg: #090b10;
  --bg-soft: #10141c;
  --bg-elev: #161b26;
  --bg-card: rgba(22, 27, 38, 0.72);
  --text: #e8ecf1;
  --text-muted: #9aa3b0;
  --line: rgba(232, 236, 241, 0.12);
  --line-strong: rgba(232, 236, 241, 0.22);
  --cyan: #3ee0c9;
  --cyan-dim: rgba(62, 224, 201, 0.16);
  --amber: #e8b86d;
  --amber-dim: rgba(232, 184, 109, 0.16);
  --violet: #c4a6ff;
  --gold: #c9d0d8;
  --gold-dim: rgba(201, 208, 216, 0.16);
  --gold-fill: color-mix(in srgb, var(--bg-elev) 70%, #c9d0d8 30%);
  --gold-glow: rgba(62, 224, 201, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "Sarasa Mono SC", ui-monospace, Consolas, monospace;
  --radius: 12px;
  --nav-h: 64px;
  --sidebar-w: 208px;
  --rail-w: 52px;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #eef1f4;
  --bg-soft: #f5f7f9;
  --bg-elev: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --text: #1a2230;
  --text-muted: #5c6878;
  --line: rgba(26, 34, 48, 0.1);
  --line-strong: rgba(26, 34, 48, 0.18);
  --cyan: #0f8f82;
  --cyan-dim: rgba(15, 143, 130, 0.12);
  --amber: #c05621;
  --amber-dim: rgba(192, 86, 33, 0.12);
  --violet: #6d4cb0;
  --gold: #6b7c90;
  --gold-dim: rgba(107, 124, 144, 0.14);
  --gold-fill: #dfe6ee;
  --gold-glow: rgba(15, 143, 130, 0.16);
  --shadow: 0 18px 40px rgba(20, 32, 48, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

body {
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(62, 224, 201, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 166, 255, 0.08), transparent 50%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.skip {
  position: absolute;
  left: calc(var(--sidebar-w) + 12px);
  top: -40px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

.progress-rail {
  position: fixed;
  left: var(--sidebar-w);
  top: 0;
  z-index: 40;
  width: 3px;
  height: 100vh;
  background: var(--line);
}

.progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--cyan), var(--amber), var(--gold));
  transform-origin: top;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px 18px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 0 8px;
}

.toc {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: auto;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  padding: 7px 10px;
  border-radius: 12px;
}

.toc-num {
  flex: none;
  width: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
}

.toc a[data-track="side"] .toc-num {
  color: var(--amber);
}

.toc a:hover,
.toc a.is-active {
  color: var(--text);
  background: var(--cyan-dim);
}

.toc a[data-track="side"].is-active {
  background: var(--amber-dim);
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.icon-btn:hover {
  border-color: var(--cyan);
}

main {
  position: relative;
  z-index: 1;
  margin-left: var(--sidebar-w);
  padding-bottom: 80px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: 48px 0 28px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
}

.hero h1 {
  margin: 18px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  animation: rise 0.9s var(--ease) both;
}

.lede {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  color: var(--text-muted);
  animation: rise 0.9s var(--ease) 0.08s both;
}

.lede::after {
  content: "";
  display: block;
  width: 120px;
  height: 2px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform-origin: left;
  animation: draw 1.1s var(--ease) 0.2s both;
}

.intro {
  max-width: 54rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  animation: rise 0.9s var(--ease) 0.16s both;
}

#outcome-fde {
  white-space: nowrap;
}

.intro strong {
  color: var(--text);
  font-weight: 650;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 36px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 28px;
  height: 3px;
  border-radius: 99px;
}

.swatch.main { background: var(--cyan); }
.swatch.side { background: var(--amber); }
.swatch.goal { background: var(--gold); }

.overview {
  padding: 8px 0 32px;
}

.overview h2,
.station h2,
.appendix h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 12px;
}

.stem {
  --stem-w: min(var(--map-frame-width, 1200px), calc(100vw - var(--sidebar-w) - 48px));
  width: var(--stem-w);
  margin-top: 8px;
  margin-left: calc(50% - var(--stem-w) / 2);
}

.stem-figure {
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 20px 12px 36px;
  overflow: visible;
  backdrop-filter: blur(18px);
}

.stem-figure svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.node {
  cursor: pointer;
}

.node-hit {
  fill: transparent;
  pointer-events: all;
}

.node-core {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.28s var(--ease);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.node:hover .node-core,
.node:focus-visible .node-core,
.node.is-lit .node-core {
  transform: scale(1.05);
}

.node-scene {
  pointer-events: none;
}

.sc-ground { fill: #2a3444; }
.sc-desk { fill: #4a5564; }
.sc-wood { fill: #6b7380; }
.sc-wall { fill: #c5ced8; }
.sc-brick { fill: #6d7a88; }
.sc-glass { fill: #7ec8d8; }
.sc-glass-dim { fill: #5a7a88; }
.sc-metal { fill: #8b96a2; }
.sc-screen { fill: #142028; }
.sc-screen-lit { fill: #3ee0c9; opacity: 0.55; }
.sc-chrome { fill: #3a4452; }
.sc-person { fill: #d5dde6; }
.sc-person-2 { fill: #9aa7b5; }
.sc-robot { fill: #7d8ea3; }
.sc-doc { fill: #dce4ec; }
.sc-doc-line { fill: none; stroke: #5a6878; stroke-width: 1.4; }
.sc-fade { fill: #6d6458; opacity: 0.45; }
.sc-frame {
  fill: none;
  stroke: #c5d0da;
  stroke-width: 2.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

[data-theme="light"] .sc-ground { fill: #d5dde6; }
[data-theme="light"] .sc-desk { fill: #8a96a4; }
[data-theme="light"] .sc-wood { fill: #7a8490; }
[data-theme="light"] .sc-wall { fill: #e8eef4; }
[data-theme="light"] .sc-brick { fill: #6a7684; }
[data-theme="light"] .sc-glass { fill: #5aa8bc; }
[data-theme="light"] .sc-glass-dim { fill: #7a96a4; }
[data-theme="light"] .sc-metal { fill: #6d7884; }
[data-theme="light"] .sc-screen { fill: #1c2a34; }
[data-theme="light"] .sc-screen-lit { fill: #0f8f82; opacity: 0.55; }
[data-theme="light"] .sc-chrome { fill: #c5ced6; }
[data-theme="light"] .sc-person { fill: #2a3440; }
[data-theme="light"] .sc-person-2 { fill: #5a6878; }
[data-theme="light"] .sc-robot { fill: #5d6d82; }
[data-theme="light"] .sc-doc { fill: #ffffff; }
[data-theme="light"] .sc-doc-line { stroke: #6a7684; }
[data-theme="light"] .sc-fade { fill: #9aa7b5; opacity: 0.5; }
[data-theme="light"] .sc-frame { stroke: #5d6670; }

.node-kicker {
  fill: #3ee0c9;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-anchor: middle;
  pointer-events: none;
}

.node-plate {
  fill: #161b26;
  stroke: rgba(62, 224, 201, 0.32);
  stroke-width: 1.2;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.node-plate-inset {
  fill: none;
  stroke: rgba(62, 224, 201, 0.18);
  stroke-width: 1;
  pointer-events: none;
}

.node .node-label {
  fill: #e8ecf1;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-anchor: middle;
  pointer-events: none;
}

.node .node-label.node-label-start {
  text-anchor: start;
}

.node-outcome .node-label {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.node-num-disc {
  fill: #3ee0c9;
  pointer-events: none;
}

.node-badge-num {
  fill: #0b1218;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

[data-theme="light"] .node-kicker {
  fill: #0f8f82;
}

[data-theme="light"] .node-plate {
  fill: #ffffff;
  stroke: rgba(15, 143, 130, 0.32);
  filter: drop-shadow(0 7px 12px rgba(20, 32, 48, 0.12));
}

[data-theme="light"] .node-plate-inset {
  stroke: rgba(15, 143, 130, 0.18);
}

[data-theme="light"] .node .node-label {
  fill: #1a2230;
}

[data-theme="light"] .node-num-disc {
  fill: #0f8f82;
}

[data-theme="light"] .node-badge-num {
  fill: #ffffff;
}

.node:focus-visible {
  outline: none;
}

.edge-glow {
  fill: none;
  stroke: #3ee0c9;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.16;
  filter: url(#edge-soft);
  pointer-events: none;
}

.edge {
  fill: none;
  stroke: #2a8f86;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s var(--ease), opacity 0.3s;
}

[data-theme="light"] .edge-glow {
  stroke: #0f8f82;
  opacity: 0.22;
}

[data-theme="light"] .edge {
  stroke: #0f8f82;
}

.edge.solid { stroke-dasharray: none; }

.edge-side,
.edge-goal {
  stroke: #2a8f86;
}

.edge.is-lit {
  opacity: 1;
}

.edge-glow:has(+ .edge.is-lit) {
  opacity: 0.28;
}

.edge-spark {
  fill: none;
  pointer-events: none;
  stroke: #e8fffa;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation-name: spark;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.edge-spark-tail {
  stroke: #3ee0c9;
  stroke-width: 5;
  opacity: 0.45;
}

.edge-spark-head {
  stroke: #f4fffc;
  stroke-width: 3.2;
}

[data-theme="light"] .edge-spark-tail {
  stroke: #0f8f82;
  opacity: 0.7;
}

[data-theme="light"] .edge-spark-head {
  stroke: #ffffff;
}

.timeline {
  display: none;
}

.stations {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 12px;
}

.station,
.appendix {
  position: relative;
  padding: 32px 32px 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  transform: translateY(12px);
  opacity: 0.72;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), border-color 0.3s;
}

.station.is-inview,
.appendix.is-inview,
.station:target,
.appendix:target {
  transform: none;
  opacity: 1;
}

.station.is-flash {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 40%, transparent), var(--shadow);
}

.station-side {
  border-left: 3px solid var(--amber);
}

.station-main {
  border-left: 3px solid var(--cyan);
}

.station-branch {
  border-left: 3px dashed var(--violet);
}

.station-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.station-num {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--cyan-dim);
  color: var(--cyan);
}

.station-side .station-num {
  background: var(--amber-dim);
  color: var(--amber);
}

.station-branch .station-num {
  background: color-mix(in srgb, var(--violet) 16%, transparent);
  color: var(--violet);
}

.station-head h2 {
  flex: 1;
}

.seen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
  margin-top: 8px;
}

.seen input {
  accent-color: var(--cyan);
}

.lead {
  color: var(--text-muted);
  margin: 0 0 20px;
}

.prereq {
  margin: 0 0 16px;
  font-size: 0.95rem;
}

h3.block-title {
  margin: 8px 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 650;
}

.must {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.skill-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.skill-group {
  position: relative;
  padding: 16px 18px 8px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
}

.skill-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 99px;
  background: var(--cyan);
}

.station-side .skill-group::before {
  background: var(--amber);
}

.skill-group > h4,
.skill-leaf {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 650;
}

.skill-group > h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.skill-group ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--line);
}

.skill-group li {
  position: relative;
  padding: 8px 0 8px 12px;
  color: var(--text);
  font-weight: 400;
  font-size: 0.95rem;
}

.skill-group li::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--cyan);
}

.station-side .skill-group li::before {
  border-color: var(--amber);
}

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 4px;
  vertical-align: middle;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 1px 9px;
  border: 1px solid color-mix(in srgb, var(--cyan) 35%, var(--line));
  border-radius: 999px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.6;
  background: var(--cyan-dim);
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
}

.station-side .chip {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 35%, var(--line));
  background: var(--amber-dim);
}

.appendix {
  margin: 56px auto 0;
  width: min(var(--max), calc(100% - 48px));
}

.appendix ul {
  padding-left: 1.1rem;
}

.appendix li {
  margin: 8px 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes spark {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: calc(var(--spark-len) * -1); }
}

@keyframes outcome-glow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(240, 215, 140, 0.35)); }
  50% { filter: drop-shadow(0 0 16px rgba(240, 215, 140, 0.9)); }
}

@keyframes aura-pulse {
  0%, 100% { opacity: 0.22; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.07); }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 56px;
  }
  .brand {
    display: none;
  }
  .toc-label {
    display: none;
  }
  .toc a {
    justify-content: center;
    padding: 8px 4px;
  }
  .toc-num {
    width: auto;
  }
  .icon-btn {
    padding: 8px 0;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .stem-figure svg {
    width: 100%;
  }
  .station,
  .appendix {
    padding: 22px 18px 24px;
    transform: none;
    opacity: 1;
  }
  .wrap,
  .appendix {
    width: min(var(--max), calc(100% - 24px));
  }
  .stem {
    --stem-w: min(var(--map-frame-width, 1200px), calc(100vw - var(--sidebar-w) - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1,
  .lede,
  .intro,
  .station,
  .appendix {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .lede::after { animation: none; }
  .chip:hover { transform: none; }
  .node-glow,
  .edge-spark {
    animation: none;
  }
  .edge-spark { display: none; }
  .node-glow { opacity: 0.45; transform: none; }
  .node:hover .node-core,
  .node:focus-visible .node-core {
    transform: none;
  }
}
