:root {
  --bg: #070b14;
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .1);
  --text: #f2f5fb;
  --muted: #97a3ba;
  --faint: #6d7b95;
  --teal: #5eead4;
  --blue: #6aa9ff;
  --violet: #b69bff;
  --radius: 20px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 78% -8%, rgba(94, 234, 212, .14), transparent 65%),
    radial-gradient(760px 600px at 8% 12%, rgba(106, 169, 255, .13), transparent 68%),
    radial-gradient(700px 620px at 60% 92%, rgba(182, 155, 255, .09), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
::selection { background: rgba(94, 234, 212, .3); }
.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(7, 11, 20, .68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: .02em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 0 22px rgba(94, 234, 212, .32);
}
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--faint); letter-spacing: .16em; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--muted); }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: var(--text); }
.header-badge {
  font-size: 12px; color: var(--teal); padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, .28); background: rgba(94, 234, 212, .07);
  white-space: nowrap;
}

/* Shared */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: var(--teal);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.section-head { margin-bottom: 34px; max-width: 720px; }
.section-head h2 {
  margin: 14px 0 10px; font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25; letter-spacing: -.02em; font-weight: 700;
}
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.section-head .grad {
  background: linear-gradient(100deg, var(--teal), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Hero */
.hero { padding: 88px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 {
  margin: 20px 0 22px; font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.12; letter-spacing: -.035em; font-weight: 750;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--teal), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin: 0; max-width: 520px; font-size: 17px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px;
  border-radius: 12px; font-size: 14px; font-weight: 600; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: linear-gradient(120deg, var(--teal), #7dc4ff); color: #05121a; box-shadow: 0 10px 30px rgba(94, 234, 212, .2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(94, 234, 212, .3); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--surface-strong); }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 56px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.hero-stats div strong { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats div span { font-size: 12px; color: var(--faint); letter-spacing: .06em; }

/* Hero visual */
.hero-visual { position: relative; }
.viz-frame {
  position: relative; padding: 18px; border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
  box-shadow: 0 34px 90px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  transform: rotate(-2deg);
}
.viz-frame svg { width: 100%; height: auto; border-radius: 14px; }
.viz-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px; }
.viz-dots { display: flex; gap: 6px; }
.viz-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.viz-dots i:first-child { background: var(--teal); }
.viz-title { font-size: 11px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.float-chip {
  position: absolute; z-index: 2; padding: 9px 14px; border-radius: 11px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(12, 18, 30, .9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4); backdrop-filter: blur(10px);
}
.float-chip b { color: var(--teal); font-variant-numeric: tabular-nums; }
.chip-one { top: 12%; right: -22px; animation: float 6s ease-in-out infinite; }
.chip-two { bottom: 12%; left: -26px; animation: float 7s ease-in-out infinite reverse; }
.chip-two b { color: var(--violet); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.draw-line { stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 2.6s .3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bar-grow { transform-origin: center bottom; animation: grow 1.1s .4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Overview */
.overview { padding: 26px 0 96px; }
.overview-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; align-items: start; }
.overview-note {
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
}
.overview-note p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.overview-note p:last-child { margin-bottom: 0; }
.overview-note .hl { color: var(--text); font-weight: 600; }
.path-list { display: grid; gap: 12px; counter-reset: path; }
.path-item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .25s, transform .25s, background .25s;
}
.path-item:hover { transform: translateX(4px); border-color: rgba(94, 234, 212, .35); background: var(--surface-strong); }
.path-num {
  font-size: 22px; font-weight: 700; letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--teal), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.path-item h3 { margin: 0 0 3px; font-size: 16px; font-weight: 650; }
.path-item p { margin: 0; font-size: 13px; color: var(--muted); }
.path-range { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* Chapters */
.chapters { padding-bottom: 110px; }
.chapters-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.chapters-head .section-head { margin-bottom: 34px; }
.notice {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 34px;
  font-size: 13px; color: var(--muted); padding: 9px 15px; border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .025);
}
.notice i { width: 7px; height: 7px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.chapter-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.chapter-card {
  --accent: var(--teal);
  position: relative; grid-column: span 4; min-width: 0;
  display: flex; flex-direction: column;
  padding: 24px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .28s, border-color .28s, box-shadow .28s, background .28s;
}
.chapter-card--feature {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  grid-template-areas:
    "top viz"
    "kicker viz"
    "title viz"
    "desc viz"
    "tags viz"
    "foot viz";
  column-gap: 36px;
  align-content: start;
}
.chapter-card--feature .card-top { grid-area: top; }
.chapter-card--feature .chapter-kicker { grid-area: kicker; margin-top: 10px; }
.chapter-card--feature h3 { grid-area: title; }
.chapter-card--feature .chapter-desc { grid-area: desc; flex: none; max-width: 660px; }
.chapter-card--feature .tag-list { grid-area: tags; max-width: 660px; }
.chapter-card--feature .card-foot { grid-area: foot; }
.chapter-card--feature .feature-viz {
  grid-area: viz; width: 220px; height: 140px; align-self: center; justify-self: center;
}
.chapter-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 80%); opacity: .75;
}
.chapter-card::after {
  content: ""; position: absolute; top: -90px; right: -70px; width: 200px; height: 200px;
  border-radius: 50%; background: var(--accent); opacity: .07; filter: blur(48px); pointer-events: none;
}
.chapter-card:hover {
  transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .38); background: var(--surface-strong);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chapter-num {
  font-size: 38px; font-weight: 750; line-height: 1; letter-spacing: -.05em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.mini-viz { width: 88px; height: 56px; flex: none; opacity: .9; color: var(--accent); }
.chapter-kicker { margin: 14px 0 6px; font-size: 10px; letter-spacing: .18em; color: var(--faint); }
.chapter-card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; }
.chapter-desc { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); flex: 1; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.tag-list li {
  font-size: 11.5px; color: #c4ccdb; padding: 4px 9px; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .035);
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.link-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--faint); }
.link-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6d7b95; }
.is-linked .link-status { color: var(--teal); }
.is-linked .link-status::before { background: var(--teal); box-shadow: 0 0 9px var(--teal); }
.card-action {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--faint); transition: color .2s, gap .2s;
}
.card-action svg { width: 14px; height: 14px; }
.card-action[aria-disabled="true"] { cursor: default; opacity: .65; }
.is-linked .card-action { color: var(--accent); }
.is-linked .card-action:hover { gap: 10px; }
.chapter-card.is-linked { cursor: pointer; }
.chapter-card.is-linked:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.chapter-card.is-linked .card-action::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.footer-inner strong { color: var(--muted); font-weight: 600; }

/* Motion */
.js-ready .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js-ready .reveal.in-view { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 560px; }
  .overview-grid { grid-template-columns: 1fr; gap: 28px; }
  .chapter-card { grid-column: span 6; }
  .chapter-card--feature { grid-column: span 12; }
}
.site-nav .nav-compact { display: none; }
.site-nav a { white-space: nowrap; }
#overview, #chapters, #links-note { scroll-margin-top: 88px; }

@media (max-width: 680px) {
  #overview, #chapters, #links-note { scroll-margin-top: 72px; }
  .wrap { width: min(100% - 32px, var(--maxw)); }
  .header-inner { height: 60px; }
  .brand { font-size: 13px; white-space: nowrap; }
  .brand small { display: none; }
  .site-nav { gap: 14px; font-size: 13px; }
  .site-nav .nav-full { display: none; }
  .site-nav .nav-compact { display: inline; }
  .header-badge { display: none; }
  .hero { padding: 60px 0 64px; }
  .hero-stats { gap: 16px 28px; margin-top: 40px; }
  .float-chip { display: none; }
  .viz-frame { transform: none; }
  .overview { padding-bottom: 72px; }
  .path-item { grid-template-columns: 40px 1fr; gap: 12px; }
  .path-range { grid-column: 2; }
  .chapter-card, .chapter-card--feature { grid-column: span 12; }
  .chapter-card--feature { display: flex; flex-direction: column; }
  .chapter-card--feature .feature-viz {
    position: absolute; top: 24px; right: 24px; width: 88px; height: 56px;
  }
  .chapters { padding-bottom: 76px; }
  .notice { margin: -14px 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js-ready .reveal { opacity: 1; transform: none; }
}
