:root {
  color-scheme: light;
  --ink: #1a2441;
  --muted: #58657d;
  --blue: #3657db;
  --line: #dce3f1;
  --mono: "SFMono-Regular", Consolas, Menlo, monospace;
  color: var(--ink);
  background: #f7f8fc;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #6888ff; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner, .shell { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
.masthead-inner, .wordmark, .platforms, .platforms a, .routes, .routes button, .chapter-head, .screen-top, .screen-label, .controls, .controls button, #copy { display: flex; align-items: center; }
.masthead-inner { justify-content: space-between; min-height: 65px; gap: 10px; }
.wordmark { gap: 7px; font-size: 22px; font-weight: 720; letter-spacing: -.055em; }
.wordmark img { width: 39px; height: 39px; }
.brand-line { height: 16px; width: 1px; background: #d0d9ea; margin: 0 9px; transform: rotate(18deg); }
.brand-sub { color: #64718a; font-size: 13px; font-weight: 560; letter-spacing: .04em; }
.platforms { align-self: stretch; gap: 18px; }
.platforms a { position: relative; gap: 6px; color: var(--muted); padding: 4px 4px 0; font-weight: 600; font-size: 14px; text-decoration: none; }
.platforms img { width: 23px; height: 23px; }
.platforms a[aria-current] { color: #263f9b; }
.platforms a[aria-current]::after { position: absolute; content: ""; height: 3px; left: 3px; right: 3px; bottom: -1px; border-radius: 3px 3px 0 0; background: #4968e3; }
.shell { padding-bottom: 34px; }
.introduction { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0 23px; min-height: 151px; }
.intro-copy { position: relative; z-index: 1; }
h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: .23em; font-size: clamp(30px, 3.9vw, 54px); font-weight: 600; line-height: 1.14; letter-spacing: -.052em; }
h1 strong { font-weight: 770; letter-spacing: -.065em; }
h1 span { color: #45526b; font-weight: 520; }
.introduction p { color: #596981; font-size: 15px; line-height: 1.65; margin-top: 12px; }
.connection-art { flex: 0 1 320px; min-width: 182px; }
.connection-art svg { display: block; width: 100%; max-height: 112px; }
.routes { width: max-content; gap: 4px; padding: 4px; border: 1px solid #d9dfed; border-radius: 12px; background: #eaf0f9; margin-bottom: 17px; }
.routes button { justify-content: center; gap: 7px; border: 1px solid transparent; padding: 8px 15px; min-height: 35px; background: transparent; color: #56627b; font-size: 13px; font-weight: 580; border-radius: 8px; }
.routes button[aria-pressed=true] { background: #fff; border-color: #d4dcef; color: #2449c3; box-shadow: 0 2px 5px #1d377019; }
.routes svg, .controls svg, .question svg, #copy svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.lesson { display: grid; grid-template-columns: minmax(0,2.24fr) minmax(280px,1fr); align-items: stretch; gap: 18px; }
.screen { min-width: 0; position: relative; overflow: hidden; display: flex; flex-direction: column; align-self: start; border-radius: 20px; color: #fff; background: #172442; box-shadow: 0 11px 26px -16px #0719388c, inset 0 0 0 1px #526b99; }
.screen-top { gap: 20px; justify-content: space-between; padding: 14px 23px; min-height: 46px; border-bottom: 1px solid #ffffff14; background: linear-gradient(110deg,#16243c,#1d2b49); }
.screen-label { gap: 9px; color: #ecf2ff; font-size: 13px; font-weight: 620; }
.screen-label i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #73dfda; box-shadow: 0 0 0 4px #6adfd11a; }
.counter { color: #bdd0ef; font: 11px var(--mono); letter-spacing: .07em; }
.scene-mat { position: relative; isolation: isolate; overflow: hidden; background:
 radial-gradient(ellipse at 92% 8%,#3f5f9c 0%,transparent 47%),
 radial-gradient(ellipse at 5% 103%,#425ab0 0%,transparent 48%),
 linear-gradient(125deg,#243150 0%,#253758 56%,#202642 100%); }
#scene { display: block; width: 100%; height: auto; aspect-ratio: 760 / 420; overflow: hidden; font-family: Inter, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.controls { gap: 13px; padding: 8px 17px; min-height: 52px; border-top: 1px solid #ffffff15; background: #142039; }
.controls button { color: white; justify-content: center; border: 0; background: transparent; border-radius: 8px; }
.controls button:hover { background: #ffffff20; }
.controls .play { min-width: 70px; height: 30px; gap: 6px; padding: 0 9px; font-size: 12px; font-weight: 600; background: #eef3ff; color: #243152; box-shadow: 0 1px 3px #0002; }
.controls .play:hover { background: white; }
.play svg { display: block; width: 12px; height: 12px; stroke: none; fill: currentColor; }
#replay { width: 32px; height: 32px; padding: 5px; color: #d1defb; }
#time { color: #cbd7ee; font: 11px var(--mono); white-space: nowrap; }
.timeline { position: relative; flex: 1; min-width: 16px; }
.ticks { position: absolute; display: block; inset: 0 5px; pointer-events: none; }
.ticks i { position: absolute; top: 50%; height: 4px; width: 2px; transform: translateY(-50%); background: #142039; }
input[type=range] { display: block; appearance: none; width: 100%; height: 24px; padding: 0; margin: 0; cursor: pointer; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 8px; background: linear-gradient(to right,#8ca6ff var(--progress,0%),#4b5978 var(--progress,0%)); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -3px; border-radius: 50%; background: #e6ecff; box-shadow: 0 0 0 2px #657fc63d; }
input[type=range]::-moz-range-track { height: 4px; background: #4b5978; }
input[type=range]::-moz-range-progress { height: 4px; background: #8ca6ff; }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border: 0; background: #e6ecff; }
.chapters { background: #fff; border: 1px solid var(--line); border-radius: 19px; padding: 18px 13px 15px; min-width: 0; box-shadow: 0 5px 15px -11px #26365c42; }
.chapter-head { justify-content: space-between; gap: 8px; padding: 0 8px 12px; }
.chapter-head h2 { font-size: 17px; line-height: 1.5; font-weight: 680; letter-spacing: -.02em; }
.chapter-head span { color: #6a7790; font: 11px var(--mono); }
#step-list { list-style: none; display: grid; gap: 5px; margin: 0; padding: 0; }
.step-button { display: grid; width: 100%; grid-template-columns: 75px minmax(0,1fr); align-items: center; gap: 12px; padding: 12px 9px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; color: #35435e; }
.step-button:hover { background: #f4f6fc; }
.step-button[aria-current] { border-color: #c1cef5; background: linear-gradient(115deg,#edf2ff,#f6f8ff); box-shadow: inset 3px 0 #5270ef; }
.step-preview { position: relative; display: block; overflow: hidden; background: linear-gradient(120deg,#33476b,#273858); border: 1px solid #cdd8ec; border-radius: 6px; aspect-ratio: 1.65; }
.step-preview svg { display: block; width: 100%; height: 100%; }
.step-info { min-width: 0; }
.step-index { display: flex; align-items: center; gap: 6px; color: #73809b; font: 10px var(--mono); letter-spacing: .02em; }
.step-index i { width: 11px; height: 1px; background: #bbc6de; }
.step-name { display: block; font-size: 14px; font-weight: 630; line-height: 1.45; margin-top: 4px; }
.step-short { display: none; }
.step-button[aria-current] .step-name, .step-button[aria-current] .step-index { color: #284cbb; }
.chapter-caption { border-top: 1px solid #e3e8f4; margin: 12px 8px 0; padding-top: 12px; color: #53617d; font-size: 13px; line-height: 1.65; }
.question { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; column-gap: 16px; margin-top: 20px; padding: 19px 22px; border-radius: 15px; border: 1px solid #cfdaf3; background: linear-gradient(108deg,#edf1fd 0%,#f6f8ff 64%,#fafbff); }
.question-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; border: 1px solid #c9d4f4; background: linear-gradient(145deg,white,#e4e9fd); color: #435bc0; box-shadow: 0 3px 6px #40589512, inset 0 1px 0 white; }
.question-mark svg { width: 26px; height: 26px; }
.question h2 { font-size: 13px; font-weight: 670; color: #425994; line-height: 1.5; }
.question p { font-size: 15px; font-weight: 500; line-height: 1.65; margin-top: 4px; }
#copy { justify-content: center; gap: 7px; white-space: nowrap; border-radius: 8px; border: 1px solid #c4cfe9; padding: 9px 13px; background: #ffffffdb; font-size: 13px; font-weight: 560; color: #324982; }
#copy:hover { background: #fff; border-color: #92a6de; }
.sr-only { position: absolute; overflow: hidden; clip-path: inset(50%); width: 1px; height: 1px; white-space: nowrap; }
.embedded { background: transparent; }
.embedded .masthead, .embedded .introduction { display: none; }
.embedded .shell { width: 100%; padding: 2px 1px 8px; }
.embedded .screen { box-shadow: none; }
@media (max-width: 949px) {
  .lesson { grid-template-columns: 1fr; gap: 10px; }
  .chapters { padding: 11px 12px 12px; border-radius: 13px; }
  .chapter-head { display: none; }
  #step-list { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .step-button { display: flex; gap: 8px; align-items: center; padding: 7px; border: 1px solid #e2e7f3; border-radius: 8px; background: #fafbfe; }
  .step-preview { width: clamp(31px,5vw,48px); flex-shrink: 0; }
  .step-name, .step-index { display: none; }
  .step-short { display: block; font-size: 12px; font-weight: 630; line-height: 1.4; }
  .step-button[aria-current] { box-shadow: none; color: #294bb2; }
  #compact-description { display: block; }
  .chapter-caption { border: 0; margin: 8px 0 0; padding: 0 3px; }
}
@media (max-width: 620px) {
  .masthead-inner, .shell { width: calc(100% - 28px); }
  .masthead-inner { min-height: 55px; }
  .brand-line, .brand-sub { display: none; }
  .wordmark { gap: 3px; font-size: 18px; }
  .wordmark img { width: 30px; height: 30px; }
  .platforms { gap: 9px; }
  .platforms a { font-size: 12px; gap: 3px; padding-inline: 1px; }
  .platforms img { width: 18px; height: 18px; }
  .introduction { padding: 22px 0 16px; min-height: 0; }
  .connection-art { display: none; }
  h1 { font-size: clamp(28px,7vw,37px); }
  .introduction p { font-size: 13px; margin-top: 7px; }
  .routes { margin-bottom: 12px; padding: 3px; }
  .routes button { font-size: 12px; min-height: 32px; padding: 5px 10px; }
  .screen { border-radius: 13px; }
  .screen-top { min-height: 34px; padding: 8px 13px; }
  .screen-label { font-size: 11px; }
  .counter { font-size: 10px; }
  .controls { min-height: 43px; gap: 8px; padding: 5px 8px; }
  .controls .play { min-width: 54px; height: 28px; padding: 0 5px; font-size: 11px; }
  #replay { width: 25px; height: 28px; }
  #time { font-size: 10px; }
  #step-list { gap: 5px; }
  .step-button { flex-direction: column; align-items: stretch; gap: 5px; padding: 4px 4px 6px; text-align: center; }
  .step-preview { width: 100%; height: auto; aspect-ratio: 2.1; }
  .step-short { font-size: 11px; white-space: normal; }
  .chapter-caption { font-size: 13px; }
  .question { grid-template-columns: 31px minmax(0,1fr); column-gap: 10px; align-items: start; margin-top: 12px; padding: 13px; }
  .question-mark { width: 31px; height: 31px; border-radius: 9px; }
  .question-mark svg { width: 20px; height: 20px; }
  .question p { font-size: 14px; }
  #copy { grid-column: 2; justify-self: start; margin-top: 9px; font-size: 12px; padding: 6px 9px; }
}
@media (max-width: 350px) {
  .masthead-inner, .shell { width: calc(100% - 18px); }
  .embedded .shell { width: 100%; }
  .chapters { padding-inline: 7px; }
  .platforms { gap: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  .step-button, .routes button, #copy { transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
}
