:root {
  color-scheme: light;
  --ink: #172840;
  --muted: #52657e;
  --blue: #1758ba;
  --blue-dark: #154a9e;
  --line: #dce6f3;
  --back: #f4f7fc;
  --white: #fff;
  --soft-blue: #eaf2ff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--back);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; line-height: 1.6; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:enabled { cursor: pointer; }
:focus-visible { outline: 3px solid #3979de; outline-offset: 4px; }
[hidden] { display: none !important; }

.page-shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 750; color: var(--ink); white-space: nowrap; }
.brand-mark { position: relative; flex: none; width: 35px; height: 35px; border-radius: 8px; background: var(--blue); }
.brand-mark::before, .brand-mark::after { position: absolute; top: 10px; width: 9px; height: 14px; border: 1.5px solid white; content: ""; }
.brand-mark::before { left: 9px; border-radius: 2px 0 0 2px; transform: skewY(12deg); }
.brand-mark::after { right: 8px; border-radius: 0 2px 2px 0; transform: skewY(-12deg); }
.top-nav { display: flex; align-items: center; gap: 30px; font-size: 14px; white-space: nowrap; }
.top-nav a { padding-block: 9px; color: var(--muted); }
.top-nav a:hover { color: var(--blue); }
.skip-link { position: absolute; left: 10px; top: 8px; padding: 7px 14px; background: var(--white); z-index: 3; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.course-banner { margin-block: 28px 24px; padding: 30px 40px 32px; position: relative; overflow: hidden; isolation: isolate; border: 1px solid #d7e5fa; border-radius: 14px; background: linear-gradient(105deg, #f8fbff, #e8f1ff 74%, #dceaff); }
.banner-content { position: relative; z-index: 1; }
.edition { color: var(--blue); font-size: 14px; font-weight: 750; letter-spacing: .1em; margin-bottom: 4px; }
.course-banner h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.36; letter-spacing: -.035em; font-weight: 800; color: #143665; }
.course-meta { font-size: 14px; color: #4b6586; margin-top: 11px; }
.course-meta span { margin-inline: 6px; }
.banner-art { width: min(39%, 385px); position: absolute; top: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 38%); }
.banner-art span { position: absolute; display: block; height: 112px; width: 420px; border: 1px solid #9abdf2; border-radius: 34px; transform: rotate(-29deg); right: -73px; bottom: -51px; background: linear-gradient(110deg, #c4dcff03, #a4caff48); }
.banner-art span:nth-child(2) { bottom: -16px; right: -91px; background: transparent; }
.banner-art span:nth-child(3) { bottom: 20px; right: -129px; background: transparent; }

.learning-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(270px, 310px); grid-template-areas: "stage catalog"; gap: 20px; }
.catalog, .stage { border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.catalog { grid-area: catalog; padding: 21px 15px 15px; }
.catalog h2 { margin: 0 9px 12px; font-size: 18px; }
.lessons { display: grid; gap: 5px; }
.lesson-link { color: var(--ink); display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; gap: 11px; padding: 12px 9px; border: 1px solid transparent; border-radius: 8px; min-width: 0; }
.lesson-link:hover { background: #f5f8fd; }
.lesson-link[aria-current="true"] { background: var(--soft-blue); border-color: #ccddf8; }
.course-number { display: grid; place-items: center; width: 36px; height: 34px; border-radius: 6px; font-size: 14px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; background: #f1f5fb; color: #496687; }
.lesson-link[aria-current="true"] .course-number { color: white; background: var(--blue); }
.lesson-link[aria-current="true"] .catalog-title { color: var(--blue-dark); }
.catalog-title, .catalog-short { display: block; font-weight: 680; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-duration { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.catalog-short { display: none; }

.stage { grid-area: stage; min-width: 0; padding: 24px; }
.lesson-index { color: var(--blue); font-size: 13px; font-weight: 740; margin-bottom: 3px; }
.stage h2 { font-size: clamp(21px, 2.4vw, 29px); line-height: 1.35; letter-spacing: -.025em; margin-bottom: 17px; overflow-wrap: anywhere; }
.player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 9px; border: 1px solid #dce6f1; background: #142236; }
.player video, .play-cover, .play-cover img { display: block; width: 100%; height: 100%; }
.player video, .play-cover img { object-fit: contain; }
.play-cover { border: 0; padding: 0; position: relative; isolation: isolate; background: #edf4ff; }
.play-cover:focus-visible { outline-offset: -4px; }
.play-cover::after { position: absolute; inset: 0; z-index: 0; content: ""; background: linear-gradient(to top, #0c387c48, transparent 42%); }
.play-action { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 8px 19px 8px 8px; border-radius: 100px; white-space: nowrap; background: #fff; color: var(--blue-dark); font-size: 15px; font-weight: 750; box-shadow: 0 8px 25px #143d7440; }
.play-cover:hover .play-action { background: #ecf4ff; }
.play-disc { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--blue); }
.play-disc i { width: 0; height: 0; border-block: 7px solid transparent; border-left: 11px solid white; margin-left: 3px; }
.stage-meta { display: flex; align-items: center; gap: 15px; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.quality-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3979ce; margin-right: 6px; vertical-align: .09em; }
.player-message { color: #9e301e; font-size: 14px; margin-top: 10px; }
.lesson-summary { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 15px; }
.lesson-summary h3, .resource-card h3 { font-size: 16px; }
.lesson-summary p { color: var(--muted); font-size: 15px; margin-top: 5px; }
.topics { list-style: none; display: flex; padding: 0; margin: 13px 0 0; flex-wrap: wrap; gap: 7px; }
.topics li { color: #315c91; border-radius: 5px; background: #f0f5fd; padding: 3px 9px; font-size: 13px; }

.resources { margin-block: 26px 44px; }
.section-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.section-head h2 { font-size: 22px; }
.section-head > span { font-size: 14px; color: var(--muted); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-card { position: relative; min-width: 0; padding: 17px 16px 18px 60px; background: var(--white); border: 1px solid var(--line); border-radius: 11px; }
.resource-card p, .resource-card small { font-size: 13px; color: var(--muted); margin-top: 2px; }
.resource-card small { display: block; margin-top: 8px; }
.resource-card > .action, .resource-card > .resource-actions { margin-top: 11px; }
.resource-icon { position: absolute; top: 17px; left: 15px; width: 34px; height: 34px; color: var(--blue); background: var(--soft-blue); border-radius: 7px; }
.resource-icon::before, .resource-icon::after { position: absolute; content: ""; }
.icon-video::before { top: 10px; left: 7px; width: 20px; height: 14px; border: 1.5px solid; border-radius: 3px; }
.icon-video::after { top: 14px; left: 15px; border-block: 3.5px solid transparent; border-left: 5px solid; }
.icon-document::before { top: 8px; left: 11px; width: 13px; height: 18px; border: 1.5px solid; border-radius: 2px; }
.icon-document::after { top: 14px; left: 14px; width: 7px; height: 5px; border-block: 1.5px solid; }
.icon-folder::before { top: 13px; left: 7px; width: 21px; height: 12px; border: 1.5px solid; border-radius: 2px; }
.icon-folder::after { top: 9px; left: 8px; width: 10px; height: 5px; border: 1.5px solid; border-bottom: 0; border-radius: 2px 3px 0 0; }
.resource-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.action { display: inline-flex; justify-content: center; align-items: center; min-height: 41px; border: 1px solid #cbdcf6; border-radius: 7px; background: white; color: var(--blue-dark); font-size: 13px; font-weight: 700; line-height: 1.3; padding: 8px 12px; white-space: nowrap; }
.action:hover { background: #eff5ff; }
.action.primary { background: var(--blue); border-color: var(--blue); color: white; }
.action.primary:hover { background: var(--blue-dark); }
.action:disabled { opacity: .58; }
.download-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); font-size: 14px; }
.download-feedback progress { width: min(240px, 100%); accent-color: var(--blue); }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 20px; font-size: 13px; color: var(--muted); }

.reader { border: 1px solid var(--line); padding: 0; border-radius: 13px; background: var(--back); width: min(900px, calc(100% - 24px)); height: min(91dvh, 1000px); max-height: 91dvh; color: var(--ink); }
.reader[open] { display: flex; flex-direction: column; }
.reader::backdrop { background: #12294980; }
body:has(.reader[open]) { overflow: hidden; }
.reader-head { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 10px; background: white; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.reader-head p { font-size: 12px; color: var(--muted); }
.reader-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 12px; }
.reader-scroll img { display: block; width: 100%; height: auto; max-width: 810px; margin: 0 auto 12px; border: 1px solid var(--line); background: white; }

@media (max-width: 850px) {
  .page-shell { width: calc(100% - 40px); }
  .learning-grid { grid-template-columns: minmax(0, 1fr) 235px; gap: 12px; }
  .stage { padding: 18px; }
  .catalog { padding-inline: 10px; }
  .resource-card { padding-left: 15px; }
  .resource-icon { position: relative; display: block; top: auto; left: auto; margin-bottom: 7px; }
}

@media (max-width: 650px) {
  .page-shell { width: calc(100% - 28px); }
  .header-inner { height: 56px; gap: 8px; }
  .brand-mark { scale: .85; transform-origin: left center; margin-right: -4px; }
  .wordmark { font-size: 15px; gap: 5px; }
  .top-nav { gap: 13px; font-size: 13px; }
  .course-banner { margin-block: 15px 12px; padding: 16px 15px 17px; border-radius: 10px; }
  .course-banner h1 { font-size: clamp(23px, 6.3vw, 31px); max-width: 16em; }
  .edition, .course-meta { font-size: 13px; }
  .course-meta { margin-top: 6px; }
  .banner-art { opacity: .48; }
  .learning-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "catalog" "stage"; }
  .catalog { padding: 10px; border-radius: 10px; }
  .catalog h2 { margin: 0 3px 6px; font-size: 15px; }
  .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .lesson-link { grid-template-columns: 29px minmax(0, 1fr); align-items: center; gap: 6px; padding: 7px; min-height: 46px; background: #f8fafd; }
  .course-number { width: 27px; height: 27px; font-size: 12px; }
  .catalog-short { display: block; font-size: 12px; }
  .catalog-title, .catalog-duration { display: none; }
  .lesson-link[aria-current="true"] .catalog-short { color: var(--blue-dark); }
  .stage { padding: 14px; border-radius: 10px; }
  .stage h2 { margin-bottom: 12px; }
  .play-action { font-size: 14px; gap: 8px; padding: 6px 13px 6px 6px; }
  .play-disc { width: 33px; height: 33px; }
  .resources { margin-block: 18px 27px; }
  .section-head h2 { font-size: 19px; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .resource-card { padding: 12px 12px 13px 55px; }
  .resource-icon { position: absolute; top: 13px; left: 11px; }
  .resource-card > .action, .resource-card > .resource-actions { margin-top: 7px; }
  .reader-head { padding: 8px; }
  .reader-head .action { padding-inline: 7px; }
  .reader-scroll { padding: 5px; }
}
