:root {
  --ink: #07101f;
  --ink-soft: #15233a;
  --paper: #f5f7fb;
  --white: #ffffff;
  --yellow: #ffd43b;
  --yellow-deep: #efb900;
  --cyan: #78dce8;
  --muted: #69768a;
  --line: #dce2ec;
  --red: #eb3349;
  --blue: #286bd6;
  --green: #27a960;
  --orange: #f28c28;
  --shadow: 0 24px 70px rgba(7, 16, 31, .14);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.72;
}
a { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 99; padding: 10px 16px; background: var(--yellow); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1.16fr);
  align-items: center;
  gap: 48px;
  padding: 72px max(6vw, 48px);
  color: var(--white);
  background:
    radial-gradient(circle at 8% 20%, rgba(40,107,214,.18), transparent 30%),
    linear-gradient(135deg, #07101f 0%, #0b172a 56%, #111827 100%);
  overflow: hidden;
}
.hero-copy { max-width: 680px; position: relative; z-index: 1; }
.eyebrow, .kicker { margin: 0 0 14px; color: var(--yellow-deep); font-size: .82rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(3.4rem, 6vw, 6.3rem); line-height: 1.02; letter-spacing: -.055em; }
.hero h1 span { color: var(--yellow); }
.hero-lead { max-width: 610px; margin: 28px 0 34px; color: #cfd8e7; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 800; }
.hero-actions .primary { color: var(--ink); background: var(--yellow); }
.hero-actions .secondary { border: 1px solid rgba(255,255,255,.32); }
.hero-visual { margin: 0; position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 7% -8% -12% 18%; background: var(--yellow); filter: blur(90px); opacity: .12; }
.hero-visual img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 36px; box-shadow: 0 36px 110px rgba(0,0,0,.48); position: relative; }
.hero-visual figcaption { margin-top: 14px; color: #9fb0c8; font-size: .85rem; text-align: right; }

.step-nav { position: sticky; top: 0; z-index: 20; overflow-x: auto; background: rgba(245,247,251,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.step-nav ol { width: max-content; min-width: 100%; display: flex; justify-content: center; gap: 2px; margin: 0; padding: 9px 22px; list-style: none; }
.step-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 12px; color: #455166; text-decoration: none; font-size: .78rem; white-space: nowrap; }
.step-nav a:hover, .step-nav a:focus-visible { color: var(--ink); background: var(--white); }
.step-nav span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: var(--ink); background: var(--yellow); font-weight: 900; font-size: .68rem; }

main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.notation-section { display: grid; grid-template-columns: 1.05fr 1.2fr; gap: 50px; padding: 110px 24px 90px; align-items: start; }
h2 { margin: 0 0 20px; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.06; letter-spacing: -.04em; }
.notation-section > div:first-child p:last-child { color: var(--muted); font-size: 1.08rem; }
.notation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.notation-grid div { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
kbd { font: inherit; font-weight: 900; letter-spacing: .035em; }
.notation-grid kbd { display: grid; place-items: center; min-width: 58px; height: 42px; border-radius: 10px; color: var(--yellow); background: var(--ink); box-shadow: inset 0 -2px 0 rgba(255,255,255,.08); }
.notation-grid span { color: #4e5d73; font-size: .92rem; }
.tip { grid-column: 1 / -1; padding: 18px 22px; border-left: 5px solid var(--yellow); background: #fff8d9; border-radius: 0 14px 14px 0; }

.lesson { position: relative; min-height: 560px; margin: 28px 0; padding: 72px; display: grid; grid-template-columns: 90px minmax(0, 1.55fr) minmax(300px, .75fr); gap: 34px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 82px; }
.lesson-copy { position: relative; z-index: 2; max-width: 760px; }
.step-number { align-self: start; color: #cbd3df; font-size: 4rem; font-weight: 900; letter-spacing: -.08em; line-height: 1; }
.summary { margin: 0 0 26px; color: #4e5d73; font-size: 1.06rem; }
.dark-step { color: var(--white); background: linear-gradient(145deg, #081222, #13243d); border-color: #23334b; }
.dark-step .summary, .dark-step .note, .dark-step .mini-steps { color: #bdc9da; }
.dark-step .step-number { color: #38506e; }
.focus-step { background: linear-gradient(145deg, #fffef9, #fff7c6); border-color: #f1d76a; }
.finish-step { color: var(--white); background: radial-gradient(circle at 85% 30%, rgba(255,212,59,.24), transparent 28%), linear-gradient(145deg, #07101f, #13243d); border-color: #22314a; }
.finish-step .summary { color: #c5cfdd; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 10px 0; padding-left: 27px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--yellow-deep); font-weight: 900; }

.cube-visual, .fish-visual { display: grid; justify-items: center; gap: 18px; }
.face-grid { width: min(280px, 100%); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 18px; background: #080d14; box-shadow: 0 18px 40px rgba(7,16,31,.2); transform: rotate(-2deg); }
.face-grid i { border-radius: 8px; background: #324156; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
.face-grid .yellow, .mini-face .yellow { background: var(--yellow); }
.face-grid .white { background: #f7f7f3; }
.face-grid .red { background: var(--red); }
.face-grid .blue { background: var(--blue); }
.face-grid .green { background: var(--green); }
.face-grid .orange { background: var(--orange); }
.face-grid .dim { background: #263449; }
.visual-label, .fish-visual b { color: var(--muted); font-size: .85rem; text-align: center; }
.dark-step .visual-label { color: #9fb0c8; }
.decision-flow { display: grid; gap: 10px; }
.decision-flow div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.decision-flow b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); }
.decision-flow kbd { padding: 4px 8px; border-radius: 6px; background: rgba(7,16,31,.08); }
.note { margin: 24px 0 0; padding: 14px 18px; border-left: 4px solid var(--yellow-deep); color: #5b687b; background: rgba(255,212,59,.12); border-radius: 0 12px 12px 0; font-size: .91rem; }
.formula-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0; }
.formula-line span { color: var(--muted); font-size: .82rem; }
.formula-line kbd { padding: 8px 12px; border-radius: 9px; color: var(--white); background: var(--ink); }
.mini-steps { margin: 22px 0 0; padding-left: 1.25rem; color: #536176; }
.mini-steps li { margin: 7px 0; padding-left: 5px; }

.formula { margin: 22px 0; }
.primary-formula { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 100%; padding: 16px 18px; border-radius: 14px; color: var(--yellow); background: var(--ink); box-shadow: 0 11px 26px rgba(7,16,31,.18); }
.dark-step .primary-formula, .finish-step .primary-formula { color: var(--ink); background: var(--yellow); }
.primary-formula kbd { overflow-wrap: anywhere; font-size: 1.15rem; }
.primary-formula small { color: #b5c0d0; font-weight: 700; }
.dark-step .primary-formula small, .finish-step .primary-formula small { color: #594b00; }
.long kbd { font-size: 1rem; }
.mega kbd { font-size: .94rem; line-height: 1.6; }
.hand-sequence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.hand-sequence span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 18px; color: var(--yellow); background: var(--ink); font-size: 2rem; font-weight: 900; }
.hand-sequence em { grid-column: 1 / -1; color: var(--muted); font-style: normal; letter-spacing: .2em; font-size: .82rem; }

.formula-stack { display: grid; gap: 12px; }
.formula-stack div { padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.07); }
.formula-stack span { display: block; margin-bottom: 5px; color: var(--yellow); font-size: .78rem; font-weight: 800; }
.formula-stack kbd { color: #f7f9fc; font-size: .98rem; overflow-wrap: anywhere; }
.layer-diagram { justify-self: center; width: min(250px, 100%); perspective: 700px; }
.layer { height: 82px; margin: 6px 0; border-radius: 12px; transform: rotateY(-18deg) skewY(2deg); background: repeating-linear-gradient(90deg, var(--red) 0 31%, #111 31% 34%); box-shadow: 8px 12px 24px rgba(0,0,0,.2); }
.layer.top { background: repeating-linear-gradient(90deg, #556276 0 31%, #111 31% 34%); }
.layer.middle, .layer.bottom { outline: 2px solid var(--yellow); outline-offset: 2px; }
.layer-diagram span { display: block; margin-top: 18px; color: #a9b7ca; text-align: center; font-size: .84rem; }

.shape-row { display: grid; grid-template-columns: repeat(4, minmax(92px, 1fr)); gap: 14px; margin-top: 28px; }
.mini-face { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 7px 7px 34px; border-radius: 12px; background: var(--ink); position: relative; }
.mini-face i { aspect-ratio: 1; border-radius: 3px; background: #2d3b50; }
.mini-face span { position: absolute; left: 0; right: 0; bottom: 6px; color: #b8c4d3; text-align: center; font-size: .72rem; }
.mini-face i:nth-child(5), .elbow i:nth-child(2), .elbow i:nth-child(4), .line i:nth-child(4), .line i:nth-child(6), .cross i:nth-child(2), .cross i:nth-child(4), .cross i:nth-child(6), .cross i:nth-child(8) { background: var(--yellow); }
.fish-visual .face-grid { transform: rotate(2deg); }
.fish-visual b { color: #5c4a00; }
.eyes-visual div { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; padding: 10px; background: #080d14; border-radius: 16px; }
.eyes-visual i { height: 72px; border-radius: 9px; background: var(--red); }
.eyes-visual i.edge { background: #556276; }
.eyes-visual span { display: block; margin-top: 13px; color: #a9b7ca; text-align: center; }

.orientation-callout { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 20px 0; }
.orientation-callout span { color: var(--muted); font-size: .8rem; }
.four-eyes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.eye-pair { display: flex; justify-content: space-between; gap: 28px; padding: 12px; border-radius: 12px; background: var(--ink); }
.eye-pair i { width: 48px; height: 48px; border-radius: 8px; }
.eye-pair.red i { background: var(--red); }
.eye-pair.blue i { background: var(--blue); }
.eye-pair.green i { background: var(--green); }
.eye-pair.orange i { background: var(--orange); }
.four-eyes span { grid-column: 1 / -1; color: var(--muted); text-align: center; font-size: .84rem; }
.bar-visual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 12px 48px; border-radius: 16px; background: var(--ink); position: relative; }
.bar-visual i { width: 70px; height: 70px; border-radius: 9px; background: var(--blue); }
.bar-visual span { position: absolute; bottom: 12px; left: 0; right: 0; color: #b9c4d3; text-align: center; font-size: .8rem; }
.finish-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.finish-flow div { padding: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; }
.finish-flow b { display: block; color: var(--yellow); font-size: 1.4rem; }
.finish-flow span { color: #b7c3d4; font-size: .82rem; }
.solved-mark { display: grid; justify-items: center; }
.solved-mark span { display: grid; place-items: center; width: 180px; height: 180px; border-radius: 50%; color: var(--ink); background: var(--yellow); font-size: 6rem; font-weight: 900; box-shadow: 0 0 80px rgba(255,212,59,.25); }
.solved-mark strong { margin-top: 18px; font-size: 1.8rem; }
.solved-mark small { color: #a9b7ca; }

.troubleshooting { padding: 110px 24px; }
.trouble-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trouble-grid article { padding: 26px; border-top: 4px solid var(--yellow); background: var(--white); box-shadow: 0 14px 36px rgba(7,16,31,.08); }
.trouble-grid b { font-size: 1.05rem; }
.trouble-grid p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
footer { display: flex; justify-content: space-between; padding: 30px max(6vw, 48px); color: #9aa8bc; background: var(--ink); }
footer a { color: var(--yellow); text-decoration: none; }

@media (max-width: 980px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 90px; }
  .hero-visual { max-width: 760px; }
  .notation-section { grid-template-columns: 1fr; }
  .lesson { grid-template-columns: 64px 1fr; padding: 54px 42px; }
  .lesson > :last-child { grid-column: 2; justify-self: start; width: min(420px, 100%); }
  .trouble-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 22px 50px; gap: 32px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero-lead { font-size: 1rem; }
  .hero-visual img { border-radius: 22px; }
  main { width: min(100% - 22px, 1240px); }
  .notation-section { padding: 74px 10px 54px; }
  .notation-grid { grid-template-columns: 1fr; }
  .lesson { min-height: 0; grid-template-columns: 1fr; gap: 24px; margin: 14px 0; padding: 34px 22px; border-radius: 20px; }
  .step-number { font-size: 2.8rem; }
  .lesson > :last-child { grid-column: 1; justify-self: stretch; }
  .shape-row { grid-template-columns: repeat(2, 1fr); }
  .finish-flow { grid-template-columns: 1fr; }
  .eyes-visual div { grid-template-columns: repeat(3, 1fr); }
  .eyes-visual i, .bar-visual i { width: auto; aspect-ratio: 1; height: auto; }
  .troubleshooting { padding: 74px 10px; }
  footer { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
