:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #162a40;
  background: #f3f6fa;
  --navy: #12263d;
  --muted: #506176;
  --line: #dce4ed;
  --accent: #2465ba;
  --paper: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #bf6c14; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; width: 100%; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 5;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--navy);
  transform: translateY(calc(-100% - 10px));
}
.skip-link:focus { transform: none; }

.masthead { background: var(--navy); color: #fff; }
.masthead-content {
  display: flex;
  min-height: 66px;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: 28px;
  gap: 34px;
  align-items: stretch;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 700; white-space: nowrap; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #377cc9;
}
.brand-mark > span {
  position: relative;
  width: 17px;
  height: 20px;
  background: #f6fbff;
  clip-path: polygon(50% 0, 100% 20%, 94% 63%, 79% 85%, 50% 100%, 21% 85%, 6% 63%, 0 20%);
}
.brand-mark > span::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 5px;
  height: 8px;
  border: solid #2e6eb6;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
  content: "";
}
.masthead-nav { display: flex; }
.masthead-nav a {
  display: inline-flex;
  align-items: center;
  padding: 2px 17px 0;
  border-bottom: 3px solid #7eb7fd;
  color: #e9f3ff;
  font-size: 14px;
  font-weight: 650;
}
.masthead-nav a:hover { background: #203950; }

.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: calc(100vh - 66px);
  max-width: 1560px;
  margin-inline: auto;
}
.sidebar { border-right: 1px solid var(--line); background: #f9fbfd; }
.sidebar-content { position: sticky; top: 0; display: grid; gap: 5px; padding: 34px 18px; }
.sidebar-heading { margin: 0 0 10px 12px; color: var(--muted); font-size: 14px; font-weight: 650; }
.sidebar a { padding: 11px 12px; border-radius: 6px; color: #314762; font-size: 15px; line-height: 1.45; }
.sidebar a:hover { background: #eaf1f9; }
.sidebar a[aria-current] { background: #e6effa; color: #164f9a; font-weight: 700; box-shadow: inset 3px 0 #3276c6; }

.main { min-width: 0; padding: 30px clamp(22px, 3.1vw, 48px) 32px; }
#course, #film, #scenes, .scene { scroll-margin-top: 22px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: var(--muted); font-size: 14px; }
.breadcrumbs a:hover { color: #185ba7; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs > span[aria-hidden] { color: #798b9e; }
.breadcrumbs > span[aria-current] { color: #314762; }
h1 { font-size: clamp(30px, 3.1vw, 43px); font-weight: 780; letter-spacing: -.025em; line-height: 1.25; }
.title-dot { margin-inline: .08em; color: #316eb5; }
.intro { margin: 12px 0 24px; color: var(--muted); font-size: 16px; line-height: 1.75; }

.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 29%); align-items: start; gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.panel-heading { display: flex; min-height: 57px; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.panel-heading h2 { font-size: 17px; font-weight: 720; line-height: 1.4; }
.film { overflow: hidden; }
.film .panel-heading { padding-inline: 16px; }
.duration { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.clock-icon { position: relative; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.clock-icon::after { position: absolute; top: 2px; left: 5px; width: 3px; height: 4px; border: solid currentColor; border-width: 0 0 1px 1px; content: ""; }
.player { position: relative; aspect-ratio: 16 / 9; background: #17232f; }
.player video { height: 100%; object-fit: contain; }
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(54px, 6vw, 76px);
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid #ffffffc9;
  border-radius: 50%;
  background: #12263dcf;
  color: #fff;
  cursor: pointer;
}
.play-button:hover { background: #1a5da8; }
.play-button span { margin-left: 4px; border: solid transparent; border-width: 11px 0 11px 17px; border-left-color: currentColor; }
.play-feedback { padding: 12px 16px; color: var(--muted); font-size: 14px; }
.play-feedback a { color: #185ba7; text-decoration: underline; }

.takeaways .panel-heading { border-bottom: 1px solid var(--line); }
.takeaway-list { list-style: none; margin: 0; padding: 0 14px; }
.takeaway-list li + li { border-top: 1px solid #e7edf3; }
.takeaway-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) 10px; gap: 10px; align-items: center; min-height: 78px; padding: 11px 2px; }
.takeaway-list a:hover strong { color: #185ba7; text-decoration: underline; text-underline-offset: 3px; }
.scene-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; font-size: 15px; font-weight: 750; }
.fire-mark { background: #faeee4; color: #8c461c; }
.power-mark { background: #e8effa; color: #235897; }
.lobby-mark { background: #e5f1ef; color: #236357; }
.takeaway-text { display: grid; gap: 3px; line-height: 1.5; }
.takeaway-text strong { font-size: 15px; font-weight: 710; }
.takeaway-text > span { color: var(--muted); font-size: 14px; }
.down-icon { width: 7px; height: 7px; margin-top: -3px; border: solid #5f7690; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.scenes { margin-top: 28px; }
.section-title { margin-bottom: 14px; font-size: 22px; line-height: 1.4; }
.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scene { overflow: hidden; }
.scene:target { border-color: #3975c2; box-shadow: 0 0 0 2px #3975c233; }
.scene img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #e3eaf2; }
.scene-body { padding: 15px; }
.scene-body h3 { margin-bottom: 6px; font-size: 17px; line-height: 1.4; }
.scene-body p { color: var(--muted); font-size: 16px; line-height: 1.7; }

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 15px 18px;
  border: 1px solid #d7e4f4;
  border-left: 3px solid #3b7cc9;
  border-radius: 6px;
  background: #eaf1fa;
}
.course-footer p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; line-height: 1.55; }
.course-footer p span { color: var(--muted); font-size: 14px; }
.course-footer a { flex: none; padding: 6px 0; color: #1b559c; font-size: 14px; }
.course-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1140px) {
  .layout { grid-template-columns: 182px minmax(0, 1fr); }
  .main { padding-inline: 24px; }
  .lesson-grid { grid-template-columns: minmax(0, 1fr) 248px; gap: 16px; }
}

@media (max-width: 920px) {
  .layout { display: block; min-height: 0; }
  .sidebar { position: sticky; top: 0; z-index: 2; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar-content { position: static; display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 7px 24px; }
  .sidebar-heading { display: none; }
  .sidebar a { min-height: 44px; }
  .sidebar a[aria-current] { box-shadow: none; }
  #course, #film, #scenes, .scene { scroll-margin-top: 78px; }
}

@media (max-width: 690px) {
  .masthead-content { min-height: 57px; gap: 8px; justify-content: space-between; padding-inline: 16px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .masthead-nav a { padding-inline: 7px; }
  .sidebar-content { padding: 5px 12px; }
  .sidebar a { display: flex; align-items: center; padding: 8px; font-size: 14px; }
  .main { padding: 20px 16px 24px; }
  .breadcrumbs { margin-bottom: 9px; }
  h1 { font-size: clamp(24px, 7.1vw, 35px); }
  .intro { margin: 9px 0 17px; }
  .lesson-grid, .scene-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-heading { min-height: 51px; }
  .scenes { margin-top: 22px; }
  .course-footer { align-items: start; margin-top: 17px; padding: 12px; }
}
