:root {
  color-scheme: dark;
  --bg: #0B1230;
  --surface: #121B40;
  --surface-2: #19244F;
  --line: rgba(158, 176, 230, .14);
  --line-strong: rgba(198, 210, 245, .34);
  --text: #EDF0FA;
  --body: #C3CAE0;
  --mist: #98A2C4;
  --blue: #4A78FF;
  --blue-deep: #3A66F0;
  --blue-ink: #93B1FF;
  --blue-soft: rgba(74, 120, 255, .16);
  --amber: #FFC53D;
  --chip: rgba(255, 255, 255, .06);
  --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 48, .72);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 15px; color: var(--mist); }
.nav a:hover { color: var(--text); background: var(--chip); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.menu-btn {
  display: none; margin-left: auto; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-line { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-line:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.btn-light { background: #fff; color: var(--bg); }
.btn-light:hover { background: var(--amber); }
.btn-quiet { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-quiet:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 112px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -320px; right: -180px; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(74, 120, 255, .34), rgba(74, 120, 255, 0));
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(40px, 5vw, 72px); line-height: 1.06; font-weight: 800; letter-spacing: -.035em;
}
.hero-lead { margin: 0 0 40px; max-width: 30em; font-size: 19px; color: var(--mist); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { margin: 28px 0 0; font-size: 14px; color: var(--mist); }
.hero-proof b { color: var(--text); font-variant-numeric: tabular-nums; }

.notice {
  display: flex; align-items: center; gap: 14px; margin-top: 44px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(255, 197, 61, .07); border: 1px solid rgba(255, 197, 61, .26); font-size: 15px;
}
.notice svg { width: 20px; height: 20px; flex: none; color: var(--amber); }
.notice a { margin-left: auto; font-weight: 600; white-space: nowrap; color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }

/* Course progress panel: the one animated moment */
.course {
  padding: 30px; border-radius: 24px;
  background: linear-gradient(180deg, #18245A 0%, #101A40 100%);
  border: 1px solid var(--line);
  box-shadow: 0 50px 120px -50px rgba(74, 120, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.course-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.course-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.course-sub { margin: 2px 0 0; font-size: 13px; color: var(--mist); }
.live {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 197, 61, .12); color: var(--amber);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.6s ease-in-out infinite; }
.course.is-done .live i { animation: none; }
@keyframes pulse { 50% { opacity: .25; } }

.task { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.task-name { font-size: 15px; color: rgba(255, 255, 255, .8); }
.task-kind { margin-left: 8px; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .62); }
.task-state { font-size: 13px; color: rgba(255, 255, 255, .4); font-variant-numeric: tabular-nums; }
.task.is-active .task-state { color: #fff; }
.task.is-done .task-name { color: #fff; }
.task.is-done .task-state { color: var(--amber); }
.bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--amber); box-shadow: 0 0 12px rgba(255, 197, 61, .6); }
.course-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 8px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.course-foot p { margin: 0; font-size: 13px; color: var(--mist); }
.saved { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.saved small { margin-left: 6px; font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.count { font-size: 14px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }

/* ---------- Quick questions ---------- */
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quick > span { margin-right: 6px; font-size: 14px; font-weight: 600; }
.quick a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--body); }
.quick a:hover { border-color: var(--line-strong); color: var(--text); }

/* ---------- Sections ---------- */
.section { padding: 112px 0 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { margin: 0 0 14px; font-size: clamp(32px, 4vw, 50px); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.section-head p { margin: 0; font-size: 17px; color: var(--mist); }

/* Tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 40px; border-radius: 14px; background: var(--chip); border: 1px solid var(--line); }
.tab { padding: 10px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--mist); font-size: 15px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tab-panel { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.tab-panel[hidden] { display: none; }
.tab-panel h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 24px; letter-spacing: -.01em; }
.tab-panel > div > p { margin: 0; color: var(--mist); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--blue-soft); color: var(--blue-ink); }
.tag-amber { background: rgba(255, 197, 61, .14); color: var(--amber); }
.tag-mute { background: var(--chip); color: var(--mist); }

.steps { list-style: none; margin: 28px 0; padding: 0; counter-reset: s; }
.steps li { position: relative; counter-increment: s; padding: 0 0 22px 48px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700;
}
.steps li::after { content: ""; position: absolute; left: 14.5px; top: 36px; bottom: 6px; width: 1px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps strong { display: block; font-size: 16px; line-height: 30px; color: var(--text); }
.steps span { display: block; font-size: 15px; color: var(--mist); }
.panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.video {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9;
  border-radius: 20px; overflow: hidden; color: #fff; text-align: center;
  border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 20% 0%, #24357A 0%, #111A3D 65%);
}
.video-play { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: #fff; color: var(--bg); transition: transform .15s; }
.video:hover .video-play { transform: scale(1.06); }
.video-play svg { width: 26px; height: 26px; margin-left: 4px; }
.video p { margin: 0; font-size: 15px; color: rgba(255, 255, 255, .75); }
.video-list { display: flex; gap: 8px; margin-top: 12px; }
.video-list a { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--body); }
.video-list a:hover { border-color: var(--line-strong); color: var(--text); }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--line); }
.platform { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 16px 26px; background: var(--surface); text-align: center; }
.platform:hover { background: var(--surface-2); }
.platform img { width: 52px; height: 52px; padding: 6px; border-radius: 14px; object-fit: contain; background: #fff; }
.platform strong { font-size: 15px; }
.platform span { font-size: 12px; color: var(--mist); }

/* Features */
.features { display: grid; grid-template-columns: 360px 1fr; gap: 72px; }
.features .section-head { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; margin-bottom: 0; }
.feature { display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 32px 0; border-top: 1px solid var(--line); }
.feature:first-child { padding-top: 0; border-top: 0; }
.feature-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--blue-soft); color: var(--blue-ink); }
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { margin: 4px 0 8px; font-size: 21px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--mist); }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.shot { margin: 0; scroll-snap-align: start; }
.shot-frame { aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--mist); }
.shot.is-missing img { display: none; }
.shot.is-missing .shot-frame { display: grid; place-items: center; }
.shot.is-missing .shot-frame::after { content: "截图加载失败"; font-size: 14px; color: var(--mist); }

/* Open source band */
.oss {
  display: grid; grid-template-columns: 1.3fr auto; gap: 40px; align-items: center;
  padding: 64px; border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, #4A78FF 0%, #3159E0 100%);
}
.oss h2 { margin: 0 0 12px; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.2; letter-spacing: -.02em; }
.oss p { margin: 0; max-width: 34em; color: rgba(255, 255, 255, .82); }
.oss-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.oss .btn-line { border-color: rgba(255, 255, 255, .6); color: #fff; }
.oss .btn-line:hover { background: #fff; border-color: #fff; color: var(--blue-deep); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 120px; padding: 56px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mist); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid .brand { color: var(--text); }
.footer-grid p { margin: 14px 0 0; max-width: 22em; }
.footer-grid h4 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.footer-grid a:not(.brand) { display: block; padding: 4px 0; }
.footer-grid a:not(.brand):hover { color: var(--text); }
.copyright { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Doc pages ---------- */
.doc { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px; padding-top: 48px; }
.doc-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 14px; color: var(--body); }
.doc-nav h5 { margin: 22px 0 6px; padding-left: 12px; font-size: 13px; font-weight: 600; color: var(--mist); }
.doc-nav h5:first-child { margin-top: 0; }
.doc-nav a { display: block; padding: 7px 12px; border-radius: 8px; }
.doc-nav a:hover { background: var(--chip); color: var(--text); }
.doc-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }
.doc-nav a[target="_blank"]::after { content: " ↗"; color: var(--mist); font-size: 12px; }

.prose { max-width: 780px; }
.prose h1 { margin: 0 0 16px; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
.prose .lead { margin: 0 0 40px; font-size: 18px; color: var(--mist); }
.prose h2 { margin: 64px 0 16px; font-size: 27px; line-height: 1.3; letter-spacing: -.01em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { margin: 36px 0 10px; font-size: 19px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose p, .prose li { color: var(--body); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose code { padding: 2px 6px; border-radius: 5px; background: var(--chip); font-family: ui-monospace, Consolas, monospace; font-size: .88em; }
.link { color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link:hover { color: #C0D1FF; }

.callout { margin: 20px 0; padding: 16px 18px; border: 1px solid; border-radius: 12px; font-size: 15px; }
.callout strong { display: block; margin-bottom: 4px; color: var(--text); }
.callout p { margin: 0; color: var(--body); }
.callout-tip { background: rgba(74, 120, 255, .09); border-color: rgba(74, 120, 255, .3); }
.callout-warn { background: rgba(255, 197, 61, .07); border-color: rgba(255, 197, 61, .26); }

.rows { overflow: hidden; margin: 24px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-featured { background: rgba(74, 120, 255, .09); }
.row-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
.row-icon svg { width: 24px; height: 24px; }
.row-icon img { width: 32px; height: 32px; object-fit: contain; }
.row h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.row p { margin: 2px 0 0; font-size: 14px; color: var(--mist); }
.row-actions { display: flex; align-items: center; gap: 14px; }
.row-actions .link { font-size: 14px; white-space: nowrap; }
.ver { padding: 1px 8px; border-radius: 6px; background: var(--chip); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 24px 0; padding: 0; list-style: none; }
.checklist li { margin: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.checklist strong { display: block; color: var(--text); }
.checklist span { font-size: 15px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }

.timeline { margin: 24px 0 24px 6px; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.timeline li { position: relative; margin: 0; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--text); }
.timeline li:last-child::before { background: var(--amber); border-color: var(--amber); }
.timeline time { display: block; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid, .tab-panel { grid-template-columns: 1fr; gap: 48px; }
  .features { grid-template-columns: 1fr; gap: 40px; }
  .features .section-head { position: static; }
  .platforms { grid-template-columns: repeat(3, 1fr); }
  .oss { grid-template-columns: 1fr; padding: 44px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .doc-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .doc-nav h5 { display: none; }
  .doc-nav a { flex: none; white-space: nowrap; }
}
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; display: none; flex-direction: column;
    padding: 12px 24px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .header-cta { display: none; }
}
@media (max-width: 600px) {
  .wrap { width: min(1180px, 100% - 32px); }
  .hero { padding: 48px 0 72px; }
  .hero::before { top: -260px; right: -360px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .notice { flex-wrap: wrap; }
  .notice a { margin-left: 34px; }
  .course { padding: 22px; border-radius: 20px; }
  .saved { font-size: 40px; }
  .section { padding-top: 84px; }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 14px; }
  .row { grid-template-columns: 40px 1fr; padding: 18px; }
  .row-icon { width: 40px; height: 40px; }
  .row-actions { grid-column: 1 / -1; }
  .row-actions .btn { flex: 1; }
  .checklist, .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
